TBCI Numerical high perf. C++ Library 2.8.0
Tensor< T > Class Template Reference

Tensor class including arithmetics. More...

#include <tensor.h>

Inheritance diagram for Tensor< T >:
Collaboration diagram for Tensor< T >:

Public Types

typedef T value_type
 
typedef T element_type
 
typedef T aligned_value_type TALIGN(MIN_ALIGN2)
 
- Public Types inherited from CTensor< T >
typedef T value_type
 
typedef T element_type
 
typedef T aligned_value_type TALIGN(MIN_ALIGN2)
 

Public Member Functions

 Tensor ()
 
 Tensor (const unsigned dim_rank)
 
 Tensor (const Index &ix)
 
 Tensor (const T &value, const Index &ix)
 
 Tensor (const Tensor< T > &ct)
 
 Tensor (vararg va,...)
 
 Tensor (const T, vararg va,...)
 
 ~Tensor ()
 
Tensor< T > & operator+= (const Tensor< T > &)
 
Tensor< T > & operator-= (const Tensor< T > &)
 
Tensor< Toperator+ (const Tensor< T > &) const
 
Tensor< Toperator- (const Tensor< T > &) const
 
Tensor< T > & operator*= (const T m)
 
Tensor< T > & operator/= (const T m)
 
Tensor< T > & operator+= (const T m)
 
Tensor< T > & operator-= (const T m)
 
Tensor< Toperator* (const T m) const
 
Tensor< Tmult (const T) const
 
Tensor< Toperator/ (const T m) const
 
Tensor< Toperator- () const
 
Tensor< Tcontract (const unsigned, const unsigned) const
 
Tensor< Tdrctmul (const Tensor< T > &) const
 
Tensor< Tcntrmul (const Tensor< T > &, const unsigned, const unsigned) const
 
- Public Member Functions inherited from CTensor< T >
 CTensor ()
 
 CTensor (const unsigned dim_rank)
 
 CTensor (const Index &ix)
 
 CTensor (const T &value, const Index &ix)
 
 CTensor (const CTensor &ct)
 
 CTensor (vararg va,...)
 
 CTensor (const T, vararg va,...)
 
 ~CTensor ()
 
unsigned long calc_offs (const Index &ix) const
 
Index calc_indx (const unsigned long i) const
 
Toperator() (const Index &ix)
 
tbci_traits< T >::const_refval_type operator() (const Index &ix) const
 
Toperator() (vararg va,...)
 
tbci_traits< T >::const_refval_type operator() (vararg va,...) const
 
Toperator() (const unsigned long i)
 
tbci_traits< T >::const_refval_type operator() (const unsigned long i) const
 
const Tgetcref (vararg va,...) const
 
Tget_lin_idx (const unsigned long i)
 
tbci_traits< T >::const_refval_type get_lin_idx (const unsigned long i) const
 
unsigned lin_read (vararg va,...)
 
CTensor< T > & transpose (const unsigned i, const unsigned j)
 
CTensor< T > & fill (const T &value)
 
CTensor< T > & operator= (const CTensor< T > &ct)
 
CTensor< T > & operator= (const T &value)
 
CTensor< T > & resize (const Index &ix)
 
CTensor< T > & resize (const T &val, const Index &ix)
 
CTensor< T > & resize (const CTensor< T > &ct)
 
T max (unsigned long &pos) const
 
T min (unsigned long &pos) const
 
T max () const
 
T min () const
 
T trace () const
 
bool operator== (const CTensor< T > &ct)
 
bool operator!= (const CTensor< T > &ct)
 
unsigned long lin_size (void) const
 
Index index_size (void) const
 
unsigned rank_size (void) const
 

Friends

Tensor< T > FRIEND_TBCI2__ dctmul FGD (const Tensor< T > &, const Tensor< T > &)
 
Tensor< T > FRIEND_TBCI2__ ctrmul FGD (const Tensor< T > &, const Tensor< T > &, const unsigned, const unsigned)
 
Tensor< T > FRIEND_TBCI2__ metrmul FGD (const Tensor< T > &, const Tensor< T > &, const unsigned, const unsigned)
 

Additional Inherited Members

- Protected Member Functions inherited from CTensor< T >
unsigned long calcsize (void)
 
unsigned calclayout ()
 
- Protected Attributes inherited from CTensor< T >
Vector< Tdata
 
unsigned rank
 
unsigned long noel
 
Index shape
 
Index layout
 

Detailed Description

template<typename T>
class Tensor< T >

Tensor class including arithmetics.

Definition at line 466 of file tensor.h.

Member Typedef Documentation

◆ element_type

template<typename T>
typedef T Tensor< T >::element_type

Definition at line 475 of file tensor.h.

◆ TALIGN

template<typename T>
typedef T aligned_value_type Tensor< T >::TALIGN(MIN_ALIGN2)

Definition at line 476 of file tensor.h.

◆ value_type

template<typename T>
typedef T Tensor< T >::value_type

Definition at line 474 of file tensor.h.

Constructor & Destructor Documentation

◆ Tensor() [1/7]

◆ Tensor() [2/7]

template<typename T>
Tensor< T >::Tensor ( const unsigned dim_rank)
inline

Definition at line 479 of file tensor.h.

References CTensor< T >::CTensor(), and T.

◆ Tensor() [3/7]

template<typename T>
Tensor< T >::Tensor ( const Index & ix)
inline

Definition at line 480 of file tensor.h.

References CTensor< T >::CTensor(), and T.

◆ Tensor() [4/7]

template<typename T>
Tensor< T >::Tensor ( const T & value,
const Index & ix )
inline

Definition at line 481 of file tensor.h.

References CTensor< T >::CTensor(), and T.

◆ Tensor() [5/7]

template<typename T>
Tensor< T >::Tensor ( const Tensor< T > & ct)
inline

Definition at line 482 of file tensor.h.

References CTensor< T >::CTensor(), and T.

◆ Tensor() [6/7]

template<typename T>
Tensor< T >::Tensor ( vararg va,
... )
inline

◆ Tensor() [7/7]

template<typename T>
Tensor< T >::Tensor ( const T value,
vararg va,
... )
inline

◆ ~Tensor()

template<typename T>
Tensor< T >::~Tensor ( )
inline

Definition at line 485 of file tensor.h.

Member Function Documentation

◆ cntrmul()

template<typename T>
Tensor< T > Tensor< T >::cntrmul ( const Tensor< T > & t2,
const unsigned i1,
const unsigned i2 ) const

◆ contract()

template<typename T>
Tensor< T > Tensor< T >::contract ( const unsigned i1,
const unsigned i2 ) const

◆ drctmul()

template<typename T>
Tensor< T > Tensor< T >::drctmul ( const Tensor< T > & t1) const

◆ mult()

template<typename T>
Tensor< T > Tensor< T >::mult ( const T m) const

Definition at line 817 of file tensor.h.

References CTensor< T >::data, i, CTensor< T >::noel, res, CTensor< T >::shape, T, and Tensor().

Referenced by operator*().

◆ operator*()

template<typename T>
Tensor< T > Tensor< T >::operator* ( const T m) const
inline

Definition at line 499 of file tensor.h.

References CTensor< T >::data, i, CTensor< T >::noel, CTensor< T >::shape, T, and Tensor().

◆ operator*=()

template<typename T>
Tensor< T > & Tensor< T >::operator*= ( const T m)
inline

Definition at line 494 of file tensor.h.

References CTensor< T >::data, T, and Tensor().

◆ operator+()

template<typename T>
Tensor< T > Tensor< T >::operator+ ( const Tensor< T > & t) const

◆ operator+=() [1/2]

template<typename T>
Tensor< T > & Tensor< T >::operator+= ( const T m)
inline

Definition at line 496 of file tensor.h.

References CTensor< T >::data, T, and Tensor().

◆ operator+=() [2/2]

template<typename T>
Tensor< T > & Tensor< T >::operator+= ( const Tensor< T > & t)

◆ operator-() [1/2]

template<typename T>
Tensor< T > Tensor< T >::operator- ( ) const
inline

Definition at line 519 of file tensor.h.

References CTensor< T >::data, i, CTensor< T >::noel, CTensor< T >::shape, and Tensor().

◆ operator-() [2/2]

template<typename T>
Tensor< T > Tensor< T >::operator- ( const Tensor< T > & t) const

◆ operator-=() [1/2]

template<typename T>
Tensor< T > & Tensor< T >::operator-= ( const T m)
inline

Definition at line 497 of file tensor.h.

References CTensor< T >::data, T, and Tensor().

◆ operator-=() [2/2]

template<typename T>
Tensor< T > & Tensor< T >::operator-= ( const Tensor< T > & t)

◆ operator/()

template<typename T>
Tensor< T > Tensor< T >::operator/ ( const T m) const
inline

Definition at line 511 of file tensor.h.

References CTensor< T >::data, i, CTensor< T >::noel, CTensor< T >::shape, T, and Tensor().

◆ operator/=()

template<typename T>
Tensor< T > & Tensor< T >::operator/= ( const T m)
inline

Definition at line 495 of file tensor.h.

References CTensor< T >::data, T, and Tensor().

Friends And Related Symbol Documentation

◆ FGD [1/3]

template<typename T>
Tensor< T > FRIEND_TBCI2__ dctmul FGD ( const Tensor< T > & ,
const Tensor< T > &  )
friend

References dctmul(), FRIEND_TBCI2__, and Tensor().

◆ FGD [2/3]

template<typename T>
Tensor< T > FRIEND_TBCI2__ ctrmul FGD ( const Tensor< T > & ,
const Tensor< T > & ,
const unsigned ,
const unsigned  )
friend

References ctrmul(), FRIEND_TBCI2__, and Tensor().

◆ FGD [3/3]

template<typename T>
Tensor< T > FRIEND_TBCI2__ metrmul FGD ( const Tensor< T > & ,
const Tensor< T > & ,
const unsigned ,
const unsigned  )
friend

References FRIEND_TBCI2__, metrmul(), and Tensor().


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