pairinteraction
A Rydberg Interaction Calculator
pairinteraction::Ket Class Referenceabstract

Base class for a ket. More...

#include <Ket.hpp>

+ Inheritance diagram for pairinteraction::Ket:
+ Collaboration diagram for pairinteraction::Ket:

Data Structures

struct  hash
 

Public Member Functions

 Ket ()=delete
 
virtual ~Ket ()=default
 
bool has_quantum_number_f () const
 
bool has_quantum_number_m () const
 
bool has_parity () const
 
double get_energy () const
 
double get_quantum_number_f () const
 
double get_quantum_number_m () const
 
Parity get_parity () const
 
virtual std::string get_label () const =0
 

Protected Member Functions

 Ket (double energy, double f, double m, Parity p)
 
bool operator== (const Ket &other) const
 

Protected Attributes

double energy
 
double quantum_number_f
 
double quantum_number_m
 
Parity parity
 

Friends

std::ostream & operator<< (std::ostream &os, const Ket &ket)
 

Detailed Description

Base class for a ket.

This base class represents a ket. It is a base class for specific ket implementations. Its constructor is protected to indicate that derived classes should not allow direct instantiation. Instead, a factory class should be provided that is a friend of the derived class and can create instances of it.

Definition at line 25 of file Ket.hpp.

Constructor & Destructor Documentation

◆ Ket() [1/2]

pairinteraction::Ket::Ket ( )
delete

◆ ~Ket()

virtual pairinteraction::Ket::~Ket ( )
virtualdefault

◆ Ket() [2/2]

pairinteraction::Ket::Ket ( double  energy,
double  f,
double  m,
Parity  p 
)
protected

Definition at line 12 of file Ket.cpp.

Member Function Documentation

◆ get_energy()

double pairinteraction::Ket::get_energy ( ) const

Definition at line 25 of file Ket.cpp.

References energy.

◆ get_label()

virtual std::string pairinteraction::Ket::get_label ( ) const
pure virtual

◆ get_parity()

Parity pairinteraction::Ket::get_parity ( ) const

Definition at line 31 of file Ket.cpp.

References parity.

◆ get_quantum_number_f()

double pairinteraction::Ket::get_quantum_number_f ( ) const

Definition at line 27 of file Ket.cpp.

References quantum_number_f.

◆ get_quantum_number_m()

double pairinteraction::Ket::get_quantum_number_m ( ) const

Definition at line 29 of file Ket.cpp.

References quantum_number_m.

◆ has_parity()

bool pairinteraction::Ket::has_parity ( ) const

Definition at line 23 of file Ket.cpp.

References parity, and pairinteraction::UNKNOWN.

◆ has_quantum_number_f()

bool pairinteraction::Ket::has_quantum_number_f ( ) const

Definition at line 15 of file Ket.cpp.

References quantum_number_f.

◆ has_quantum_number_m()

bool pairinteraction::Ket::has_quantum_number_m ( ) const

Definition at line 19 of file Ket.cpp.

References quantum_number_m.

◆ operator==()

bool pairinteraction::Ket::operator== ( const Ket other) const
protected

Definition at line 33 of file Ket.cpp.

References energy, parity, quantum_number_f, and quantum_number_m.

Referenced by pairinteraction::KetAtom::operator==(), and pairinteraction::KetPair< Scalar >::operator==().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Ket ket 
)
friend

Definition at line 41 of file Ket.hpp.

Field Documentation

◆ energy

double pairinteraction::Ket::energy
protected

Definition at line 54 of file Ket.hpp.

Referenced by get_energy(), pairinteraction::Ket::hash::operator()(), and operator==().

◆ parity

Parity pairinteraction::Ket::parity
protected

Definition at line 57 of file Ket.hpp.

Referenced by get_parity(), has_parity(), pairinteraction::Ket::hash::operator()(), and operator==().

◆ quantum_number_f

double pairinteraction::Ket::quantum_number_f
protected

◆ quantum_number_m


The documentation for this class was generated from the following files: