TBTK
TBTK::Property::EnergyResolvedProperty< DataType > Class Template Reference

Base class for energy resolved Properties. More...

#include <EnergyResolvedProperty.h>

Inheritance diagram for TBTK::Property::EnergyResolvedProperty< DataType >:
TBTK::Property::AbstractProperty< DataType > TBTK::Serializable

Public Types

enum  EnergyType { Real, FermionicMatsubara, BosonicMatsubara }
 
- Public Types inherited from TBTK::Serializable
enum  Mode { Debug, Binary, XML, JSON }
 

Public Member Functions

 EnergyResolvedProperty ()
 
 EnergyResolvedProperty (const IndexTree &indexTree, double lowerBound, double upperBound, unsigned int resolution)
 
 EnergyResolvedProperty (const IndexTree &indexTree, double lowerBound, double upperBound, unsigned int resolution, const DataType *data)
 
 EnergyResolvedProperty (EnergyType energyType, const IndexTree &indexTree, int lowerMatsubaraEnergyIndex, int upperMatsubaraEnergtIndex, double fundamentalMatsubaraEnergy)
 
 EnergyResolvedProperty (EnergyType energyType, const IndexTree &indexTree, int lowerMatsubaraEnergyIndex, int upperMatsubaraEnergtIndex, double fundamentalMatsubaraEnergy, const DataType *data)
 
 EnergyResolvedProperty (const std::string &serialization, Serializable::Mode mode)
 
EnergyType getEnergyType () const
 
double getLowerBound () const
 
double getUpperBound () const
 
unsigned int getResolution () const
 
double getEnergy (unsigned int n) const
 
int getLowerMatsubaraEnergyIndex () const
 
int getUpperMatsubaraEnergyIndex () const
 
unsigned int getNumMatsubaraEnergies () const
 
double getFundamentalMatsubaraEnergy () const
 
double getLowerMatsubaraEnergy () const
 
double getUpperMatsubaraEnergy () const
 
std::complex< double > getMatsubaraEnergy (unsigned int n) const
 
virtual std::string serialize (Serializable::Mode mode) const
 
- Public Member Functions inherited from TBTK::Property::AbstractProperty< DataType >
unsigned int getBlockSize () const
 
unsigned int getSize () const
 
const std::vector< DataType > & getData () const
 
std::vector< DataType > & getDataRW ()
 
unsigned int getDimensions () const
 
std::vector< int > getRanges () const
 
int getOffset (const Index &index) const
 
const IndexDescriptorgetIndexDescriptor () const
 
bool contains (const Index &index) const
 
virtual const DataType & operator() (const Index &index, unsigned int offset=0) const
 
virtual DataType & operator() (const Index &index, unsigned int offset=0)
 
DataType & operator() (const std::initializer_list< int > &index)
 
const DataType & operator() (const std::initializer_list< int > &index) const
 
DataType & operator() (const std::initializer_list< unsigned int > &index)
 
const DataType & operator() (const std::initializer_list< unsigned int > &index) const
 
virtual const DataType & operator() (unsigned int offset) const
 
virtual DataType & operator() (unsigned int offset)
 
void setAllowIndexOutOfBoundsAccess (bool allowIndexOutOfBoundsAccess)
 
void setDefaultValue (const DataType &defaultValue)
 

Additional Inherited Members

- 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)
 
- Protected Member Functions inherited from TBTK::Property::AbstractProperty< DataType >
 AbstractProperty ()
 
 AbstractProperty (unsigned int blockSize)
 
 AbstractProperty (unsigned int blockSize, const DataType *data)
 
 AbstractProperty (unsigned int dimensions, const int *ranges, unsigned int blockSize)
 
 AbstractProperty (unsigned int dimensions, const int *ranges, unsigned int blockSize, const DataType *data)
 
 AbstractProperty (const IndexTree &indexTree, unsigned int blockSize)
 
 AbstractProperty (const IndexTree &indexTree, unsigned int blockSize, const DataType *data)
 
 AbstractProperty (const AbstractProperty &abstractProperty)
 
 AbstractProperty (AbstractProperty &&abstractProperty)
 
 AbstractProperty (const std::string &serialization, Mode mode)
 
virtual ~AbstractProperty ()
 
AbstractPropertyoperator= (const AbstractProperty &abstractProperty)
 
AbstractPropertyoperator= (AbstractProperty &&abstractProperty)
 
- 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

template<typename DataType>
class TBTK::Property::EnergyResolvedProperty< DataType >

Base class for energy resolved Properties.

Member Enumeration Documentation

template<typename DataType>
enum TBTK::Property::EnergyResolvedProperty::EnergyType
strong

Enum class for specifying the energy type.

Constructor & Destructor Documentation

template<typename DataType >
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty ( )

Constructs an uninitialized EnergyResolvedProperty.

template<typename DataType >
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty ( const IndexTree indexTree,
double  lowerBound,
double  upperBound,
unsigned int  resolution 
)

Constructs an EnergyResolvedProperty with real energies on the Custom format. [See AbstractProperty for detailed information about the Custom format.]

