v2DM-DOCI  1.0
helpers::tmatrix< T > Class Template Reference

#include <helpers.h>

+ Inheritance diagram for helpers::tmatrix< T >:
+ Collaboration diagram for helpers::tmatrix< T >:

Public Member Functions

 tmatrix ()
 
 tmatrix (int n_, int m_)
 
 tmatrix (const tmatrix< T > &orig)
 
 tmatrix (tmatrix< T > &&orig)
 
virtual ~tmatrix ()
 
tmatrix< T > & operator= (const tmatrix< T > &orig)
 
tmatrix< T > & operator= (T val)
 
unsigned int getn () const
 
unsigned int getm () const
 
operator() (int x, int y) const
 
T & operator() (int x, int y)
 
T & operator[] (int x)
 
operator[] (int x) const
 
T * getpointer () const
 
void Print () const
 

Private Attributes

std::unique_ptr< T[]> mat
 n by m array of double More...
 
unsigned int n
 number of rows More...
 
unsigned int m
 number of columns More...
 

Detailed Description

template<typename T>
class helpers::tmatrix< T >

Definition at line 134 of file helpers.h.

Constructor & Destructor Documentation

template<typename T >
tmatrix::tmatrix ( )

Empty tmatrix constructor. Don't use it unless you know what you're doing

Definition at line 459 of file helpers.cpp.

template<typename T >
tmatrix::tmatrix ( int  n_,
int  m_ 
)
Parameters
n_number of rows
m_number of columns

Definition at line 470 of file helpers.cpp.

template<typename T>
tmatrix::tmatrix ( const tmatrix< T > &  orig)
Parameters
origtmatrix to copy

Definition at line 482 of file helpers.cpp.

+ Here is the call graph for this function:

template<typename T>
tmatrix::tmatrix ( tmatrix< T > &&  orig)

move constructor

Parameters
origtmatrix to copy (descrutive)

Definition at line 495 of file helpers.cpp.

template<typename T>
virtual helpers::tmatrix< T >::~tmatrix ( )
inlinevirtual

Definition at line 145 of file helpers.h.

Member Function Documentation

template<typename T >
unsigned int tmatrix::getm ( ) const
Returns
number of columns

Definition at line 538 of file helpers.cpp.

template<typename T >
unsigned int tmatrix::getn ( ) const
Returns
number of rows

Definition at line 529 of file helpers.cpp.

template<typename T >
T * tmatrix::getpointer ( ) const

Definition at line 572 of file helpers.cpp.

+ Here is the caller graph for this function:

template<typename T >
T tmatrix::operator() ( int  x,
int  y 
) const

Definition at line 544 of file helpers.cpp.

template<typename T >
T & tmatrix::operator() ( int  x,
int  y 
)

Definition at line 551 of file helpers.cpp.

template<typename T>
tmatrix< T > & tmatrix::operator= ( const tmatrix< T > &  orig)

Definition at line 503 of file helpers.cpp.

+ Here is the call graph for this function:

template<typename T>
tmatrix< T > & tmatrix::operator= ( val)

Set all tmatrix elements equal to a value

Parameters
valthe value to use

Definition at line 517 of file helpers.cpp.

template<typename T >
T & tmatrix::operator[] ( int  x)

Definition at line 558 of file helpers.cpp.

template<typename T >
T tmatrix::operator[] ( int  x) const

Definition at line 565 of file helpers.cpp.

template<typename T >
void tmatrix::Print ( ) const

Definition at line 578 of file helpers.cpp.

Member Data Documentation

template<typename T>
unsigned int helpers::tmatrix< T >::m
private

number of columns

Definition at line 173 of file helpers.h.

template<typename T>
std::unique_ptr<T []> helpers::tmatrix< T >::mat
private

n by m array of double

Definition at line 169 of file helpers.h.

template<typename T>
unsigned int helpers::tmatrix< T >::n
private

number of rows

Definition at line 171 of file helpers.h.


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