v2DM-DOCI
1.0
|
#include <helpers.h>
Public Member Functions | |
cmatrix () | |
cmatrix (int n_, int m_) | |
cmatrix (const cmatrix &orig) | |
cmatrix (cmatrix &&orig) | |
virtual | ~cmatrix () |
cmatrix & | operator= (const cmatrix &orig) |
cmatrix & | operator= (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 |
matrix & | prod (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... | |
Helper class, wrapper around a complex double array. Has methods to get the number of rows and columns. A simple matrix class.
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_ | ||
) |
n_ | number of rows |
m_ | number of columns |
Definition at line 350 of file helpers.cpp.
cmatrix::cmatrix | ( | const cmatrix & | orig | ) |
orig | cmatrix to copy |
Definition at line 361 of file helpers.cpp.
cmatrix::cmatrix | ( | cmatrix && | orig | ) |
move constructor
orig | cmatrix to copy (descrutive) |
Definition at line 373 of file helpers.cpp.
int cmatrix::getm | ( | ) | const |
Definition at line 412 of file helpers.cpp.
int cmatrix::getn | ( | ) | const |
Definition at line 404 of file helpers.cpp.
std::complex< double > * cmatrix::getpointer | ( | ) | const |
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= | ( | std::complex< double > | val | ) |
Set all cmatrix elements equal to a value
val | the 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.
|
private |