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

SourceAmplitude container. More...

#include <SourceAmplitudeSet.h>

Inheritance diagram for TBTK::SourceAmplitudeSet:
TBTK::Serializable

Classes

class  ConstIterator
 
class  Iterator
 

Public Member Functions

 SourceAmplitudeSet ()
 
 SourceAmplitudeSet (const std::string &serializeation, Mode mode)
 
virtual ~SourceAmplitudeSet ()
 
void add (const SourceAmplitude &sourceAmplitude)
 
std::vector< SourceAmplitude > & get (const Index &index)
 
const std::vector< SourceAmplitude > & get (const Index &index) const
 
SourceAmplitudeSet::Iterator begin ()
 
SourceAmplitudeSet::ConstIterator begin () const
 
SourceAmplitudeSet::ConstIterator cbegin () const
 
SourceAmplitudeSet::Iterator end ()
 
SourceAmplitudeSet::ConstIterator end () const
 
SourceAmplitudeSet::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)
 

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

SourceAmplitude container.

A SourceAmplitudeSet is a container for SourceAmplitudes .

Constructor & Destructor Documentation

◆ SourceAmplitudeSet() [1/2]

TBTK::SourceAmplitudeSet::SourceAmplitudeSet ( )

Constructor.

◆ SourceAmplitudeSet() [2/2]

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

Constructor. Constructs the HoppingAmplitudeSet from a serialization string.

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

◆ ~SourceAmplitudeSet()

virtual TBTK::SourceAmplitudeSet::~SourceAmplitudeSet ( )
virtual

Destructor.

Member Function Documentation

◆ add()

void TBTK::SourceAmplitudeSet::add ( const SourceAmplitude sourceAmplitude)
inline

Add a single SourceAmplitude.

Parameters
sourceAmplitudeSourceAmplitude to add.

◆ begin() [1/2]

SourceAmplitudeSet::Iterator TBTK::SourceAmplitudeSet::begin ( )

Create Iterator.

Returns
Iterator pointing at the first element in the SourceAmplitudeSet.

◆ begin() [2/2]

SourceAmplitudeSet::ConstIterator TBTK::SourceAmplitudeSet::begin ( ) const

Create Iterator.

Returns
Iterator pointing at the first element in the SourceAmplitudeSet.

◆ cbegin()

SourceAmplitudeSet::ConstIterator TBTK::SourceAmplitudeSet::cbegin ( ) const

Create Iterator.

Returns
Iterator pointing at the first element in the SourceAmplitudeSet.

◆ cend()

SourceAmplitudeSet::ConstIterator TBTK::SourceAmplitudeSet::cend ( ) const

Get Iterator pointing to end.

Returns
An Iterator pointing at the end of the SourceAmplitudeSet.

◆ end() [1/2]

SourceAmplitudeSet::Iterator TBTK::SourceAmplitudeSet::end ( )

Get Iterator pointing to end.

Returns
An Iterator pointing at the end of the SourceAmplitudeSet.

◆ end() [2/2]

SourceAmplitudeSet::ConstIterator TBTK::SourceAmplitudeSet::end ( ) const

Get Iterator pointing to end.

Returns
An Iterator pointing at the end of the SourceAmplitudeSet.

◆ get() [1/2]

std::vector< SourceAmplitude > & TBTK::SourceAmplitudeSet::get ( const Index index)
inline

Get all SourceAmplitudes with the given Index.

Parameters
indexIndex to get SourceAmplitudes for.
Returns
All SourceAmplitudes for the given Index.

◆ get() [2/2]

const std::vector< SourceAmplitude > & TBTK::SourceAmplitudeSet::get ( const Index index) const
inline

Get all SourceAmplitudes with the given Index.

Parameters
indexIndex to get SourceAmplitudes for.
Returns
All SourceAmplitudes for the given Index.

◆ getSizeInBytes()

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

Get size in bytes.

◆ serialize()

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

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