|
| Matrix (void) |
| The default constructor. More...
|
|
| Matrix (const size_t &r, const size_t &c, double init_value=0) |
| Constructor allocating memory space for r times c elements, and sets all elements to init_value. More...
|
|
| Matrix (const Matrix &) |
| The copy constructor. More...
|
|
| Matrix (const MatrixBase &) |
|
virtual | ~Matrix (void) |
| Destructor.
|
|
template<class T > |
| Matrix (const MatrixExpression< T > &other) |
|
| Matrix (Matrix &&) noexcept |
| The move constructor. More...
|
|
| Matrix (MatrixMutable &&) |
|
template<class T > |
| Matrix (MatrixExpression< T > &&other) |
|
| Matrix (std::istream &, char sep='\0') |
| The istream constructor. More...
|
|
gsl_matrix * | gsl_matrix_p (void) |
|
const gsl_matrix * | gsl_matrix_p (void) const |
|
void | resize (size_t r, size_t c, double init_value=0) |
| Resize Matrix. More...
|
|
void | transpose (void) |
| Transpose the matrix. More...
|
|
const Matrix & | operator= (const Matrix &other) |
| The assignment operator. More...
|
|
Matrix & | operator= (Matrix &&other) |
| Move assignment operatorOnly reason they mention those 1e-5 peaks. More...
|
|
const Matrix & | operator*= (const Matrix &) |
| Multiply and assignment operator. More...
|
|
MatrixMutable & | operator= (const MatrixMutable &other) |
| The assignment operator. More...
|
|
MatrixMutable & | operator= (const MatrixBase &other) |
| The assignment operator.
|
|
template<class T > |
MatrixMutable & | operator= (const MatrixExpression< T > &rhs) |
|
MatrixMutable & | operator= (MatrixMutable &&other) |
| Move assignment operator.
|
|
template<class T > |
MatrixMutable & | operator= (MatrixExpression< T > &&rhs) |
|
const MatrixMutable & | operator*= (double d) |
| Multiply and assignment operator. More...
|
|
void | all (const double value) |
|
iterator | begin (void) |
|
const_iterator | begin (void) const |
|
const_iterator | begin (void) const |
|
column_iterator | begin_column (size_t i) |
|
const_column_iterator | begin_column (size_t i) const |
|
const_column_iterator | begin_column (size_t i) const |
|
row_iterator | begin_row (size_t i) |
|
const_row_iterator | begin_row (size_t i) const |
|
const_row_iterator | begin_row (size_t i) const |
|
VectorView | column_view (size_t i) |
|
void | div (const MatrixBase &b) |
|
iterator | end (void) |
|
const_iterator | end (void) const |
|
const_iterator | end (void) const |
|
column_iterator | end_column (size_t i) |
|
const_column_iterator | end_column (size_t i) const |
|
const_column_iterator | end_column (size_t i) const |
|
row_iterator | end_row (size_t i) |
|
const_row_iterator | end_row (size_t i) const |
|
const_row_iterator | end_row (size_t i) const |
|
virtual const gsl_matrix * | gsl_matrix_p (void) const=0 |
|
void | mul (const MatrixBase &b) |
|
VectorView | row_view (size_t) |
|
void | swap_columns (const size_t i, const size_t j) |
| Swap columns i and j. More...
|
|
void | swap_rowcol (const size_t i, const size_t j) |
| Swap row i and column j. More...
|
|
void | swap_rows (const size_t i, const size_t j) |
| Swap rows i and j. More...
|
|
double & | operator() (size_t row, size_t column) |
| Element access operator. More...
|
|
const double & | operator() (size_t row, size_t column) const |
| Element access operator. More...
|
|
const MatrixMutable & | operator+= (const MatrixBase &b) |
| Add and assign operator. More...
|
|
template<class T > |
MatrixMutable & | operator+= (const MatrixExpression< T > &rhs) |
| Addition and assign operator. More...
|
|
const MatrixMutable & | operator+= (const double d) |
| Add and assign operator. More...
|
|
const MatrixMutable & | operator-= (const MatrixBase &) |
| Subtract and assign operator. More...
|
|
template<class T > |
MatrixMutable & | operator-= (const MatrixExpression< T > &rhs) |
| Subtraction and assign operator. More...
|
|
const MatrixMutable & | operator-= (const double d) |
| Subtract and assign operator. More...
|
|
const MatrixMutable & | operator*= (double d) |
| Multiply and assignment operator. More...
|
|
const VectorConstView | column_const_view (size_t) const |
|
size_t | columns (void) const |
|
bool | equal (const MatrixBase &, const double precision=0) const |
| Check whether matrices are equal within a user defined precision, set by precision. More...
|
|
size_t | rows (void) const |
|
const VectorConstView | row_const_view (size_t) const |
|
bool | operator== (const MatrixBase &other) const |
| Comparison operator. Takes squared time. More...
|
|
bool | operator!= (const MatrixBase &other) const |
| Comparison operator. Takes squared time. More...
|
|
|
(Note that these are not member functions.)
|
template<class Derived1 , class Derived2 > |
expression::MatrixBinary< Derived1, Derived2, expression::Plus > | operator+ (const BasicMatrix< Derived1 > &lhs, const BasicMatrix< Derived2 > &rhs) |
| Matrix addition operator. More...
|
|
template<class Derived1 , class Derived2 > |
expression::MatrixBinary< Derived1, Derived2, expression::Minus > | operator- (const BasicMatrix< Derived1 > &lhs, const BasicMatrix< Derived2 > &rhs) |
| Matrix subtraction operator. More...
|
|
template<class Derived1 , class Derived2 > |
expression::MatrixProduct< BasicMatrix< Derived1 >, BasicMatrix< Derived2 > > | operator* (const BasicMatrix< Derived1 > &lhs, const BasicMatrix< Derived2 > &rhs) |
| Matrix multiplication operator. More...
|
|
template<class T > |
expression::ScaledMatrix< T > | operator* (const BasicMatrix< T > &A, double k) |
|
template<class T > |
expression::ScaledMatrix< T > | operator* (double k, const BasicMatrix< T > &A) |
|
template<typename T > |
expression::ScaledMatrix< T > | operator- (const BasicMatrix< T > &m) |
| negation operator More...
|
|
template<typename T > |
expression::TransposedMatrix< T > | transpose (const BasicMatrix< T > &A) |
| transpose function More...
|
|
void | inverse_svd (const MatrixBase &input, Matrix &result) |
|
bool | nan (const MatrixBase &templat, Matrix &flag) |
| Create a Matrix flag indicating NaN's in another Matrix templat. More...
|
|
bool | isnull (const MatrixBase &) |
| Check if all elements of the Matrix are zero. More...
|
|
double | max (const MatrixBase &) |
| Get the maximum value of the Matrix. More...
|
|
double | min (const MatrixBase &) |
| Get the minimum value of the Matrix. More...
|
|
double | trace (const MatrixBase &) |
| Trace of matrix. More...
|
|
void | swap (MatrixMutable &, MatrixMutable &) |
| Exchange all elements between the matrices by copying. More...
|
|
void | minmax_index (const MatrixBase &M, std::pair< size_t, size_t > &min, std::pair< size_t, size_t > &max) |
| Locate the maximum and minimum element in the matrix, M. More...
|
|
std::ostream & | operator<< (std::ostream &s, const MatrixBase &) |
| The output operator for the MatrixBase class.
|
|
Interface to GSL matrix.
For the time being 'double' is the only type supported.
- [File streams] Reading and writing vectors to file streams
- are of course supported. These are implemented without using GSL functionality, and thus binary read and write to streams are not supported.
- Note
- All GSL matrix related functions are not implement but most functionality defined for GSL matrices can be achieved with this interface class. Most notable GSL functionality not supported are no binary file support.
Constructor from a matrix expression. A matrix expression is result operator+
, operator-
, and operator*, or combinations of them.
A typical usage looks like
where B, C, and D are all instances of class Matrix.
Typically MatrixExpression only exists as rvalue, and this operator is not called but the rvalue version, operator=(MatrixExpression<T>&&)
Invalidates, references, iterators and views.
- Since
- new in yat 0.15
Move constructor from a matrix expression. A matrix expression is result operator+
, operator-
, and operator*, or combinations of them.
A typical usage looks like
where B, C, and D are all instances of class Matrix.
Invalidates, references, iterators and views.
- Since
- new in yat 0.15
theplu::yat::utility::Matrix::Matrix |
( |
std::istream & |
, |
|
|
char |
sep = '\0' |
|
) |
| |
|
explicit |
The istream constructor.
The std::istream will be interpreted as outlined here:
Missing values, i.e. empty elements, are treated as NaN values (std::numeric_limits<double>::quiet_NaN() to be specific).
Matrix rows are separated with the new line character.
Column element separation has two modes depending on the value of sep.
- If sep is the default '\0' value then column elements are separated with white space characters except the new line character. Multiple sequential white space characters are treated as one separator.
- Setting sep to something else than the default value will change the behaviour to use the sep character as the separator between column elements. Multiple sequential sep characters will be treated as separating elements with missing values.
End of input is the end of file marker and this treatment cannot be redefined using the provided API.
- Exceptions
-
GSL_error | if memory allocation fails, IO_error if unexpected input is found in the input stream. |
template<class T >
MatrixMutable& theplu::yat::utility::MatrixMutable::operator= |
( |
class T |
| ) |
|
|
inline |
Assignment from a matrix expression. A matrix expression is the result of operator+
, operator-
, and operator*, or combinations of them.
A typical usage looks like
where A, B, C, and D are all instances of class Matrix.
Typically MatrixExpression only exists as rvalue, and this operator is not called but the rvalue version, operator=(MatrixExpression<T>&&)
Invalidates, references, iterators and views.
- Since
- new in yat 0.15
template<class T >
MatrixMutable& theplu::yat::utility::MatrixMutable::operator= |
( |
class T |
| ) |
|
|
inline |
Move assignment from a matrix expression. A matrix expression is the result of operator+
, operator-
, and operator*, or combinations of them.
A typical usage looks like
where B, C, and D are all instances of class Matrix.
Invalidates references, iterators, and views.
- Since
- new in yat 0.15