|
DOCI-Exact
1.0
|
#include <helpers.h>
Public Member Functions | |
| matrix () | |
| matrix (int n_, int m_) | |
| matrix (const matrix &orig) | |
| matrix (matrix &&orig) | |
| virtual | ~matrix () |
| matrix & | operator= (const matrix &orig) |
| matrix & | operator= (double val) |
| matrix & | operator+= (const matrix &orig) |
| matrix & | operator-= (const matrix &orig) |
| int | getn () const |
| int | getm () const |
| double | operator() (int x, int y) const |
| double & | operator() (int x, int y) |
| double & | operator[] (int x) |
| double | operator[] (int x) const |
| double * | getpointer () const |
| matrix & | prod (matrix const &A, matrix const &B) |
| std::unique_ptr< double[]> | svd () |
| void | mvprod (const double *x, double *y, double beta) const |
| void | Print () const |
| double | trace () const |
| std::vector< double > | GetColumn (unsigned int) const |
| const double * | GetColumnRaw (unsigned int idx) const |
| void | SaveToFile (std::string filename) const |
| void | ReadFromFile (std::string filename) const |
| matrix () | |
| matrix (int n_, int m_) | |
| matrix (const matrix &orig) | |
| matrix (matrix &&orig) | |
| virtual | ~matrix () |
| matrix & | operator= (const matrix &orig) |
| matrix & | operator= (double val) |
| matrix & | operator+= (const matrix &orig) |
| matrix & | operator-= (const matrix &orig) |
| int | getn () const |
| int | getm () const |
| double | operator() (int x, int y) const |
| double & | operator() (int x, int y) |
| double & | operator[] (int x) |
| double | operator[] (int x) const |
| double * | getpointer () const |
| matrix & | prod (matrix const &A, matrix const &B) |
| std::unique_ptr< double[]> | svd () |
| void | mvprod (const double *x, double *y, double beta) const |
| void | Print () const |
| double | trace () const |
| std::vector< double > | GetColumn (unsigned int) const |
| const double * | GetColumnRaw (unsigned int idx) const |
| void | SaveToFile (std::string filename) const |
| void | ReadFromFile (std::string filename) const |
Helper class, wrapper around a double array. Has methods to get the number of rows and columns. A simple matrix class.
| matrix::matrix | ( | ) |
Empty matrix constructor. Don't use it unless you know what you're doing
Definition at line 42 of file helpers.cpp.
| matrix::matrix | ( | int | n_, |
| int | m_ | ||
| ) |
| n_ | number of rows |
| m_ | number of columns |
Definition at line 52 of file helpers.cpp.
| matrix::matrix | ( | const matrix & | orig | ) |
| orig | matrix to copy |
Definition at line 63 of file helpers.cpp.
Here is the call graph for this function:| matrix::matrix | ( | matrix && | orig | ) |
move constructor
| orig | matrix to copy (descrutive) |
Definition at line 75 of file helpers.cpp.
| helpers::matrix::matrix | ( | ) |
| helpers::matrix::matrix | ( | int | n_, |
| int | m_ | ||
| ) |
| helpers::matrix::matrix | ( | const matrix & | orig | ) |
| helpers::matrix::matrix | ( | matrix && | orig | ) |
| std::vector< double > matrix::GetColumn | ( | unsigned int | idx | ) | const |
Get a column out of a matrix.
| idx | the number of the column |
Definition at line 255 of file helpers.cpp.
| std::vector<double> helpers::matrix::GetColumn | ( | unsigned | int | ) | const |
| const double * matrix::GetColumnRaw | ( | unsigned int | idx | ) | const |
Dangerious brother of GetColumn(), it returns a raw pointer to a column. If this object goes out of scope, this pointer will no longer be valid
| idx | the number of the column |
Definition at line 272 of file helpers.cpp.
| const double* helpers::matrix::GetColumnRaw | ( | unsigned int | idx | ) | const |
| int matrix::getm | ( | ) | const |
Definition at line 136 of file helpers.cpp.
Here is the caller graph for this function:| int helpers::matrix::getm | ( | ) | const |
| int matrix::getn | ( | ) | const |
Definition at line 128 of file helpers.cpp.
Here is the caller graph for this function:| int helpers::matrix::getn | ( | ) | const |
| double * matrix::getpointer | ( | ) | const |
| double* helpers::matrix::getpointer | ( | ) | const |
| void helpers::matrix::mvprod | ( | const double * | x, |
| double * | y, | ||
| double | beta | ||
| ) | const |
| void matrix::mvprod | ( | const double * | x, |
| double * | y, | ||
| double | beta | ||
| ) | const |
| double helpers::matrix::operator() | ( | int | x, |
| int | y | ||
| ) | const |
| double matrix::operator() | ( | int | x, |
| int | y | ||
| ) | const |
Definition at line 141 of file helpers.cpp.
| double & matrix::operator() | ( | int | x, |
| int | y | ||
| ) |
Definition at line 147 of file helpers.cpp.
| double& helpers::matrix::operator() | ( | int | x, |
| int | y | ||
| ) |
| matrix & matrix::operator= | ( | double | val | ) |
Set all matrix elements equal to a value
| val | the value to use |
Definition at line 95 of file helpers.cpp.
| matrix& helpers::matrix::operator= | ( | double | val | ) |
| double & matrix::operator[] | ( | int | x | ) |
Definition at line 153 of file helpers.cpp.
| double& helpers::matrix::operator[] | ( | int | x | ) |
| double matrix::operator[] | ( | int | x | ) | const |
Definition at line 159 of file helpers.cpp.
| double helpers::matrix::operator[] | ( | int | x | ) | const |
| void matrix::Print | ( | ) | const |
Definition at line 233 of file helpers.cpp.
| void helpers::matrix::Print | ( | ) | const |
Matrix-Matrix product of A and B. Store result in this
| A | first matrix |
| B | second matrix |
Definition at line 175 of file helpers.cpp.
Here is the call graph for this function:| void helpers::matrix::ReadFromFile | ( | std::string | filename | ) | const |
| void matrix::ReadFromFile | ( | std::string | filename | ) | const |
Definition at line 325 of file helpers.cpp.
| void helpers::matrix::SaveToFile | ( | std::string | filename | ) | const |
| void matrix::SaveToFile | ( | std::string | filename | ) | const |
Definition at line 280 of file helpers.cpp.
| std::unique_ptr<double []> helpers::matrix::svd | ( | ) |
| std::unique_ptr< double[]> matrix::svd | ( | ) |
Do a SVD on this matrix and store left singular values in this. Changes the size of the matrix!
Definition at line 194 of file helpers.cpp.
Here is the call graph for this function:| double matrix::trace | ( | ) | const |
Definition at line 240 of file helpers.cpp.
| double helpers::matrix::trace | ( | ) | const |