ARTS 2.5.11 (git: 6827797f)
|
Classes | |
struct | CheckMatch |
Status of comparing two lists that are supposedly of some type. More... | |
struct | GlobalState |
A logical struct for global quantum numbers with species identifiers. More... | |
struct | HalfIntegerValue |
Holds half integer values, but only its denominator. More... | |
struct | IntegerValue |
Holds integer values. More... | |
struct | LevelMatch |
Struct that converts to bool automatically but allows checking both energy levels matching status. More... | |
struct | LevelTest |
struct | LocalState |
A logical struct for local quantum numbers. More... | |
struct | StateMatch |
StateMatchType operates so that a check less than a level should be 'better', bar None. More... | |
struct | StringValue |
Holds string values but can only hold sizeof(Index) long values. More... | |
struct | TwoLevelValueHolder |
The values of two levels. More... | |
struct | Value |
A complete quantum number value with type information. More... | |
struct | ValueDescription |
A complete description of a value, its type and value. More... | |
union | ValueHolder |
A union of the three type of values we need to consider. More... | |
class | ValueList |
A list of many quantum numbers. Should always remain sorted. More... | |
Functions | |
std::ostream & | operator<< (std::ostream &os, ValueDescription x) |
std::ostream & | operator<< (std::ostream &os, Value x) |
std::istream & | operator>> (std::istream &is, Value &x) |
std::pair< std::string_view, String > | fix_legacy (std::string_view key, std::string_view val) |
Fix legacy catalog, where some values are rationals even though they shouldn't be. | |
constexpr std::pair< std::string_view, std::string_view > | split_hitran_qn (std::string_view x) |
Returns some input "ASDASDS=asdAS" as ["ASDASDS", "asdAS"] for Hitran online data. | |
ValueList | from_hitran (std::string_view upp, std::string_view low) |
std::ostream & | operator<< (std::ostream &os, const ValueList &vl) |
std::istream & | operator>> (std::istream &is, ValueList &vl) |
std::ostream & | operator<< (std::ostream &os, const GlobalState &gs) |
std::istream & | operator>> (std::istream &is, GlobalState &gs) |
bool | vamdcCheck (const ValueList &l, VAMDC type) ARTS_NOEXCEPT |
std::ostream & | operator<< (std::ostream &os, const LocalState &vl) |
std::istream & | operator>> (std::istream &is, LocalState &vl) |
ENUMCLASS (Type, char, alpha, config, ElecStateLabel, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, I, J, K, Ka, Kc, L, Lambda, N, Omega, S, Sigma, SpinComponentLabel, asSym, elecInv, elecRefl, elecSym, kronigParity, l, l1, l10, l11, l12, l2, l3, l4, l5, l6, l7, l8, l9, n, parity, r, rotSym, rovibSym, sym, tau, term, v, v1, v10, v11, v12, v2, v3, v4, v5, v6, v7, v8, v9, vibInv, vibRefl, vibSym) const expr ValueType common_value_type(Type type) noexcept | |
Three tags, S: str, I: index, H: half-index. | |
constexpr ValueType | common_value_type (ValueType a, ValueType b) noexcept |
Return a common type between a and b. | |
constexpr std::strong_ordering | cmp (std::strong_ordering &&a, std::strong_ordering &&b) |
constexpr ValueDescription | value_holder (Rational r_) |
Takes a rational and determine which type of quantum number it is, returning this information or throwing a runtime error if there's an error. | |
constexpr Rational | cast_qnrat (std::string_view s) noexcept |
Returns a rational if possible or RATIONAL_UNDEFINED otherwise. | |
constexpr ValueDescription | value_holder (std::string_view s, Type t) |
Returns a value description for the quantum number. | |
constexpr Index | count_items (std::string_view s) noexcept |
Count all space-separated items in s. | |
constexpr std::string_view | rstrip (std::string_view x) |
Strips spaces at the end of x before returning it. | |
constexpr std::string_view | lstrip (std::string_view x) |
Strips spaces at the beginning x before returning it. | |
constexpr std::string_view | strip (std::string_view x) |
Strips spaces at the beginning and end of x before returning it. | |
template<std::size_t n = 1> | |
constexpr std::string_view | items (std::string_view s, std::size_t i) noexcept |
Get a view of a number of space-separated items from the list. | |
constexpr CheckValue | update (CheckValue val, CheckValue res) noexcept |
Updates old by what a new check says it should be. | |
constexpr CheckMatch | update (CheckMatch val, CheckValue res) noexcept |
Updates old by what a new check says it should be. | |
constexpr CheckMatch | update (CheckMatch val, CheckMatch res) noexcept |
Updates old by what a new check says it should be. | |
template<size_t N> | |
constexpr bool | is_sorted (const std::array< Type, N > &types) noexcept |
Checks if an array of types is sorted. | |
ENUMCLASS (VAMDC, char, asymcs, asymos, dcs, hunda, hundb, lpcs, lpos, ltcs, ltos, nltcs, nltos, sphcs, sphos, stcs) bool vamdcCheck(const ValueList &l | |
VAMDC classes of quantum number cases. | |
Variables | |
VAMDC type | ARTS_NOEXCEPT |
constexpr std::array | global_types |
A default state of global quantum numbers. | |
constexpr std::array | local_types |
A default state of local quantum numbers. | |
|
constexprnoexcept |
Returns a rational if possible or RATIONAL_UNDEFINED otherwise.
Spaces are not allowed and results in RATIONAL_UNDEFINED being returns
Also only accepts rationals that match how quantum numbers are defined, so half or full integers, in case a decimal string is given. Note also that only a single decimal value can be given
If the rational is not a full integer or a half-integer, returns RATIONAL_UNDEFINED
s | Some view of a string |
Definition at line 494 of file quantum_numbers.h.
References d, Quantum::Number::ValueHolder::i, nonstd::isdigit(), and Quantum::Number::ValueHolder::s.
Referenced by value_holder().
|
constexpr |
Definition at line 396 of file quantum_numbers.h.
Referenced by Quantum::Number::TwoLevelValueHolder::order().
|
constexprnoexcept |
Return a common type between a and b.
If they are the same, returns the value If either is H and the other is I, returns H Otherwise returns FINAL as an error flag
a | A value type |
b | Another value type |
Definition at line 341 of file quantum_numbers.h.
Referenced by Quantum::Number::Value::level_match(), Quantum::Number::Value::low(), Absorption::Lines::max(), Quantum::Number::Value::operator<=>(), Quantum::Number::Value::read(), Quantum::Number::Value::str_low(), Quantum::Number::Value::str_upp(), Quantum::Number::TwoLevelValueHolder::TwoLevelValueHolder(), Quantum::Number::Value::upp(), Quantum::Number::Value::Value(), value_holder(), and Quantum::Number::Value::write().
|
constexprnoexcept |
Count all space-separated items in s.
Example: "X 1 3123 1/3 1,,,,,2 " returns 5
s | Any set of characters |
Definition at line 623 of file quantum_numbers.h.
References nonstd::isspace(), and Quantum::Number::ValueHolder::s.
Referenced by Quantum::Number::GlobalState::GlobalState(), Quantum::Number::Value::Value(), Quantum::Number::ValueList::ValueList(), and xml_read_from_stream().
|
noexcept |
Three tags, S: str, I: index, H: half-index.
Different types of quantum numbers according to VAMDC with some unbounded counted up to 12 times Common value type of a given quantum number type
Guards against integer/half-integer comparisons failing for bad reasons and allows IO to not need some information
Keep new entries to a 1-to-1 key-to-key match, and sort them the same as Type for ease of reading
type | A quantum number type |
Definition at line 100 of file quantum_numbers.h.
Quantum::Number::ENUMCLASS | ( | VAMDC | , |
char | , | ||
asymcs | , | ||
asymos | , | ||
dcs | , | ||
hunda | , | ||
hundb | , | ||
lpcs | , | ||
lpos | , | ||
ltcs | , | ||
ltos | , | ||
nltcs | , | ||
nltos | , | ||
sphcs | , | ||
sphos | , | ||
stcs | |||
) | const & |
VAMDC classes of quantum number cases.
Checks if a ValueList can belong to a given VAMDC type by ensuring it cannot have some quantum numbers
l | A list of values |
type | A type of VAMDC molecular model |
std::pair< std::string_view, String > Quantum::Number::fix_legacy | ( | std::string_view | key, |
std::string_view | val | ||
) |
Fix legacy catalog, where some values are rationals even though they shouldn't be.
Definition at line 60 of file quantum_numbers.cc.
References ARTS_USER_ERROR.
Referenced by Quantum::Number::ValueList::ValueList().
ValueList Quantum::Number::from_hitran | ( | std::string_view | upp, |
std::string_view | low | ||
) |
Definition at line 240 of file quantum_numbers.cc.
References Quantum::Number::ValueList::add(), ARTS_USER_ERROR_IF, Quantum::Number::ValueList::has(), Quantum::Number::Value::set(), Quantum::Number::ValueList::set(), split_hitran_qn(), strip(), and v.
Referenced by Absorption::ReadFromHitranOnlineStream().
|
constexprnoexcept |
Checks if an array of types is sorted.
N | Number of types |
types | Array of types |
Definition at line 891 of file quantum_numbers.h.
References Quantum::Number::ValueHolder::i.
Referenced by Quantum::Number::ValueList::has().
|
constexprnoexcept |
Get a view of a number of space-separated items from the list.
Example: "X 1 3123 1/3 1,,,,,2 " with i=0, n=3 returns "X 1 3123" Example: "X 1 3123 1/3 1,,,,,2 " with i=2, n=3 returns "3123 1/3 1,,,,,2" Example: "X 1 3123 1/3 1,,,,,2 " with i=4, n=3 returns "1,,,,,2" Example: "X 1 3123 1/3 1,,,,,2 " with i=5, n=3 returns ""
n | Number of items |
s | Any set of characters |
i | The first item from the original list in the list of n items |
Definition at line 682 of file quantum_numbers.h.
References Quantum::Number::ValueHolder::i, nonstd::isspace(), and Quantum::Number::ValueHolder::s.
Referenced by Quantum::Number::GlobalState::GlobalState(), Quantum::Number::Value::Value(), Quantum::Number::ValueList::ValueList(), and xml_read_from_stream().
|
constexpr |
Strips spaces at the beginning x before returning it.
x | any string view |
Definition at line 655 of file quantum_numbers.h.
References nonstd::isspace().
Referenced by strip().
std::ostream & Quantum::Number::operator<< | ( | std::ostream & | os, |
const GlobalState & | gs | ||
) |
Definition at line 413 of file quantum_numbers.cc.
std::ostream & Quantum::Number::operator<< | ( | std::ostream & | os, |
const LocalState & | vl | ||
) |
Definition at line 982 of file quantum_numbers.cc.
std::ostream & Quantum::Number::operator<< | ( | std::ostream & | os, |
const ValueList & | vl | ||
) |
Definition at line 360 of file quantum_numbers.cc.
std::ostream & Quantum::Number::operator<< | ( | std::ostream & | os, |
Value | x | ||
) |
Definition at line 35 of file quantum_numbers.cc.
std::ostream & Quantum::Number::operator<< | ( | std::ostream & | os, |
ValueDescription | x | ||
) |
Definition at line 11 of file quantum_numbers.cc.
std::istream & Quantum::Number::operator>> | ( | std::istream & | is, |
GlobalState & | gs | ||
) |
Definition at line 417 of file quantum_numbers.cc.
std::istream & Quantum::Number::operator>> | ( | std::istream & | is, |
LocalState & | vl | ||
) |
Definition at line 986 of file quantum_numbers.cc.
std::istream & Quantum::Number::operator>> | ( | std::istream & | is, |
Value & | x | ||
) |
Definition at line 39 of file quantum_numbers.cc.
std::istream & Quantum::Number::operator>> | ( | std::istream & | is, |
ValueList & | vl | ||
) |
Definition at line 368 of file quantum_numbers.cc.
|
constexpr |
Strips spaces at the end of x before returning it.
x | any string view |
Definition at line 645 of file quantum_numbers.h.
References nonstd::isspace().
Referenced by strip().
|
constexpr |
Returns some input "ASDASDS=asdAS" as ["ASDASDS", "asdAS"] for Hitran online data.
Note that there is a special exception for F::XYZ values
x | A string |
Definition at line 228 of file quantum_numbers.cc.
References strip().
Referenced by from_hitran().
|
constexpr |
Strips spaces at the beginning and end of x before returning it.
x | any string view |
Definition at line 665 of file quantum_numbers.h.
References lstrip(), and rstrip().
Referenced by from_hitran(), and split_hitran_qn().
|
constexprnoexcept |
Updates old by what a new check says it should be.
Definition at line 879 of file quantum_numbers.h.
References update().
|
constexprnoexcept |
Updates old by what a new check says it should be.
Definition at line 874 of file quantum_numbers.h.
References update().
|
constexprnoexcept |
Updates old by what a new check says it should be.
Definition at line 864 of file quantum_numbers.h.
Referenced by Quantum::Number::ValueList::check_match(), and update().
|
constexpr |
Takes a rational and determine which type of quantum number it is, returning this information or throwing a runtime error if there's an error.
r_ | A rational |
Definition at line 460 of file quantum_numbers.h.
References Quantum::Number::ValueHolder::h, Quantum::Number::ValueHolder::i, quantum_number_error_value, Quantum::Number::ValueDescription::val, Quantum::Number::IntegerValue::x, and Quantum::Number::HalfIntegerValue::x.
Referenced by Quantum::Number::Value::set(), Quantum::Number::Value::Value(), and value_holder().
|
constexpr |
Returns a value description for the quantum number.
Note that several branches can throw as the input is assumed to be from the user
s | Some view of a string |
Definition at line 587 of file quantum_numbers.h.
References cast_qnrat(), common_value_type(), Quantum::Number::ValueHolder::s, Quantum::Number::ValueDescription::val, and value_holder().
bool Quantum::Number::vamdcCheck | ( | const ValueList & | l, |
VAMDC | type | ||
) |
Definition at line 425 of file quantum_numbers.cc.
Referenced by SimpleG().
VAMDC type Quantum::Number::ARTS_NOEXCEPT |
Definition at line 1141 of file quantum_numbers.h.
|
constexpr |
A default state of global quantum numbers.
Definition at line 1144 of file quantum_numbers.h.
|
constexpr |
A default state of local quantum numbers.
Definition at line 1197 of file quantum_numbers.h.