exmat::Mat< Rep, ErrChecker_ > Class Template Reference

The Mat matrix class. More...

#include <Mat.h>

Inheritance diagram for exmat::Mat< Rep, ErrChecker_ >:

exmat::Vec< Rep, ErrChecker_ > List of all members.

Assignment operators

CommaInitializer< self_typeoperator= (const_param_type s)
template<class Rep2, class ErrChk2>
MatAssignNoAna (const Mat< Rep2, ErrChk2 > &A)
 Assignment from expression without any analyzer.
template<class Rep2, class ErrChk2>
Matoperator= (const Mat< Rep2, ErrChk2 > &A)
 Assignment operator for Mat of different type.
Matoperator= (const self_type &A)
 Assignment operator for Mat of the same type.
template<class Res, class Exp>
static void AssignDispatcher (Res &res, const Exp &exp)
 Default function for Mat assignment, it can be overloaded by template specialization.

Comparison operators

template<class Rep2, class ErrChk2>
bool operator!= (const Mat< Rep2, ErrChk2 > &A) const
template<class Rep2, class ErrChk2>
bool operator== (const Mat< Rep2, ErrChk2 > &A) const
bool operator!= (const value_type &s) const
bool operator== (const value_type &s) const
bool operator!= (const value_type &lhs, const self_type &rhs)
bool operator== (const value_type &lhs, const self_type &rhs)

Public Member Functions

 Mat ()
 Empty constructor.
template<class Rep2, class ErrChk2>
 Mat (const Mat< Rep2, ErrChk2 > &A, typename DisableIf_c< IsDerivedFrom< Rep, ViewTag >::RET &&_AlwaysTrue< Rep2 >::RET >::RET *dummy=NULL)
 Mat (const std::string &s)
 Special constructor for constructing the Mat from a view.
 Mat (const_param_type s)
 Forward the scalar construction to the rep_type.
template<class Rep2>
 Mat (ExpMat< Rep2 > &A)
 Construct the Mat from an expression.
template<class Rep2>
 Mat (const ExpMat< Rep2 > &A)
 Construct the Mat from an expression.
template<class T1, class T2>
 Mat (T1 &t1, T2 &t2)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2, class T3>
 Mat (T1 &t1, T2 &t2, T3 &t3)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2, class T3, class T4>
 Mat (T1 &t1, T2 &t2, T3 &t3, T4 &t4)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2, class T3, class T4, class T5>
 Mat (T1 &t1, T2 &t2, T3 &t3, T4 &t4, T5 &t5)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
 Mat (T1 &t1, T2 &t2, T3 &t3, T4 &t4, T5 &t5, T6 &t6, T7 &t7, T8 &t8, T9 &t9)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
 Mat (T1 &t1, T2 &t2, T3 &t3, T4 &t4, T5 &t5, T6 &t6, T7 &t7, T8 &t8, T9 &t9, T10 t10, T11 &t11, T12 &t12, T13 &t13, T14 &t14, T15 &t15, T16 &t16)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2>
 Mat (const T1 &t1, const T2 &t2)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2, class T3>
 Mat (const T1 &t1, const T2 &t2, const T3 &t3)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2, class T3, class T4>
 Mat (const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
 Generic constructor, which forward the initialization to rep_type.
template<class T1, class T2, class T3, class T4, class T5>
 Mat (const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5)
 Generic constructor, which forward the initialization to rep_type.
 Mat (const Dim &d)
 Forward the Dimension construction to the rep_type.
 Mat (const Dim &d1, const Dim &d2, const_param_type s)
 Forward the Dimension construction to the rep_type.
Index operators
To access individual element

reference operator() (index_type r, index_type c)
const_reference operator() (index_type r, index_type c) const
Index operators
To access individual row

row_type operator[] (index_type r)
const_row_type operator[] (index_type r) const
In-place operators
self_typeoperator+= (const_param_type s)
 In-place addition with scalar.
self_typeoperator-= (const_param_type s)
 In-place subtraction with scalar.
self_typeoperator *= (const_param_type s)
 In-place multiplication with scalar.
self_typeoperator/= (const_param_type s)
 In-place division with scalar.
template<class Rep2, class ErrChk2>
self_typeoperator+= (const Mat< Rep2, ErrChk2 > &A)
 In-place addition with matrix.
template<class Rep2, class ErrChk2>
self_typeoperator-= (const Mat< Rep2, ErrChk2 > &A)
 In-place subtraction with matrix.
template<class Rep2, class ErrChk2>
self_typeoperator *= (const Mat< Rep2, ErrChk2 > &A)
 In-place multiplication with matrix.
Index get/set functions
for internal use, no error checking applied. Should be protected functions, but have to make many friend class...

reference setAt (index_type i)
const_reference getAt (index_type i) const
reference setAt (index_type r, index_type c)
const_reference getAt (index_type r, index_type c) const

Detailed Description

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
class exmat::Mat< Rep, ErrChecker_ >

The Mat matrix class.

This is the core class over the whole exmat library


Constructor & Destructor Documentation

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
template<class Rep2, class ErrChk2>
exmat::Mat< Rep, ErrChecker_ >::Mat const Mat< Rep2, ErrChk2 > &  A,
typename DisableIf_c< IsDerivedFrom< Rep, ViewTag >::RET &&_AlwaysTrue< Rep2 >::RET >::RET *  dummy = NULL
[inline]
 

Construct the Mat from another type of Mat.
It will perform resizing operation if needed. This constructor will be disabled for view construction

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
exmat::Mat< Rep, ErrChecker_ >::Mat const std::string &  s  )  [inline]
 

