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

The context for the single particle part of a Model. More...

#include <SingleParticleContext.h>

Inheritance diagram for TBTK::SingleParticleContext:
TBTK::Serializable

Public Member Functions

 SingleParticleContext ()
 
 SingleParticleContext (const std::vector< unsigned int > &capacity)
 
 SingleParticleContext (const std::string &serialization, Mode mode)
 
void setStatistics (Statistics statistics)
 
Statistics getStatistics () const
 
void generateHoppingAmplitudeSet (const HoppingAmplitude::AmplitudeCallback &hoppingAmplitudeCallback)
 
void generateOverlapAmplitudeSet (const OverlapAmplitude::AmplitudeCallback &overlapAmplitudeCallback)
 
BasisStateSet & getBasisStateSet ()
 
const BasisStateSet & getBasisStateSet () const
 
HoppingAmplitudeSetgetHoppingAmplitudeSet ()
 
const HoppingAmplitudeSetgetHoppingAmplitudeSet () const
 
SourceAmplitudeSetgetSourceAmplitudeSet ()
 
const SourceAmplitudeSetgetSourceAmplitudeSet () const
 
OverlapAmplitudeSetgetOverlapAmplitudeSet ()
 
const OverlapAmplitudeSetgetOverlapAmplitudeSet () const
 
GeometrygetGeometry ()
 
const GeometrygetGeometry () const
 
std::string serialize (Mode mode) 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)
 

Friends

class FileReader
 

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

The context for the single particle part of a Model.

Constructor & Destructor Documentation

◆ SingleParticleContext() [1/3]

TBTK::SingleParticleContext::SingleParticleContext ( )

Constructor.

◆ SingleParticleContext() [2/3]

TBTK::SingleParticleContext::SingleParticleContext ( const std::vector< unsigned int > &  capacity)

Constructor.

◆ SingleParticleContext() [3/3]

TBTK::SingleParticleContext::SingleParticleContext ( const std::string &  serialization,
Mode  mode 
)

Constructor. Constructs the SingleParticleContext from a serializeation string. Note that the BasisStateSet is not yet serialized.

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

Member Function Documentation

◆ generateHoppingAmplitudeSet()

void TBTK::SingleParticleContext::generateHoppingAmplitudeSet ( const HoppingAmplitude::AmplitudeCallback hoppingAmplitudeCallback)

Generate a HoppingAmplitudeSet from the BasisStateSet.

Parameters
hoppingAmplitudeCallbackCallback to use as argument for the HoppingAmplitudes.

◆ generateOverlapAmplitudeSet()

void TBTK::SingleParticleContext::generateOverlapAmplitudeSet ( const OverlapAmplitude::AmplitudeCallback overlapAmplitudeCallback)

Generate a OverlapAmplitudeSet from the BasisStateSet.

Parameters
overlapAmplitudeCallbackCallback to use as argument for the OverlapAmplitudes.

◆ getBasisStateSet() [1/2]

const BasisStateSet & TBTK::SingleParticleContext::getBasisStateSet ( )
inline

Get the contained BasisStateSet.

Returns
The contained BasisStateSet.

◆ getBasisStateSet() [2/2]

const BasisStateSet& TBTK::SingleParticleContext::getBasisStateSet ( ) const

Get the contained BasisStateSet.

Returns
The contained BasisStateSet.

◆ getGeometry() [1/2]

const Geometry & TBTK::SingleParticleContext::getGeometry ( )
inline

Get Geometry.

◆ getGeometry() [2/2]

const Geometry& TBTK::SingleParticleContext::getGeometry ( ) const

Get Geometry.

◆ getHoppingAmplitudeSet() [1/2]

const HoppingAmplitudeSet & TBTK::SingleParticleContext::getHoppingAmplitudeSet ( )
inline

Get the contained HoppingAmplitudeSet.

Returns
The contained HoppingAmplitudeSet.

◆ getHoppingAmplitudeSet() [2/2]

const HoppingAmplitudeSet& TBTK::SingleParticleContext::getHoppingAmplitudeSet ( ) const

Get the contained HoppingAmplitudeSet.

Returns
The contained HoppingAmplitudeSet.

◆ getOverlapAmplitudeSet() [1/2]

const OverlapAmplitudeSet & TBTK::SingleParticleContext::getOverlapAmplitudeSet ( )
inline

Get the contained OverlapAmplitudeSet.

Returns
The contained OverlapAmplitudeSet.

◆ getOverlapAmplitudeSet() [2/2]

const OverlapAmplitudeSet& TBTK::SingleParticleContext::getOverlapAmplitudeSet ( ) const

Get the contained OverlapAmplitudeSet.

Returns
The contained OverlapAmplitudeSet.

◆ getSourceAmplitudeSet() [1/2]

const SourceAmplitudeSet & TBTK::SingleParticleContext::getSourceAmplitudeSet ( )
inline

Get the contained SourceAmplitudeSet.

Returns
The contained SourceAmplitudeSet.

◆ getSourceAmplitudeSet() [2/2]

const SourceAmplitudeSet& TBTK::SingleParticleContext::getSourceAmplitudeSet ( ) const

Get the contained SourceAmplitudeSet.

Returns
The contained SourceAmplitudeSet.

◆ getStatistics()

Statistics TBTK::SingleParticleContext::getStatistics ( ) const
inline

Get statistics.

Returns
The currently set Statistics.

◆ serialize()

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

Implements Serializable::serialize(). Note that the BasisStateSet is not yet serialized.

Implements TBTK::Serializable.

◆ setStatistics()

void TBTK::SingleParticleContext::setStatistics ( Statistics  statistics)
inline

Set statistics.

Parameters
statisticsThe Statistics to use.

Friends And Related Function Documentation

◆ FileReader

friend class FileReader
friend

FileReader is a friend class to allow it to write Model data.


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