HubbardGPU
Hubbard diagonalisation on the GPU (and CPU)
|
#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) |
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 | Print () const |
Private Attributes | |
std::unique_ptr< double[]> | mat |
n by m array of double More... | |
int | n |
number of rows More... | |
int | m |
number of columns More... | |
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 41 of file helpers.cpp.
matrix::matrix | ( | int | n_, |
int | m_ | ||
) |
n_ | number of rows |
m_ | number of columns |
Definition at line 51 of file helpers.cpp.
matrix::matrix | ( | const matrix & | orig | ) |
orig | matrix to copy |
Definition at line 62 of file helpers.cpp.
matrix::matrix | ( | matrix && | orig | ) |
move constructor
orig | matrix to copy (descrutive) |
Definition at line 74 of file helpers.cpp.
int matrix::getm | ( | ) | const |
Definition at line 113 of file helpers.cpp.
int matrix::getn | ( | ) | const |
Definition at line 105 of file helpers.cpp.
double * matrix::getpointer | ( | ) | const |
double matrix::operator() | ( | int | x, |
int | y | ||
) | const |
Definition at line 118 of file helpers.cpp.
double & matrix::operator() | ( | int | x, |
int | y | ||
) |
Definition at line 124 of file helpers.cpp.
matrix & matrix::operator= | ( | double | val | ) |
Set all matrix elements equal to a value
val | the value to use |
Definition at line 94 of file helpers.cpp.
double & matrix::operator[] | ( | int | x | ) |
Definition at line 130 of file helpers.cpp.
double matrix::operator[] | ( | int | x | ) | const |
Definition at line 136 of file helpers.cpp.
void matrix::Print | ( | ) | const |
Definition at line 200 of file helpers.cpp.
Matrix-Matrix product of A and B. Store result in this
A | first matrix |
B | second matrix |
Definition at line 152 of file helpers.cpp.
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 171 of file helpers.cpp.
|
private |