Contains geometric information about a Model.
More...
#include <Geometry.h>
|
| | Geometry () |
| |
| | Geometry (const std::string &serialization, Mode mode) |
| |
| virtual | ~Geometry () |
| |
| void | setCoordinate (const Index &index, const std::vector< double > &coordinate) |
| |
| const std::vector< double > & | getCoordinate (const Index &index) const |
| |
| int | getDimensions () const |
| |
| void | translate (const std::vector< double > &translation) |
| |
| std::string | serialize (Mode mode) const |
| |
|
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) |
| |
|
| enum | Mode { Debug,
Binary,
XML,
JSON
} |
| |
| 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 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) |
| |
Contains geometric information about a Model.
◆ Geometry() [1/2]
| TBTK::Geometry::Geometry |
( |
| ) |
|
◆ Geometry() [2/2]
| TBTK::Geometry::Geometry |
( |
const std::string & |
serialization, |
|
|
Mode |
mode |
|
) |
| |
Constructs a Geometry from a serialization string.
- Parameters
-
| serialization | Serialization string from which to construct the Geometry. |
| mode | Mode with which the string has been serialized. |
◆ ~Geometry()
| virtual TBTK::Geometry::~Geometry |
( |
| ) |
|
|
virtual |
◆ getCoordinate()
| const std::vector< double > & TBTK::Geometry::getCoordinate |
( |
const Index & |
index | ) |
const |
|
inline |
Get the coordinate for a given Index.
- Parameters
-
| index | The Index to get the coordinate for. |
- Returns
- The coordinate for the given Index.
◆ getDimensions()
| int TBTK::Geometry::getDimensions |
( |
| ) |
const |
|
inline |
Get the number of dimensions of the space. If no coordinate has been set yet, the returned value is -1.
- Returns
- The number of dimensions.
◆ serialize()
| std::string TBTK::Geometry::serialize |
( |
Mode |
mode | ) |
const |
|
virtual |
◆ setCoordinate()
| void TBTK::Geometry::setCoordinate |
( |
const Index & |
index, |
|
|
const std::vector< double > & |
coordinate |
|
) |
| |
|
inline |
Set a coordinate for an index. The first added coordinate can have arbitrary number of dimensions, while the rest has to agree with the number of dimensions of the first.
- Parameters
-
| index | The Index for which to set the coordinate. |
| coordinate | The coordinate. |
◆ translate()
| void TBTK::Geometry::translate |
( |
const std::vector< double > & |
translation | ) |
|
Translate all coordinates.
- Parameters
-
| translation | The translation to be applied. |
◆ FileReader
The documentation for this class was generated from the following file: