#include <Matrix.h>
◆ Matrix() [1/4]
◆ Matrix() [2/4]
Matrix::Matrix |
( |
const Matrix & |
mat | ) |
|
|
inline |
◆ Matrix() [3/4]
Matrix::Matrix |
( |
long |
rows, |
|
|
long |
cols |
|
) |
| |
|
inline |
◆ Matrix() [4/4]
Matrix::Matrix |
( |
Bstring & |
filename | ) |
|
|
inline |
◆ ~Matrix()
◆ check_for_singularity()
int Matrix::check_for_singularity |
( |
| ) |
|
|
inline |
◆ columns()
◆ data()
double * Matrix::data |
( |
| ) |
|
|
inline |
◆ delete_row_column()
Matrix Matrix::delete_row_column |
( |
long |
rc | ) |
|
|
inline |
◆ determinant()
double Matrix::determinant |
( |
| ) |
|
|
inline |
◆ eigen_sort()
void Matrix::eigen_sort |
( |
vector< double > & |
val | ) |
|
Sorts eigenvalues into descending order and rearranges matrix columns accordingly.
- Parameters
-
val | eigenvalues. The eigenvectors are in the columns.
This method uses straight insertion.
Reference: Press W.H. et al (1992) Numerical Recipes in C. |
◆ fill()
void Matrix::fill |
( |
double |
v | ) |
|
|
inline |
◆ jacobi_rotation()
vector< double > Matrix::jacobi_rotation |
( |
| ) |
|
Computes all eigenvalues and eigenvectors of a real symmetric matrix.
- Returns
- double* val eigenvalues.
The eigenvectors are returned in the columns of the input matrix. Reference: Press W.H. et al (1992) Numerical Recipes in C.
◆ jrotate()
int Matrix::jrotate |
( |
double |
s, |
|
|
double |
tau, |
|
|
long |
i, |
|
|
long |
j, |
|
|
long |
k, |
|
|
long |
l |
|
) |
| |
◆ LU_decomposition() [1/2]
double Matrix::LU_decomposition |
( |
| ) |
|
Matrix inversion by LU decomposition.
- Returns
- double determinant.
This inverts matrix A by LU decomposition.
The matrix A must be square and is converted to and replaced by its inverse.
Note: The matrix is modified.
Reference: Press W.H. et al (1992) Numerical Recipes in C.
◆ LU_decomposition() [2/2]
double Matrix::LU_decomposition |
( |
vector< double > & |
b | ) |
|
|
inline |
◆ multiply_in_place()
int Matrix::multiply_in_place |
( |
vector< double > & |
vec | ) |
|
Multiplies a matrix by a vector, modifiying the vector.
- Parameters
-
- Returns
- double determinant.
◆ normalize()
void Matrix::normalize |
( |
| ) |
|
|
inline |
The rows and columns are alternatively iteratively normalized until the error is small enough.
◆ operator*() [1/2]
◆ operator*() [2/2]
vector< double > Matrix::operator* |
( |
vector< double > & |
vec | ) |
|
|
inline |
◆ operator*=()
◆ operator+()
◆ operator+=()
◆ operator-() [1/2]
◆ operator-() [2/2]
◆ operator-=()
◆ operator=()
◆ operator[]()
Row Matrix::operator[] |
( |
long |
i | ) |
|
|
inline |
◆ randomize()
void Matrix::randomize |
( |
| ) |
|
|
inline |
◆ rows()
◆ show_below_cutoff()
void Matrix::show_below_cutoff |
( |
double |
d | ) |
|
|
inline |
◆ singular_value_decomposition() [1/2]
double Matrix::singular_value_decomposition |
( |
| ) |
|
Singular value decomposition of a matrix .
- Returns
- double* 0.
The matrix A is replaced by the matrix U. Reference: Press W.H. et al (1992) Numerical Recipes in C.
◆ singular_value_decomposition() [2/2]
double Matrix::singular_value_decomposition |
( |
vector< double > & |
b | ) |
|
|
inline |
◆ size()
◆ swap_rows_columns()
void Matrix::swap_rows_columns |
( |
long |
rc1, |
|
|
long |
rc2 |
|
) |
| |
|
inline |
◆ transpose()
Matrix Matrix::transpose |
( |
| ) |
const |
|
inline |
◆ write()
void Matrix::write |
( |
Bstring & |
filename | ) |
|
|
inline |
The documentation for this class was generated from the following files: