xerus
a general purpose tensor library
|
Internal representation of an readable indexed Tensor or TensorNetwork. More...
#include <indexedTensor_tensor_factorisations.h>
Public Member Functions | |
IndexedTensorReadOnly ()=delete | |
There is no usefull default constructor. More... | |
IndexedTensorReadOnly (const IndexedTensorReadOnly &_other)=delete | |
There is no usefull copy constructor for IndexedTensors. More... | |
IndexedTensorReadOnly (IndexedTensorReadOnly< tensor_type > &&_other) noexcept | |
Move-constructor. More... | |
IndexedTensorReadOnly (const tensor_type *const _tensorObjectReadOnly, std::vector< Index > _indices) | |
Constructs an IndexedTensorReadOnly using the given pointer and indices. More... | |
virtual | ~IndexedTensorReadOnly () |
Destructor must be virtual. More... | |
void | assign_index_dimensions () |
Assignes the indices using the current tensorObejct. More... | |
void | assign_indices () |
Assignes the indices using the degree of the tensorObejct. More... | |
void | assign_indices (const size_t _degree) |
Assignes the indices assuming the given degree. More... | |
size_t | degree () const |
Returns the degree of the associated tensorObejct. More... | |
std::vector< size_t > | get_evaluated_dimensions (const std::vector< Index > &_indexOrder) |
Returns the dimensionTuple the evaluation of this IndexedTensor to the given indices would have. More... | |
operator value_t () const | |
Allows cast to value_t if the degree of the current object is equal to 0. More... | |
void | operator= (const IndexedTensorReadOnly &_rhs)=delete |
: IndexedTensorReadOnly cannot be assigned as they are read only. More... | |
void | operator= (IndexedTensorReadOnly &&_rhs)=delete |
: IndexedTensorReadOnly cannot be assigned as they are read only. More... | |
bool | uses_tensor (const tensor_type *_otherTensor) const |
Checks whether _otherTensor is the tensorObejct of this IndexTensor. More... | |
Public Attributes | |
std::vector< Index > | indices |
Vector of the associates indices. More... | |
bool | indicesAssigned = false |
Flag indicating whether the indices are assinged. More... | |
const tensor_type * | tensorObjectReadOnly |
Pointer to the associated Tensor/TensorNetwork object. More... | |
Internal representation of an readable indexed Tensor or TensorNetwork.
This class appears inplicitly by indexing any Tensor or TensorNetwork. It is not recommended to use it explicitly or to store variables of this type (unless you really know what you are doing).
Definition at line 36 of file indexedTensor_tensor_factorisations.h.
|
delete |
There is no usefull default constructor.
|
delete |
There is no usefull copy constructor for IndexedTensors.
|
noexcept |
Move-constructor.
Definition at line 41 of file indexedTensorReadOnly.cpp.
xerus::internal::IndexedTensorReadOnly< tensor_type >::IndexedTensorReadOnly | ( | const tensor_type *const | _tensorObjectReadOnly, |
std::vector< Index > | _indices | ||
) |
Constructs an IndexedTensorReadOnly using the given pointer and indices.
Definition at line 48 of file indexedTensorReadOnly.cpp.
|
virtualdefault |
Destructor must be virtual.
void xerus::internal::IndexedTensorReadOnly< tensor_type >::assign_index_dimensions | ( | ) |
Assignes the indices using the current tensorObejct.
Definition at line 118 of file indexedTensorReadOnly.cpp.
void xerus::internal::IndexedTensorReadOnly< tensor_type >::assign_indices | ( | ) |
Assignes the indices using the degree of the tensorObejct.
Definition at line 76 of file indexedTensorReadOnly.cpp.
void xerus::internal::IndexedTensorReadOnly< tensor_type >::assign_indices | ( | const size_t | _degree | ) |
Assignes the indices assuming the given degree.
Definition at line 81 of file indexedTensorReadOnly.cpp.
size_t xerus::internal::IndexedTensorReadOnly< tensor_type >::degree | ( | ) | const |
Returns the degree of the associated tensorObejct.
Definition at line 71 of file indexedTensorReadOnly.cpp.
std::vector< size_t > xerus::internal::IndexedTensorReadOnly< tensor_type >::get_evaluated_dimensions | ( | const std::vector< Index > & | _indexOrder | ) |
Returns the dimensionTuple the evaluation of this IndexedTensor to the given indices would have.
Definition at line 139 of file indexedTensorReadOnly.cpp.
|
explicit |
Allows cast to value_t if the degree of the current object is equal to 0.
Definition at line 60 of file indexedTensorReadOnly.cpp.
|
delete |
: IndexedTensorReadOnly cannot be assigned as they are read only.
|
delete |
: IndexedTensorReadOnly cannot be assigned as they are read only.
bool xerus::internal::IndexedTensorReadOnly< tensor_type >::uses_tensor | ( | const tensor_type * | _otherTensor | ) | const |
Checks whether _otherTensor is the tensorObejct of this IndexTensor.
Definition at line 66 of file indexedTensorReadOnly.cpp.
std::vector<Index> xerus::internal::IndexedTensorReadOnly< tensor_type >::indices |
Vector of the associates indices.
Definition at line 55 of file indexedTensorReadOnly.h.
bool xerus::internal::IndexedTensorReadOnly< tensor_type >::indicesAssigned = false |
Flag indicating whether the indices are assinged.
Definition at line 58 of file indexedTensorReadOnly.h.
const tensor_type* xerus::internal::IndexedTensorReadOnly< tensor_type >::tensorObjectReadOnly |
Pointer to the associated Tensor/TensorNetwork object.
Definition at line 52 of file indexedTensorReadOnly.h.