xerus
a general purpose tensor library
xerus::internal::IndexedTensorReadOnly< tensor_type > Class Template Reference

Internal representation of an readable indexed Tensor or TensorNetwork. More...

#include <indexedTensor_tensor_factorisations.h>

Inheritance diagram for xerus::internal::IndexedTensorReadOnly< tensor_type >:
Collaboration diagram for xerus::internal::IndexedTensorReadOnly< tensor_type >:

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< Indexindices
 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...
 

Detailed Description

template<class tensor_type>
class xerus::internal::IndexedTensorReadOnly< tensor_type >

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.

Constructor & Destructor Documentation

◆ IndexedTensorReadOnly() [1/4]

template<class tensor_type>
xerus::internal::IndexedTensorReadOnly< tensor_type >::IndexedTensorReadOnly ( )
delete

There is no usefull default constructor.

◆ IndexedTensorReadOnly() [2/4]

template<class tensor_type>
xerus::internal::IndexedTensorReadOnly< tensor_type >::IndexedTensorReadOnly ( const IndexedTensorReadOnly< tensor_type > &  _other)
delete

There is no usefull copy constructor for IndexedTensors.

◆ IndexedTensorReadOnly() [3/4]

template<class tensor_type>
xerus::internal::IndexedTensorReadOnly< tensor_type >::IndexedTensorReadOnly ( IndexedTensorReadOnly< tensor_type > &&  _other)
noexcept

Move-constructor.

Definition at line 41 of file indexedTensorReadOnly.cpp.

◆ IndexedTensorReadOnly() [4/4]

template<class tensor_type>
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.

◆ ~IndexedTensorReadOnly()

template<class tensor_type >
xerus::internal::IndexedTensorReadOnly< tensor_type >::~IndexedTensorReadOnly ( )
virtualdefault

Destructor must be virtual.

Member Function Documentation

◆ assign_index_dimensions()

template<class tensor_type >
void xerus::internal::IndexedTensorReadOnly< tensor_type >::assign_index_dimensions ( )

Assignes the indices using the current tensorObejct.

Definition at line 118 of file indexedTensorReadOnly.cpp.

◆ assign_indices() [1/2]

template<class tensor_type >
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.

◆ assign_indices() [2/2]

template<class tensor_type >
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.

◆ degree()

template<class tensor_type >
size_t xerus::internal::IndexedTensorReadOnly< tensor_type >::degree ( ) const

Returns the degree of the associated tensorObejct.

Definition at line 71 of file indexedTensorReadOnly.cpp.

◆ get_evaluated_dimensions()

template<class tensor_type >
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.

◆ operator value_t()

template<class tensor_type >
xerus::internal::IndexedTensorReadOnly< tensor_type >::operator value_t ( ) const
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.

◆ operator=() [1/2]

template<class tensor_type>
void xerus::internal::IndexedTensorReadOnly< tensor_type >::operator= ( const IndexedTensorReadOnly< tensor_type > &  _rhs)
delete

: IndexedTensorReadOnly cannot be assigned as they are read only.

◆ operator=() [2/2]

template<class tensor_type>
void xerus::internal::IndexedTensorReadOnly< tensor_type >::operator= ( IndexedTensorReadOnly< tensor_type > &&  _rhs)
delete

: IndexedTensorReadOnly cannot be assigned as they are read only.

◆ uses_tensor()

template<class tensor_type>
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.

Member Data Documentation

◆ indices

template<class tensor_type>
std::vector<Index> xerus::internal::IndexedTensorReadOnly< tensor_type >::indices

Vector of the associates indices.

Definition at line 55 of file indexedTensorReadOnly.h.

◆ indicesAssigned

template<class tensor_type>
bool xerus::internal::IndexedTensorReadOnly< tensor_type >::indicesAssigned = false

Flag indicating whether the indices are assinged.

Definition at line 58 of file indexedTensorReadOnly.h.

◆ tensorObjectReadOnly

template<class tensor_type>
const tensor_type* xerus::internal::IndexedTensorReadOnly< tensor_type >::tensorObjectReadOnly

Pointer to the associated Tensor/TensorNetwork object.

Definition at line 52 of file indexedTensorReadOnly.h.


The documentation for this class was generated from the following files: