TBTK
TBTK::Geometry Class Reference

Contains geometric information about a Model. More...

#include <Geometry.h>

Inheritance diagram for TBTK::Geometry:
TBTK::Serializable

Public Member Functions

 Geometry (int dimensions, int numSpecifiers, const HoppingAmplitudeSet *hoppingAmplitudeSet)
 
 Geometry (const Geometry &geometry)
 
 Geometry (Geometry &&geometry)
 
 Geometry (const std::string &serialization, Mode mode, const HoppingAmplitudeSet &hoppingAmplitudeSet)
 
virtual ~Geometry ()
 
Geometryoperator= (const Geometry &rhs)
 
Geometryoperator= (Geometry &&rhs)
 
void setCoordinates (const Index &index, std::initializer_list< double > coordinates, std::initializer_list< int > specifiers={})
 
void setCoordinates (const Index &index, const std::vector< double > &coordinates, const std::vector< int > &specifiers={})
 
void setCoordinates (int basisIndex, std::initializer_list< double > coordinates, std::initializer_list< int > specifiers={})
 
void setCoordinates (int basisIndex, const std::vector< double > &coordinates, const std::vector< int > &specifiers={})
 
int getDimensions () const
 
int getNumSpecifiers () const
 
const double * getCoordinates (const Index &index) const
 
const double * getCoordinates (int index) const
 
const double * getCoordinates () const
 
void translate (std::initializer_list< double > translation)
 
int getSpecifier (const Index &index, int specifier) const
 
int getSpecifier (int index, int specifier) const
 
const int * getSpecifiers (const Index &index) const
 
const int * getSpecifiers (int index) const
 
const int * getSpecifiers () const
 
double getDistance (const Index &index1, const Index &index2) const
 
double getDistance (int index1, int index2) const
 
int getBasisSize () const
 
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

Contains geometric information about a Model.

Constructor & Destructor Documentation

TBTK::Geometry::Geometry ( int  dimensions,
int  numSpecifiers,
const HoppingAmplitudeSet hoppingAmplitudeSet 
)

Constructor.

TBTK::Geometry::Geometry ( const Geometry geometry)

Copy constructor.

TBTK::Geometry::Geometry ( Geometry &&  geometry)

Move constructor.

TBTK::Geometry::Geometry ( const std::string &  serialization,
Mode  mode,
const HoppingAmplitudeSet hoppingAmplitudeSet 
)

Constructor. Constructs the Geometry from a serialization string.

virtual TBTK::Geometry::~Geometry ( )
virtual

Destructor.

Member Function Documentation

int TBTK::Geometry::getBasisSize ( ) const
inline

Get size of corresponding Hilbert space.

const double * TBTK::Geometry::getCoordinates ( const Index index) const
inline

Get Coordinates using a physical index.

const double * TBTK::Geometry::getCoordinates ( int  index) const
inline

Get coordinates using a Hilbert space index.

const double * TBTK::Geometry::getCoordinates ( ) const
inline

Get all coordinates.

int TBTK::Geometry::getDimensions ( ) const
inline

Get dimensions.

double TBTK::Geometry::getDistance ( const Index index1,
const Index index2 
) const

Get distance between positions corresponding to index1 and index2, using physical indices.

double TBTK::Geometry::getDistance ( int  index1,
int  index2 
) const
inline

Get distance between positions corresponding to index1 and index2, using physical indices.

int TBTK::Geometry::getNumSpecifiers ( ) const
inline

Get number of specifiers.

int TBTK::Geometry::getSpecifier ( const Index index,
int  specifier 
) const
inline

Get specifier using a physical index.

int TBTK::Geometry::getSpecifier ( int  index,
int  specifier 
) const
inline

Get specifier using a Hilbert space index.

const int * TBTK::Geometry::getSpecifiers ( const Index index) const
inline

Get all specifiers for given physical index.

const int * TBTK::Geometry::getSpecifiers ( int  index) const
inline

Get all speciferis for given Hilbert space index.

const int * TBTK::Geometry::getSpecifiers ( ) const
inline

Get all specifiers.

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

Assignment operator.

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

Move assignment operator.

std::string TBTK::Geometry::serialize ( Mode  mode) const
virtual
void TBTK::Geometry::setCoordinates ( const Index index,
std::initializer_list< double >  coordinates,
std::initializer_list< int >  specifiers = {} 
)

Add a coordinate (and specifiers) for an index.

void TBTK::Geometry::setCoordinates ( const Index index,
const std::vector< double > &  coordinates,
const std::vector< int > &  specifiers = {} 
)

Add a coordinate (and specifiers) for an index.

void TBTK::Geometry::setCoordinates ( int  basisIndex,
std::initializer_list< double >  coordinates,
std::initializer_list< int >  specifiers = {} 
)

Add a coordinate (and specifiers) for a Hilbert space index.

void TBTK::Geometry::setCoordinates ( int  basisIndex,
const std::vector< double > &  coordinates,
const std::vector< int > &  specifiers = {} 
)

Add a coordinate (and specifiers) for a Hilbert space index.

void TBTK::Geometry::translate ( std::initializer_list< double >  translation)

Translate all coordinates.

Friends And Related Function Documentation

friend class FileReader
friend

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


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