Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
BIAS::Tensor3D< T > Class Template Reference

#include <Base/Math/Tensor3D.hh>

+ Inheritance diagram for BIAS::Tensor3D< T >:
+ Collaboration diagram for BIAS::Tensor3D< T >:

Public Member Functions

void Destroy ()
 frees internal data More...
 
T * GetData ()
 
const T * GetData () const
 
T *** GetDataArray ()
 
int GetDim1 () const
 
int GetDim2 () const
 
int GetDim3 () const
 
GetLength () const
 
void NewSize (const int i, const int j, const int k, const T &def=(T) 0.0)
 allocates internal data More...
 
T & operator() (unsigned int i, unsigned int j, unsigned int k)
 direct data access through () operator: T_i^{jk} More...
 
Tensor3D< T > & operator= (const Tensor3D< T > &t)
 
bool operator== (const Tensor3D< T > &t)
 checks if all tensor entries are equal (up-to-scale-equality is not checked) More...
 
void Scale (T factor)
 
void SetFromVector (const BIAS::Vector< T > &v)
 set the tensor by the rows of the vector. More...
 
void SetZero ()
 set all elements to zero More...
 
 Tensor3D ()
 
 Tensor3D (const int i, const int j, const int k, const T &def=(T) 0.0)
 
 Tensor3D (const Tensor3D< T > &t)
 
BIAS::Vector< T > ToVector ()
 
 ~Tensor3D ()
 

Protected Attributes

T * _Data
 
T *** _DataArray
 
int _Dim1
 
int _Dim2
 
int _Dim3
 
int _Size
 

Detailed Description

template<class T = double>
class BIAS::Tensor3D< T >

Author
Mathias Dunda

Definition at line 40 of file Tensor3D.hh.

Constructor & Destructor Documentation

template<class T >
Tensor3D::Tensor3D ( )

Definition at line 33 of file Tensor3D.cpp.

template<class T>
Tensor3D::Tensor3D ( const int  i,
const int  j,
const int  k,
const T &  def = (T)0.0 
)

Definition at line 38 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::NewSize().

template<class T>
Tensor3D::Tensor3D ( const Tensor3D< T > &  t)

Definition at line 46 of file Tensor3D.cpp.

template<class T >
Tensor3D::~Tensor3D ( )

Definition at line 52 of file Tensor3D.cpp.

Member Function Documentation

template<class T >
void Tensor3D::Destroy ( )

frees internal data

Definition at line 90 of file Tensor3D.cpp.

template<class T = double>
T* BIAS::Tensor3D< T >::GetData ( )
inline

Definition at line 72 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::operator=(), and BIAS::Tensor3D< T >::operator==().

template<class T = double>
const T* BIAS::Tensor3D< T >::GetData ( ) const
inline

Definition at line 78 of file Tensor3D.hh.

template<class T = double>
T*** BIAS::Tensor3D< T >::GetDataArray ( )
inline

Definition at line 75 of file Tensor3D.hh.

template<class T >
int Tensor3D::GetDim1 ( ) const
template<class T >
int Tensor3D::GetDim2 ( ) const
template<class T >
int Tensor3D::GetDim3 ( ) const
template<class T >
T Tensor3D::GetLength ( ) const

Definition at line 185 of file Tensor3D.cpp.

template<class T>
void Tensor3D::NewSize ( const int  i,
const int  j,
const int  k,
const T &  def = (T)0.0 
)

allocates internal data

Definition at line 58 of file Tensor3D.cpp.

Referenced by BIAS::Tensor3D< T >::Tensor3D().

template<class T = double>
T& BIAS::Tensor3D< T >::operator() ( unsigned int  i,
unsigned int  j,
unsigned int  k 
)
inline

direct data access through () operator: T_i^{jk}

Author
mdunda 07 2004

Definition at line 96 of file Tensor3D.hh.

template<class T>
Tensor3D< T > & Tensor3D::operator= ( const Tensor3D< T > &  t)
template<class T>
bool Tensor3D::operator== ( const Tensor3D< T > &  t)

checks if all tensor entries are equal (up-to-scale-equality is not checked)

Author
mdunda 07 2004

Definition at line 138 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::GetData(), BIAS::Tensor3D< T >::GetDim1(), BIAS::Tensor3D< T >::GetDim2(), and BIAS::Tensor3D< T >::GetDim3().

template<class T>
void Tensor3D::Scale ( factor)

Definition at line 177 of file Tensor3D.cpp.

template<class T>
void Tensor3D::SetFromVector ( const BIAS::Vector< T > &  v)

set the tensor by the rows of the vector.

Vector size must be at least Dim1*Dim2*Dim3!

Author
mdunda

Definition at line 165 of file Tensor3D.cpp.

References BIAS::Vector< T >::Size().

Referenced by BIAS::TFTensorEstimation::Compute().

template<class T >
void Tensor3D::SetZero ( )

set all elements to zero

Definition at line 124 of file Tensor3D.cpp.

template<class T >
Vector< T > Tensor3D::ToVector ( )
Returns
all tensor elements in a vector
Author
mdunda

Definition at line 150 of file Tensor3D.cpp.

Member Data Documentation

template<class T = double>
T* BIAS::Tensor3D< T >::_Data
protected

Definition at line 107 of file Tensor3D.hh.

template<class T = double>
T*** BIAS::Tensor3D< T >::_DataArray
protected

Definition at line 111 of file Tensor3D.hh.

template<class T = double>
int BIAS::Tensor3D< T >::_Dim1
protected

Definition at line 112 of file Tensor3D.hh.

template<class T = double>
int BIAS::Tensor3D< T >::_Dim2
protected

Definition at line 112 of file Tensor3D.hh.

template<class T = double>
int BIAS::Tensor3D< T >::_Dim3
protected

Definition at line 112 of file Tensor3D.hh.

template<class T = double>
int BIAS::Tensor3D< T >::_Size
protected

Definition at line 112 of file Tensor3D.hh.


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