TBTK
|
Need a break? Support the development by playing Polarity Puzzles |
Array with additional information about its axes. More...
#include <AnnotatedArray.h>
Public Member Functions | |
AnnotatedArray () | |
AnnotatedArray (const Array< DataType > &array, const std::vector< std::vector< AxesType >> &axes) | |
AnnotatedArray (const std::string &serialization, Serializable::Mode mode) | |
const std::vector< std::vector< AxesType > > & | getAxes () const |
std::string | serialize (Serializable::Mode mode) const |
Public Member Functions inherited from TBTK::Array< DataType > | |
Array () | |
Array (const std::initializer_list< unsigned int > &ranges) | |
Array (const std::initializer_list< unsigned int > &ranges, const DataType &fillValue) | |
Array (const std::vector< DataType > &vector) | |
Array (const std::vector< std::vector< DataType >> &vector) | |
Array (const Range &range) | |
Array (const std::string &serialization, Mode mode) | |
template<typename CastType > | |
operator Array< CastType > () const | |
DataType & | operator[] (const std::vector< unsigned int > &index) |
const DataType & | operator[] (const std::vector< unsigned int > &index) const |
DataType & | operator[] (unsigned int n) |
const DataType & | operator[] (unsigned int n) const |
Array | operator+ (const Array &rhs) const |
Array | operator- (const Array &rhs) const |
Array | operator* (const DataType &rhs) const |
Array | operator* (const Array &rhs) const |
Array | operator/ (const DataType &rhs) const |
bool | operator== (const Array &rhs) const |
Array< DataType > | getSlice (const std::vector< Subindex > &index) const |
Array< DataType > | getArrayWithPermutedIndices (const std::vector< unsigned int > &permutation) const |
Array< DataType > | getArrayWithReversedIndices () const |
const std::vector< unsigned int > & | getRanges () const |
CArray< DataType > & | getData () |
const CArray< DataType > & | getData () const |
unsigned int | getSize () const |
std::string | serialize (Mode mode) const |
Public Member Functions inherited from TBTK::Serializable | |
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) |
Additional Inherited Members | |
Public Types inherited from TBTK::Serializable | |
enum | Mode { Debug, Binary, XML, JSON } |
Static Public Member Functions inherited from TBTK::Array< DataType > | |
static Array | create (const std::vector< unsigned int > &ranges) |
static Array | create (const std::vector< unsigned int > &ranges, const DataType &fillValue) |
static Array | contract (const Array &array0, const std::vector< Subindex > &pattern0, const Array &array1, const std::vector< Subindex > &pattern1) |
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) |
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) |
Array with additional information about its axes.
The AnnotatedArray extends the Array with axes. The number of axes must be the same as the number of Array dimensions and each axis must have the same number of entries as the corresponding Array range.
TBTK::AnnotatedArray< DataType, AxesType >::AnnotatedArray |
Constructor.
TBTK::AnnotatedArray< DataType, AxesType >::AnnotatedArray | ( | const Array< DataType > & | array, |
const std::vector< std::vector< AxesType >> & | axes | ||
) |
TBTK::AnnotatedArray< DataType, AxesType >::AnnotatedArray | ( | const std::string & | serialization, |
Serializable::Mode | mode | ||
) |
Constructs an AnnotatedArray from a serialization string.
serialization | Serialization string from which to construct the AnnotatedArray. |
mode | The mode with which the string has been serialized. |
const std::vector< std::vector< AxesType > > & TBTK::AnnotatedArray< DataType, AxesType >::getAxes |
Return the axes of the AnnotatedArray.
|
virtual |
Implements Serilizable::serialize().
Implements TBTK::Serializable.