TBCI::CTensor< T > Class Template Reference

Note (KG, 981214): We don't handle rank == 0. More...

#include <tensor.h>

Inheritance diagram for TBCI::CTensor< T >:

Inheritance graph
[legend]
Collaboration diagram for TBCI::CTensor< T >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef T value_type
typedef T element_type
typedef T aligned_value_type

Public Member Functions

 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
T & operator() (const Index &ix)
tbci_traits< T >::const_refval_type operator() (const Index &ix) const
T & operator() (vararg va,...)
tbci_traits< T >::const_refval_type operator() (vararg va,...) const
T & operator() (const unsigned long i)
tbci_traits< T >::const_refval_type operator() (const unsigned long i) const
const T & getcref (vararg va,...) const
T & get_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)
max (unsigned long &pos) const
min (unsigned long &pos) const
max () const
min () const
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

Protected Member Functions

unsigned long calcsize (void)
unsigned calclayout ()

Protected Attributes

Vector< T > data
unsigned rank
unsigned long noel
Index shape
Index layout

Friends

std::ostream & operator<< (std::ostream &, const CTensor< T > &)
std::istream & operator>> (std::istream &, CTensor< T > &)


Detailed Description

template<typename T>
class TBCI::CTensor< T >

Note (KG, 981214): We don't handle rank == 0.

container class without arithmetics

Definition at line 51 of file tensor.h.


Member Typedef Documentation

template<typename T>
typedef T TBCI::CTensor< T >::value_type

Reimplemented in TBCI::Tensor< T >.

Definition at line 80 of file tensor.h.

template<typename T>
typedef T TBCI::CTensor< T >::element_type

Reimplemented in TBCI::Tensor< T >.

Definition at line 81 of file tensor.h.

template<typename T>
typedef T TBCI::CTensor< T >::aligned_value_type

Reimplemented in TBCI::Tensor< T >.

Definition at line 82 of file tensor.h.


Constructor & Destructor Documentation

template<typename T>
TBCI::CTensor< T >::CTensor (  )  [inline]

Definition at line 84 of file tensor.h.

template<typename T>
TBCI::CTensor< T >::CTensor ( const unsigned  dim_rank  )  [inline, explicit]

Definition at line 221 of file tensor.h.

template<typename T>
TBCI::CTensor< T >::CTensor ( const Index ix  )  [inline]

Definition at line 230 of file tensor.h.

template<typename T>
TBCI::CTensor< T >::CTensor ( const T &  value,
const Index ix 
) [inline]

Definition at line 239 of file tensor.h.

template<typename T>
TBCI::CTensor< T >::CTensor ( const CTensor< T > &  ct  )  [inline]

Definition at line 250 of file tensor.h.

template<typename T>
TBCI::CTensor< T >::CTensor ( vararg  va,
  ... 
) [inline]

template<typename T>
TBCI::CTensor< T >::CTensor ( const T  value,
vararg  va,
  ... 
) [inline]

template<typename T>
TBCI::CTensor< T >::~CTensor (  )  [inline]

Definition at line 92 of file tensor.h.


Member Function Documentation

template<typename T>
unsigned long TBCI::CTensor< T >::calcsize ( void   )  [inline, protected]

Definition at line 60 of file tensor.h.

Referenced by TBCI::CTensor< T >::CTensor(), and TBCI::Tensor< T >::Tensor().

template<typename T>
unsigned TBCI::CTensor< T >::calclayout (  )  [inline, protected]

Definition at line 67 of file tensor.h.

References fac().

Referenced by TBCI::CTensor< T >::CTensor(), and TBCI::Tensor< T >::Tensor().

template<typename T>
unsigned long TBCI::CTensor< T >::calc_offs ( const Index ix  )  const [inline]

template<typename T>
Index TBCI::CTensor< T >::calc_indx ( const unsigned long  i  )  const [inline]

template<typename T>
T& TBCI::CTensor< T >::operator() ( const Index ix  )  [inline]

Definition at line 101 of file tensor.h.

template<typename T>
tbci_traits<T>::const_refval_type TBCI::CTensor< T >::operator() ( const Index ix  )  const [inline]

Definition at line 104 of file tensor.h.

template<typename T>
T & TBCI::CTensor< T >::operator() ( vararg  va,
  ... 
) [inline]

template<typename T>
tbci_traits< T >::const_refval_type TBCI::CTensor< T >::operator() ( vararg  va,
  ... 
) const [inline]

template<typename T>
T& TBCI::CTensor< T >::operator() ( const unsigned long  i  )  [inline]

