rheolef  7.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
rheolef::tensor_basic< T > Class Template Reference

#include <tensor.h>

Public Types

typedef size_t size_type
 
typedef T element_type
 
typedef T float_type
 

Public Member Functions

 tensor_basic (const T &init_val=0)
 
 tensor_basic (T x[3][3])
 
 tensor_basic (const tensor_basic< T > &a)
 
tensor_basic< T > & operator= (const tensor_basic< T > &a)
 
tensor_basic< T > & operator= (const T &val)
 
void fill (const T &init_val)
 
void reset ()
 
void set_row (const point_basic< T > &r, size_t i, size_t d=3)
 
void set_column (const point_basic< T > &c, size_t j, size_t d=3)
 
T & operator() (size_type i, size_type j)
 
const T & operator() (size_type i, size_type j) const
 
point_basic< T > row (size_type i) const
 
point_basic< T > col (size_type i) const
 
size_t nrow () const
 
size_t ncol () const
 
std::ostream & put (std::ostream &s, size_type d=3) const
 
std::istream & get (std::istream &)
 
bool operator== (const tensor_basic< T > &) const
 
bool operator!= (const tensor_basic< T > &b) const
 
const tensor_basic< T > & operator+ () const
 
tensor_basic< T > operator- () const
 
tensor_basic< T > operator+ (const tensor_basic< T > &b) const
 
tensor_basic< T > operator- (const tensor_basic< T > &b) const
 
tensor_basic< T > operator* (const tensor_basic< T > &b) const
 
tensor_basic< T > operator* (const T &k) const
 
tensor_basic< T > operator/ (const T &k) const
 
point_basic< T > operator* (const point_basic< T > &) const
 
point_basic< T > trans_mult (const point_basic< T > &x) const
 
determinant (size_type d=3) const
 
point_basic< T > eig (tensor_basic< T > &q, size_t dim=3) const
 
point_basic< T > eig (size_t dim=3) const
 
point_basic< T > svd (tensor_basic< T > &u, tensor_basic< T > &v, size_t dim=3) const
 

Static Public Member Functions

static tensor_basic< T > eye (size_type d=3)
 

Public Attributes

_x [3][3]
 

Detailed Description

template<class T>
class rheolef::tensor_basic< T >

Definition at line 20 of file tensor.h.

Member Typedef Documentation

◆ size_type

template<class T>
typedef size_t rheolef::tensor_basic< T >::size_type

Definition at line 23 of file tensor.h.

◆ element_type

template<class T>
typedef T rheolef::tensor_basic< T >::element_type

Definition at line 24 of file tensor.h.

◆ float_type

template<class T>
typedef T rheolef::tensor_basic< T >::float_type

Definition at line 25 of file tensor.h.

Constructor & Destructor Documentation

◆ tensor_basic() [1/3]

template<class T>
rheolef::tensor_basic< T >::tensor_basic ( const T &  init_val = 0)
inline

Definition at line 155 of file tensor.h.

◆ tensor_basic() [2/3]

template<class T>
rheolef::tensor_basic< T >::tensor_basic ( x[3][3])
inline

Definition at line 161 of file tensor.h.

◆ tensor_basic() [3/3]

template<class T>
rheolef::tensor_basic< T >::tensor_basic ( const tensor_basic< T > &  a)
inline

Definition at line 168 of file tensor.h.

Member Function Documentation

◆ eye()

template<class T >
tensor_basic< T > rheolef::tensor_basic< T >::eye ( size_type  d = 3)
inlinestatic

Definition at line 339 of file tensor.h.

◆ operator=() [1/2]

template<class T>
tensor_basic< T > & rheolef::tensor_basic< T >::operator= ( const tensor_basic< T > &  a)
inline

Definition at line 199 of file tensor.h.

◆ operator=() [2/2]

template<class T>
tensor_basic< T > & rheolef::tensor_basic< T >::operator= ( const T &  val)
inline

Definition at line 208 of file tensor.h.

◆ fill()

template<class T>
void rheolef::tensor_basic< T >::fill ( const T &  init_val)
inline

Definition at line 141 of file tensor.h.

◆ reset()

template<class T >
void rheolef::tensor_basic< T >::reset ( )
inline

Definition at line 149 of file tensor.h.

◆ set_row()

template<class T>
void rheolef::tensor_basic< T >::set_row ( const point_basic< T > &  r,
size_t  i,
size_t  d = 3 
)
inline

Definition at line 331 of file tensor.h.

◆ set_column()

template<class T>
void rheolef::tensor_basic< T >::set_column ( const point_basic< T > &  c,
size_t  j,
size_t  d = 3 
)
inline

