| 
    ARTS
    2.4.0(git:4fb77825)
    
   | 
 
#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 | 
| #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 J, 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==().
| 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, | 
| const QuantumNumbers & | qn | ||
| ) | 
Output operator.
Definition at line 187 of file quantum.cc.
References J, and quantumnumbertype2string().
| 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 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 INPUT_QUANTUM, M, and N.
Referenced by abs_linesPrintDefinedQuantumNumbers(), ArtsXMLTag::add_attribute(), Absorption::Lines::MetaData(), and operator<<().
      
  | 
  inline | 
Definition at line 101 of file quantum.h.
References F, INPUT_QUANTUM, M, and N.
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().
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 interpret_stringdata(), J, QuantumIdentifier::LowerQuantumNumber(), RATIONAL_UNDEFINED, string2quantumnumbertype(), and QuantumIdentifier::UpperQuantumNumber().