PyNE C++
|
Converts between naming conventions for reaction channels. More...
Classes | |
class | IndeterminateReactionForm |
Custom exception for declaring a value not to be of ambiquous reaction form. More... | |
class | NotAReaction |
Custom exception for declaring a value not to be a valid reaction. More... | |
Functions | |||||||||||
void * | _fill_maps () | ||||||||||
A helper function to set the contents of the variables in this library. | |||||||||||
int | offset (int dz, int da, int ds=0) | ||||||||||
A helper function to compute nuclide id offsets from z-, a-, and s- deltas. | |||||||||||
Hash Functions | |||||||||||
Custom hash function for reaction name to reaction ids. This functions will not return a value less than 1000, effectively reserving space for the MT numbers. | |||||||||||
unsigned int | hash (std::string s) | ||||||||||
unsigned int | hash (const char *s) | ||||||||||
Name Functions | |||||||||||
Returns the canonical name of a reaction channel.
| |||||||||||
std::string | name (int n) | ||||||||||
std::string | name (unsigned int n) | ||||||||||
std::string | name (char *s) | ||||||||||
std::string | name (std::string s) | ||||||||||
std::string | name (int from_nuc, int to_nuc, std::string z="n") | ||||||||||
std::string | name (int from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
std::string | name (std::string from_nuc, int to_nuc, std::string z="n") | ||||||||||
std::string | name (std::string from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
ID Functions | |||||||||||
Returns the recation id of a reaction channel. This id has been precomputed from the hash of the name.
| |||||||||||
unsigned int | id (int x) | ||||||||||
unsigned int | id (unsigned int x) | ||||||||||
unsigned int | id (const char *x) | ||||||||||
unsigned int | id (std::string x) | ||||||||||
unsigned int | id (int from_nuc, int to_nuc, std::string z="n") | ||||||||||
unsigned int | id (int from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
unsigned int | id (std::string from_nuc, int to_nuc, std::string z="n") | ||||||||||
unsigned int | id (std::string from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
MT Number Functions | |||||||||||
Returns the MT number of a reaction channel, if available.
| |||||||||||
unsigned int | mt (int x) | ||||||||||
unsigned int | mt (unsigned int x) | ||||||||||
unsigned int | mt (char *x) | ||||||||||
unsigned int | mt (std::string x) | ||||||||||
unsigned int | mt (int from_nuc, int to_nuc, std::string z="n") | ||||||||||
unsigned int | mt (int from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
unsigned int | mt (std::string from_nuc, int to_nuc, std::string z="n") | ||||||||||
unsigned int | mt (std::string from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
Label Functions | |||||||||||
Returns a short description of a reaction channel.
| |||||||||||
std::string | label (int x) | ||||||||||
std::string | label (unsigned int x) | ||||||||||
std::string | label (char *x) | ||||||||||
std::string | label (std::string x) | ||||||||||
std::string | label (int from_nuc, int to_nuc, std::string z="n") | ||||||||||
std::string | label (int from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
std::string | label (std::string from_nuc, int to_nuc, std::string z="n") | ||||||||||
std::string | label (std::string from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
Documentation Functions | |||||||||||
Returns a short description of a reaction channel.
| |||||||||||
std::string | doc (int x) | ||||||||||
std::string | doc (unsigned int x) | ||||||||||
std::string | doc (char *x) | ||||||||||
std::string | doc (std::string x) | ||||||||||
std::string | doc (int from_nuc, int to_nuc, std::string z="n") | ||||||||||
std::string | doc (int from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
std::string | doc (std::string from_nuc, int to_nuc, std::string z="n") | ||||||||||
std::string | doc (std::string from_nuc, std::string to_nuc, std::string z="n") | ||||||||||
Child Functions | |||||||||||
Returns the child nuclide comming from a parent for a reaction channel.
| |||||||||||
int | parent (int nuc, unsigned int rx, std::string z="n") | ||||||||||
int | parent (int nuc, std::string rx, std::string z="n") | ||||||||||
int | parent (std::string nuc, unsigned int rx, std::string z="n") | ||||||||||
int | parent (std::string nuc, std::string rx, std::string z="n") | ||||||||||
Parent Functions | |||||||||||
Returns the parent nuclide comming for a child and a given reaction channel.
| |||||||||||
int | child (int nuc, unsigned int rx, std::string z="n") | ||||||||||
int | child (int nuc, std::string rx, std::string z="n") | ||||||||||
int | child (std::string nuc, unsigned int rx, std::string z="n") | ||||||||||
int | child (std::string nuc, std::string rx, std::string z="n") | ||||||||||
Variables | |
std::string | _names [NUM_RX_NAMES] |
std::set< std::string > | names |
Set of reaction names, must be valid variable names. | |
std::map< unsigned int, std::string > | id_name |
Mapping from reaction ids to reaction names. | |
std::map< std::string, unsigned int > | name_id |
Mapping from reaction names to reaction ids. | |
std::map< std::string, unsigned int > | altnames |
Mapping between alternative names for reactions and the reaction id. | |
std::map< unsigned int, unsigned int > | id_mt |
Mapping from reaction ids to MT numbers. | |
std::map< unsigned int, unsigned int > | mt_id |
Mapping from MT numbers to reaction names. | |
std::map< unsigned int, std::string > | labels |
Mapping from reaction ids to labels (short descriptions). | |
std::map< unsigned int, std::string > | docs |
Mapping from reaction ids to documentation strings (long descriptions). | |
std::map< std::pair< std::string, int >, unsigned int > | offset_id |
std::map< std::pair< std::string, unsigned int >, int > | id_offset |
void * | _ = pyne::rxname::_fill_maps() |
A dummy variable used when calling _fill_maps(). | |
Converts between naming conventions for reaction channels.
std::string pyne::rxname::_names |
Raw array of reaction names
std::map< std::pair< std::string, unsigned int >, int > pyne::rxname::id_offset |
Mapping from particle type and reaction ids to offsets. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.
std::map< std::pair< std::string, int >, unsigned int > pyne::rxname::offset_id |
Mapping from particle type and offset pairs to reaction ids. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.