Parameters
indexTreeIndexTree containing the Indices for which the EnergyResolvedProperty should be contained.
lowerBoundLower bound for the energy.
upperBoundUpper bound for the energy.
resolutionNumber of points to use for the energy.
template<typename DataType>
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty ( const IndexTree indexTree,
double  lowerBound,
double  upperBound,
unsigned int  resolution,
const DataType *  data 
)

Constructs an EnergyResolvedProperty with real energie on the Custom format and initializes it with data. [See AbstractProperty for detailed information about the Custom format and the raw data format.]

Parameters
indexTreeIndexTree containing the Indices for which the EnergyResolvedProperty should be contained.
lowerBoundLower bound for the energy.
upperBoundUpper bound for the energy.
resolutionNumber of points to use for the energy.
dataRaw data to initialize the EnergyResolvedProperty with.
template<typename DataType>
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty ( EnergyType  energyType,
const IndexTree indexTree,
int  lowerMatsubaraEnergyIndex,
int  upperMatsubaraEnergtIndex,
double  fundamentalMatsubaraEnergy 
)

Constructs an EnergyResolvedProperty with Matsubara energies on the Custom format. [See AbstractProperty for detailed information about the Custom format.]

Parameters
indexTreeIndexTree containing the Indices for which the EnergyResolvedProperty should be contained.
lowerBoundLower bound for the energy.
upperBoundUpper bound for the energy.
resolutionNumber of points to use for the energy.
template<typename DataType>
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty ( EnergyType  energyType,
const IndexTree indexTree,
int  lowerMatsubaraEnergyIndex,
int  upperMatsubaraEnergtIndex,
double  fundamentalMatsubaraEnergy,
const DataType *  data 
)

Constructs an EnergyResolvedProperty with Matsubara energies on the Custom format and initializes it with data. [See AbstractProperty for detailed information about the Custom format and the raw data format.]

Parameters
indexTreeIndexTree containing the Indices for which the EnergyResolvedProperty should be contained.
lowerBoundLower bound for the energy.
upperBoundUpper bound for the energy.
resolutionNumber of points to use for the energy.
dataRaw data to initialize the EnergyResolvedProperty with.
template<typename DataType>
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty ( const std::string &  serialization,
Serializable::Mode  mode 
)

Constructor. Constructs the EnergyResolvedProperty from a serialization string.

Parameters
serializationSerialization string from which to construct the EnergyResolvedProperty.

Member Function Documentation

template<typename DataType >
double TBTK::Property::EnergyResolvedProperty< DataType >::getEnergy ( unsigned int  n) const
inline

Get the nth energy value.

Parameters
nThe energy index to get the energy for.
Returns
The energy for the nth energy index.
template<typename DataType >
double TBTK::Property::EnergyResolvedProperty< DataType >::getFundamentalMatsubaraEnergy ( ) const
inline

Get the fundamental Matsubara energy E_0 in the expression E = (l + 2*n)*E_0.

template<typename DataType >
double TBTK::Property::EnergyResolvedProperty< DataType >::getLowerBound ( ) const
inline

Get lower bound for the energy.

Returns
Lower bound for the energy.
template<typename DataType >
double TBTK::Property::EnergyResolvedProperty< DataType >::getLowerMatsubaraEnergy ( ) const
inline

Get the lower Matsubara energy.

Returns
The lowest Matsubara energy.
template<typename DataType >
int TBTK::Property::EnergyResolvedProperty< DataType >::getLowerMatsubaraEnergyIndex ( ) const
inline

Get the lower Matsubara energy index. That is, l in the expression E = (l + 2*n)*E_0.

Returns
The lowest Matsubara energy index.
template<typename DataType >
std::complex< double > TBTK::Property::EnergyResolvedProperty< DataType >::getMatsubaraEnergy ( unsigned int  n) const
inline

Get the nth Matsubara energy.

template<typename DataType >
unsigned int TBTK::Property::EnergyResolvedProperty< DataType >::getNumMatsubaraEnergies ( ) const
inline

Get the number of Matsubara energies.

Returns
The number of Matsubara energies.
template<typename DataType >
unsigned int TBTK::Property::EnergyResolvedProperty< DataType >::getResolution ( ) const
inline

Get the energy resolution (number of points used for the energy axis).

Returns
The energy resolution.
template<typename DataType >
double TBTK::Property::EnergyResolvedProperty< DataType >::getUpperBound ( ) const
inline

Get upper bound for the energy.

Returns
Upper bound for the energy.
template<typename DataType >
double TBTK::Property::EnergyResolvedProperty< DataType >::getUpperMatsubaraEnergy ( ) const
inline

Get the upper Matsubara energy.

Returns
The highest Matsubara energy.
template<typename DataType >
int TBTK::Property::EnergyResolvedProperty< DataType >::getUpperMatsubaraEnergyIndex ( ) const
inline

Get the upper Matsubara energy index. That is, l+N-1, where l is the lowest Matsubara energy index and N is the number of Matsubara energies.

Returns
The largest Matsubara energy index.
template<typename DataType >
std::string TBTK::Property::EnergyResolvedProperty< DataType >::serialize ( Serializable::Mode  mode) const
inlinevirtual

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