![]() |
AmpGen 2.1
|
Classes | |
struct | Dim |
class | Index |
Public Member Functions | |
Tensor () | |
Tensor (const std::vector< Expression > &elements) | |
Tensor (const std::vector< unsigned > &dim) | |
Tensor (const Tensor::Dim &dim) | |
template<class TYPE> | |
Tensor (const std::initializer_list< TYPE > &elements, const std::vector< unsigned > &dim) | |
template<class TYPE> | |
Tensor (const std::vector< TYPE > &elements, const std::vector< unsigned > &dim) | |
Expression & | operator[] (const unsigned &i) |
Low level access of elements, either by coordinates or by index ///. | |
Expression & | operator[] (const std::vector< unsigned > &co) |
const Expression & | operator[] (const unsigned &i) const |
const Expression & | operator[] (const std::vector< unsigned > &co) const |
Expression | get (const unsigned &co) |
Expression | get (const unsigned &co) const |
Expression | get (const std::vector< unsigned > &_co) const |
Expression & | operator() (const unsigned &a) |
TensorProxy access to class members High level access is done via these commands, i.e. | |
Expression & | operator() (const unsigned &a, const unsigned &b) |
const Expression | operator() (const unsigned &a) const |
const Expression & | operator() (const unsigned &a, const unsigned &b) const |
TensorProxy | operator() (const Tensor::Index &a) const |
TensorProxy | operator() (const Tensor::Index &a, const Tensor::Index &b) const |
TensorProxy | operator() (const Tensor::Index &a, const Tensor::Index &b, const Tensor::Index &c) const |
TensorProxy | operator() (const Tensor::Index &a, const Tensor::Index &b, const Tensor::Index &c, const Tensor::Index &d) const |
TensorProxy | operator() (const std::vector< Tensor::Index > &indices) const |
Tensor | operator- () const |
void | st (const bool simplify=false) |
bool | rankMatches (const Tensor &other) |
void | imposeSymmetry (unsigned indexA, unsigned indexB) |
void | imposeSymmetry (std::vector< unsigned > indices) |
Tensor | Invert () const |
std::string | to_string (const ASTResolver *resolver=nullptr) const |
int | metricSgn (const std::vector< unsigned > &coordinates) const |
int | metricSgn (const unsigned &index) const |
void | append (const Expression &expression) |
void | append (const real_t &value) |
void | append (const complex_t &value) |
void | append (const std::string &value) |
void | setupCoordinates () |
unsigned | nDim () const |
unsigned | rank () const |
unsigned | size () const |
unsigned | index (const std::vector< unsigned > &_co) const |
unsigned | symmetrisedIndex (const std::vector< unsigned > &_co) const |
unsigned | nElements () const |
const std::vector< unsigned > | coords (const unsigned &index) const |
const std::vector< unsigned > & | dims () const |
const std::string | dimString () const |
void | print (const bool &eval=false) const |
const std::vector< unsigned > & | uniqueElements () const |
void | operator+= (const Tensor &rhs) |
void | operator-= (const Tensor &rhs) |
Tensor | conjugate () const |
Static Public Member Functions | |
static std::vector< unsigned > | index_to_coordinates (const unsigned &index, const std::vector< unsigned > &dim) |
static unsigned | coordinates_to_index (const std::vector< unsigned > &coords, const std::vector< unsigned > &dim) |
static std::string | coordinates_to_string (const std::vector< unsigned > &coordinates) |
template<class... ARGS> | |
static std::vector< unsigned > | dim (const ARGS &... args) |
AmpGen::Tensor::Tensor | ( | ) |
|
explicit |
|
explicit |
|
inlineexplicit |
|
inline |
|
inline |
void AmpGen::Tensor::append | ( | const complex_t & | value | ) |
void AmpGen::Tensor::append | ( | const Expression & | expression | ) |
void AmpGen::Tensor::append | ( | const real_t & | value | ) |
void AmpGen::Tensor::append | ( | const std::string & | value | ) |
Tensor AmpGen::Tensor::conjugate | ( | ) | const |
|
static |
|
static |
const std::vector< unsigned > AmpGen::Tensor::coords | ( | const unsigned & | index | ) | const |
|
inlinestatic |
|
inline |
const std::string AmpGen::Tensor::dimString | ( | ) | const |
Expression AmpGen::Tensor::get | ( | const std::vector< unsigned > & | _co | ) | const |
Expression AmpGen::Tensor::get | ( | const unsigned & | co | ) |
Expression AmpGen::Tensor::get | ( | const unsigned & | co | ) | const |
void AmpGen::Tensor::imposeSymmetry | ( | std::vector< unsigned > | indices | ) |
void AmpGen::Tensor::imposeSymmetry | ( | unsigned | indexA, |
unsigned | indexB ) |
unsigned AmpGen::Tensor::index | ( | const std::vector< unsigned > & | _co | ) | const |
|
static |
Tensor AmpGen::Tensor::Invert | ( | ) | const |
int AmpGen::Tensor::metricSgn | ( | const std::vector< unsigned > & | coordinates | ) | const |
int AmpGen::Tensor::metricSgn | ( | const unsigned & | index | ) | const |
unsigned AmpGen::Tensor::nDim | ( | ) | const |
unsigned AmpGen::Tensor::nElements | ( | ) | const |
TensorProxy AmpGen::Tensor::operator() | ( | const std::vector< Tensor::Index > & | indices | ) | const |
TensorProxy AmpGen::Tensor::operator() | ( | const Tensor::Index & | a | ) | const |
TensorProxy AmpGen::Tensor::operator() | ( | const Tensor::Index & | a, |
const Tensor::Index & | b ) const |
TensorProxy AmpGen::Tensor::operator() | ( | const Tensor::Index & | a, |
const Tensor::Index & | b, | ||
const Tensor::Index & | c ) const |
TensorProxy AmpGen::Tensor::operator() | ( | const Tensor::Index & | a, |
const Tensor::Index & | b, | ||
const Tensor::Index & | c, | ||
const Tensor::Index & | d ) const |
|
inline |
|
inline |
|
inline |
|
inline |
void AmpGen::Tensor::operator+= | ( | const Tensor & | rhs | ) |
Tensor AmpGen::Tensor::operator- | ( | ) | const |
void AmpGen::Tensor::operator-= | ( | const Tensor & | rhs | ) |
Expression & AmpGen::Tensor::operator[] | ( | const std::vector< unsigned > & | co | ) |
const Expression & AmpGen::Tensor::operator[] | ( | const std::vector< unsigned > & | co | ) | const |
Expression & AmpGen::Tensor::operator[] | ( | const unsigned & | i | ) |
const Expression & AmpGen::Tensor::operator[] | ( | const unsigned & | i | ) | const |
void AmpGen::Tensor::print | ( | const bool & | eval = false | ) | const |
unsigned AmpGen::Tensor::rank | ( | ) | const |
bool AmpGen::Tensor::rankMatches | ( | const Tensor & | other | ) |
void AmpGen::Tensor::setupCoordinates | ( | ) |
unsigned AmpGen::Tensor::size | ( | ) | const |
void AmpGen::Tensor::st | ( | const bool | simplify = false | ) |
unsigned AmpGen::Tensor::symmetrisedIndex | ( | const std::vector< unsigned > & | _co | ) | const |
std::string AmpGen::Tensor::to_string | ( | const ASTResolver * | resolver = nullptr | ) | const |
|
inline |