ug4
ug::MathTensor< TRank, N, T > Class Template Reference

a mathematical Tensor of rank TRank and N entries. More...

#include <math_tensor.h>

Public Types

typedef size_t size_type
 
typedef MathTensor< TRank-1, N, T > value_type
 

Public Member Functions

 MathTensor ()
 
 MathTensor (const MathTensor &v)
 
MathTensoroperator= (const MathTensor &v)
 
MathTensoroperator= (T val)
 sets all values of the tensor to a value More...
 
value_typeoperator[] (size_t i)
 
const value_typeoperator[] (size_t i) const
 
size_t rank () const
 
void set (T val)
 
size_t size () const
 

Static Public Attributes

static const size_t Dimension = N
 
static const size_t Rank = TRank
 

Protected Member Functions

void assign (const MathTensor< TRank, N, T > &v)
 

Protected Attributes

value_type m_data [N]
 

Detailed Description

template<size_t TRank, size_t N, typename T>
class ug::MathTensor< TRank, N, T >

a mathematical Tensor of rank TRank and N entries.

Member Typedef Documentation

◆ size_type

template<size_t TRank, size_t N, typename T >
typedef size_t ug::MathTensor< TRank, N, T >::size_type

◆ value_type

template<size_t TRank, size_t N, typename T >
typedef MathTensor<TRank-1, N, T> ug::MathTensor< TRank, N, T >::value_type

Constructor & Destructor Documentation

◆ MathTensor() [1/2]

template<size_t TRank, size_t N, typename T >
ug::MathTensor< TRank, N, T >::MathTensor ( )
inline

◆ MathTensor() [2/2]

template<size_t TRank, size_t N, typename T >
ug::MathTensor< TRank, N, T >::MathTensor ( const MathTensor< TRank, N, T > &  v)
inline

Member Function Documentation

◆ assign()

template<size_t TRank, size_t N, typename T >
void ug::MathTensor< TRank, N, T >::assign ( const MathTensor< TRank, N, T > &  v)
inlineprotected

◆ operator=() [1/2]

template<size_t TRank, size_t N, typename T >
MathTensor& ug::MathTensor< TRank, N, T >::operator= ( const MathTensor< TRank, N, T > &  v)
inline

◆ operator=() [2/2]

template<size_t TRank, size_t N, typename T >
MathTensor& ug::MathTensor< TRank, N, T >::operator= ( val)
inline

sets all values of the tensor to a value

References ug::MathTensor< TRank, N, T >::set().

◆ operator[]() [1/2]

template<size_t TRank, size_t N, typename T >
value_type& ug::MathTensor< TRank, N, T >::operator[] ( size_t  i)
inline

◆ operator[]() [2/2]

template<size_t TRank, size_t N, typename T >
const value_type& ug::MathTensor< TRank, N, T >::operator[] ( size_t  i) const
inline

◆ rank()

template<size_t TRank, size_t N, typename T >
size_t ug::MathTensor< TRank, N, T >::rank ( ) const
inline

◆ set()

◆ size()

template<size_t TRank, size_t N, typename T >
size_t ug::MathTensor< TRank, N, T >::size ( ) const
inline

Member Data Documentation

◆ Dimension

template<size_t TRank, size_t N, typename T >
const size_t ug::MathTensor< TRank, N, T >::Dimension = N
static

◆ m_data

◆ Rank

template<size_t TRank, size_t N, typename T >
const size_t ug::MathTensor< TRank, N, T >::Rank = TRank
static

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