|
My Project
|
#include <mia/core/gsl_matrix.hh>
Public Types | |
| typedef const_matrix_iterator | const_iterator |
| typedef matrix_iterator | iterator |
Public Member Functions | |
| matrix_iterator | begin () |
| const_matrix_iterator | begin () const |
| size_t | cols () const |
| Matrix | column_covariance () const |
| double | dot_column (int c, const Vector &col) const |
| double | dot_row (int r, const Vector &v) const |
| matrix_iterator | end () |
| const_matrix_iterator | end () const |
| VectorView | get_column (int c) |
| ConstVectorView | get_column (int c) const |
| VectorView | get_row (int r) |
| ConstVectorView | get_row (int r) const |
| bool | is_valid () const |
| bool | is_writable () const |
| Matrix () | |
| Matrix (const gsl_matrix *m) | |
| Matrix (const Matrix &other) | |
| Matrix (gsl_matrix *m) | |
| Matrix (Matrix &&other) | |
| Matrix (size_t rows, size_t columns, bool clean) | |
| Matrix (size_t rows, size_t columns, const double *init) | |
| Matrix (size_t rows, size_t columns, double init) | |
| operator const gsl_matrix * () const | |
| operator gsl_matrix * () | |
| double | operator() (size_t i, size_t j) const |
| Matrix & | operator*= (double rhs) |
| Matrix & | operator+= (const Matrix &rhs) |
| Matrix & | operator-= (const Matrix &rhs) |
| Matrix & | operator= (const Matrix &other) |
| Matrix & | operator= (Matrix &&other) |
| void | print (std::ostream &os) const |
| void | reset (size_t rows, size_t columns, bool clean) |
| void | reset (size_t rows, size_t columns, double init) |
| Matrix | row_covariance () const |
| size_t | rows () const |
| void | set (size_t i, size_t j, double x) |
| void | set_column (int c, const Vector &col) |
| void | set_row (int r, const Vector &row) |
| Matrix | transposed () const |
| ~Matrix () | |
This is a wrapper class around the GSL matrix type. It provides a compatibility to avoid handling de-alloction manually.
Definition at line 171 of file gsl_matrix.hh.
Definition at line 175 of file gsl_matrix.hh.
| typedef matrix_iterator gsl::Matrix::iterator |
Definition at line 174 of file gsl_matrix.hh.
| gsl::Matrix::Matrix | ( | ) |
Referenced by column_covariance(), Matrix(), Matrix(), operator*=(), operator+=(), operator-=(), operator=(), operator=(), row_covariance(), and transposed().
| gsl::Matrix::Matrix | ( | size_t | rows, |
| size_t | columns, | ||
| bool | clean ) |
Create a matrix of size rows \(\times\) columns,
| rows | |
| columns | |
| clean | allocate zeroing out all elements |
References rows().
| gsl::Matrix::Matrix | ( | size_t | rows, |
| size_t | columns, | ||
| double | init ) |
Create a matrix of size rows \(\times\) columns,
| rows | |
| columns | |
| init | set the matrix elements to this value |
References rows().
| gsl::Matrix::Matrix | ( | size_t | rows, |
| size_t | columns, | ||
| const double * | init ) |
Create a matrix of size rows \(\times\) columns and initialize it with the given data
| rows | |
| columns | |
| init | the input data in row major format |
References rows().
| gsl::Matrix::Matrix | ( | const Matrix & | other | ) |
Copy constructor that executes a deep copy
References Matrix().
| gsl::Matrix::Matrix | ( | Matrix && | other | ) |
move constructor
References Matrix().
| gsl::Matrix::Matrix | ( | gsl_matrix * | m | ) |
Wrap an existing GSL matrix
| m | the GSL matrix |
| gsl::Matrix::Matrix | ( | const gsl_matrix * | m | ) |
Wrap an existing GSL constant matrix
| m | the GSL matrix |
| gsl::Matrix::~Matrix | ( | ) |
| matrix_iterator gsl::Matrix::begin | ( | ) |
Iterator over the matrix elements of the matrix, column indices are the fastest changing indices.
| const_matrix_iterator gsl::Matrix::begin | ( | ) | const |
Read only iterator over the matrix elements of the matrix, column indices are the fastest changing indices.
| size_t gsl::Matrix::cols | ( | ) | const |
| Matrix gsl::Matrix::column_covariance | ( | ) | const |
Evaluate the covariance matrix between the columns of this matrix
References Matrix().
| double gsl::Matrix::dot_column | ( | int | c, |
| const Vector & | col ) const |
Evaluate the dot product between a column of the matrix and a given vector
| c | index of column, must be in [0, this->cols()-1] |
| col | vector to evaluate the dot product with. The vector's size must be equal to the number of matrix rows. |
| double gsl::Matrix::dot_row | ( | int | r, |
| const Vector & | v ) const |
Evaluate the dot product between a row of the matrix and a given vector
| r | index of row, must be in [0, this->rows()-1] |
| v | vector to evaluate the dot product with. The vector's size must be equal to the number of matrix columns. |
| matrix_iterator gsl::Matrix::end | ( | ) |
Iterator over the matrix elements of the matrix, column indices are the fastest changing indices.
| const_matrix_iterator gsl::Matrix::end | ( | ) | const |
Read only iterator over the matrix elements of the matrix, column indices are the fastest changing indices.
| VectorView gsl::Matrix::get_column | ( | int | c | ) |
Get a read-write view of a matrix column
| c | index of the matrix column |
| ConstVectorView gsl::Matrix::get_column | ( | int | c | ) | const |
Get a read-only view of a matrix column
| c | index of the matrix column |
| VectorView gsl::Matrix::get_row | ( | int | r | ) |
Get a read-write view of a matrix row
| r | index of the matrix row |
| ConstVectorView gsl::Matrix::get_row | ( | int | r | ) | const |
Get a read-only view of a matrix row
| r | index of the matrix row |
| bool gsl::Matrix::is_valid | ( | ) | const |
| bool gsl::Matrix::is_writable | ( | ) | const |
| gsl::Matrix::operator const gsl_matrix * | ( | ) | const |
operator to get the underlying const gsl_matrix pointer
| gsl::Matrix::operator gsl_matrix * | ( | ) |
operator to get the underlying gsl_matrix pointer
| double gsl::Matrix::operator() | ( | size_t | i, |
| size_t | j ) const |
Get a value of the matrix
| i | row |
| j | column |
|
inline |
Scale elements with a factor
| rhs | scaling factor |
Definition at line 438 of file gsl_matrix.hh.
References Matrix().
Element wise matrix addition
| rhs | matrix to add |
Definition at line 427 of file gsl_matrix.hh.
References Matrix().
Element wise matrix subtraction
| rhs | matrix to subtract |
Definition at line 416 of file gsl_matrix.hh.
References Matrix().
Copy operator that executes a deep copy
References Matrix().
| void gsl::Matrix::print | ( | std::ostream & | os | ) | const |
| void gsl::Matrix::reset | ( | size_t | rows, |
| size_t | columns, | ||
| bool | clean ) |
Reset the matrix with the new dimensions.
| rows | |
| columns | |
| clean | - set all values to zero |
References rows().
| void gsl::Matrix::reset | ( | size_t | rows, |
| size_t | columns, | ||
| double | init ) |
Reset the matrix with the new dimensions.
| rows | |
| columns | |
| init | - set all values to init |
References rows().
| Matrix gsl::Matrix::row_covariance | ( | ) | const |
Evaluate the covariance matrix between the rows of this matrix
References Matrix().
| size_t gsl::Matrix::rows | ( | ) | const |
| void gsl::Matrix::set | ( | size_t | i, |
| size_t | j, | ||
| double | x ) |
Set a value of the matrix
| i | row |
| j | column |
| x | value |
| void gsl::Matrix::set_column | ( | int | c, |
| const Vector & | col ) |
Set a matrix column
| c | index of column to be set, must be in [0, this->cols()-1] |
| col | vector containing the new values. It's size must be equal to the number of rows of the matrix |
| void gsl::Matrix::set_row | ( | int | r, |
| const Vector & | row ) |
Set a matrix row
| r | index of row to be set, must be in [0, this->rows()-1] |
| row | vector containing the new values. It's size must be equal to the number of columns of the matrix |
| Matrix gsl::Matrix::transposed | ( | ) | const |
Acquire the transposed matrix.
References Matrix().