TBTK
TBTK::HoppingAmplitudeList Class Reference

List of HoppingAmplitudes . More...

#include <HoppingAmplitudeList.h>

Inheritance diagram for TBTK::HoppingAmplitudeList:
TBTK::Serializable TBTK::BackwardDifference TBTK::CenteredDifference TBTK::ForwardDifference

Public Member Functions

 HoppingAmplitudeList ()
 
 HoppingAmplitudeList (const std::string &serializeation, Serializable::Mode mode)
 
void add (const HoppingAmplitude &hoppingAmplitude)
 
unsigned int getSize () const
 
const HoppingAmplitudeoperator[] (unsigned int n) const
 
std::string serialize (Serializable::Mode mode) const
 
unsigned int getSizeInBytes () const
 

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)
 
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

Constructor & Destructor Documentation

TBTK::HoppingAmplitudeList::HoppingAmplitudeList ( )

Constructs a HoppingAmplitudeList

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

Constructor. Constructs the HoppingAmplitudeList from a serialization string.

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

Member Function Documentation

void TBTK::HoppingAmplitudeList::add ( const HoppingAmplitude hoppingAmplitude)
inline

Append HoppingAmplitude to the end of the list.

Parameters
hoppingAmplitudeHoppingAmplitude to add.
unsigned int TBTK::HoppingAmplitudeList::getSize ( ) const
inline

Get size.

Returns
Number of elements in the list.
unsigned int TBTK::HoppingAmplitudeList::getSizeInBytes ( ) const
inline

Get size in bytes.

Returns
Memory size required to store the HoppingAmplitudeList.
const HoppingAmplitude & TBTK::HoppingAmplitudeList::operator[] ( unsigned int  n) const
inline

Subscript operator.

Parameters
nElement to access.
Returns
THe HoppingAmplitude at position n.
std::string TBTK::HoppingAmplitudeList::serialize ( Serializable::Mode  mode) const
virtual

Serialize HoppingAmplitudeList.

Parameters
modeSerialization mode to use.
Returns
Serialized string representation of the HoppingAmplitudeList.

Implements TBTK::Serializable.


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