Definition at line 110 of file tensor.h.

References BCHKNR.

template<typename T>
tbci_traits<T>::const_refval_type TBCI::CTensor< T >::operator() ( const unsigned long  i  )  const [inline]

Definition at line 114 of file tensor.h.

References BCHKNR.

template<typename T>
const T & TBCI::CTensor< T >::getcref ( vararg  va,
  ... 
) const [inline]

template<typename T>
T& TBCI::CTensor< T >::get_lin_idx ( const unsigned long  i  )  [inline]

Definition at line 120 of file tensor.h.

template<typename T>
tbci_traits<T>::const_refval_type TBCI::CTensor< T >::get_lin_idx ( const unsigned long  i  )  const [inline]

Definition at line 123 of file tensor.h.

template<typename T>
unsigned TBCI::CTensor< T >::lin_read ( vararg  va,
  ... 
) [inline]

Definition at line 285 of file tensor.h.

References TBCI::CTensor< T >::data, and T.

template<typename T>
CTensor<T>& TBCI::CTensor< T >::transpose ( const unsigned  i,
const unsigned  j 
) [inline]

Definition at line 131 of file tensor.h.

References BCHK, and TBCI::SWAP().

template<typename T>
CTensor<T>& TBCI::CTensor< T >::fill ( const T &  value  )  [inline]

Definition at line 140 of file tensor.h.

template<typename T>
CTensor<T>& TBCI::CTensor< T >::operator= ( const CTensor< T > &  ct  )  [inline]

template<typename T>
CTensor<T>& TBCI::CTensor< T >::operator= ( const T &  value  )  [inline]

Definition at line 151 of file tensor.h.

template<typename T>
CTensor<T>& TBCI::CTensor< T >::resize ( const Index ix  )  [inline]

Definition at line 155 of file tensor.h.

References TBCI::TVector< T >::size().

template<typename T>
CTensor<T>& TBCI::CTensor< T >::resize ( const T &  val,
const Index ix 
) [inline]

Definition at line 162 of file tensor.h.

References TBCI::TVector< T >::size().

template<typename T>
CTensor<T>& TBCI::CTensor< T >::resize ( const CTensor< T > &  ct  )  [inline]

template<typename T>
T TBCI::CTensor< T >::max ( unsigned long &  pos  )  const [inline]

Definition at line 177 of file tensor.h.

template<typename T>
T TBCI::CTensor< T >::min ( unsigned long &  pos  )  const [inline]

Definition at line 178 of file tensor.h.

template<typename T>
T TBCI::CTensor< T >::max (  )  const [inline]

Definition at line 180 of file tensor.h.

template<typename T>
T TBCI::CTensor< T >::min (  )  const [inline]

Definition at line 181 of file tensor.h.

template<typename T>
T TBCI::CTensor< T >::trace (  )  const [inline]

Definition at line 183 of file tensor.h.

template<typename T>
bool TBCI::CTensor< T >::operator== ( const CTensor< T > &  ct  )  [inline]

template<typename T>
bool TBCI::CTensor< T >::operator!= ( const CTensor< T > &  ct  )  [inline]

Definition at line 201 of file tensor.h.

References TBCI::operator==().

template<typename T>
unsigned long TBCI::CTensor< T >::lin_size ( void   )  const [inline]

Definition at line 205 of file tensor.h.

template<typename T>
Index TBCI::CTensor< T >::index_size ( void   )  const [inline]

Definition at line 207 of file tensor.h.

template<typename T>
unsigned TBCI::CTensor< T >::rank_size ( void   )  const [inline]

Definition at line 209 of file tensor.h.


Friends And Related Function Documentation

template<typename T>
std:: ostream& operator<< ( std::ostream &  os,
const CTensor< T > &  ct 
) [friend]

Definition at line 352 of file tensor.h.

template<typename T>
std:: istream& operator>> ( std::istream &  is,
CTensor< T > &  ct 
) [friend]

Definition at line 371 of file tensor.h.


Member Data Documentation

template<typename T>
Vector<T> TBCI::CTensor< T >::data [protected]

template<typename T>
unsigned TBCI::CTensor< T >::rank [protected]

template<typename T>
unsigned long TBCI::CTensor< T >::noel [protected]

template<typename T>
Index TBCI::CTensor< T >::shape [protected]

template<typename T>
Index TBCI::CTensor< T >::layout [protected]


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

Generated on Wed Nov 20 09:29:42 2013 for TBCI Numerical high perf. C++ Library by  doxygen 1.5.6