tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
TensorND< T, Dims > Class Template Reference

#include <tensor.h>

Inheritance diagram for TensorND< T, Dims >:
Inheritance graph
[legend]

Public Member Functions

 TensorND ()
 
 TensorND (T initValue)
 
 TensorND (const TensorND &other)
 
 TensorND (TensorND &&other) noexcept
 
template<typename... Indices>
T & operator() (Indices... indices)
 
template<typename... Indices>
const T & operator() (Indices... indices) const
 
template<my_size_t length>
T & operator() (my_size_t(&indices)[length])
 
template<my_size_t length>
const T & operator() (my_size_t(&indices)[length]) const
 
template<my_size_t... Dims1>
bool operator== (const TensorND< T, Dims1... > &other) const
 
template<my_size_t... Dims1>
bool operator!= (const TensorND< T, Dims1... > &other) const
 
TensorNDoperator= (const TensorND &other)
 
TensorND operator+ (const T scalar) const
 
template<my_size_t... Dims1>
TensorND operator+ (const TensorND< T, Dims1... > &other) const
 
TensorND operator- (const T scalar) const
 
TensorND operator- (void) const
 
template<my_size_t... Dims1>
TensorND operator- (const TensorND< T, Dims1... > &other) const
 
TensorND operator* (const T scalar) const
 
template<my_size_t... Dims1>
TensorND operator* (const TensorND< T, Dims1... > &other) const
 
TensorND operator/ (const T scalar) const
 
template<my_size_t... Dims1>
TensorND operator/ (const TensorND< T, Dims1... > &other) const
 
constexpr bool areDimsEqual () const
 
bool isIdentity () const
 
TensorND transposed (const my_size_t order[sizeof...(Dims)]) const
 
void inplace_transpose (const my_size_t order[sizeof...(Dims)])
 
TensorND transposed (void) const
 
void inplace_transpose (void)
 
constexpr my_size_t getTotalSize () const
 
constexpr my_size_t getNumDims () const
 
std::string getShape () const
 
TensorNDsetToZero (void)
 
TensorNDsetHomogen (T _val)
 
TensorNDsetRandom (my_size_t _maxRand, my_size_t _minRand)
 
TensorNDsetDiagonal (T _val)
 
TensorNDsetIdentity (void)
 
TensorNDsetSequencial (void)
 
template<my_size_t DiagonalSize>
void getDiagonalEntries (TensorND< T, DiagonalSize, 1 > &diagonalEntries) const
 
void print () const
 
my_size_t getDim (my_size_t i) const
 

Static Public Member Functions

static TensorND I (void)
 
template<my_size_t... Dims1, my_size_t... Dims2>
static TensorND einsum (const TensorND< T, Dims1... > &_tensor1, const TensorND< T, Dims2... > &_tensor2, my_size_t a, my_size_t b)
 

Friends

TensorND operator+ (const T scalar, const TensorND &tensor)
 
TensorND operator- (const T scalar, const TensorND &tensor)
 
TensorND operator* (const T scalar, const TensorND &tensor)
 
TensorND operator/ (const T scalar, const TensorND &tensor)
 

Constructor & Destructor Documentation

◆ TensorND() [1/4]

template<typename T , my_size_t... Dims>
TensorND< T, Dims >::TensorND ( )
inline

◆ TensorND() [2/4]

template<typename T , my_size_t... Dims>
TensorND< T, Dims >::TensorND ( initValue)
inline

◆ TensorND() [3/4]

template<typename T , my_size_t... Dims>
TensorND< T, Dims >::TensorND ( const TensorND< T, Dims > &  other)
inline
Here is the call graph for this function:

◆ TensorND() [4/4]

template<typename T , my_size_t... Dims>
TensorND< T, Dims >::TensorND ( TensorND< T, Dims > &&  other)
inlinenoexcept
Here is the call graph for this function:

Member Function Documentation

◆ areDimsEqual()

template<typename T , my_size_t... Dims>
constexpr bool TensorND< T, Dims >::areDimsEqual ( ) const
inlineconstexpr
Here is the call graph for this function:

◆ einsum()

template<typename T , my_size_t... Dims>
template<my_size_t... Dims1, my_size_t... Dims2>
static TensorND TensorND< T, Dims >::einsum ( const TensorND< T, Dims1... > &  _tensor1,
const TensorND< T, Dims2... > &  _tensor2,
my_size_t  a,
my_size_t  b 
)
inlinestatic
Here is the call graph for this function:

◆ getDiagonalEntries()

template<typename T , my_size_t... Dims>
template<my_size_t DiagonalSize>
void TensorND< T, Dims >::getDiagonalEntries ( TensorND< T, DiagonalSize, 1 > &  diagonalEntries) const
inline
Here is the call graph for this function:

◆ getDim()

template<typename T , my_size_t... Dims>
my_size_t TensorND< T, Dims >::getDim ( my_size_t  i) const
inline

◆ getNumDims()

template<typename T , my_size_t... Dims>
constexpr my_size_t TensorND< T, Dims >::getNumDims ( ) const
inlineconstexpr

◆ getShape()

template<typename T , my_size_t... Dims>
std::string TensorND< T, Dims >::getShape ( ) const
inline
Here is the call graph for this function:

◆ getTotalSize()

template<typename T , my_size_t... Dims>
constexpr my_size_t TensorND< T, Dims >::getTotalSize ( ) const
inlineconstexpr

◆ I()

template<typename T , my_size_t... Dims>
static TensorND TensorND< T, Dims >::I ( void  )
inlinestatic
Here is the call graph for this function:

◆ inplace_transpose() [1/2]

template<typename T , my_size_t... Dims>
void TensorND< T, Dims >::inplace_transpose ( const my_size_t  order[sizeof...(Dims)])
inline
Here is the call graph for this function:

