ARTS  2.4.0(git:4fb77825)
quantum.cc File Reference

Classes to handle quantum numbers. More...

#include "quantum.h"
#include <stdexcept>
#include "absorption.h"
#include "global_data.h"
#include "special_interp.h"

Go to the source code of this file.

Functions

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)
 
Rational interpret_stringdata (const QuantumNumberType key, const String &val)
 
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...
 

Detailed Description

Classes to handle quantum numbers.

Author
Oliver Lemke
Date
2013-04-12

Definition in file quantum.cc.

Function Documentation

◆ interpret_stringdata()

Rational interpret_stringdata ( const QuantumNumberType  key,
const String val 
)

Definition at line 414 of file quantum.cc.

References RATIONAL_UNDEFINED.

Referenced by update_id().

◆ IsValidQuantumNumberName()

bool IsValidQuantumNumberName ( String  name)

Check for valid quantum number name.

Parameters
[in]nameParameter
Returns
true If the parameter exist
false Otherwise

Definition at line 164 of file quantum.cc.

References J, and string2quantumnumbertype().

Referenced by string2vecqn(), and ThrowIfQuantumNumberNameInvalid().

◆ operator<<() [1/3]

◆ operator<<() [2/3]

std::ostream& operator<< ( std::ostream &  os,
const QuantumNumbers qn 
)

Output operator.

Definition at line 187 of file quantum.cc.

References J, and quantumnumbertype2string().

◆ operator<<() [3/3]

std::ostream& operator<< ( std::ostream &  os,
QuantumNumberType  t 
)

Definition at line 409 of file quantum.cc.

References quantumnumbertype2string().

◆ operator>>()

std::istream& operator>> ( std::istream &  is,
QuantumNumbers qn 
)

Input operator.

Definition at line 176 of file quantum.cc.

References QuantumNumbers::Set().

◆ ThrowIfQuantumNumberNameInvalid()

void ThrowIfQuantumNumberNameInvalid ( String  name)

Check for valid quantum number name and throws if it is invalid.

Parameters
[in]nameParameter

Definition at line 168 of file quantum.cc.

References IsValidQuantumNumberName().

Referenced by QuantumIdentifier::SetFromString().

◆ update_id()

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}

Parameters
[in,out]qidIdentifier to update
[in]upper_listList of strings to update upper state
[in]lower_listList 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().