SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Attributes | Friends | Related Functions | List of all members
slip::Matrix< Block > Class Template Reference

Numerical matrix class. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. It extends the interface of Array2d adding arithmetical: +=, -=, *=, /=,+,-,/,*... and mathematical operators: min, max, abs, sqrt, cos, acos, sin, asin, tan, atan, exp, log, cosh, sinh, tanh, log10, sum, apply... More...

#include <GenericMultiComponent2d.hpp>

Inheritance diagram for slip::Matrix< Block >:
Inheritance graph

Public Types

typedef T value_type
 
typedef Matrix< T > self
 
typedef const Matrix< T > const_self
 
typedef value_typepointer
 
typedef value_type const * const_pointer
 
typedef value_typereference
 
typedef value_type const & const_reference
 
typedef ptrdiff_t difference_type
 
typedef std::size_t size_type
 
typedef pointer iterator
 
typedef const_pointer const_iterator
 
typedef std::reverse_iterator
< iterator
reverse_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 
typedef pointer row_iterator
 
typedef const_pointer const_row_iterator
 
typedef slip::stride_iterator
< pointer
col_iterator
 
typedef slip::stride_iterator
< const_pointer
const_col_iterator
 
typedef slip::Array2d< T >
::iterator2d 
iterator2d
 
typedef slip::Array2d< T >
::const_iterator2d 
const_iterator2d
 
typedef slip::stride_iterator
< pointer
row_range_iterator
 
typedef slip::stride_iterator
< const_pointer
const_row_range_iterator
 
typedef slip::stride_iterator
< col_iterator
col_range_iterator
 
typedef slip::stride_iterator
< const_col_iterator
const_col_range_iterator
 
typedef slip::Array2d< T >
::iterator2d_range 
iterator2d_range
 
typedef slip::Array2d< T >
::const_iterator2d_range 
const_iterator2d_range
 
typedef std::reverse_iterator
< iterator
reverse_row_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_row_iterator
 
typedef std::reverse_iterator
< col_iterator
reverse_col_iterator
 
typedef std::reverse_iterator
< const_col_iterator
const_reverse_col_iterator
 
typedef std::reverse_iterator
< iterator2d
reverse_iterator2d
 
typedef std::reverse_iterator
< const_iterator2d
const_reverse_iterator2d
 
typedef std::reverse_iterator
< row_range_iterator
reverse_row_range_iterator
 
typedef std::reverse_iterator
< const_row_range_iterator
const_reverse_row_range_iterator
 
typedef std::reverse_iterator
< col_range_iterator
reverse_col_range_iterator
 
typedef std::reverse_iterator
< const_col_range_iterator
const_reverse_col_range_iterator
 
typedef std::reverse_iterator
< iterator2d_range
reverse_iterator2d_range
 
typedef std::reverse_iterator
< const_iterator2d_range
const_reverse_iterator2d_range
 
typedef slip::lin_alg_traits
< value_type >::value_type 
norm_type
 
typedef iterator2d default_iterator
 
typedef const_iterator2d const_default_iterator
 

Public Member Functions

void resize (const size_type d1, const size_type d2, const T &val=T())
 Resizes a Matrix. More...
 
std::string name () const
 Returns the name of the class. More...
 
size_type dim1 () const
 Returns the number of rows (first dimension size) in the Matrix. More...
 
size_type rows () const
 Returns the number of rows (first dimension size) in the Matrix. More...
 
size_type dim2 () const
 Returns the number of columns (second dimension size) in the Matrix. More...
 
size_type columns () const
 Returns the number of columns (second dimension size) in the Matrix. More...
 
size_type cols () const
 Returns the number of columns (second dimension size) in the Matrix. More...
 
size_type size () const
 Returns the number of elements in the Matrix. More...
 
size_type max_size () const
 Returns the maximal size (number of elements) in the Matrix. More...
 
bool empty () const
 Returns true if the Matrix is empty. (Thus size() == 0) More...
 
void swap (self &M)
 Swaps data with another Matrix. More...
 
template<typename T >
 Matrix (const typename Matrix< T >::size_type d1, const typename Matrix< T >::size_type d2)
 
template<typename T >
 Matrix (const typename Matrix< T >::size_type d1, const typename Matrix< T >::size_type d2, const T &val)
 
template<typename T >
 Matrix (const typename Matrix< T >::size_type d1, const typename Matrix< T >::size_type d2, const T *val)
 
Constructors & Destructors
 Matrix ()
 Constructs a Matrix. More...
 
 Matrix (const size_type d1, const size_type d2)
 Constructs a Matrix. More...
 
 Matrix (const size_type d1, const size_type d2, const T &val)
 Constructs a Matrix initialized by the scalar value val. More...
 
 Matrix (const size_type d1, const size_type d2, const T *val)
 Constructs a Matrix initialized by an array val. More...
 
template<typename InputIterator >
 Matrix (const size_type d1, const size_type d2, InputIterator first, InputIterator last)
 Contructs a Matrix from a range. More...
 
 Matrix (const self &rhs)
 Constructs a copy of the Matrix rhs. More...
 
 ~Matrix ()
 Destructor of the Matrix. More...
 
iterators
iterator begin ()
 Returns a read/write iterator that points to the first element in the Matrix. Iteration is done in ordinary element order. More...
 
iterator end ()
 Returns a read/write iterator that points one past the last element in the Matrix. Iteration is done in ordinary element order. More...
 
const_iterator begin () const
 Returns a read-only (constant) iterator that points to the first element in the Matrix. Iteration is done in ordinary element order. More...
 
const_iterator end () const
 Returns a read-only (constant) iterator that points one past the last element in the Matrix. Iteration is done in ordinary element order. More...
 
reverse_iterator rbegin ()
 Returns a read/write reverse iterator that points to the last element in the Matrix. Iteration is done in reverse element order. More...
 
reverse_iterator rend ()
 Returns a read/write reverse iterator that points to one before the first element in the Matrix. Iteration is done in reverse element order. More...
 
const_reverse_iterator rbegin () const
 Returns a read-only (constant) reverse iterator that points to the last element in the Matrix. Iteration is done in reverse element order. More...
 
const_reverse_iterator rend () const
 Returns a read-only (constant) reverse iterator that points to one before the first element in the Matrix. Iteration is done in reverse element order. More...
 
row_iterator row_begin (const size_type row)
 Returns a read/write iterator that points to the first element of the row row in the Matrix. Iteration is done in ordinary element order. More...
 
row_iterator row_end (const size_type row)
 Returns a read/write iterator that points one past the end element of the row row in the Matrix. Iteration is done in ordinary element order. More...
 
const_row_iterator row_begin (const size_type row) const
 Returns a read-only iterator that points to the first element of the row row in the Matrix. Iteration is done in ordinary element order. More...
 
const_row_iterator row_end (const size_type row) const
 Returns a read-only iterator that points one past the end element of the row row in the Matrix. Iteration is done in ordinary element order. More...
 
col_iterator col_begin (const size_type col)
 Returns a read/write iterator that points to the first element of the column column in the Matrix. Iteration is done modulo the number of columns. More...
 
col_iterator col_end (const size_type col)
 Returns a read/write iterator that points one past the end element of the column column in the Matrix. Iteration is done modulo the number of columns. More...
 
const_col_iterator col_begin (const size_type col) const
 Returns a read-only iterator that points to the first element of the column column in the Matrix. Iteration is done modulo the number of columns. More...
 
const_col_iterator col_end (const size_type col) const
 Returns a read-only iterator that points one past the end element of the column column in the Matrix. Iteration is done modulo the number of columns. More...
 
row_range_iterator row_begin (const size_type row, const slip::Range< int > &range)
 Returns a read/write iterator that points to the first element of the Range range of the row row in the Matrix. Iteration is done in ordinary element order according to the Range. More...
 
row_range_iterator row_end (const size_type row, const slip::Range< int > &range)
 Returns a read/write iterator that points one past the end element of the Range range of the row row in the Matrix. Iteration is done in ordinary element order according to the Range. More...
 