Definition at line 323 of file tensor.h.

◆ operator()() [1/2]

template<class T >
T & rheolef::tensor_basic< T >::operator() ( size_type  i,
size_type  j 
)
inline

Definition at line 231 of file tensor.h.

◆ operator()() [2/2]

template<class T >
const T & rheolef::tensor_basic< T >::operator() ( size_type  i,
size_type  j 
) const
inline

Definition at line 238 of file tensor.h.

◆ row()

template<class T >
point_basic< T > rheolef::tensor_basic< T >::row ( size_type  i) const

Definition at line 244 of file tensor.cc.

◆ col()

template<class T >
point_basic< T > rheolef::tensor_basic< T >::col ( size_type  i) const

Definition at line 254 of file tensor.cc.

◆ nrow()

template<class T >
size_t rheolef::tensor_basic< T >::nrow ( ) const
inline

Definition at line 217 of file tensor.h.

◆ ncol()

template<class T >
size_t rheolef::tensor_basic< T >::ncol ( ) const
inline

Definition at line 224 of file tensor.h.

◆ put()

template<class T >
ostream & rheolef::tensor_basic< T >::put ( std::ostream &  s,
size_type  d = 3 
) const

Definition at line 11 of file tensor.cc.

◆ get()

template<class T >
istream & rheolef::tensor_basic< T >::get ( std::istream &  in)

Definition at line 25 of file tensor.cc.

◆ operator==()

template<class T>
bool rheolef::tensor_basic< T >::operator== ( const tensor_basic< T > &  b) const

Definition at line 70 of file tensor.cc.

◆ operator!=()

template<class T>
bool rheolef::tensor_basic< T >::operator!= ( const tensor_basic< T > &  b) const
inline

Definition at line 62 of file tensor.h.

◆ operator+() [1/2]

template<class T>
const tensor_basic<T>& rheolef::tensor_basic< T >::operator+ ( ) const
inline

Definition at line 63 of file tensor.h.

◆ operator-() [1/2]

template<class T >
tensor_basic< T > rheolef::tensor_basic< T >::operator- ( ) const

Definition at line 79 of file tensor.cc.

◆ operator+() [2/2]

template<class T>
tensor_basic< T > rheolef::tensor_basic< T >::operator+ ( const tensor_basic< T > &  b) const

Definition at line 90 of file tensor.cc.

◆ operator-() [2/2]

template<class T>
tensor_basic< T > rheolef::tensor_basic< T >::operator- ( const tensor_basic< T > &  b) const

Definition at line 101 of file tensor.cc.

◆ operator*() [1/3]

template<class T>
tensor_basic< T > rheolef::tensor_basic< T >::operator* ( const tensor_basic< T > &  b) const

Definition at line 204 of file tensor.cc.

◆ operator*() [2/3]

template<class T>
tensor_basic< T > rheolef::tensor_basic< T >::operator* ( const T &  k) const

Definition at line 112 of file tensor.cc.

◆ operator/()

template<class T>
tensor_basic< T > rheolef::tensor_basic< T >::operator/ ( const T &  k) const
inline

Definition at line 256 of file tensor.h.

◆ operator*() [3/3]

template<class T>
point_basic< T > rheolef::tensor_basic< T >::operator* ( const point_basic< T > &  x) const

Definition at line 123 of file tensor.cc.

◆ trans_mult()

template<class T>
point_basic< T > rheolef::tensor_basic< T >::trans_mult ( const point_basic< T > &  x) const
inline

Definition at line 263 of file tensor.h.

◆ determinant()

template<class T >
T rheolef::tensor_basic< T >::determinant ( size_type  d = 3) const

Definition at line 221 of file tensor.cc.

◆ eig() [1/2]

template<class T>
point_basic< T > rheolef::tensor_basic< T >::eig ( tensor_basic< T > &  q,
size_t  dim = 3 
) const

Definition at line 328 of file tensor.cc.

◆ eig() [2/2]

template<class T>
point_basic< T > rheolef::tensor_basic< T >::eig ( size_t  dim = 3) const

Definition at line 341 of file tensor.cc.

◆ svd()

template<class T>
point_basic< T > rheolef::tensor_basic< T >::svd ( tensor_basic< T > &  u,
tensor_basic< T > &  v,
size_t  dim = 3 
) const

Definition at line 348 of file tensor.cc.

Member Data Documentation

◆ _x

template<class T>
T rheolef::tensor_basic< T >::_x[3][3]

Definition at line 83 of file tensor.h.


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