TBTK
TBTK::AbstractState Class Referenceabstract
Inheritance diagram for TBTK::AbstractState:
TBTK::ArrayState TBTK::BasicState TBTK::ParallelepipedArrayState

Public Types

enum  StateID { Basic = 0 }
 

Public Member Functions

 AbstractState (StateID stateID)
 
virtual ~AbstractState ()
 
virtual AbstractStateclone () const =0
 
virtual std::complex< double > getOverlap (const AbstractState &ket) const =0
 
virtual std::complex< double > getMatrixElement (const AbstractState &ket, const AbstractOperator &o=DefaultOperator()) const =0
 
StateID getStateID () const
 
void setCoordinates (std::initializer_list< double > coordinates)
 
void setCoordinates (const std::vector< double > &coordinates)
 
void setSpecifiers (std::initializer_list< int > specifiers)
 
void setSpecifiers (const std::vector< int > &specifiers)
 
void setIndex (const Index &index)
 
void setContainer (const Index &container)
 
void setExtent (double extent)
 
const std::vector< double > & getCoordinates () const
 
const std::vector< int > & getSpecifiers () const
 
const IndexgetIndex () const
 
const IndexgetContainer () const
 
double getExtent () const
 
bool hasFiniteExtent () const
 

Member Enumeration Documentation

List of state identifiers. Officially supported operators are given unique identifiers. Operators not (yet) supported should make sure they use an identifier that does not clash with the officially supported ones [ideally a large random looking number (magic number) to also minimize accidental clashes with other operators that are not (yet) supported].

Constructor & Destructor Documentation

TBTK::AbstractState::AbstractState ( StateID  stateID)

Constructor.

virtual TBTK::AbstractState::~AbstractState ( )
virtual

Destructor.

Member Function Documentation

virtual AbstractState* TBTK::AbstractState::clone ( ) const
pure virtual

Returns a pointer to a clone of the State.

Implemented in TBTK::ArrayState, TBTK::BasicState, and TBTK::ParallelepipedArrayState.

const Index & TBTK::AbstractState::getContainer ( ) const
inline

Get container.

const std::vector< double > & TBTK::AbstractState::getCoordinates ( ) const
inline

Get coordinates.

double TBTK::AbstractState::getExtent ( ) const
inline

Get radial extent.

const Index & TBTK::AbstractState::getIndex ( ) const
inline

Get index.

virtual std::complex<double> TBTK::AbstractState::getMatrixElement ( const AbstractState ket,
const AbstractOperator o = DefaultOperator() 
) const
pure virtual

Pure virtual matrix element function. Returns the value of the11 operation

\[\langle\Psi_1|o|\Psi_2\rangle\]

, where

\[\Psi_1\]

and

\[\Psi_2\]

are the argument bra and the object itself, respectively, and o is an operator.

Implemented in TBTK::BasicState, TBTK::ArrayState, and TBTK::ParallelepipedArrayState.

virtual std::complex<double> TBTK::AbstractState::getOverlap ( const AbstractState ket) const
pure virtual

Pure virtual overlap function. Returns the value of the operation

\[\langle\Psi_1|\Psi_2\rangle\]

, where

\[\Psi_1\]

and

\[\Psi_2\]

are the argument bra and the object itself, respectively.

Implemented in TBTK::BasicState, TBTK::ArrayState, and TBTK::ParallelepipedArrayState.

const std::vector< int > & TBTK::AbstractState::getSpecifiers ( ) const
inline

Get specifiers.

AbstractState::StateID TBTK::AbstractState::getStateID ( ) const
inline

Get state identifier.

bool TBTK::AbstractState::hasFiniteExtent ( ) const
inline

Returns true if the state has finite extent.

void TBTK::AbstractState::setContainer ( const Index container)
inline

Set container. (For example a unit cell index.)

void TBTK::AbstractState::setCoordinates ( std::initializer_list< double >  coordinates)

Set coordinates.

void TBTK::AbstractState::setCoordinates ( const std::vector< double > &  coordinates)

Set coordinates.

void TBTK::AbstractState::setExtent ( double  extent)
inline

Set radial extent.

void TBTK::AbstractState::setIndex ( const Index index)
inline

Set index.

void TBTK::AbstractState::setSpecifiers ( std::initializer_list< int >  specifiers)

Set specifiers.

void TBTK::AbstractState::setSpecifiers ( const std::vector< int > &  specifiers)

Set specifiers.


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