xerus
a general purpose tensor library
|
Abstract internal representation of an read and writeable indexed Tensor or TensorNetwork. More...
#include <indexedTensorReadOnly.h>
Public Member Functions | |
virtual | ~IndexedTensorWritable () |
template<> | |
void | indexed_assignement (IndexedTensorReadOnly< Tensor > &&_rhs) |
void | indexed_assignement (IndexedTensorReadOnly< Tensor > &&_rhs) |
Tensor assignment with indices. More... | |
void | indexed_assignement (IndexedTensorReadOnly< TensorNetwork > &&_rhs) |
Tensor assignment with indices. More... | |
template<> | |
void | indexed_assignement (IndexedTensorReadOnly< TensorNetwork > &&_rhs) |
template<> | |
void | indexed_assignement (IndexedTensorReadOnly< Tensor > &&_rhs) |
template<> | |
void | indexed_assignement (IndexedTensorReadOnly< TensorNetwork > &&_rhs) |
void | indexed_minus_equal (IndexedTensorReadOnly< tensor_type > &&_rhs) |
Tensor subtract_assignment with indices. More... | |
template<> | |
void | indexed_minus_equal (IndexedTensorReadOnly< Tensor > &&_rhs) |
template<> | |
void | indexed_minus_equal (IndexedTensorReadOnly< TensorNetwork > &&_rhs) |
void | indexed_plus_equal (IndexedTensorReadOnly< tensor_type > &&_rhs) |
Tensor add_assignment with indices. More... | |
template<> | |
void | indexed_plus_equal (IndexedTensorReadOnly< Tensor > &&_rhs) |
template<> | |
void | indexed_plus_equal (IndexedTensorReadOnly< TensorNetwork > &&_rhs) |
bool | is_owner () const |
Check whether the IndexedTensorWritable has ownership of the tensor object. More... | |
void | perform_traces () |
: Performes all traces induces by the current indices and therby also evaluates all fixed indices. More... | |
template<> | |
void | perform_traces () |
Public Member Functions inherited from xerus::internal::IndexedTensorReadOnly< tensor_type > | |
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 | |
bool | deleteTensorObject |
Flag indicating, whether the IndexedTensorWritable is the owner of the tensorObject. More... | |
tensor_type * | tensorObject |
Non-const pointer to the tensor object. More... | |
Public Attributes inherited from xerus::internal::IndexedTensorReadOnly< tensor_type > | |
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... | |
Protected Member Functions | |
IndexedTensorWritable ()=delete | |
There is no usefull default constructor;. More... | |
IndexedTensorWritable (const IndexedTensorWritable &_other)=delete | |
There is no usefull copy constructor, because the handling of the tensorObject is unclear. More... | |
IndexedTensorWritable (IndexedTensorWritable &&_other) noexcept | |
Move constructor. More... | |
IndexedTensorWritable (tensor_type *const _tensorObject, const std::vector< Index > &_indices, const bool _takeOwnership) | |
Constructs an IndexedTensorWritable with the given tensor and takes owership of the tensorObject if requested. More... | |
IndexedTensorWritable (tensor_type *const _tensorObject, std::vector< Index > &&_indices, const bool _takeOwnership) | |
Constructs an IndexedTensorWritable with the given tensor and takes owership of the tensorObject if requested. More... | |
Abstract internal representation of an read and writeable indexed Tensor or TensorNetwork.
This class (without specialization) should not appear or be used anywhere.
Definition at line 38 of file indexedTensorReadOnly.h.
|
protecteddelete |
There is no usefull default constructor;.
|
protecteddelete |
There is no usefull copy constructor, because the handling of the tensorObject is unclear.
|
protectednoexcept |
Move constructor.
Definition at line 39 of file indexedTensorWritable.cpp.
|
protected |
Constructs an IndexedTensorWritable with the given tensor and takes owership of the tensorObject if requested.
Definition at line 45 of file indexedTensorWritable.cpp.
|
protected |
Constructs an IndexedTensorWritable with the given tensor and takes owership of the tensorObject if requested.
Definition at line 50 of file indexedTensorWritable.cpp.
|
virtual |
Definition at line 55 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< Tensor >::indexed_assignement | ( | IndexedTensorReadOnly< Tensor > && | _rhs | ) |
Definition at line 68 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< tensor_type >::indexed_assignement | ( | IndexedTensorReadOnly< Tensor > && | _rhs | ) |
Tensor assignment with indices.
void xerus::internal::IndexedTensorWritable< tensor_type >::indexed_assignement | ( | IndexedTensorReadOnly< TensorNetwork > && | _rhs | ) |
Tensor assignment with indices.
void xerus::internal::IndexedTensorWritable< Tensor >::indexed_assignement | ( | IndexedTensorReadOnly< TensorNetwork > && | _rhs | ) |
Definition at line 82 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< TensorNetwork >::indexed_assignement | ( | IndexedTensorReadOnly< Tensor > && | _rhs | ) |
Definition at line 122 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< TensorNetwork >::indexed_assignement | ( | IndexedTensorReadOnly< TensorNetwork > && | _rhs | ) |
Definition at line 127 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< tensor_type >::indexed_minus_equal | ( | IndexedTensorReadOnly< tensor_type > && | _rhs | ) |
Tensor subtract_assignment with indices.
void xerus::internal::IndexedTensorWritable< Tensor >::indexed_minus_equal | ( | IndexedTensorReadOnly< Tensor > && | _rhs | ) |
Definition at line 139 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< TensorNetwork >::indexed_minus_equal | ( | IndexedTensorReadOnly< TensorNetwork > && | _rhs | ) |
Definition at line 152 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< tensor_type >::indexed_plus_equal | ( | IndexedTensorReadOnly< tensor_type > && | _rhs | ) |
Tensor add_assignment with indices.
void xerus::internal::IndexedTensorWritable< Tensor >::indexed_plus_equal | ( | IndexedTensorReadOnly< Tensor > && | _rhs | ) |
Definition at line 132 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< TensorNetwork >::indexed_plus_equal | ( | IndexedTensorReadOnly< TensorNetwork > && | _rhs | ) |
Definition at line 147 of file indexedTensorWritable.cpp.
bool xerus::internal::IndexedTensorWritable< tensor_type >::is_owner | ( | ) | const |
Check whether the IndexedTensorWritable has ownership of the tensor object.
Definition at line 63 of file indexedTensorWritable.cpp.
void xerus::internal::IndexedTensorWritable< tensor_type >::perform_traces | ( | ) |
: Performes all traces induces by the current indices and therby also evaluates all fixed indices.
void xerus::internal::IndexedTensorWritable< Tensor >::perform_traces | ( | ) |
Definition at line 157 of file indexedTensorWritable.cpp.
bool xerus::internal::IndexedTensorWritable< tensor_type >::deleteTensorObject |
Flag indicating, whether the IndexedTensorWritable is the owner of the tensorObject.
Definition at line 45 of file indexedTensorWritable.h.
tensor_type* xerus::internal::IndexedTensorWritable< tensor_type >::tensorObject |
Non-const pointer to the tensor object.
This must always coincide with tensorObjectReadOnly.
Definition at line 42 of file indexedTensorWritable.h.