TBTK
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 SingleParticleContext &singleParticleContext)
 
 SingleParticleContext (SingleParticleContext &&singleParticleContext)
 
 SingleParticleContext (const std::string &serialization, Mode mode)
 
virtual ~SingleParticleContext ()
 
SingleParticleContextoperator= (const SingleParticleContext &rhs)
 
SingleParticleContextoperator= (SingleParticleContext &&rhs)
 
void setStatistics (Statistics statistics)
 
Statistics getStatistics () const
 
void addHoppingAmplitude (HoppingAmplitude ha)
 
void addHoppingAmplitudeAndHermitianConjugate (HoppingAmplitude ha)
 
int getBasisIndex (const Index &index) const
 
int getBasisSize () const
 
void construct ()
 
void sortHoppingAmplitudes ()
 
bool getIsConstructed () const
 
void constructCOO ()
 
void destructCOO ()
 
void reconstructCOO ()
 
const HoppingAmplitudeSetgetHoppingAmplitudeSet () const
 
void createGeometry (int dimensions, int numSpecifiers=0)
 
GeometrygetGeometry ()
 
std::string serialize (Mode mode) const
 

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 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)
 
static std::string serialize (bool b, Mode mode)
 
static void deserialize (const std::string &serialization, bool *b, Mode mode)
 
static std::string serialize (int i, Mode mode)
 
static void deserialize (const std::string &serialization, int *i, Mode mode)
 
static std::string serialize (unsigned int u, Mode mode)
 
static void deserialize (const std::string &serialization, unsigned int *u, Mode mode)
 
static std::string serialize (double d, Mode mode)
 
static void deserialize (const std::string &serialization, double *d, Mode mode)
 
static std::string serialize (std::complex< double > c, Mode mode)
 
static void deserialize (const std::string &serialization, std::complex< double > *c, Mode mode)
 
static std::string serialize (Statistics s, Mode mode)
 
static void deserialize (const std::string &serialization, Statistics *s, 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

TBTK::SingleParticleContext::SingleParticleContext ( )

Constructor.

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

Constructor.

TBTK::SingleParticleContext::SingleParticleContext ( const SingleParticleContext singleParticleContext)

Copy constructor.

TBTK::SingleParticleContext::SingleParticleContext ( SingleParticleContext &&  singleParticleContext)

Move constructor.

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

Constructor. Constructs the SingleParticleContext from a serializeation string.

virtual TBTK::SingleParticleContext::~SingleParticleContext ( )
virtual

Destructor.

Member Function Documentation

void TBTK::SingleParticleContext::addHoppingAmplitude ( HoppingAmplitude  ha)
inline
void TBTK::SingleParticleContext::addHoppingAmplitudeAndHermitianConjugate ( HoppingAmplitude  ha)
inline

Add a HoppingAmplitude and its Hermitian conjugate.

void TBTK::SingleParticleContext::construct ( )

Construct Hilbert space. No more HoppingAmplitudes should be added after this call.

void TBTK::SingleParticleContext::constructCOO ( )
inline

Construct Hamiltonian on COO format.

void TBTK::SingleParticleContext::createGeometry ( int  dimensions,
int  numSpecifiers = 0 
)

Create Geometry.

void TBTK::SingleParticleContext::destructCOO ( )
inline

Destruct Hamiltonian on COO format.

int TBTK::SingleParticleContext::getBasisIndex ( const Index index) const
inline

Get Hilbert space index corresponding to given 'from'-index.

Parameters
index'from'-index to get Hilbert space index for.
int TBTK::SingleParticleContext::getBasisSize ( ) const
inline

Get size of Hilbert space.

Geometry * TBTK::SingleParticleContext::getGeometry ( )
inline

Get Geometry.

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

Get HoppingAMplitudeSet.

bool TBTK::SingleParticleContext::getIsConstructed ( ) const
inline

Returns true if the Hilbert space basis has been constructed.

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

Get statistics.

SingleParticleContext& TBTK::SingleParticleContext::operator= ( const SingleParticleContext rhs)

Assignment operator.

SingleParticleContext& TBTK::SingleParticleContext::operator= ( SingleParticleContext &&  rhs)

Move assignment operator.

void TBTK::SingleParticleContext::reconstructCOO ( )
inline

To be called when HoppingAmplitudes need to be reevaluated. This is required if the HoppingAmplitudeSet in addition to its standard storage format also utilizes a more effective format such as COO format and some HoppingAMplitudes are evaluated through the use of callbacks.

std::string TBTK::SingleParticleContext::serialize ( Mode  mode) const
virtual
void TBTK::SingleParticleContext::setStatistics ( Statistics  statistics)
inline

Set statistics.

Friends And Related Function Documentation

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: