v2DM-DOCI  1.0
helpers::cmatrix Class Reference

#include <helpers.h>

+ Collaboration diagram for helpers::cmatrix:

Public Member Functions

 cmatrix ()
 
 cmatrix (int n_, int m_)
 
 cmatrix (const cmatrix &orig)
 
 cmatrix (cmatrix &&orig)
 
virtual ~cmatrix ()
 
cmatrixoperator= (const cmatrix &orig)
 
cmatrixoperator= (std::complex< double > val)
 
int getn () const
 
int getm () const
 
std::complex< double > operator() (int x, int y) const
 
std::complex< double > & operator() (int x, int y)
 
std::complex< double > & operator[] (int x)
 
std::complex< double > operator[] (int x) const
 
std::complex< double > * getpointer () const
 
matrixprod (cmatrix const &A, cmatrix const &B)
 
void Print () const
 

Private Attributes

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

Detailed Description

Helper class, wrapper around a complex double array. Has methods to get the number of rows and columns. A simple matrix class.

Definition at line 89 of file helpers.h.

Constructor & Destructor Documentation

cmatrix::cmatrix ( )

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

Definition at line 340 of file helpers.cpp.

cmatrix::cmatrix ( int  n_,
int  m_ 
)
Parameters
n_number of rows
m_number of columns

Definition at line 350 of file helpers.cpp.

cmatrix::cmatrix ( const cmatrix orig)
Parameters
origcmatrix to copy

Definition at line 361 of file helpers.cpp.

+ Here is the call graph for this function:

cmatrix::cmatrix ( cmatrix &&  orig)

move constructor

Parameters
origcmatrix to copy (descrutive)

Definition at line 373 of file helpers.cpp.

virtual helpers::cmatrix::~cmatrix ( )
inlinevirtual

Definition at line 100 of file helpers.h.

Member Function Documentation

int cmatrix::getm ( ) const
Returns
number of columns

Definition at line 412 of file helpers.cpp.

int cmatrix::getn ( ) const
Returns
number of rows

Definition at line 404 of file helpers.cpp.

std::complex< double > * cmatrix::getpointer ( ) const

Definition at line 441 of file helpers.cpp.

+ Here is the caller graph for this function:

std::complex< double > cmatrix::operator() ( int  x,
int  y 
) const

Definition at line 417 of file helpers.cpp.

std::complex< double > & cmatrix::operator() ( int  x,
int  y 
)

Definition at line 423 of file helpers.cpp.

cmatrix & cmatrix::operator= ( const cmatrix orig)

Definition at line 380 of file helpers.cpp.

+ Here is the call graph for this function:

cmatrix & cmatrix::operator= ( std::complex< double >  val)

Set all cmatrix elements equal to a value

Parameters
valthe value to use

Definition at line 393 of file helpers.cpp.

std::complex< double > & cmatrix::operator[] ( int  x)

Definition at line 429 of file helpers.cpp.

std::complex< double > cmatrix::operator[] ( int  x) const

Definition at line 435 of file helpers.cpp.

void cmatrix::Print ( ) const

Definition at line 446 of file helpers.cpp.

matrix& helpers::cmatrix::prod ( cmatrix const &  A,
cmatrix const &  B 
)

Member Data Documentation

int helpers::cmatrix::m
private

number of columns

Definition at line 130 of file helpers.h.

std::unique_ptr<std::complex<double> []> helpers::cmatrix::mat
private

n by m array of complex<double>

Definition at line 126 of file helpers.h.

int helpers::cmatrix::n
private

number of rows

Definition at line 128 of file helpers.h.


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