◆ inplace_transpose() [2/2]

template<typename T , my_size_t... Dims>
void TensorND< T, Dims >::inplace_transpose ( void  )
inline

◆ isIdentity()

template<typename T , my_size_t... Dims>
bool TensorND< T, Dims >::isIdentity ( ) const
inline
Here is the call graph for this function:

◆ operator!=()

template<typename T , my_size_t... Dims>
template<my_size_t... Dims1>
bool TensorND< T, Dims >::operator!= ( const TensorND< T, Dims1... > &  other) const
inline

◆ operator()() [1/4]

template<typename T , my_size_t... Dims>
template<typename... Indices>
T & TensorND< T, Dims >::operator() ( Indices...  indices)
inline

◆ operator()() [2/4]

template<typename T , my_size_t... Dims>
template<typename... Indices>
const T & TensorND< T, Dims >::operator() ( Indices...  indices) const
inline

◆ operator()() [3/4]

template<typename T , my_size_t... Dims>
template<my_size_t length>
T & TensorND< T, Dims >::operator() ( my_size_t(&)  indices[length])
inline

◆ operator()() [4/4]

template<typename T , my_size_t... Dims>
template<my_size_t length>
const T & TensorND< T, Dims >::operator() ( my_size_t(&)  indices[length]) const
inline

◆ operator*() [1/2]

template<typename T , my_size_t... Dims>
TensorND TensorND< T, Dims >::operator* ( const T  scalar) const
inline

◆ operator*() [2/2]

template<typename T , my_size_t... Dims>
template<my_size_t... Dims1>
TensorND TensorND< T, Dims >::operator* ( const TensorND< T, Dims1... > &  other) const
inline
Here is the call graph for this function:

◆ operator+() [1/2]

template<typename T , my_size_t... Dims>
TensorND TensorND< T, Dims >::operator+ ( const T  scalar) const
inline

◆ operator+() [2/2]

template<typename T , my_size_t... Dims>
template<my_size_t... Dims1>
TensorND TensorND< T, Dims >::operator+ ( const TensorND< T, Dims1... > &  other) const
inline
Here is the call graph for this function:

◆ operator-() [1/3]

template<typename T , my_size_t... Dims>
TensorND TensorND< T, Dims >::operator- ( const T  scalar) const
inline

◆ operator-() [2/3]

template<typename T , my_size_t... Dims>
template<my_size_t... Dims1>
TensorND TensorND< T, Dims >::operator- ( const TensorND< T, Dims1... > &  other) const
inline
Here is the call graph for this function:

◆ operator-() [3/3]

template<typename T , my_size_t... Dims>
TensorND TensorND< T, Dims >::operator- ( void  ) const
inline

◆ operator/() [1/2]

template<typename T , my_size_t... Dims>
TensorND TensorND< T, Dims >::operator/ ( const T  scalar) const
inline
Here is the call graph for this function:

◆ operator/() [2/2]

template<typename T , my_size_t... Dims>
template<my_size_t... Dims1>
TensorND TensorND< T, Dims >::operator/ ( const TensorND< T, Dims1... > &  other) const
inline
Here is the call graph for this function:

◆ operator=()

template<typename T , my_size_t... Dims>
TensorND & TensorND< T, Dims >::operator= ( const TensorND< T, Dims > &  other)
inline
Here is the call graph for this function:

◆ operator==()

template<typename T , my_size_t... Dims>
template<my_size_t... Dims1>
bool TensorND< T, Dims >::operator== ( const TensorND< T, Dims1... > &  other) const
inline
Here is the call graph for this function:

◆ print()

template<typename T , my_size_t... Dims>
void TensorND< T, Dims >::print ( ) const
inline

◆ setDiagonal()

template<typename T , my_size_t... Dims>
TensorND & TensorND< T, Dims >::setDiagonal ( _val)
inline
Here is the call graph for this function:

◆ setHomogen()

template<typename T , my_size_t... Dims>
TensorND & TensorND< T, Dims >::setHomogen ( _val)
inline

◆ setIdentity()

template<typename T , my_size_t... Dims>
TensorND & TensorND< T, Dims >::setIdentity ( void  )
inline
Here is the call graph for this function:

◆ setRandom()

template<typename T , my_size_t... Dims>
TensorND & TensorND< T, Dims >::setRandom ( my_size_t  _maxRand,
my_size_t  _minRand 
)
inline

◆ setSequencial()

template<typename T , my_size_t... Dims>
TensorND & TensorND< T, Dims >::setSequencial ( void  )
inline

◆ setToZero()

template<typename T , my_size_t... Dims>
TensorND & TensorND< T, Dims >::setToZero ( void  )
inline

◆ transposed() [1/2]

template<typename T , my_size_t... Dims>
TensorND TensorND< T, Dims >::transposed ( const my_size_t  order[sizeof...(Dims)]) const
inline
Here is the call graph for this function:

◆ transposed() [2/2]

template<typename T , my_size_t... Dims>
TensorND TensorND< T, Dims >::transposed ( void  ) const
inline

Friends And Related Symbol Documentation

◆ operator*

template<typename T , my_size_t... Dims>
TensorND operator* ( const T  scalar,
const TensorND< T, Dims > &  tensor 
)
friend

◆ operator+

template<typename T , my_size_t... Dims>
TensorND operator+ ( const T  scalar,
const TensorND< T, Dims > &  tensor 
)
friend

◆ operator-

template<typename T , my_size_t... Dims>
TensorND operator- ( const T  scalar,
const TensorND< T, Dims > &  tensor 
)
friend

◆ operator/

template<typename T , my_size_t... Dims>
TensorND operator/ ( const T  scalar,
const TensorND< T, Dims > &  tensor 
)
friend

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