TBTK
Need a break? Support the development by playing Polarity Puzzles
TBTK::OverlapAmplitudeSet Class Reference

OverlapAmplitude container. More...

#include <OverlapAmplitudeSet.h>

Inheritance diagram for TBTK::OverlapAmplitudeSet:
TBTK::Serializable

Classes

class  ConstIterator
 
class  Iterator
 

Public Member Functions

 OverlapAmplitudeSet ()
 
 OverlapAmplitudeSet (const std::string &serializeation, Mode mode)
 
virtual ~OverlapAmplitudeSet ()
 
void add (const OverlapAmplitude &overlapAmplitude)
 
OverlapAmplitudeget (const Index &braIndex, const Index &ketIndex)
 
const OverlapAmplitudeget (const Index &braIndex, const Index &ketIndex) const
 
bool getAssumeOrthonormalBasis () const
 
OverlapAmplitudeSet::Iterator begin ()
 
OverlapAmplitudeSet::ConstIterator begin () const
 
OverlapAmplitudeSet::ConstIterator cbegin () const
 
OverlapAmplitudeSet::Iterator end ()
 
OverlapAmplitudeSet::ConstIterator end () const
 
OverlapAmplitudeSet::ConstIterator cend () const
 
virtual std::string serialize (Mode mode) const
 
unsigned int getSizeInBytes () const
 
- Public Member Functions inherited from TBTK::Serializable
template<>
std::string serialize (const bool &data, Mode mode)
 
template<>
std::string serialize (const double &data, Mode mode)
 
template<>
std::string serialize (const std::complex< double > &data, Mode mode)
 
template<>
std::string serialize (const int &data, Mode mode)
 
template<>
std::string serialize (const unsigned int &data, Mode mode)
 
template<>
std::string serialize (const SpinMatrix &data, Mode mode)
 
template<>
std::string serialize (const Statistics &data, Mode mode)
 
template<>
std::string serialize (const std::vector< std::complex< double >> &data, Mode mode)
 
template<>
int deserialize (const std::string &serialization, Mode mode)
 
template<>
unsigned int deserialize (const std::string &serialization, Mode mode)
 
template<>
double deserialize (const std::string &serialization, Mode mode)
 
template<>
std::complex< double > deserialize (const std::string &serialization, Mode mode)
 
template<>
SpinMatrix deserialize (const std::string &serialization, Mode mode)
 
template<>
Statistics deserialize (const std::string &serialization, Mode mode)
 
template<>
std::vector< std::complex< double > > deserialize (const std::string &serialization, Mode mode)
 

Additional Inherited Members

- Public Types inherited from TBTK::Serializable
enum  Mode { Debug, Binary, XML, JSON }
 
- Static Public Member Functions inherited from TBTK::Serializable
static bool hasID (const std::string &serialization, Mode mode)
 
static std::string getID (const std::string &serialization, Mode mode)
 
static std::string extractComponent (const std::string &serialization, const std::string &containerID, const std::string &componentID, const std::string &componentName, Mode mode)
 
- Static Protected Member Functions inherited from TBTK::Serializable
static bool validate (const std::string &serialization, const std::string &id, Mode mode)
 
static std::string getContent (const std::string &serialization, Mode mode)
 
static std::vector< std::string > split (const std::string &content, Mode mode)
 
template<typename DataType >
static std::enable_if<!std::is_pointer< DataType >::value, std::string >::type serialize (const DataType &data, Mode mode)
 
template<typename DataType >
static std::enable_if< std::is_pointer< DataType >::value, std::string >::type serialize (const DataType &data, Mode mode)
 
template<typename DataType >
static DataType deserialize (const std::string &serialization, Mode mode)
 
static std::string extract (const std::string &serialization, Mode mode, std::string component)
 

Detailed Description

OverlapAmplitude container.

An OverlapAmplitudeSet is a container for OverlapAmplitudes .

Constructor & Destructor Documentation

◆ OverlapAmplitudeSet() [1/2]

TBTK::OverlapAmplitudeSet::OverlapAmplitudeSet ( )

Constructor.

◆ OverlapAmplitudeSet() [2/2]

TBTK::OverlapAmplitudeSet::OverlapAmplitudeSet ( const std::string &  serializeation,
Mode  mode 
)

Constructor. Constructs the OverlapAmplitudeSet from a serialization string.

Parameters
serializationSerialization from which to construct the OverlapAmplitudeSet.
modeMode with which the string has been serialized.

◆ ~OverlapAmplitudeSet()

virtual TBTK::OverlapAmplitudeSet::~OverlapAmplitudeSet ( )
virtual

Destructor.

Member Function Documentation

◆ add()

void TBTK::OverlapAmplitudeSet::add ( const OverlapAmplitude overlapAmplitude)
inline

Add a single OverlapAmplitude.

Parameters
overlapAmplitudeOverlapAmplitude to add.

◆ begin() [1/2]

OverlapAmplitudeSet::Iterator TBTK::OverlapAmplitudeSet::begin ( )

Create Iterator.

Returns
Iterator pointing at the first element in the OverlapAmplitudeSet.

◆ begin() [2/2]

OverlapAmplitudeSet::ConstIterator TBTK::OverlapAmplitudeSet::begin ( ) const

Create Iterator.

Returns
Iterator pointing at the first element in the OverlapAmplitudeSet.

◆ cbegin()

OverlapAmplitudeSet::ConstIterator TBTK::OverlapAmplitudeSet::cbegin ( ) const

Create Iterator.

Returns
Iterator pointing at the first element in the OverlapAmplitudeSet.

◆ cend()

OverlapAmplitudeSet::ConstIterator TBTK::OverlapAmplitudeSet::cend ( ) const

Get Iterator pointing to end.

Returns
An Iterator pointing at the end of the OverlapAmplitudeSet.

◆ end() [1/2]

OverlapAmplitudeSet::Iterator TBTK::OverlapAmplitudeSet::end ( )

Get Iterator pointing to end.

Returns
An Iterator pointing at the end of the OverlapAmplitudeSet.

◆ end() [2/2]

OverlapAmplitudeSet::ConstIterator TBTK::OverlapAmplitudeSet::end ( ) const

Get Iterator pointing to end.

Returns
An Iterator pointing at the end of the OverlapAmplitudeSet.

◆ get() [1/2]

OverlapAmplitude & TBTK::OverlapAmplitudeSet::get ( const Index braIndex,
const Index ketIndex 
)
inline

Get the OverlapAmplitude with the given Indices.

Parameters
braIndexbra-Index to get the OverlapAmplitude for.
ketIndexket-Index to get the OverlapAmplitude for.
Returns
The OverlapAmplitude for the given bra- and ket-Indices.

◆ get() [2/2]

const OverlapAmplitude & TBTK::OverlapAmplitudeSet::get ( const Index braIndex,
const Index ketIndex 
) const
inline

Get the OverlapAmplitude for the given Indices.

Parameters
braIndexbra-Index to get the OverlapAmplitude for.
ketIndexket-Index to get the OverlapAmplitude for.
Returns
The OverlapAmplitude for the given bra- and ket-Indices.

◆ getAssumeOrthonormalBasis()

bool TBTK::OverlapAmplitudeSet::getAssumeOrthonormalBasis ( ) const
inline

Get whether an orthonormal basis should be assumed. This is true if no OverlapAmplitude has been added to the OverlapAmplitudeSet.

Returns
True if no OverlapAmplitude has been added to the OverlapAmplitudeSet.

◆ getSizeInBytes()

unsigned int TBTK::OverlapAmplitudeSet::getSizeInBytes ( ) const
inline

Get size in bytes.

◆ serialize()

virtual std::string TBTK::OverlapAmplitudeSet::serialize ( Mode  mode) const
virtual

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