const_row_range_iterator row_begin (const size_type row, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the first element of the Range range of the row row in the Matrix. Iteration is done in ordinary element order according to the Range. More...
 
const_row_range_iterator row_end (const size_type row, const slip::Range< int > &range) const
 Returns a read_only iterator that points one past the last element of the Range range of the row row in the Matrix. Iteration is done in ordinary element order according to the Range. More...
 
col_range_iterator col_begin (const size_type col, const slip::Range< int > &range)
 Returns a read-write iterator that points to the first element of the Range range of the col col in the Matrix. Iteration is done in ordinary element order according to the Range. More...
 
col_range_iterator col_end (const size_type col, const slip::Range< int > &range)
 Returns a read-write iterator that points to the past the end element of the Range range of the col col in the Matrix. Iteration is done in ordinary element order according to the Range. More...
 
const_col_range_iterator col_begin (const size_type col, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the first element of the Range range of the col col in the Matrix. Iteration is done in ordinary element order according to the Range. More...
 
const_col_range_iterator col_end (const size_type col, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the past the end element of the Range range of the col col in the Matrix. Iteration is done in ordinary element order according to the Range. More...
 
reverse_row_iterator row_rbegin (const size_type row)
 Returns a read/write reverse iterator that points to the last element of the row row in the Matrix. Iteration is done in the reverse element order. More...
 
reverse_row_iterator row_rend (const size_type row)
 Returns a read/write reverse iterator that points one past the first element of the row row in the Matrix. Iteration is done in the reverse element order. More...
 
const_reverse_row_iterator row_rbegin (const size_type row) const
 Returns a read-only reverse iterator that points to the last element of the row row in the Matrix. Iteration is done in the reverse element order. More...
 
const_reverse_row_iterator row_rend (const size_type row) const
 Returns a read-only reverse iterator that points one past the first element of the row row in the Matrix. Iteration is done in the reverse element order. More...
 
reverse_col_iterator col_rbegin (const size_type col)
 Returns a read/write reverse iterator that points to the last element of the column column in the Matrix. Iteration is done modulo the number of columns and in the reverse element order. More...
 
reverse_col_iterator col_rend (const size_type col)
 Returns a read/write reverse iterator that points one past the first element of the column column in the Matrix. Iteration is done modulo the number of columns and in the reverse element order. More...
 
const_reverse_col_iterator col_rbegin (const size_type col) const
 Returns a read-only reverse iterator that points to the last element of the column column in the Matrix. Iteration is done modulo the number of columns and in the reverse element order. More...
 
const_reverse_col_iterator col_rend (const size_type col) const
 Returns a read-only reverse iterator that points one past the first element of the column column in the Matrix. Iteration is done modulo the number of columns and in the reverse element order. More...
 
reverse_row_range_iterator row_rbegin (const size_type row, const slip::Range< int > &range)
 Returns a read-write iterator that points to the last element of the Range range of the row row in the Matrix. Iteration is done in the reverse element order according to the Range. More...
 
reverse_row_range_iterator row_rend (const size_type row, const slip::Range< int > &range)
 Returns a read-write iterator that points one before the first element of the Range range of the row row in the Matrix. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_row_range_iterator row_rbegin (const size_type row, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the last element of the Range range of the row row in the Matrix. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_row_range_iterator row_rend (const size_type row, const slip::Range< int > &range) const
 Returns a read-only iterator that points one before the first element of the Range range of the row row in the Matrix. Iteration is done in the reverse element order according to the Range. More...
 
reverse_col_range_iterator col_rbegin (const size_type col, const slip::Range< int > &range)
 Returns a read-write iterator that points to the last element of the Range range of the col col in the Matrix. Iteration is done in the reverse element order according to the Range. More...
 
reverse_col_range_iterator col_rend (const size_type col, const slip::Range< int > &range)
 Returns a read-write iterator that points to one before the first element of the Range range of the col col in the Matrix. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_col_range_iterator col_rbegin (const size_type col, const slip::Range< int > &range) const
 Returns a read_only iterator that points to the last element of the Range & range of the col col in the Matrix. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_col_range_iterator col_rend (const size_type col, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the first element of the Range range of the col col in the Matrix. Iteration is done in the reverse element order according to the Range. More...
 
iterator2d upper_left ()
 Returns a read/write iterator2d that points to the first element of the Matrix. It points to the upper left element of the Matrix. More...
 
iterator2d bottom_right ()
 Returns a read/write iterator2d that points to the past the end element of the Matrix. It points to past the end element of the bottom right element of the Matrix. More...
 
const_iterator2d upper_left () const
 Returns a read-only iterator2d that points to the first element of the Matrix. It points to the upper left element of the Matrix. More...
 
const_iterator2d bottom_right () const
 Returns a read-only iterator2d that points to the past the end element of the Matrix. It points to past the end element of the bottom right element of the Matrix. More...
 
iterator2d upper_left (const Box2d< int > &box)
 Returns a read/write iterator2d that points to the first element of the Matrix. It points to the upper left element of the Box2d associated to the Matrix. More...
 
iterator2d bottom_right (const Box2d< int > &box)
 Returns a read/write iterator2d that points to the past the end element of the Matrix. It points to past the end element of the bottom right element of the Box2d associated to the Matrix. More...
 
const_iterator2d upper_left (const Box2d< int > &box) const
 Returns a read only iterator2d that points to the first element of the Matrix. It points to the upper left element of the Box2d associated to the Matrix. More...
 
const_iterator2d bottom_right (const Box2d< int > &box) const
 Returns a read only iterator2d that points to the past the end element of the Matrix. It points to past the end element of the bottom right element of the Box2d associated to the Matrix. More...
 
iterator2d_range upper_left (const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write iterator2d_range that points to the upper left element of the ranges row_range and col_range associated to the Matrix. More...
 
iterator2d_range bottom_right (const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write iterator2d_range that points to the past the end bottom right element of the ranges row_range and col_range associated to the Matrix. More...
 
const_iterator2d_range upper_left (const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only iterator2d_range that points to the to the upper left element of the ranges row_range and col_range associated to the Matrix. More...
 
const_iterator2d_range bottom_right (const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only iterator2d_range that points to the past the end bottom right element of the ranges row_range and col_range associated to the Matrix. More...
 
iterator2d_range upper_left (const Range< int > &range)
 Returns a read/write iterator2d_range that points to the upper left element of the Range range associated to the Matrix. The same range is applied for rows and cols. More...
 
iterator2d_range bottom_right (const Range< int > &range)
 Returns a read/write iterator2d_range that points to the past the end bottom right element of the Range range associated to the Matrix. The same range is applied for rows and cols. More...
 
const_iterator2d_range upper_left (const Range< int > &range) const
 Returns a read-only iterator2d_range that points to the to the upper left element of the Range range associated to the Matrix. More...
 
const_iterator2d_range bottom_right (const Range< int > &range) const
 Returns a read-only const_iterator2d_range that points to the past the end bottom right element of the Range range associated to the Matrix. The same range is applied for rows and cols. More...
 
reverse_iterator2d rupper_left ()
 Returns a read/write reverse iterator2d. It points to the bottom right element of the Matrix. Iteration is done within the Matrix in the reverse order. More...
 
reverse_iterator2d rbottom_right ()
 Returns a read/write reverse iterator2d. It points to past the upper left element of the Matrix. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d rupper_left () const
 Returns a read only reverse iterator2d that points. It points to the bottom right element of the Matrix. Iteration is done within the Matrix in the reverse order. More...
 
const_reverse_iterator2d rbottom_right () const
 Returns a read only reverse iterator2d. It points to past the upper left element of the Matrix. Iteration is done in the reverse order. More...
 
reverse_iterator2d rupper_left (const Box2d< int > &box)
 Returns a read/write reverse iterator2d. It points to the bottom right element of the Box2d associated to the Matrix. Iteration is done in the reverse order. More...
 
reverse_iterator2d rbottom_right (const Box2d< int > &box)
 Returns a read/write reverse iterator2d. It points to one before the upper left element of the Box2d box associated to the Matrix. More...
 
const_reverse_iterator2d rupper_left (const Box2d< int > &box) const
 Returns a read only reverse iterator2d. It points to the bottom right element of the Box2d box associated to the Matrix. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d rbottom_right (const Box2d< int > &box) const
 Returns a read-only reverse iterator2d. It points to one before the element of the bottom right element of the Box2d box associated to the Matrix. More...
 
reverse_iterator2d_range rupper_left (const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write reverse_iterator2d_range that points to the past the bottom right element of the ranges row_range and col_range associated to the Matrix. Iteration is done in the reverse order. More...
 
reverse_iterator2d_range rbottom_right (const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write reverse_iterator2d_range that points to one before the upper left element of the ranges row_range and col_range associated to the Matrix. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d_range rupper_left (const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only reverse_iterator2d_range that points to the past the bottom right element of the ranges row_range and col_range associated to the Matrix. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d_range rbottom_right (const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only reverse_iterator2d_range that points to one before the upper left element of the ranges row_range and col_range associated to the Matrix.Iteration is done in the reverse order. More...
 
reverse_iterator2d_range rupper_left (const Range< int > &range)
 Returns a read/write reverse_iterator2d_range that points to the bottom right element of the Range range associated to the Matrix. The same range is applied for rows and cols. Iteration is done in the reverse order. More...
 
reverse_iterator2d_range rbottom_right (const Range< int > &range)
 Returns a read/write reverse_iterator2d_range that points to one before the upper left element of the Range range associated to the Matrix. The same range is applied for rows and cols. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d_range rupper_left (const Range< int > &range) const
 Returns a read-only reverse_iterator2d_range that points to the to the bottom right element of the Range range associated to the Matrix. The same range is applied for rows and cols. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d_range rbottom_right (const Range< int > &range) const
 Returns a read_only reverse_iterator2d_range that points to one before the upper left element of the Range range associated to the Matrix. The same range is applied for rows and cols. Iteration is done in the reverse order. More...
 
Assignment operators and methods
Matrixoperator= (const self &rhs)
 Assign a Matrix. More...
 
selfoperator= (const T &val)
 Affects all the element of the Matrix by val. More...
 
void fill (const T &value)
 Fills the container range [begin(),begin()+size()) with copies of value. More...
 
void fill (const T *value)
 Fills the container range [begin(),begin()+size()) with a copy of the value array. More...
 
template<typename InputIterator >
void fill (InputIterator first, InputIterator last)
 Fills the container range [begin(),begin()+size()) with a copy of the range [first,last) More...
 
Element access operators
pointer operator[] (const size_type i)
 Subscript access to the row datas contained in the Matrix. More...
 
const_pointer operator[] (const size_type i) const
 Subscript access to the row datas contained in the Matrix. More...
 
reference operator() (const size_type i, const size_type j)
 Subscript access to the data contained in the Matrix. More...
 
const_reference operator() (const size_type i, const size_type j) const
 Subscript access to the data contained in the Matrix. More...
 
reference operator() (const Point2d< size_type > &point2d)
 Subscript access to the data contained in the Matrix. More...
 
const_reference operator() (const Point2d< size_type > &point2d) const
 Subscript access to the data contained in the Matrix. More...
 
self operator() (const Range< int > &row_range, const Range< int > &col_range)
 Subscript access to the data contained in the Matrix. More...
 
Arithmetic operators
selfoperator+= (const T &val)
 Add val to each element of the Matrix. More...
 
selfoperator-= (const T &val)
 
selfoperator*= (const T &val)
 
selfoperator/= (const T &val)
 
self operator- () const
 
selfoperator+= (const self &rhs)
 
selfoperator-= (const self &rhs)
 
selfoperator*= (const self &rhs)
 
selfoperator/= (const self &rhs)
 
Mathematical operators
T & min () const
 Returns the min element of the Matrix according to the operator <, if the T is complex, it returns the element with the minimal magnitude. More...
 
T & max () const
 Returns the max element of the Matrix according to the operator >, , if the T is complex, it returns the element with the maximal magnitude. More...
 
sum () const
 Returns the sum of the elements of the Matrix. More...
 
trace () const
 Returns the trace of the elements of the Matrix. More...
 
det () const
 Returns the determinant of the Matrix. More...
 
norm_type cond () const
 Returns the condition number $\frac{\mu_n}{\mu_k} $ of the Matrix where k is the rank of the matrix. More...
 
size_type rank () const
 Returns the rank of the Matrix. More...
 
self inv () const
 Returns the inverse of the Matrix. More...
 
norm_type L1_norm () const
 Returns the L1 norm ( $\max_j\sum_i |a_{ij}|$) of the elements of the Matrix. More...
 
norm_type L2_norm () const
 Returns the L2 norm ( $\sqrt(\max \{\lambda_i(MM^*\})$) of the elements of the Matrix. More...
 
norm_type infinite_norm () const
 Returns the infinite norm ( $\max_i\sum_j |a_{ij}|$) of the elements of the Matrix. More...
 
norm_type frobenius_norm () const
 Returns the Frobenius norm of the Matrix $\sum_{i,j} \bar{a_{ij}}a_{i,j}$. More...
 
norm_type spectral_radius () const
 Returns the spectral radius of the Matrix ( $\max_i |\lambda_{i}|$) More...
 
Matrix< T > & apply (T(*fun)(T))
 Applys the one-parameter C-function fun to each element of the Matrix. More...
 
Matrix< T > & apply (T(*fun)(const T &))
 Applys the one-parameter C-function fun to each element of the Matrix. More...
 

Static Public Attributes

static const std::size_t DIM = 2
 

Friends

class boost::serialization::access
 
i/o operators
std::ostream & operator<< (std::ostream &out, const self &a)
 Write the Matrix to the ouput stream. More...
 
Comparison operators
bool operator== (const Matrix< T > &x, const Matrix< T > &y)
 Matrix equality comparison. More...
 
bool operator!= (const Matrix< T > &x, const Matrix< T > &y)
 Matrix inequality comparison. More...
 
bool operator< (const Matrix< T > &x, const Matrix< T > &y)
 Less than comparison operator (Matrix ordering relation) More...
 
bool operator> (const Matrix< T > &x, const Matrix< T > &y)
 More than comparison operator. More...
 
bool operator<= (const Matrix< T > &x, const Matrix< T > &y)
 Less than equal comparison operator. More...
 
bool operator>= (const Matrix< T > &x, const Matrix< T > &y)
 More than equal comparison operator. More...
 

Related Functions

(Note that these are not member functions.)

template<typename T >
T & min (const Matrix< T > &M1)
 Returns the min element of a Matrix, if the T is complex, it returns ** the element with the minimal magnitude. More...
 
template<typename T >
T & max (const Matrix< T > &M1)
 Returns the max element of a Matrix, if the T is complex, it returns the element with the maximal magnitude. More...
 
template<typename T >
Matrix< typename
slip::lin_alg_traits< T >
::value_type
abs (const Matrix< T > &V)
 Returns the abs value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > sqrt (const Matrix< T > &V)
 Returns the sqrt value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > cos (const Matrix< T > &V)
 Returns the cos value of each element of the Matrix. More...
 
Matrix< float > acos (const Matrix< float > &V)
 Returns the acos value of each element of the Matrix. More...
 
Matrix< double > acos (const Matrix< double > &V)
 Returns the acos value of each element of the Matrix. More...
 
Matrix< long double > acos (const Matrix< long double > &V)
 Returns the acos value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > sin (const Matrix< T > &V)
 Returns the sin value of each element of the Matrix. More...
 
Matrix< float > asin (const Matrix< float > &V)
 Returns the asin value of each element of the Matrix. More...
 
Matrix< double > asin (const Matrix< double > &V)
 Returns the asin value of each element of the Matrix. More...
 
Matrix< long double > asin (const Matrix< long double > &V)
 Returns the asin value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > tan (const Matrix< T > &V)
 Returns the tan value of each element of the Matrix. More...
 
Matrix< float > atan (const Matrix< float > &V)
 Returns the atan value of each element of the Matrix. More...
 
Matrix< double > atan (const Matrix< double > &V)
 Returns the atan value of each element of the Matrix. More...
 
Matrix< long double > atan (const Matrix< long double > &V)
 Returns the atan value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > exp (const Matrix< T > &V)
 Returns the exp value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > log (const Matrix< T > &V)
 Returns the log value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > cosh (const Matrix< T > &V)
 Returns the cosh value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > sinh (const Matrix< T > &V)
 Returns the sinh value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > tanh (const Matrix< T > &V)
 Returns the tanh value of each element of the Matrix. More...
 
template<typename T >
Matrix< T > log10 (const Matrix< T > &V)
 Returns the log10 value of each element of the Matrix. More...
 

Detailed Description

template<typename Block>
class slip::Matrix< Block >

Numerical matrix class. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. It extends the interface of Array2d adding arithmetical: +=, -=, *=, /=,+,-,/,*... and mathematical operators: min, max, abs, sqrt, cos, acos, sin, asin, tan, atan, exp, log, cosh, sinh, tanh, log10, sum, apply...

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2007/10/29
Since
1.0.0
Parameters
T.Type of object in the Matrix
Axis conventions:
iterator2d_conventions.jpg
axis and notation conventions
Examples:
fft2d.cpp, and matrix_math_op.cpp.

Definition at line 132 of file GenericMultiComponent2d.hpp.

Member Typedef Documentation

template<typename Block>
typedef slip::stride_iterator<pointer> slip::Matrix< Block >::col_iterator

Definition at line 214 of file Matrix.hpp.

template<typename Block>
typedef slip::stride_iterator<col_iterator> slip::Matrix< Block >::col_range_iterator

Definition at line 222 of file Matrix.hpp.

template<typename Block>
typedef slip::stride_iterator<const_pointer> slip::Matrix< Block >::const_col_iterator

Definition at line 215 of file Matrix.hpp.

Definition at line 223 of file Matrix.hpp.

template<typename Block>
typedef const_iterator2d slip::Matrix< Block >::const_default_iterator

Definition at line 246 of file Matrix.hpp.

template<typename Block>
typedef const_pointer slip::Matrix< Block >::const_iterator

Definition at line 207 of file Matrix.hpp.

template<typename Block>
typedef slip::Array2d<T>::const_iterator2d slip::Matrix< Block >::const_iterator2d

Definition at line 219 of file Matrix.hpp.

template<typename Block>
typedef slip::Array2d<T>::const_iterator2d_range slip::Matrix< Block >::const_iterator2d_range

Definition at line 225 of file Matrix.hpp.

template<typename Block>
typedef value_type const* slip::Matrix< Block >::const_pointer

Definition at line 199 of file Matrix.hpp.

template<typename Block>
typedef value_type const& slip::Matrix< Block >::const_reference

Definition at line 201 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<const_col_iterator> slip::Matrix< Block >::const_reverse_col_iterator

Definition at line 231 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<const_col_range_iterator> slip::Matrix< Block >::const_reverse_col_range_iterator

Definition at line 237 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<const_iterator> slip::Matrix< Block >::const_reverse_iterator

Definition at line 210 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<const_iterator2d> slip::Matrix< Block >::const_reverse_iterator2d

Definition at line 233 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<const_iterator2d_range> slip::Matrix< Block >::const_reverse_iterator2d_range

Definition at line 239 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<const_iterator> slip::Matrix< Block >::const_reverse_row_iterator

Definition at line 229 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<const_row_range_iterator> slip::Matrix< Block >::const_reverse_row_range_iterator

Definition at line 235 of file Matrix.hpp.

template<typename Block>
typedef const_pointer slip::Matrix< Block >::const_row_iterator

Definition at line 213 of file Matrix.hpp.

template<typename Block>
typedef slip::stride_iterator<const_pointer> slip::Matrix< Block >::const_row_range_iterator

Definition at line 221 of file Matrix.hpp.

template<typename Block>
typedef const Matrix<T> slip::Matrix< Block >::const_self

Definition at line 196 of file Matrix.hpp.

template<typename Block>
typedef iterator2d slip::Matrix< Block >::default_iterator

Definition at line 245 of file Matrix.hpp.

template<typename Block>
typedef ptrdiff_t slip::Matrix< Block >::difference_type

Definition at line 203 of file Matrix.hpp.

template<typename Block>
typedef pointer slip::Matrix< Block >::iterator

Definition at line 206 of file Matrix.hpp.

template<typename Block>
typedef slip::Array2d<T>::iterator2d slip::Matrix< Block >::iterator2d

Definition at line 218 of file Matrix.hpp.

template<typename Block>
typedef slip::Array2d<T>::iterator2d_range slip::Matrix< Block >::iterator2d_range

Definition at line 224 of file Matrix.hpp.

template<typename Block>
typedef slip::lin_alg_traits<value_type>::value_type slip::Matrix< Block >::norm_type

Definition at line 241 of file Matrix.hpp.

template<typename Block>
typedef value_type* slip::Matrix< Block >::pointer

Definition at line 198 of file Matrix.hpp.

template<typename Block>
typedef value_type& slip::Matrix< Block >::reference

Definition at line 200 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<col_iterator> slip::Matrix< Block >::reverse_col_iterator

Definition at line 230 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<col_range_iterator> slip::Matrix< Block >::reverse_col_range_iterator

Definition at line 236 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<iterator> slip::Matrix< Block >::reverse_iterator

Definition at line 209 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<iterator2d> slip::Matrix< Block >::reverse_iterator2d

Definition at line 232 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<iterator2d_range> slip::Matrix< Block >::reverse_iterator2d_range

Definition at line 238 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<iterator> slip::Matrix< Block >::reverse_row_iterator

Definition at line 228 of file Matrix.hpp.

template<typename Block>
typedef std::reverse_iterator<row_range_iterator> slip::Matrix< Block >::reverse_row_range_iterator

Definition at line 234 of file Matrix.hpp.

template<typename Block>
typedef pointer slip::Matrix< Block >::row_iterator

Definition at line 212 of file Matrix.hpp.

template<typename Block>
typedef slip::stride_iterator<pointer> slip::Matrix< Block >::row_range_iterator

Definition at line 220 of file Matrix.hpp.

template<typename Block>
typedef Matrix<T> slip::Matrix< Block >::self

Definition at line 195 of file Matrix.hpp.

template<typename Block>
typedef std::size_t slip::Matrix< Block >::size_type

Definition at line 204 of file Matrix.hpp.

template<typename Block>
typedef T slip::Matrix< Block >::value_type

Definition at line 194 of file Matrix.hpp.

Constructor & Destructor Documentation

template<typename T >
slip::Matrix< T >::Matrix ( )
inline

Constructs a Matrix.

Definition at line 2718 of file Matrix.hpp.

template<typename Block>
slip::Matrix< Block >::Matrix ( const size_type  d1,
const size_type  d2 
)

Constructs a Matrix.

& **

Parameters
d1first dimension of the Matrix
d2second dimension of the Matrix
template<typename Block>
slip::Matrix< Block >::Matrix ( const size_type  d1,
const size_type  d2,
const T &  val 
)

Constructs a Matrix initialized by the scalar value val.

Parameters
d1first dimension of the Matrix
d2second dimension of the Matrix
valinitialization value of the elements
template<typename Block>
slip::Matrix< Block >::Matrix ( const size_type  d1,
const size_type  d2,
const T *  val 
)

Constructs a Matrix initialized by an array val.

Parameters
d1first dimension of the Matrix
d2second dimension of the Matrix
valinitialization array value of the elements
template<typename Block>
template<typename InputIterator >
slip::Matrix< Block >::Matrix ( const size_type  d1,
const size_type  d2,
InputIterator  first,
InputIterator  last 
)
inline

Contructs a Matrix from a range.

Parameters
d1first dimension of the Matrix
d2second dimension of the Matrix
firstAn input iterator.
lastAn input iterator.

Create a Matrix consisting of copies of the elements from [first,last).

Definition at line 299 of file Matrix.hpp.

template<typename T >
slip::Matrix< T >::Matrix ( const self rhs)
inline

Constructs a copy of the Matrix rhs.

Definition at line 2747 of file Matrix.hpp.

template<typename T >
slip::Matrix< T >::~Matrix ( )
inline

Destructor of the Matrix.

Definition at line 2753 of file Matrix.hpp.

template<typename Block>
template<typename T >
slip::Matrix< Block >::Matrix ( const typename Matrix< T >::size_type  d1,
const typename Matrix< T >::size_type  d2 
)
inline

Definition at line 2724 of file Matrix.hpp.

template<typename Block>
template<typename T >
slip::Matrix< Block >::Matrix ( const typename Matrix< T >::size_type  d1,
const typename Matrix< T >::size_type  d2,
const T &  val 
)
inline

Definition at line 2731 of file Matrix.hpp.

template<typename Block>
template<typename T >
slip::Matrix< Block >::Matrix ( const typename Matrix< T >::size_type  d1,
const typename Matrix< T >::size_type  d2,
const T *  val 
)
inline

Definition at line 2739 of file Matrix.hpp.

Member Function Documentation

template<typename T >
Matrix< T > & slip::Matrix< T >::apply ( T(*)(T)  fun)
inline

Applys the one-parameter C-function fun to each element of the Matrix.

Parameters
funThe one-parameter C function
Returns
the resulting Matrix
Example:
//fill M with values from 1 to 49 with step 1
slip::iota(M.begin(),M.end(),1.0,1.0);
//apply std::sqrt to each element of M

Definition at line 3736 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::apply ( T(*)(const T &)  fun)
inline

Applys the one-parameter C-function fun to each element of the Matrix.

Parameters
funThe one-const-parameter C function
Returns
the resulting Matrix
Example:
//fill M with values from 1 to 49 with step 1
slip::iota(M.begin(),M.end(),1.0,1.0);
//apply std::sqrt to each element of M

Definition at line 3744 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator slip::Matrix< T >::begin ( )
inline

Returns a read/write iterator that points to the first element in the Matrix. Iteration is done in ordinary element order.

Returns
begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the elements of A1 and A2 in S
std::transform(A1.begin(),A1.end(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 2789 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator slip::Matrix< T >::begin ( ) const
inline

Returns a read-only (constant) iterator that points to the first element in the Matrix. Iteration is done in ordinary element order.

Returns
const begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of A1 and A2 in S
std::transform(A1.begin(),A1.end(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 2803 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator2d slip::Matrix< T >::bottom_right ( )
inline

Returns a read/write iterator2d that points to the past the end element of the Matrix. It points to past the end element of the bottom right element of the Matrix.

Returns
begin iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
//copy the elements of A1 in A2

Definition at line 3151 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator2d slip::Matrix< T >::bottom_right ( ) const
inline

Returns a read-only iterator2d that points to the past the end element of the Matrix. It points to past the end element of the bottom right element of the Matrix.

Returns
begin const iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
//copy the elements of A1 in A2

Definition at line 3158 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator2d slip::Matrix< T >::bottom_right ( const Box2d< int > &  box)
inline

Returns a read/write iterator2d that points to the past the end element of the Matrix. It points to past the end element of the bottom right element of the Box2d associated to the Matrix.

Parameters
boxa Box2d defining the range of indices to iterate within the Matrix.
Returns
end iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the Matrix ones.
Example:
slip::Box2d<int> box(1,1,3,2);
//copy the elements of A1 inside the box which upper_left element
//is located in (1,1) and the bottom right element is in (3,2)

Definition at line 3182 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator2d slip::Matrix< T >::bottom_right ( const Box2d< int > &  box) const
inline

Returns a read only iterator2d that points to the past the end element of the Matrix. It points to past the end element of the bottom right element of the Box2d associated to the Matrix.

Parameters
boxa Box2d defining the range of indices to iterate within the Matrix.
Returns
end const iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the Matrix ones.
Example:
slip::Box2d<int> box(1,1,3,2);
//copy the elements of A1 inside the box which upper_left element
//is located in (1,1) and the bottom right element is in (3,2)

Definition at line 3189 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator2d_range slip::Matrix< T >::bottom_right ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write iterator2d_range that points to the past the end bottom right element of the ranges row_range and col_range associated to the Matrix.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.
Returns
iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> row_range(0,A1.dim2()-1,2);
slip::Range<int> col_range(0,A1.dim1()-1,2);
//copy the elements of A1 within the ranges row_range and col_range
//in A2
std::copy(A1.upper_left(row_range,col_range),
A1.bottom_right(row_range,col_range),A2.upper_left());

Definition at line 3218 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator2d_range slip::Matrix< T >::bottom_right ( const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only iterator2d_range that points to the past the end bottom right element of the ranges row_range and col_range associated to the Matrix.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.
Returns
const_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> row_range(0,A1.dim2()-1,2);
slip::Range<int> col_range(0,A1.dim1()-1,2);
//copy the elements of A1 within the ranges row_range and col_range
//in A2
std::copy(A1.upper_left(row_range,col_range),
A1.bottom_right(row_range,col_range),A2.upper_left());

Definition at line 3227 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator2d_range slip::Matrix< T >::bottom_right ( const Range< int > &  range)
inline

Returns a read/write iterator2d_range that points to the past the end bottom right element of the Range range associated to the Matrix. The same range is applied for rows and cols.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the Matrix ones.
Returns
iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of A1 within the range range
//in A2
std::copy(A1.upper_left(range),A1.bottom_right(range),A2.upper_left());

Definition at line 3254 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator2d_range slip::Matrix< T >::bottom_right ( const Range< int > &  range) const
inline

Returns a read-only const_iterator2d_range that points to the past the end bottom right element of the Range range associated to the Matrix. The same range is applied for rows and cols.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the Matrix ones.
Returns
const_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of A1 within the range range
//in A2
std::copy(A1.upper_left(range),A1.bottom_right(range),A2.upper_left());

Definition at line 3262 of file Matrix.hpp.

template<typename Block>
col_iterator slip::Matrix< Block >::col_begin ( const size_type  col)

Returns a read/write iterator that points to the first element of the column column in the Matrix. Iteration is done modulo the number of columns.

Parameters
colThe index of the column to iterate.
Returns
begin col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix
Example:
//copy the elements of the column 0 of A1 in the column 1 of A2
std::copy(A1.col_begin(0),A1.col_end(0),A2.col_begin(1));
template<typename Block>
const_col_iterator slip::Matrix< Block >::col_begin ( const size_type  col) const

Returns a read-only iterator that points to the first element of the column column in the Matrix. Iteration is done modulo the number of columns.

Parameters
colThe index of the column to iterate.
Returns
begin const_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
Example:
//copy the elements of the column 0 of A1 in the column 1 of A2
std::copy(A1.col_begin(0),A1.col_end(0),A2.col_begin(1));
template<typename Block>
col_range_iterator slip::Matrix< Block >::col_begin ( const size_type  col,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to the first element of the Range range of the col col in the Matrix. Iteration is done in ordinary element order according to the Range.

Parameters
colThe index of the column to iterate.
rangeRange of the column to iterate
Returns
begin col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the elements of the column 0 of A1 iterated according to the
//range in the column 1 of A2
std::copy(A1.col_begin(0,range),A1.col_end(0,range),A2.col_begin(1));
template<typename Block>
const_col_range_iterator slip::Matrix< Block >::col_begin ( const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the first element of the Range range of the col col in the Matrix. Iteration is done in ordinary element order according to the Range.

Parameters
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
begin const_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the elements of the column 0 of A1 iterated according to the
//range in the column 1 of A2
std::copy(A1.col_begin(0,range),A1.col_end(0,range),A2.col_begin(1));
template<typename Block>
col_iterator slip::Matrix< Block >::col_end ( const size_type  col)

Returns a read/write iterator that points one past the end element of the column column in the Matrix. Iteration is done modulo the number of columns.

Parameters
colThe index of the column to iterate.
Returns
begin col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
Example:
//copy the elements of the column 0 of A1 in the column 1 of A2
std::copy(A1.col_begin(0),A1.col_end(0),A2.col_begin(1));
template<typename Block>
const_col_iterator slip::Matrix< Block >::col_end ( const size_type  col) const

Returns a read-only iterator that points one past the end element of the column column in the Matrix. Iteration is done modulo the number of columns.

Parameters
colThe index of the column
Returns
begin const_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
Example:
//copy the elements of the column 0 of A1 in the column 1 of A2
std::copy(A1.col_begin(0),A1.col_end(0),A2.col_begin(1));
template<typename Block>
col_range_iterator slip::Matrix< Block >::col_end ( const size_type  col,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to the past the end element of the Range range of the col col in the Matrix. Iteration is done in ordinary element order according to the Range.

Parameters
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
begin col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the elements of the column 0 of A1 iterated according to the
//range in the column 1 of A2
std::copy(A1.col_begin(0,range),A1.col_end(0,range),A2.col_begin(1));
template<typename Block>
const_col_range_iterator slip::Matrix< Block >::col_end ( const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the past the end element of the Range range of the col col in the Matrix. Iteration is done in ordinary element order according to the Range.

Parameters
colThe index of the column to iterate.
rangeRange of the column to iterate
Returns
begin const_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the elements of the column 0 of A1 iterated according to the
//range in the column 1 of A2
std::copy(A1.col_begin(0,range),A1.col_end(0,range),A2.col_begin(1));
template<typename Block>
reverse_col_iterator slip::Matrix< Block >::col_rbegin ( const size_type  col)

Returns a read/write reverse iterator that points to the last element of the column column in the Matrix. Iteration is done modulo the number of columns and in the reverse element order.

Parameters
colThe index of the column to iterate.
Returns
begin col_reverse_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
template<typename Block>
const_reverse_col_iterator slip::Matrix< Block >::col_rbegin ( const size_type  col) const

Returns a read-only reverse iterator that points to the last element of the column column in the Matrix. Iteration is done modulo the number of columns and in the reverse element order.

Parameters
colThe index of the column to iterate.
Returns
begin const_reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
template<typename Block>
reverse_col_range_iterator slip::Matrix< Block >::col_rbegin ( const size_type  col,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to the last element of the Range range of the col col in the Matrix. Iteration is done in the reverse element order according to the Range.

Parameters
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
begin reverse_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
template<typename Block>
const_reverse_col_range_iterator slip::Matrix< Block >::col_rbegin ( const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read_only iterator that points to the last element of the Range & range of the col col in the Matrix. Iteration is done in the reverse element order according to the Range.

Parameters
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
begin const_reverse_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
template<typename Block>
reverse_col_iterator slip::Matrix< Block >::col_rend ( const size_type  col)

Returns a read/write reverse iterator that points one past the first element of the column column in the Matrix. Iteration is done modulo the number of columns and in the reverse element order.

Parameters
colThe index of the column to iterate.
Returns
end reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
template<typename Block>
const_reverse_col_iterator slip::Matrix< Block >::col_rend ( const size_type  col) const

Returns a read-only reverse iterator that points one past the first element of the column column in the Matrix. Iteration is done modulo the number of columns and in the reverse element order.

Parameters
colThe index of the column to iterate.
Returns
end const_reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
template<typename Block>
reverse_col_range_iterator slip::Matrix< Block >::col_rend ( const size_type  col,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to one before the first element of the Range range of the col col in the Matrix. Iteration is done in the reverse element order according to the Range.

Parameters
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
reverse_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
template<typename Block>
const_reverse_col_range_iterator slip::Matrix< Block >::col_rend ( const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the first element of the Range range of the col col in the Matrix. Iteration is done in the reverse element order according to the Range.

Parameters
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
const_reverse_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
template<typename T >
Matrix< T >::size_type slip::Matrix< T >::cols ( ) const
inline

Returns the number of columns (second dimension size) in the Matrix.

Definition at line 3512 of file Matrix.hpp.

template<typename T >
Matrix< T >::size_type slip::Matrix< T >::columns ( ) const
inline

Returns the number of columns (second dimension size) in the Matrix.

Definition at line 3508 of file Matrix.hpp.

template<typename T >
Matrix< T >::norm_type slip::Matrix< T >::cond ( ) const
inline

Returns the condition number $\frac{\mu_n}{\mu_k} $ of the Matrix where k is the rank of the matrix.

Precondition
this->row() == this->cols()
size() != 0

Definition at line 3693 of file Matrix.hpp.

template<typename T >
T slip::Matrix< T >::det ( ) const
inline

Returns the determinant of the Matrix.

Precondition
this->row() == this->cols()
size() != 0

Definition at line 3657 of file Matrix.hpp.

template<typename T >
Matrix< T >::size_type slip::Matrix< T >::dim1 ( ) const
inline

Returns the number of rows (first dimension size) in the Matrix.

Definition at line 3495 of file Matrix.hpp.

template<typename T >
Matrix< T >::size_type slip::Matrix< T >::dim2 ( ) const
inline

Returns the number of columns (second dimension size) in the Matrix.

Definition at line 3504 of file Matrix.hpp.

template<typename T >
bool slip::Matrix< T >::empty ( ) const
inline

Returns true if the Matrix is empty. (Thus size() == 0)

Definition at line 3525 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator slip::Matrix< T >::end ( )
inline

Returns a read/write iterator that points one past the last element in the Matrix. Iteration is done in ordinary element order.

Returns
end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the elements of A1 and A2 in S
std::transform(A1.begin(),A1.end(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 2796 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator slip::Matrix< T >::end ( ) const
inline

Returns a read-only (constant) iterator that points one past the last element in the Matrix. Iteration is done in ordinary element order.

Returns
const end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the elements of A1 and A2 in S
std::transform(A1.begin(),A1.end(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 2811 of file Matrix.hpp.

template<typename Block>
void slip::Matrix< Block >::fill ( const T &  value)
inline

Fills the container range [begin(),begin()+size()) with copies of value.

Parameters
valueA reference-to-const of arbitrary type.

Definition at line 1915 of file Matrix.hpp.

template<typename Block>
void slip::Matrix< Block >::fill ( const T *  value)
inline

Fills the container range [begin(),begin()+size()) with a copy of the value array.

Parameters
valueA pointer of arbitrary type.

Definition at line 1926 of file Matrix.hpp.

template<typename Block>
template<typename InputIterator >
void slip::Matrix< Block >::fill ( InputIterator  first,
InputIterator  last 
)
inline

Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)

Parameters
firstAn input iterator.
lastAn input iterator.

Definition at line 1940 of file Matrix.hpp.

template<typename Block>
norm_type slip::Matrix< Block >::frobenius_norm ( ) const
inline

Returns the Frobenius norm of the Matrix $\sum_{i,j} \bar{a_{ij}}a_{i,j}$.

Precondition
size() != 0

Definition at line 2307 of file Matrix.hpp.

template<typename Block>
norm_type slip::Matrix< Block >::infinite_norm ( ) const
inline

Returns the infinite norm ( $\max_i\sum_j |a_{ij}|$) of the elements of the Matrix.

Precondition
size() != 0

Definition at line 2298 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::Matrix< T >::inv ( ) const
inline

Returns the inverse of the Matrix.

Precondition
this->row() == this->cols()
size() != 0

Definition at line 3725 of file Matrix.hpp.

template<typename Block>
norm_type slip::Matrix< Block >::L1_norm ( ) const
inline

Returns the L1 norm ( $\max_j\sum_i |a_{ij}|$) of the elements of the Matrix.

Precondition
size() != 0

Definition at line 2274 of file Matrix.hpp.

template<typename Block>
norm_type slip::Matrix< Block >::L2_norm ( ) const
inline

Returns the L2 norm ( $\sqrt(\max \{\lambda_i(MM^*\})$) of the elements of the Matrix.

Precondition
size() != 0

Definition at line 2284 of file Matrix.hpp.

template<typename T >
T & slip::Matrix< T >::max ( ) const
inline

Returns the max element of the Matrix according to the operator >, , if the T is complex, it returns the element with the maximal magnitude.

Precondition
size() != 0

Definition at line 3627 of file Matrix.hpp.

template<typename T >
Matrix< T >::size_type slip::Matrix< T >::max_size ( ) const
inline

Returns the maximal size (number of elements) in the Matrix.

Definition at line 3520 of file Matrix.hpp.

template<typename T >
T & slip::Matrix< T >::min ( ) const
inline

Returns the min element of the Matrix according to the operator <, if the T is complex, it returns the element with the minimal magnitude.

Precondition
size() != 0

Definition at line 3619 of file Matrix.hpp.

template<typename T >
std::string slip::Matrix< T >::name ( ) const
inline

Returns the name of the class.

Definition at line 3490 of file Matrix.hpp.

template<typename Block>
reference slip::Matrix< Block >::operator() ( const size_type  i,
const size_type  j 
)

Subscript access to the data contained in the Matrix.

Parameters
iThe index of the row for which the data should be accessed.
jThe index of the columns for which the data should be accessed.
Returns
Read/write reference to data.
Precondition
i < rows()
j < columns()

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

template<typename Block>
const_reference slip::Matrix< Block >::operator() ( const size_type  i,
const size_type  j 
) const

Subscript access to the data contained in the Matrix.

Parameters
iThe index of the row for which the data should be accessed.
jThe index of the columns for which the data should be accessed.
Returns
Read_only (constant) reference to data.
Precondition
i < rows()
j < columns()

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

template<typename Block>
reference slip::Matrix< Block >::operator() ( const Point2d< size_type > &  point2d)

Subscript access to the data contained in the Matrix.

Parameters
point2dA Point2d which indicate the subscripts of the data to access.
Returns
Read/write reference to data.
Precondition
point2d must be defined in the range of the Matrix.

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

template<typename Block>
const_reference slip::Matrix< Block >::operator() ( const Point2d< size_type > &  point2d) const

Subscript access to the data contained in the Matrix.

Parameters
point2dA Point2d which indicate the subscripts of the data to access.
Returns
Read_only (constant) reference to data.
Precondition
point2d must be defined in the range of the Matrix.

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

template<typename T >
Matrix< T > slip::Matrix< T >::operator() ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Subscript access to the data contained in the Matrix.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Returns
a copy of the range.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 3471 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator*= ( const T &  val)
inline

Definition at line 3553 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator*= ( const self rhs)
inline

Definition at line 3598 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator+= ( const T &  val)
inline

Add val to each element of the Matrix.

Parameters
valvalue
Returns
reference to the resulting Matrix

Definition at line 3537 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator+= ( const self rhs)
inline

Definition at line 3578 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::Matrix< T >::operator- ( ) const
inline

Definition at line 3569 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator-= ( const T &  val)
inline

Definition at line 3545 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator-= ( const self rhs)
inline

Definition at line 3588 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator/= ( const T &  val)
inline

Definition at line 3561 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator/= ( const self rhs)
inline

Definition at line 3608 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator= ( const self rhs)
inline

Assign a Matrix.

Assign elements of Matrix in rhs

Parameters
rhsMatrix to get the values from.
Returns

Definition at line 2760 of file Matrix.hpp.

template<typename T >
Matrix< T > & slip::Matrix< T >::operator= ( const T &  val)
inline

Affects all the element of the Matrix by val.

Parameters
valaffectation value
Returns
reference to corresponding Matrix

Definition at line 2771 of file Matrix.hpp.

template<typename Block>
pointer slip::Matrix< Block >::operator[] ( const size_type  i)

Subscript access to the row datas contained in the Matrix.

Parameters
iThe index of the row for which data should be accessed.
Returns
Read/write pointer to the row data.
Precondition
i < rows()

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

template<typename Block>
const_pointer slip::Matrix< Block >::operator[] ( const size_type  i) const

Subscript access to the row datas contained in the Matrix.

Parameters
iThe index of the row for which data should be accessed.
Returns
Read-only (constant) pointer to the row data.
Precondition
i < rows()

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

template<typename T >
Matrix< T >::size_type slip::Matrix< T >::rank ( ) const
inline

Returns the rank of the Matrix.

Precondition
this->row() == this->cols()
size() != 0
Computes the number of singular values that are greater than $(x,y)$#218

Definition at line 3666 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator slip::Matrix< T >::rbegin ( )
inline

Returns a read/write reverse iterator that points to the last element in the Matrix. Iteration is done in reverse element order.

Returns
reverse begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the elements of A1 and A2
//in S (iterated in the reverse order element)
std::transform(A1.begin(),A1.end(),
A2.begin(),S.rbegin(),
std::plus<double>());

Definition at line 2820 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator slip::Matrix< T >::rbegin ( ) const
inline

Returns a read-only (constant) reverse iterator that points to the last element in the Matrix. Iteration is done in reverse element order.

Returns
const reverse begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the elements of A1 (iterated in the reverse order element)
//and A2 in S
std::transform(A1.rbegin(),A1.rend(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 2834 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator2d slip::Matrix< T >::rbottom_right ( )
inline

Returns a read/write reverse iterator2d. It points to past the upper left element of the Matrix. Iteration is done in the reverse order.

Returns
reverse iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3272 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator2d slip::Matrix< T >::rbottom_right ( ) const
inline

Returns a read only reverse iterator2d. It points to past the upper left element of the Matrix. Iteration is done in the reverse order.

Returns
const reverse iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3280 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator2d slip::Matrix< T >::rbottom_right ( const Box2d< int > &  box)
inline

Returns a read/write reverse iterator2d. It points to one before the upper left element of the Box2d box associated to the Matrix.

Parameters
boxA Box2d defining the range of indices to iterate within the Matrix.
Precondition
The box indices must be inside the range of the Matrix ones.
Returns
reverse iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3306 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator2d slip::Matrix< T >::rbottom_right ( const Box2d< int > &  box) const
inline

Returns a read-only reverse iterator2d. It points to one before the element of the bottom right element of the Box2d box associated to the Matrix.

Parameters
boxA Box2d defining the range of indices to iterate within the Matrix.
Precondition
The box indices must be inside the range of the Matrix ones.
Returns
const reverse iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3314 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator2d_range slip::Matrix< T >::rbottom_right ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write reverse_iterator2d_range that points to one before the upper left element of the ranges row_range and col_range associated to the Matrix. Iteration is done in the reverse order.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.
Returns
reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3359 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator2d_range slip::Matrix< T >::rbottom_right ( const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only reverse_iterator2d_range that points to one before the upper left element of the ranges row_range and col_range associated to the Matrix.Iteration is done in the reverse order.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.
Returns
const_reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3368 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator2d_range slip::Matrix< T >::rbottom_right ( const Range< int > &  range)
inline

Returns a read/write reverse_iterator2d_range that points to one before the upper left element of the Range range associated to the Matrix. The same range is applied for rows and cols. Iteration is done in the reverse order.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the Matrix ones.
Returns
reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3394 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator2d_range slip::Matrix< T >::rbottom_right ( const Range< int > &  range) const
inline

Returns a read_only reverse_iterator2d_range that points to one before the upper left element of the Range range associated to the Matrix. The same range is applied for rows and cols. Iteration is done in the reverse order.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the Matrix ones.
Returns
const_reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3402 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator slip::Matrix< T >::rend ( )
inline

Returns a read/write reverse iterator that points to one before the first element in the Matrix. Iteration is done in reverse element order.

Returns
reverse end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the elements of A1 and A2
//in S (iterated in the reverse order element)
std::transform(A1.begin(),A1.end(),
A2.begin(),S.rbegin(),
std::plus<double>());

Definition at line 2827 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator slip::Matrix< T >::rend ( ) const
inline

Returns a read-only (constant) reverse iterator that points to one before the first element in the Matrix. Iteration is done in reverse element order.

Returns
const reverse end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the elements of A1 (iterated in the reverse order element)
//and A2 in S
std::transform(A1.rbegin(),A1.rend(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 2841 of file Matrix.hpp.

template<typename Block>
void slip::Matrix< T >::resize ( const size_type  d1,
const size_type  d2,
const T &  val = T() 
)
inline

Resizes a Matrix.

Parameters
d1new first dimension
d2new second dimension
valnew value for all the elements

Definition at line 2779 of file Matrix.hpp.

template<typename Block>
row_iterator slip::Matrix< Block >::row_begin ( const size_type  row)

Returns a read/write iterator that points to the first element of the row row in the Matrix. Iteration is done in ordinary element order.

Parameters
rowThe index of the row to iterate.
Returns
begin row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
Example:
//copy the elements of the row 0 of A1 in the row 1 of A2
std::copy(A1.row_begin(0),A1.row_end(0),A2.row_begin(1));
template<typename Block>
const_row_iterator slip::Matrix< Block >::row_begin ( const size_type  row) const

Returns a read-only iterator that points to the first element of the row row in the Matrix. Iteration is done in ordinary element order.

Parameters
rowThe index of the row to iterate.
Returns
begin const_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
Example:
//copy the elements of the row 0 of A1 in the row 1 of A2
std::copy(A1.row_begin(0),A1.row_end(0),A2.row_begin(1));
template<typename Block>
row_range_iterator slip::Matrix< Block >::row_begin ( const size_type  row,
const slip::Range< int > &  range 
)

Returns a read/write iterator that points to the first element of the Range range of the row row in the Matrix. Iteration is done in ordinary element order according to the Range.

Parameters
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
begin row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of the row 0 of A1 iterated according to the
//range in the row 1 of A2
std::copy(A1.row_begin(0,range),A1.row_end(0,range),A2.row_begin(1));
template<typename Block>
const_row_range_iterator slip::Matrix< Block >::row_begin ( const size_type  row,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the first element of the Range range of the row row in the Matrix. Iteration is done in ordinary element order according to the Range.

Parameters
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
begin const_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of the row 0 of A1 iterated according to the
//range in the row 1 of A2
std::copy(A1.row_begin(0,range),A1.row_end(0,range),A2.row_begin(1));
template<typename Block>
row_iterator slip::Matrix< Block >::row_end ( const size_type  row)

Returns a read/write iterator that points one past the end element of the row row in the Matrix. Iteration is done in ordinary element order.

Parameters
rowThe index of the row to iterate.
Returns
begin row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
Example:
//copy the elements of the row 0 of A1 in the row 1 of A2
std::copy(A1.row_begin(0),A1.row_end(0),A2.row_begin(1));
template<typename Block>
const_row_iterator slip::Matrix< Block >::row_end ( const size_type  row) const

Returns a read-only iterator that points one past the end element of the row row in the Matrix. Iteration is done in ordinary element order.

Parameters
rowThe index of the row to iterate.
Returns
begin const_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
Example:
//copy the elements of the row 0 of A1 in the row 1 of A2
std::copy(A1.row_begin(0),A1.row_end(0),A2.row_begin(1));
template<typename Block>
row_range_iterator slip::Matrix< Block >::row_end ( const size_type  row,
const slip::Range< int > &  range 
)

Returns a read/write iterator that points one past the end element of the Range range of the row row in the Matrix. Iteration is done in ordinary element order according to the Range.

Parameters
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
end row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of the row 0 of A1 iterated according to the
//range in the row 1 of A2
std::copy(A1.row_begin(0,range),A1.row_end(0,range),A2.row_begin(1));
template<typename Block>
const_row_range_iterator slip::Matrix< Block >::row_end ( const size_type  row,
const slip::Range< int > &  range 
) const

Returns a read_only iterator that points one past the last element of the Range range of the row row in the Matrix. Iteration is done in ordinary element order according to the Range.

Parameters
rowRow to iterate.
rangeRange of the row to iterate
Returns
begin const_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of the row 0 of A1 iterated according to the
//range in the row 1 of A2
std::copy(A1.row_begin(0,range),A1.row_end(0,range),A2.row_begin(1));
template<typename Block>
reverse_row_iterator slip::Matrix< Block >::row_rbegin ( const size_type  row)

Returns a read/write reverse iterator that points to the last element of the row row in the Matrix. Iteration is done in the reverse element order.

Parameters
rowThe index of the row to iterate.
Returns
begin reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
template<typename Block>
const_reverse_row_iterator slip::Matrix< Block >::row_rbegin ( const size_type  row) const

Returns a read-only reverse iterator that points to the last element of the row row in the Matrix. Iteration is done in the reverse element order.

Parameters
rowThe index of the row to iterate.
Returns
begin const_reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
template<typename Block>
reverse_row_range_iterator slip::Matrix< Block >::row_rbegin ( const size_type  row,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to the last element of the Range range of the row row in the Matrix. Iteration is done in the reverse element order according to the Range.

Parameters
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
reverse_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
template<typename Block>
const_reverse_row_range_iterator slip::Matrix< Block >::row_rbegin ( const size_type  row,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the last element of the Range range of the row row in the Matrix. Iteration is done in the reverse element order according to the Range.

Parameters
rowThe index of the row to iterate.
rangeRange of the row to iterate
Returns
begin const_reverse_row_range_iterator value
Precondition
row must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
template<typename Block>
reverse_row_iterator slip::Matrix< Block >::row_rend ( const size_type  row)

Returns a read/write reverse iterator that points one past the first element of the row row in the Matrix. Iteration is done in the reverse element order.

Parameters
rowThe index of the row to iterate.
Returns
end reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
template<typename Block>
const_reverse_row_iterator slip::Matrix< Block >::row_rend ( const size_type  row) const

Returns a read-only reverse iterator that points one past the first element of the row row in the Matrix. Iteration is done in the reverse element order.

Parameters
rowThe index of the row to iterate.
Returns
end const_reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
template<typename Block>
reverse_row_range_iterator slip::Matrix< Block >::row_rend ( const size_type  row,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points one before the first element of the Range range of the row row in the Matrix. Iteration is done in the reverse element order according to the Range.

Parameters
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
reverse_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
template<typename Block>
const_reverse_row_range_iterator slip::Matrix< Block >::row_rend ( const size_type  row,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points one before the first element of the Range range of the row row in the Matrix. Iteration is done in the reverse element order according to the Range.

Parameters
rowThe index of the row to iterate.
rangeRange of the row to iterate
Returns
const_reverse_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Matrix.
The range must be inside the whole range of the Matrix.
template<typename T >
Matrix< T >::size_type slip::Matrix< T >::rows ( ) const
inline

Returns the number of rows (first dimension size) in the Matrix.

Definition at line 3499 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator2d slip::Matrix< T >::rupper_left ( )
inline

Returns a read/write reverse iterator2d. It points to the bottom right element of the Matrix. Iteration is done within the Matrix in the reverse order.

Returns
reverse_iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3289 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator2d slip::Matrix< T >::rupper_left ( ) const
inline

Returns a read only reverse iterator2d that points. It points to the bottom right element of the Matrix. Iteration is done within the Matrix in the reverse order.

Returns
const_reverse_iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3297 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator2d slip::Matrix< T >::rupper_left ( const Box2d< int > &  box)
inline

Returns a read/write reverse iterator2d. It points to the bottom right element of the Box2d associated to the Matrix. Iteration is done in the reverse order.

Parameters
boxa Box2d defining the range of indices to iterate within the Matrix.
Precondition
The box indices must be inside the range of the Matrix ones.
Returns
reverse iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3323 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator2d slip::Matrix< T >::rupper_left ( const Box2d< int > &  box) const
inline

Returns a read only reverse iterator2d. It points to the bottom right element of the Box2d box associated to the Matrix. Iteration is done in the reverse order.

Parameters
boxA Box2d defining the range of indices to iterate within the Matrix.
Precondition
The box indices must be inside the range of the Matrix ones.
Returns
const reverse iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3331 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator2d_range slip::Matrix< T >::rupper_left ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write reverse_iterator2d_range that points to the past the bottom right element of the ranges row_range and col_range associated to the Matrix. Iteration is done in the reverse order.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.
Returns
reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3340 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator2d_range slip::Matrix< T >::rupper_left ( const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only reverse_iterator2d_range that points to the past the bottom right element of the ranges row_range and col_range associated to the Matrix. Iteration is done in the reverse order.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.
Returns
const_reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3349 of file Matrix.hpp.

template<typename T >
Matrix< T >::reverse_iterator2d_range slip::Matrix< T >::rupper_left ( const Range< int > &  range)
inline

Returns a read/write reverse_iterator2d_range that points to the bottom right element of the Range range associated to the Matrix. The same range is applied for rows and cols. Iteration is done in the reverse order.

Parameters
rangeThe range of the rows and the cols.
Precondition
range and must be valid.
The range indices must be inside the ranges of the Matrix ones.
Returns
reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3378 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_reverse_iterator2d_range slip::Matrix< T >::rupper_left ( const Range< int > &  range) const
inline

Returns a read-only reverse_iterator2d_range that points to the to the bottom right element of the Range range associated to the Matrix. The same range is applied for rows and cols. Iteration is done in the reverse order.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the Matrix ones.
Returns
const_reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 3386 of file Matrix.hpp.

template<typename T >
Matrix< T >::size_type slip::Matrix< T >::size ( ) const
inline

Returns the number of elements in the Matrix.

Definition at line 3516 of file Matrix.hpp.

template<typename Block>
norm_type slip::Matrix< Block >::spectral_radius ( ) const
inline

Returns the spectral radius of the Matrix ( $\max_i |\lambda_{i}|$)

Precondition
size() != 0

Definition at line 2317 of file Matrix.hpp.

template<typename T >
T slip::Matrix< T >::sum ( ) const
inline

Returns the sum of the elements of the Matrix.

Precondition
size() != 0

Definition at line 3635 of file Matrix.hpp.

template<typename T >
void slip::Matrix< T >::swap ( self M)
inline

Swaps data with another Matrix.

Parameters
MA Matrix of the same element type

Definition at line 3529 of file Matrix.hpp.

template<typename T >
T slip::Matrix< T >::trace ( ) const
inline

Returns the trace of the elements of the Matrix.

Precondition
this->row() == this->cols()
size() != 0

Definition at line 3643 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator2d slip::Matrix< T >::upper_left ( )
inline

Returns a read/write iterator2d that points to the first element of the Matrix. It points to the upper left element of the Matrix.

Returns
begin iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
//copy the elements of A1 in A2

Definition at line 3135 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator2d slip::Matrix< T >::upper_left ( ) const
inline

Returns a read-only iterator2d that points to the first element of the Matrix. It points to the upper left element of the Matrix.

Returns
begin const iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
//copy the elements of A1 in A2

Definition at line 3142 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator2d slip::Matrix< T >::upper_left ( const Box2d< int > &  box)
inline

Returns a read/write iterator2d that points to the first element of the Matrix. It points to the upper left element of the Box2d associated to the Matrix.

Parameters
boxA Box2d defining the range of indices to iterate within the Matrix.
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Returns
end iterator2d value
Precondition
The box indices must be inside the range of the Matrix ones.
Example:
slip::Box2d<int> box(1,1,3,2);
//copy the elements of A1 inside the box which upper_left element
//is located in (1,1) and the bottom right element is in (3,2)

Definition at line 3166 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator2d slip::Matrix< T >::upper_left ( const Box2d< int > &  box) const
inline

Returns a read only iterator2d that points to the first element of the Matrix. It points to the upper left element of the Box2d associated to the Matrix.

Parameters
boxa Box2d defining the range of indices to iterate within the Matrix.
Returns
end const iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the Matrix ones.
Example:
slip::Box2d<int> box(1,1,3,2);
//copy the elements of A1 inside the box which upper_left element
//is located in (1,1) and the bottom right element is in (3,2)

Definition at line 3174 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator2d_range slip::Matrix< T >::upper_left ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write iterator2d_range that points to the upper left element of the ranges row_range and col_range associated to the Matrix.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.
Returns
iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> row_range(0,A1.dim2()-1,2);
slip::Range<int> col_range(0,A1.dim1()-1,2);
//copy the elements of A1 within the ranges row_range and col_range
//in A2
std::copy(A1.upper_left(row_range,col_range),
A1.bottom_right(row_range,col_range),A2.upper_left());

Definition at line 3199 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator2d_range slip::Matrix< T >::upper_left ( const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only iterator2d_range that points to the to the upper left element of the ranges row_range and col_range associated to the Matrix.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Matrix ones.
Returns
const_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> row_range(0,A1.dim2()-1,2);
slip::Range<int> col_range(0,A1.dim1()-1,2);
//copy the elements of A1 within the ranges row_range and col_range
//in A2
std::copy(A1.upper_left(row_range,col_range),
A1.bottom_right(row_range,col_range),A2.upper_left());

Definition at line 3208 of file Matrix.hpp.

template<typename T >
Matrix< T >::iterator2d_range slip::Matrix< T >::upper_left ( const Range< int > &  range)
inline

Returns a read/write iterator2d_range that points to the upper left element of the Range range associated to the Matrix. The same range is applied for rows and cols.

Parameters
rangeThe range of the rows and the cols.
Precondition
range and must be valid.
The range indices must be inside the ranges of the Matrix ones.
Returns
iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of A1 within the range range
//in A2
std::copy(A1.upper_left(range),A1.bottom_right(range),A2.upper_left());

Definition at line 3237 of file Matrix.hpp.

template<typename T >
Matrix< T >::const_iterator2d_range slip::Matrix< T >::upper_left ( const Range< int > &  range) const
inline

Returns a read-only iterator2d_range that points to the to the upper left element of the Range range associated to the Matrix.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the Matrix ones.
Returns
const_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of A1 within the range range
//in A2
std::copy(A1.upper_left(range),A1.bottom_right(range),A2.upper_left());

Definition at line 3245 of file Matrix.hpp.

Friends And Related Function Documentation

template<typename T >
Matrix< typename slip::lin_alg_traits< T >::value_type > abs ( const Matrix< T > &  V)
related

Returns the abs value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3892 of file Matrix.hpp.

template<typename Block>
Matrix< float > acos ( const Matrix< float > &  V)
related

Returns the acos value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3920 of file Matrix.hpp.

template<typename Block>
Matrix< double > acos ( const Matrix< double > &  V)
related

Returns the acos value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3928 of file Matrix.hpp.

template<typename Block>
Matrix< long double > acos ( const Matrix< long double > &  V)
related

Returns the acos value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3936 of file Matrix.hpp.

template<typename Block>
Matrix< float > asin ( const Matrix< float > &  V)
related

Returns the asin value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3954 of file Matrix.hpp.

template<typename Block>
Matrix< double > asin ( const Matrix< double > &  V)
related

Returns the asin value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3962 of file Matrix.hpp.

template<typename Block>
Matrix< long double > asin ( const Matrix< long double > &  V)
related

Returns the asin value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3970 of file Matrix.hpp.

template<typename Block>
Matrix< float > atan ( const Matrix< float > &  V)
related

Returns the atan value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3988 of file Matrix.hpp.

template<typename Block>
Matrix< double > atan ( const Matrix< double > &  V)
related

Returns the atan value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3996 of file Matrix.hpp.

template<typename Block>
Matrix< long double > atan ( const Matrix< long double > &  V)
related

Returns the atan value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 4004 of file Matrix.hpp.

template<typename Block>
friend class boost::serialization::access
friend

Definition at line 2362 of file Matrix.hpp.

template<typename T >
Matrix< T > cos ( const Matrix< T > &  V)
related

Returns the cos value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3911 of file Matrix.hpp.

template<typename T >
Matrix< T > cosh ( const Matrix< T > &  V)
related

Returns the cosh value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 4031 of file Matrix.hpp.

template<typename T >
Matrix< T > exp ( const Matrix< T > &  V)
related

Returns the exp value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 4013 of file Matrix.hpp.

template<typename T >
Matrix< T > log ( const Matrix< T > &  V)
related

Returns the log value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 4022 of file Matrix.hpp.

template<typename T >
Matrix< T > log10 ( const Matrix< T > &  V)
related

Returns the log10 value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 4058 of file Matrix.hpp.

template<typename T >
T & max ( const Matrix< T > &  M1)
related

Returns the max element of a Matrix, if the T is complex, it returns the element with the maximal magnitude.

Parameters
M1the Matrix
Returns
the min element

Definition at line 3885 of file Matrix.hpp.

template<typename T >
T & min ( const Matrix< T > &  M1)
related

Returns the min element of a Matrix, if the T is complex, it returns ** the element with the minimal magnitude.

Parameters
M1the Matrix
Returns
the min element

Definition at line 3878 of file Matrix.hpp.

template<typename Block>
bool operator!= ( const Matrix< T > &  x,
const Matrix< T > &  y 
)
friend

Matrix inequality comparison.

Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true if !(x == y)

Definition at line 4077 of file Matrix.hpp.

template<typename Block>
bool operator< ( const Matrix< T > &  x,
const Matrix< T > &  y 
)
friend

Less than comparison operator (Matrix ordering relation)

Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 4089 of file Matrix.hpp.

template<typename Block>
std::ostream& operator<< ( std::ostream &  out,
const self a 
)
friend

Write the Matrix to the ouput stream.

Parameters
outoutput std::ostream
aMatrix to write to the output stream

Definition at line 3409 of file Matrix.hpp.

template<typename Block>
bool operator<= ( const Matrix< T > &  x,
const Matrix< T > &  y 
)
friend

Less than equal comparison operator.

Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff !(y > x)

Definition at line 4106 of file Matrix.hpp.

template<typename Block>
bool operator== ( const Matrix< T > &  x,
const Matrix< T > &  y 
)
friend

Matrix equality comparison.

Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 4068 of file Matrix.hpp.

template<typename Block>
bool operator> ( const Matrix< T > &  x,
const Matrix< T > &  y 
)
friend

More than comparison operator.

Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff y > x

Definition at line 4098 of file Matrix.hpp.

template<typename Block>
bool operator>= ( const Matrix< T > &  x,
const Matrix< T > &  y 
)
friend

More than equal comparison operator.

Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff !(x < y)

Definition at line 4114 of file Matrix.hpp.

template<typename T >
Matrix< T > sin ( const Matrix< T > &  V)
related

Returns the sin value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3945 of file Matrix.hpp.

template<typename T >
Matrix< T > sinh ( const Matrix< T > &  V)
related

Returns the sinh value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 4040 of file Matrix.hpp.

template<typename T >
Matrix< T > sqrt ( const Matrix< T > &  V)
related

Returns the sqrt value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3902 of file Matrix.hpp.

template<typename T >
Matrix< T > tan ( const Matrix< T > &  V)
related

Returns the tan value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 3979 of file Matrix.hpp.

template<typename T >
Matrix< T > tanh ( const Matrix< T > &  V)
related

Returns the tanh value of each element of the Matrix.

Parameters
VThe Matrix
Returns
the resulting Matrix

Definition at line 4049 of file Matrix.hpp.

Member Data Documentation

template<typename Block>
const std::size_t slip::Matrix< Block >::DIM = 2
static

Definition at line 248 of file Matrix.hpp.


The documentation for this class was generated from the following files: