A class for constructing and defining operations on real matrices. More...
#include <gslpp_matrix_double.h>
A class for constructing and defining operations on real matrices.
This class defines some common operations on real matrices using the GSL.
Definition at line 48 of file gslpp_matrix_double.h.
Public Member Functions | |
| gsl_matrix & | as_gsl_type () |
| const gsl_matrix & | as_gsl_type () const |
| gsl_matrix * | as_gsl_type_ptr () const |
| void | assign (const size_t &i, const size_t &j, const double &a) |
| void | assign (const size_t &i, const size_t &j, const matrix< double > &a) |
| double | determinant () |
| void | eigensystem (matrix< complex > &U, vector< complex > &S) |
| matrix< double > | inverse () |
| bool | isSingular () |
| matrix (const gsl_matrix &m) | |
| matrix (const gsl_matrix *m) | |
| matrix (const matrix< double > &m) | |
| matrix (const size_t &size_i, const double &a) | |
| matrix (const size_t &size_i, const size_t &size_j, const double &a) | |
| matrix (const vector< double > &v) | |
| bool | operator!= (const matrix< double > &a) const |
| double & | operator() (const size_t &i, const size_t &j) |
| double | operator() (const size_t &i, const size_t &j) const |
| matrix< complex > | operator* (const complex &z) const |
| matrix< double > | operator* (const double &a) const |
| matrix< complex > | operator* (const matrix< complex > &m) const |
| matrix< double > | operator* (const matrix< double > &m) const |
| vector< complex > | operator* (const vector< complex > &v) const |
| vector< double > | operator* (const vector< double > &v) const |
| matrix< double > & | operator*= (const double &a) |
| matrix< double > & | operator*= (const matrix< double > &m) |
| matrix< complex > | operator+ (const complex &z) const |
| matrix< double > | operator+ (const double &a) const |
| matrix< double > | operator+ (const matrix< double > &m) const |
| matrix< double > & | operator+= (const double &a) |
| matrix< double > & | operator+= (const matrix< double > &m) |
| matrix< double > | operator- () const |
| matrix< complex > | operator- (const complex &z) const |
| matrix< double > | operator- (const double &a) const |
| matrix< double > | operator- (const matrix< double > &m) const |
| matrix< double > & | operator-= (const double &a) |
| matrix< double > & | operator-= (const matrix< double > &m) |
| matrix< complex > | operator/ (const complex &z) const |
| matrix< double > | operator/ (const double &a) const |
| matrix< double > & | operator/= (const double &a) |
| matrix< double > & | operator= (const matrix< double > &m) |
| matrix< double > & | operator= (double a) |
| bool | operator== (const matrix< double > &a) const |
| void | reset () |
| size_t | size () const |
| size_t | size_i () const |
| size_t | size_j () const |
| matrix< double > | transpose () const |
| ~matrix () | |
Static Public Member Functions | |
| static matrix< double > | Id (size_t size) |
Private Attributes | |
| gsl_matrix * | _matrix |
Friends | |
| std::ostream & | operator<< (std::ostream &output, const matrix< double > &m) |
Operations on matrix<double> | |
| matrix< double > | operator+ (const double &a, matrix< double > m) |
| matrix< double > | operator- (const double &a, matrix< double > m) |
| matrix< double > | operator* (const double &a, matrix< double > m) |
| vector< double > | operator* (const vector< double > &v, matrix< double > m) |
| vector< complex > | operator* (const vector< complex > &v, matrix< double > m) |
| matrix< complex > | operator+ (const complex &z, matrix< double > m) |
| matrix< complex > | operator- (const complex &z, matrix< double > m) |
| matrix< complex > | operator* (const complex &z, matrix< double > m) |
| gslpp::matrix< double >::matrix | ( | const size_t & | size_i, |
| const size_t & | size_j, | ||
| const double & | a | ||
| ) |
| gslpp::matrix< double >::matrix | ( | const size_t & | size_i, |
| const double & | a | ||
| ) |
| gslpp::matrix< double >::matrix | ( | const matrix< double > & | m | ) |
| gslpp::matrix< double >::matrix | ( | const gsl_matrix< double > & | m | ) |
Definition at line 43 of file gslpp_matrix_double.cpp.
| gslpp::matrix< double >::matrix | ( | const gsl_matrix< double > * | m | ) |
Definition at line 49 of file gslpp_matrix_double.cpp.
| gslpp::matrix< double >::matrix | ( | const vector< double > & | v | ) |
| gslpp::matrix< double >::~matrix | ( | ) |
Destructor
Definition at line 65 of file gslpp_matrix_double.cpp.
| gsl_matrix & gslpp::matrix< double >::as_gsl_type | ( | ) |
Definition at line 300 of file gslpp_matrix_double.cpp.
| const gsl_matrix & gslpp::matrix< double >::as_gsl_type | ( | ) | const |
Definition at line 305 of file gslpp_matrix_double.cpp.
| gsl_matrix * gslpp::matrix< double >::as_gsl_type_ptr | ( | ) | const |
| void gslpp::matrix< double >::assign | ( | const size_t & | i, |
| const size_t & | j, | ||
| const double & | a | ||
| ) |
Definition at line 108 of file gslpp_matrix_double.cpp.
| void gslpp::matrix< double >::assign | ( | const size_t & | i, |
| const size_t & | j, | ||
| const matrix< double > & | a | ||
| ) |
| double gslpp::matrix< double >::determinant | ( | ) |
| void gslpp::matrix< double >::eigensystem | ( | matrix< complex > & | U, |
| vector< complex > & | S | ||
| ) |
Eigenvalues and eigenvectors
Definition at line 280 of file gslpp_matrix_double.cpp.
|
static |
Identity matrix
Definition at line 154 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::inverse | ( | ) |
| bool gslpp::matrix< double >::isSingular | ( | ) |
Check is matrix is singular to avoid errors in lu.c
Check if matrix is singular (This is to avoid error checking by lu.c)
Definition at line 216 of file gslpp_matrix_double.cpp.
|
inline |
Definition at line 141 of file gslpp_matrix_double.h.
| double & gslpp::matrix< double >::operator() | ( | const size_t & | i, |
| const size_t & | j | ||
| ) |
| double gslpp::matrix< double >::operator() | ( | const size_t & | i, |
| const size_t & | j | ||
| ) | const |
Get element (i,j)
Definition at line 71 of file gslpp_matrix_double.cpp.
| matrix< complex > gslpp::matrix< double >::operator* | ( | const complex & | z | ) | const |
Multiplication operator (complex)
Definition at line 521 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::operator* | ( | const double & | a | ) | const |
| matrix< complex > gslpp::matrix< double >::operator* | ( | const matrix< complex > & | m | ) | const |
Definition at line 370 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::operator* | ( | const matrix< double > & | m | ) | const |
Product (matrix)
Multiplication operator (matrix)
Definition at line 351 of file gslpp_matrix_double.cpp.
| vector< complex > gslpp::matrix< double >::operator* | ( | const vector< complex > & | v | ) | const |
Multiplication (vector complex)
Multiplication assignment (vector complex)
Definition at line 398 of file gslpp_matrix_double.cpp.
| vector< double > gslpp::matrix< double >::operator* | ( | const vector< double > & | v | ) | const |
Multiplication (vector double)
Multiplication assignment (vector double)
Definition at line 377 of file gslpp_matrix_double.cpp.
| matrix< double > & gslpp::matrix< double >::operator*= | ( | const double & | a | ) |
Multiplication assignment (double)
Definition at line 493 of file gslpp_matrix_double.cpp.
| matrix< double > & gslpp::matrix< double >::operator*= | ( | const matrix< double > & | m | ) |
Multiplication assignment (matrix)
Definition at line 419 of file gslpp_matrix_double.cpp.
| matrix< complex > gslpp::matrix< double >::operator+ | ( | const complex & | z | ) | const |
Addition operator (complex)
Definition at line 507 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::operator+ | ( | const double & | a | ) | const |
| matrix< double > gslpp::matrix< double >::operator+ | ( | const matrix< double > & | m | ) | const |
| matrix< double > & gslpp::matrix< double >::operator+= | ( | const double & | a | ) |
Addition assignment (double)
Definition at line 479 of file gslpp_matrix_double.cpp.
| matrix< double > & gslpp::matrix< double >::operator+= | ( | const matrix< double > & | m | ) |
Addition assignment (matrix)
Definition at line 405 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::operator- | ( | ) | const |
check whether two matrices are equal Unary minus (matrix)
Unary minus
Definition at line 315 of file gslpp_matrix_double.cpp.
| matrix< complex > gslpp::matrix< double >::operator- | ( | const complex & | z | ) | const |
Subtraction assignment (complex)
Subtraction operator (complex)
Definition at line 514 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::operator- | ( | const double & | a | ) | const |
Subtraction assignment (double)
Subtraction operator (double)
Definition at line 443 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::operator- | ( | const matrix< double > & | m | ) | const |
| matrix< double > & gslpp::matrix< double >::operator-= | ( | const double & | a | ) |
Subtraction assignment (double)
Definition at line 486 of file gslpp_matrix_double.cpp.
| matrix< double > & gslpp::matrix< double >::operator-= | ( | const matrix< double > & | m | ) |
Subtraction assignment (matrix)
Definition at line 412 of file gslpp_matrix_double.cpp.
| matrix< complex > gslpp::matrix< double >::operator/ | ( | const complex & | z | ) | const |
Division operator (complex)
Definition at line 528 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::operator/ | ( | const double & | a | ) | const |
| matrix< double > & gslpp::matrix< double >::operator/= | ( | const double & | a | ) |
Division assignment (double)
Definition at line 500 of file gslpp_matrix_double.cpp.
| matrix< double > & gslpp::matrix< double >::operator= | ( | const matrix< double > & | m | ) |
Definition at line 90 of file gslpp_matrix_double.cpp.
| matrix< double > & gslpp::matrix< double >::operator= | ( | double | a | ) |
Definition at line 102 of file gslpp_matrix_double.cpp.
| bool gslpp::matrix< double >::operator== | ( | const matrix< double > & | a | ) | const |
Comparison == (matrix)
Definition at line 535 of file gslpp_matrix_double.cpp.
| void gslpp::matrix< double >::reset | ( | ) |
Assign
Definition at line 85 of file gslpp_matrix_double.cpp.
| size_t gslpp::matrix< double >::size | ( | ) | const |
Definition at line 142 of file gslpp_matrix_double.cpp.
| size_t gslpp::matrix< double >::size_i | ( | ) | const |
| size_t gslpp::matrix< double >::size_j | ( | ) | const |
Definition at line 137 of file gslpp_matrix_double.cpp.
| matrix< double > gslpp::matrix< double >::transpose | ( | ) | const |
Transpose matrix
Definition at line 166 of file gslpp_matrix_double.cpp.
Multiply a complex number by a real matrix
| z | Complex number |
| m | Real matrix |
Definition at line 598 of file gslpp_matrix_double.cpp.
Multiply a real number by real matrix
| a | Real number |
| m | Real matrix |
Definition at line 573 of file gslpp_matrix_double.cpp.
Multiply a complex vector by a real matrix
| v | Complex vector |
| m | Real matrix |
Definition at line 583 of file gslpp_matrix_double.cpp.
Multiply a real vector by a real matrix
| v | Real vector |
| m | Real matrix |
Definition at line 578 of file gslpp_matrix_double.cpp.
Add a complex number to a real matrix
| z | Complex number |
| m | Real matrix |
Definition at line 588 of file gslpp_matrix_double.cpp.
Add a real number to a real vector
| a | Real number |
| m | Real vector |
Definition at line 563 of file gslpp_matrix_double.cpp.
Subtract a complex number from a real matrix
| z | Complex number |
| m | Real matrix |
Definition at line 593 of file gslpp_matrix_double.cpp.
Subtract a real number from a real matrix
| a | Real number |
| m | Real matrix |
Definition at line 568 of file gslpp_matrix_double.cpp.
|
friend |
friend functions
Definition at line 549 of file gslpp_matrix_double.cpp.
|
private |
Definition at line 50 of file gslpp_matrix_double.h.