|
ARTS
2.3.1285(git:92a29ea9-dirty)
|
#include <array>#include <iostream>#include <map>#include <numeric>#include <stdexcept>#include "array.h"#include "interpolation.h"#include "matpack.h"#include "mystring.h"#include "rational.h"Go to the source code of this file.
Classes | |
| class | QuantumNumbers |
| Container class for Quantum Numbers. More... | |
| class | QuantumIdentifier |
| Class to identify and match lines by their quantum numbers. More... | |
Macros | |
| #define | INPUT_QUANTUM(ID) if (s == #ID) return QuantumNumberType::ID |
| #define | INPUT_QUANTUM(ID) if (s == QuantumNumberType::ID) return #ID |
Typedefs | |
| typedef Array< QuantumNumbers > | ArrayOfQuantumNumbers |
| typedef Array< QuantumIdentifier > | ArrayOfQuantumIdentifier |
Functions | |
| QuantumNumberType | string2quantumnumbertype (const String &s) |
| String | quantumnumbertype2string (QuantumNumberType s) |
| bool | operator== (const QuantumIdentifier &a, const QuantumIdentifier &b) |
| Is everything the same between the identifiers. More... | |
| bool | operator!= (const QuantumIdentifier &a, const QuantumIdentifier &b) |
| Is anything different between the identifiers. More... | |
| bool | operator== (const QuantumNumbers &a, const QuantumNumbers &b) |
| Check if all quantum numbers are the same between a and b. More... | |
| bool | IsValidQuantumNumberName (String name) |
| Check for valid quantum number name. More... | |
| void | ThrowIfQuantumNumberNameInvalid (String name) |
| Check for valid quantum number name and throws if it is invalid. More... | |
| std::istream & | operator>> (std::istream &is, QuantumNumbers &qn) |
| Input operator. More... | |
| std::ostream & | operator<< (std::ostream &os, const QuantumNumbers &qn) |
| Output operator. More... | |
| std::ostream & | operator<< (std::ostream &os, const QuantumIdentifier &qi) |
| Output operator. More... | |
| std::ostream & | operator<< (std::ostream &os, QuantumNumberType t) |
| void | update_id (QuantumIdentifier &qid, const std::vector< std::array< String, 2 > > &upper_list, const std::vector< std::array< String, 2 > > &lower_list) |
| Updates the quantum identifier based on a lists of strings. More... | |
| #define INPUT_QUANTUM | ( | ID | ) | if (s == #ID) return QuantumNumberType::ID |
Referenced by quantumnumbertype2string(), and string2quantumnumbertype().
| #define INPUT_QUANTUM | ( | ID | ) | if (s == QuantumNumberType::ID) return #ID |
| typedef Array<QuantumNumbers> ArrayOfQuantumNumbers |
|
strong |
Enum for Quantum Numbers used for indexing.
If you add anything here, remember to also adapt operator<<(ostream&, const QuantumNumbers&) and operator>>(istream&, QuantumNumbers&) to handle the added numbers.
| bool IsValidQuantumNumberName | ( | String | name | ) |
Check for valid quantum number name.
| [in] | name | Parameter |
Definition at line 164 of file quantum.cc.
References FINAL_ENTRY, and string2quantumnumbertype().
Referenced by string2vecqn(), and ThrowIfQuantumNumberNameInvalid().
|
inline |
Is anything different between the identifiers.
May throw if different Qtypes are compared.
| [in] | a | One identifier |
| [in] | b | Another identifier |
Definition at line 732 of file quantum.h.
References operator==().
Referenced by Iterator1D::operator!=().
| std::ostream& operator<< | ( | std::ostream & | os, |
| const QuantumNumbers & | qn | ||
| ) |
Output operator.
Definition at line 187 of file quantum.cc.
References FINAL_ENTRY, i, and quantumnumbertype2string().
| std::ostream& operator<< | ( | std::ostream & | os, |
| const QuantumIdentifier & | qi | ||
| ) |
Output operator.
Definition at line 361 of file quantum.cc.
References QuantumIdentifier::ALL, QuantumIdentifier::ENERGY_LEVEL, QuantumIdentifier::ENERGY_LEVEL_INDEX, SpeciesRecord::Isotopologue(), QuantumIdentifier::Isotopologue(), SpeciesRecord::Name(), Array< base >::nelem(), QuantumIdentifier::NONE, QuantumIdentifier::QuantumMatch(), QuantumIdentifier::Species(), global_data::species_data, QuantumIdentifier::TRANSITION, QuantumIdentifier::TRANSITION_LOWER_INDEX, QuantumIdentifier::TRANSITION_UPPER_INDEX, and QuantumIdentifier::Type().
| std::ostream& operator<< | ( | std::ostream & | os, |
| QuantumNumberType | t | ||
| ) |
Definition at line 409 of file quantum.cc.
References quantumnumbertype2string().
|
inline |
Is everything the same between the identifiers.
May throw if different Qtypes are compared.
| [in] | a | One identifier |
| [in] | b | Another identifier |
Definition at line 702 of file quantum.h.
References QuantumIdentifier::ALL, QuantumIdentifier::ENERGY_LEVEL, QuantumIdentifier::ENERGY_LEVEL_INDEX, QuantumIdentifier::Isotopologue(), QuantumIdentifier::NONE, QuantumIdentifier::QuantumMatch(), QuantumIdentifier::Species(), QuantumIdentifier::TRANSITION, QuantumIdentifier::TRANSITION_LOWER_INDEX, QuantumIdentifier::TRANSITION_UPPER_INDEX, and QuantumIdentifier::Type().
Referenced by RetrievalQuantity::operator!=(), Iterator1D::operator!=(), and operator!=().
|
inline |
Check if all quantum numbers are the same between a and b.
| [in] | a | One set of quantum numbers |
| [in] | b | Another set of quantum numbers |
Definition at line 743 of file quantum.h.
References QuantumNumbers::Compare().
| std::istream& operator>> | ( | std::istream & | is, |
| QuantumNumbers & | qn | ||
| ) |
|
inline |
Definition at line 162 of file quantum.h.
References alpha, C, dJ, dN, ElectronState, F, i, INPUT_QUANTUM, J, Ka, Kc, kronigParity, l1, l10, l11, l12, l2, l3, l4, l5, l6, l7, l8, l9, Lambda, M, N, n, n_global, Omega, parity, pm, r, S, S_global, Sym, tau, v1, v10, v11, v12, v2, v3, v4, v5, v6, v7, v8, and v9.
Referenced by abs_linesPrintDefinedQuantumNumbers(), ArtsXMLTag::add_attribute(), Absorption::Lines::MetaData(), and operator<<().
|
inline |
Definition at line 101 of file quantum.h.
References alpha, C, dJ, dN, ElectronState, F, FINAL_ENTRY, i, INPUT_QUANTUM, J, Ka, Kc, kronigParity, l1, l10, l11, l12, l2, l3, l4, l5, l6, l7, l8, l9, Lambda, M, N, n, n_global, Omega, parity, pm, r, S, S_global, Sym, tau, v1, v10, v11, v12, v2, v3, v4, v5, v6, v7, v8, and v9.
Referenced by abs_linesDeleteLinesWithQuantumNumberAbove(), abs_linesSetQuantumNumberForMatch(), ArtsXMLTag::get_attribute_value(), IsValidQuantumNumberName(), QuantumNumbers::Set(), string2quantumnumbersindex(), string2vecqn(), and update_id().
| void ThrowIfQuantumNumberNameInvalid | ( | String | name | ) |
Check for valid quantum number name and throws if it is invalid.
| [in] | name | Parameter |
Definition at line 168 of file quantum.cc.
References IsValidQuantumNumberName(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by QuantumIdentifier::SetFromString().
| void update_id | ( | QuantumIdentifier & | qid, |
| const std::vector< std::array< String, 2 > > & | upper_list, | ||
| const std::vector< std::array< String, 2 > > & | lower_list | ||
| ) |
Updates the quantum identifier based on a lists of strings.
The input lists of strings should be paired as {key, value}
| [in,out] | qid | Identifier to update |
| [in] | upper_list | List of strings to update upper state |
| [in] | lower_list | List of strings to update lower state |
Definition at line 435 of file quantum.cc.
References FINAL_ENTRY, interpret_stringdata(), QuantumIdentifier::LowerQuantumNumber(), RATIONAL_UNDEFINED, string2quantumnumbertype(), and QuantumIdentifier::UpperQuantumNumber().