Special constructor for constructing the Mat from a view.

Construct the matrix from a string

Note:
It's only for dense matrix, sparse matrix will call the container's string constructor


Member Function Documentation

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
bool exmat::Mat< Rep, ErrChecker_ >::operator!= const value_type &  s  )  const [inline]
 

The not equal operator.

Parameters:
s scalar to be compared
Returns:
True if any of the elements in the matrix is not identical to the scalar s

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
template<class Rep2, class ErrChk2>
bool exmat::Mat< Rep, ErrChecker_ >::operator!= const Mat< Rep2, ErrChk2 > &  A  )  const [inline]
 

The not equal operator.

Parameters:
A matrix to be compared
Returns:
True if any corresponding element of the 2 matrix is different

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
const_reference exmat::Mat< Rep, ErrChecker_ >::operator() index_type  r,
index_type  c
const [inline]
 

Index operator returning an element (for external use)

Parameters:
r the row index
c the column index
Returns:
the element
See also:
operator[]

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
reference exmat::Mat< Rep, ErrChecker_ >::operator() index_type  r,
index_type  c
[inline]
 

Index operator returning an element (for external use)

Parameters:
r the row index
c the column index
Returns:
the element
See also:
operator[]

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
CommaInitializer<self_type> exmat::Mat< Rep, ErrChecker_ >::operator= const_param_type  s  )  [inline]
 

Assignment operator for use with CommaInitializer

Attention:
Fail to inline in VC++6

Reimplemented in exmat::Vec< Rep, ErrChecker_ >.

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
bool exmat::Mat< Rep, ErrChecker_ >::operator== const value_type &  s  )  const [inline]
 

The equal operator.

Parameters:
s scalar to be compared
Returns:
True if all of the elements in the matrix are identical to the scalar s

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
template<class Rep2, class ErrChk2>
bool exmat::Mat< Rep, ErrChecker_ >::operator== const Mat< Rep2, ErrChk2 > &  A  )  const [inline]
 

The equal operator.

Parameters:
A matrix to be compared
Returns:
True if all of the element in both matrix are identical

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
const_row_type exmat::Mat< Rep, ErrChecker_ >::operator[] index_type  r  )  const [inline]
 

Index operator returning a row (for external use)

Parameters:
r the row index
Returns:
the row
See also:
operator()

Reimplemented in exmat::Vec< Rep, ErrChecker_ >.

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
row_type exmat::Mat< Rep, ErrChecker_ >::operator[] index_type  r  )  [inline]
 

Index operator returning a row (for external use)

Parameters:
r the row index
Returns:
the row
See also:
operator()

Reimplemented in exmat::Vec< Rep, ErrChecker_ >.


Friends And Related Function Documentation

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
bool operator!= const value_type &  lhs,
const self_type rhs
[friend]
 

The not equal operator.

Parameters:
A matrix to be compared
Returns:
True if any corresponding element of the 2 matrix is different

template<class Rep, class ErrChecker_ = DefaultErrorChecker>
bool operator== const value_type &  lhs,
const self_type rhs
[friend]
 

The not equal operator.

Parameters:
A matrix to be compared
Returns:
True if any corresponding element of the 2 matrix is different


The documentation for this class was generated from the following file:
Generated on Sat May 6 23:12:04 2006 for Exmat by  doxygen 1.4.6-NO