#include <fixed_matrix.h>
Public Types | |
typedef FixedVector< C, ROW_DIM *COL_DIM >::size_type | size_type |
Public Member Functions | |
FixedMatrix (const C value=0) | |
FixedMatrix (const int value) | |
FixedMatrix (const FixedMatrix< C, ROW_DIM, COL_DIM > &M) | |
FixedMatrix (const char *str, const bool byrow=true) | |
FixedMatrix (const char *str, const C denominator, const bool byrow) | |
~FixedMatrix () | |
const size_type | row_dimension () const |
const size_type | column_dimension () const |
const size_type | size () const |
const size_type | memory_consumption () const |
bool | empty () const |
const C | get_entry (const size_type row, const size_type column) const |
const C | operator() (const size_type row, const size_type column) const |
void | set_entry (const size_type row, const size_type column, const C value) |
C & | operator() (const size_type row, const size_type column) |
template<class C2 > | |
bool | operator== (const FixedMatrix< C2, ROW_DIM, COL_DIM > &M) const |
template<class C2 > | |
bool | operator!= (const FixedMatrix< C2, ROW_DIM, COL_DIM > &M) const |
FixedMatrix< C, ROW_DIM, COL_DIM > & | operator= (const FixedMatrix< C, ROW_DIM, COL_DIM > &M) |
void | scale (const C s) |
void | operator*= (const C s) |
void | add (const FixedMatrix< C, ROW_DIM, COL_DIM > &M, const C s=1) |
void | operator+= (const FixedMatrix< C, ROW_DIM, COL_DIM > &M) |
void | operator-= (const FixedMatrix< C, ROW_DIM, COL_DIM > &M) |
template<class VECTOR > | |
void | apply (const VECTOR &x, VECTOR &Mx) const |
void | apply (const FixedVector< C, COL_DIM > &x, FixedVector< C, ROW_DIM > &Mx) const |
special version for FixedVector<C, DIM> (requirement from MatrixBlock) | |
template<class VECTOR > | |
void | apply_transposed (const VECTOR &x, VECTOR &Mtx) const |
void | apply_transposed (const FixedVector< C, ROW_DIM > &x, FixedVector< C, COL_DIM > &Mtx) const |
special version for FixedVector<C, DIM> (requirement from MatrixBlock) | |
void | print (std::ostream &os, const unsigned int tabwidth=10, const unsigned int precision=3) const |
This class models finite, densely populated matrices M = (m_{i,j})_{0<=i<m, 0<=j<n} with entries from an arbitrary (scalar) class C, where the matrix size is a priori known.
typedef FixedVector<C,ROW_DIM*COL_DIM>::size_type MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::size_type |
type of indexes and size type (cf. STL containers)
MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::FixedMatrix | ( | const C | value = 0 | ) | [inline] |
construct a fixed matrix with all entries equal to the given number also used as default constructor, yields zero matrix
MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::FixedMatrix | ( | const int | value | ) | [inline] |
just to satisfy the compiler at constructs like FixedMatrix(0)
MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::FixedMatrix | ( | const FixedMatrix< C, ROW_DIM, COL_DIM > & | M | ) | [inline] |
copy constructor
MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::FixedMatrix | ( | const char * | str, |
const bool | byrow = true |
||
) | [explicit] |
Construct matrix from a string holding its entries, separated by a blank.
str | input string |
byrow | indicates whether coefficients are stored row by row in the stream |
MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::FixedMatrix | ( | const char * | str, |
const C | denominator, | ||
const bool | byrow | ||
) | [explicit] |
Construct matrix of fractions from a string holding its numerators (separated by a blank), with a common denominator.
str | input string of nominators |
denominator | The common denominator |
byrow | indicates whether coefficients are stored row by row in the stream |
MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::~FixedMatrix | ( | ) | [inline] |
release allocated memory
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::add | ( | const FixedMatrix< C, ROW_DIM, COL_DIM > & | M, |
const C | s = 1 |
||
) |
in place addition *this += s*M
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::apply | ( | const VECTOR & | x, |
VECTOR & | Mx | ||
) | const |
matrix-vector multiplication Mx = (*this) * x; we assume that the vector Mx has the correct size and is not identical to x
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::apply_transposed | ( | const VECTOR & | x, |
VECTOR & | Mtx | ||
) | const |
transposed matrix-vector multiplication Mtx = (*this)^T * x; we assume that the vector Mtx has the correct size and is not identical to x
const FixedMatrix< C, ROW_DIM, COL_DIM >::size_type MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::column_dimension | ( | ) | const [inline] |
column dimension
bool MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::empty | ( | ) | const [inline] |
return true if matrix is empty (cf. STL containers)
const C MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::get_entry | ( | const size_type | row, |
const size_type | column | ||
) | const [inline] |
read-only access to a matrix entry
const FixedMatrix< C, ROW_DIM, COL_DIM >::size_type MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::memory_consumption | ( | ) | const [inline] |
(estimate for the) memory consumption in bytes
bool MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::operator!= | ( | const FixedMatrix< C2, ROW_DIM, COL_DIM > & | M | ) | const [inline] |
non-equality test
const C MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::operator() | ( | const size_type | row, |
const size_type | column | ||
) | const [inline] |
read-only access to a matrix entry
C & MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::operator() | ( | const size_type | row, |
const size_type | column | ||
) | [inline] |
read-write access to a matrix entry
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::operator*= | ( | const C | s | ) |
in place scaling *this *= s
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::operator+= | ( | const FixedMatrix< C, ROW_DIM, COL_DIM > & | M | ) |
in place addition *this += M
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::operator-= | ( | const FixedMatrix< C, ROW_DIM, COL_DIM > & | M | ) |
in place subtraction *this -= M
FixedMatrix< C, ROW_DIM, COL_DIM > & MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::operator= | ( | const FixedMatrix< C, ROW_DIM, COL_DIM > & | M | ) |
assignment from another fixed matrix
bool MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::operator== | ( | const FixedMatrix< C2, ROW_DIM, COL_DIM > & | M | ) | const |
equality test with another fixed matrix
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::print | ( | std::ostream & | os, |
const unsigned int | tabwidth = 10 , |
||
const unsigned int | precision = 3 |
||
) | const |
stream output with user-defined tabwidth and precision (cf. deal.II)
const FixedMatrix< C, ROW_DIM, COL_DIM >::size_type MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::row_dimension | ( | ) | const [inline] |
row dimension
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::scale | ( | const C | s | ) | [inline] |
in place scaling *this *= s
void MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::set_entry | ( | const size_type | row, |
const size_type | column, | ||
const C | value | ||
) | [inline] |
write access to a matrix entry
const FixedMatrix< C, ROW_DIM, COL_DIM >::size_type MathTL::FixedMatrix< C, ROW_DIM, COL_DIM >::size | ( | ) | const [inline] |
size as an STL-compatible container for matrix entries