Openholo  v4.0
Open Source Digital Holographic Library
oph::matrix< T > Class Template Reference

#include <mat.h>

Collaboration diagram for oph::matrix< T >:

Public Types

using typeT = typename std::enable_if< std::is_same< Real, T >::value||std::is_same< Real_t, T >::value||std::is_same< int, T >::value||std::is_same< uchar, T >::value||std::is_same< Complex< Real >, T >::value||std::is_same< Complex< Real_t >, T >::value, T >::type
 

Public Member Functions

 matrix (void)
 
 matrix (int x, int y)
 
 matrix (ivec2 _size)
 
 matrix (const matrix< T > &ref)
 
 ~matrix ()
 
void init (void)
 
void release (void)
 
oph::ivec2getSize (void)
 
matrix< T > & resize (int x, int y)
 
matrix< T > & identity (void)
 
matrix< T > & zeros (void)
 
matrix< T > & add (matrix< T > &p)
 
matrix< T > & sub (matrix< T > &p)
 
matrix< T > & mul (matrix< T > &p)
 
matrix< T > & div (matrix< T > &p)
 
matrix< T > & mulElem (matrix< T > &p)
 
std::vector< T > & operator[] (const int index)
 
T & operator() (int x, int y)
 
void operator= (const matrix< T > &p)
 
void operator= (T *p)
 
matrix< T > & operator+ (matrix< T > &p)
 
matrix< T > & operator- (matrix< T > &p)
 
matrix< T > & operator* (matrix< T > &p)
 
matrix< T > & operator/ (matrix< T > &p)
 
matrix< T > & operator+ (const T &p)
 
const matrix< T > & operator- (const T &p)
 
const matrix< T > & operator* (const T &p)
 
const matrix< T > & operator/ (const T &p)
 

Public Attributes

std::vector< T > * mat
 
ivec2 size
 

Detailed Description

template<typename T>
class oph::matrix< T >

Definition at line 61 of file mat.h.

Member Typedef Documentation

◆ typeT

template<typename T>
using oph::matrix< T >::typeT = typename std::enable_if< std::is_same<Real, T>::value || std::is_same<Real_t, T>::value || std::is_same<int, T>::value || std::is_same<uchar, T>::value || std::is_same<Complex<Real>, T>::value || std::is_same<Complex<Real_t>, T>::value, T>::type

Definition at line 68 of file mat.h.

Constructor & Destructor Documentation

◆ matrix() [1/4]

template<typename T>
oph::matrix< T >::matrix ( void  )
inline

Definition at line 73 of file mat.h.

◆ matrix() [2/4]

template<typename T>
oph::matrix< T >::matrix ( int  x,
int  y 
)
inline

Definition at line 77 of file mat.h.

◆ matrix() [3/4]

template<typename T>
oph::matrix< T >::matrix ( ivec2  _size)
inline

Definition at line 81 of file mat.h.

◆ matrix() [4/4]

template<typename T>
oph::matrix< T >::matrix ( const matrix< T > &  ref)
inline

Definition at line 85 of file mat.h.

◆ ~matrix()

template<typename T>
oph::matrix< T >::~matrix ( )
inline

Definition at line 93 of file mat.h.

Member Function Documentation

◆ add()

template<typename T>
matrix<T>& oph::matrix< T >::add ( matrix< T > &  p)
inline

Definition at line 231 of file mat.h.

◆ div()

template<typename T>
matrix<T>& oph::matrix< T >::div ( matrix< T > &  p)
inline

Definition at line 274 of file mat.h.

◆ getSize()

template<typename T>
oph::ivec2& oph::matrix< T >::getSize ( void  )
inline

Definition at line 115 of file mat.h.

◆ identity()

template<typename T>
matrix<T>& oph::matrix< T >::identity ( void  )
inline

Definition at line 127 of file mat.h.

◆ init()

template<typename T>
void oph::matrix< T >::init ( void  )
inline

Definition at line 97 of file mat.h.

◆ mul()

template<typename T>
matrix<T>& oph::matrix< T >::mul ( matrix< T > &  p)
inline

Definition at line 255 of file mat.h.

◆ mulElem()

template<typename T>
matrix<T>& oph::matrix< T >::mulElem ( matrix< T > &  p)
inline

Definition at line 286 of file mat.h.

◆ operator()()

template<typename T>
T& oph::matrix< T >::operator() ( int  x,
int  y 
)
inline

Definition at line 308 of file mat.h.

◆ operator*() [1/2]

template<typename T>
matrix<T>& oph::matrix< T >::operator* ( matrix< T > &  p)
inline

Definition at line 360 of file mat.h.

◆ operator*() [2/2]

template<typename T>
const matrix<T>& oph::matrix< T >::operator* ( const T &  p)
inline

Definition at line 386 of file mat.h.

◆ operator+() [1/2]

template<typename T>
matrix<T>& oph::matrix< T >::operator+ ( matrix< T > &  p)
inline

Definition at line 352 of file mat.h.

◆ operator+() [2/2]

template<typename T>
matrix<T>& oph::matrix< T >::operator+ ( const T &  p)
inline

Definition at line 368 of file mat.h.

◆ operator-() [1/2]

template<typename T>
matrix<T>& oph::matrix< T >::operator- ( matrix< T > &  p)
inline

Definition at line 356 of file mat.h.

◆ operator-() [2/2]

template<typename T>
const matrix<T>& oph::matrix< T >::operator- ( const T &  p)
inline

Definition at line 377 of file mat.h.

◆ operator/() [1/2]

template<typename T>
matrix<T>& oph::matrix< T >::operator/ ( matrix< T > &  p)
inline

Definition at line 364 of file mat.h.

◆ operator/() [2/2]

template<typename T>
const matrix<T>& oph::matrix< T >::operator/ ( const T &  p)
inline

Definition at line 395 of file mat.h.

◆ operator=() [1/2]

template<typename T>
void oph::matrix< T >::operator= ( const matrix< T > &  p)
inline

Definition at line 312 of file mat.h.

◆ operator=() [2/2]

template<typename T>
void oph::matrix< T >::operator= ( T *  p)
inline

Definition at line 323 of file mat.h.

◆ operator[]()

template<typename T>
std::vector<T>& oph::matrix< T >::operator[] ( const int  index)
inline

Definition at line 304 of file mat.h.

◆ release()

template<typename T>
void oph::matrix< T >::release ( void  )
inline

Definition at line 109 of file mat.h.

◆ resize()

template<typename T>
matrix<T>& oph::matrix< T >::resize ( int  x,
int  y 
)
inline

Definition at line 117 of file mat.h.

◆ sub()

template<typename T>
matrix<T>& oph::matrix< T >::sub ( matrix< T > &  p)
inline

Definition at line 243 of file mat.h.

◆ zeros()

template<typename T>
matrix<T>& oph::matrix< T >::zeros ( void  )
inline

Definition at line 140 of file mat.h.

Member Data Documentation

◆ mat

template<typename T>
std::vector<T>* oph::matrix< T >::mat

Definition at line 70 of file mat.h.

◆ size

template<typename T>
ivec2 oph::matrix< T >::size

Definition at line 71 of file mat.h.


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