Biomechanical Joint Model
 Author: Anderson Maciel

LinAlg::Matrix_ Class Reference

#include <mat.h>

Inherited by LinAlg::HMAT.

Inheritance diagram for LinAlg::Matrix_:

Inheritance graph
[legend]
List of all members.

Public Types

typedef double value_type
typedef double * pointer
typedef double * iterator
typedef double & reference
typedef const double * const_iterator
typedef const double & const_reference

Public Member Functions

 Matrix_ ()
 Matrix_ (const Matrix_ &A)
 Matrix_ (unsigned M, unsigned N, const double &value=double(0))
 Matrix_ (unsigned M, unsigned N, const double *v)
 Matrix_ (const Vector &V)
 Matrix_ (unsigned M, unsigned N, const char *s)
 ~Matrix_ ()
Matrix_newsize (unsigned M, unsigned N)
void addToDiagonal (const Vector &V)
void addToDiagonal (const double &value)
void setBlock (const int m, const unsigned nrow, const int n, const unsigned ncol, const double &value=double(0))
void dim (unsigned &M, unsigned &N) const
unsigned row () const
unsigned col () const
void safeOutOfBounds (const bool on=true)
void setNeutral (const double &value)
double det ()
Matrix_operator= (const Matrix_ &A)
Matrix_operator= (const double &scalar)
Matrix_operator+= (const Matrix_ &A)
Matrix_operator-= (const Matrix_ &A)
Matrix_operator *= (const double &scalar)
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reference operator() (int i, int j)
const_reference operator() (int i, int j) const
reference operator[] (int k)
const_reference operator[] (int k) const
virtual Vector operator * (const Vector &V) const

Protected Member Functions

void initialize (unsigned M, unsigned N)
void copy (const double **v)
void copy (const double *t)
void set (const double &val)
void destroy ()

Protected Attributes

double ** v_
double * t_
unsigned m_
unsigned n_
bool safe
double neutral

Friends

std::ostream & operator<< (std::ostream &s, const Matrix_ &A)
Matrix_ operator+ (const Matrix_ &A, const Matrix_ &B)
Matrix_ operator- (const Matrix_ &A, const Matrix_ &B)
Matrix_ operator- (const Matrix_ &A)
Matrix_ operator * (const Matrix_ &A, const Matrix_ &B)
Matrix_ operator * (const Matrix_ &A, double s)
Matrix_ operator * (double s, const Matrix_ &A)
bool operator== (const Matrix_ &A, const Matrix_ &B)
bool operator!= (const Matrix_ &A, const Matrix_ &B)
Matrix_ transpose (const Matrix_ &A)
Matrix_ inverse (const Matrix_ &A)

Detailed Description

Definition at line 12 of file mat.h.


Member Typedef Documentation

typedef const double* LinAlg::Matrix_::const_iterator
 

Definition at line 19 of file mat.h.

typedef const double& LinAlg::Matrix_::const_reference
 

Definition at line 20 of file mat.h.

typedef double* LinAlg::Matrix_::iterator
 

Definition at line 17 of file mat.h.

typedef double* LinAlg::Matrix_::pointer
 

Definition at line 16 of file mat.h.

typedef double& LinAlg::Matrix_::reference
 

Definition at line 18 of file mat.h.

typedef double LinAlg::Matrix_::value_type
 

Definition at line 15 of file mat.h.


Constructor & Destructor Documentation

LinAlg::Matrix_::Matrix_  )  [inline]
 

Definition at line 170 of file mat.h.

LinAlg::Matrix_::Matrix_ const Matrix_ A  )  [inline]
 

Definition at line 174 of file mat.h.

References copy(), initialize(), m_, n_, and t_.

Here is the call graph for this function:

LinAlg::Matrix_::Matrix_ unsigned  M,
unsigned  N,
const double &  value = double(0)
[inline]
 

Definition at line 182 of file mat.h.

References initialize(), and set().

Here is the call graph for this function:

LinAlg::Matrix_::Matrix_ unsigned  M,
unsigned  N,
const double *  v
[inline]
 

Definition at line 190 of file mat.h.

References copy(), and initialize().

Here is the call graph for this function:

LinAlg::Matrix_::Matrix_ const Vector V  )  [inline]
 

Definition at line 199 of file mat.h.

References LinAlg::Vector::dim(), initialize(), and v_.

Here is the call graph for this function:

LinAlg::Matrix_::Matrix_ unsigned  M,
unsigned  N,
const char *  s
[inline]
 

Definition at line 208 of file mat.h.

References initialize(), and v_.

Here is the call graph for this function:

LinAlg::Matrix_::~Matrix_  )  [inline]
 

Definition at line 220 of file mat.h.

References destroy().

Here is the call graph for this function:


Member Function Documentation

void LinAlg::Matrix_::addToDiagonal const double &  value  )  [inline]
 

Definition at line 270 of file mat.h.

References m_, and v_.

void LinAlg::Matrix_::addToDiagonal const Vector V  )  [inline]
 

Definition at line 261 of file mat.h.

References LinAlg::Vector::dim(), m_, n_, and v_.

Referenced by LinAlg::HMAT::getIdentity(), and LinAlg::HMAT::setIdt().

Here is the call graph for this function:

const_iterator LinAlg::Matrix_::begin  )  const [inline]
 

Definition at line 60 of file mat.h.

References t_.

iterator LinAlg::Matrix_::begin  )  [inline]
 

Definition at line 58 of file mat.h.

References t_.

unsigned LinAlg::Matrix_::col  )  const [inline]
 

Definition at line 42 of file mat.h.

References n_.

Referenced by det(), LinAlg::inverse(), LinAlg::operator *(), LinAlg::operator+(), LinAlg::operator-(), LinAlg::operator<<(), and LinAlg::operator==().

void LinAlg::Matrix_::copy const double *  t  )  [inline, protected]
 

Definition at line 132 of file mat.h.

References m_, n_, and t_.

void LinAlg::Matrix_::copy const double **  v  )  [inline, protected]
 

Definition at line 124 of file mat.h.

References m_, n_, and v_.

Referenced by Matrix_(), and operator=().

void LinAlg::Matrix_::destroy  )  [inline, protected]
 

Definition at line 146 of file mat.h.

References m_, n_, t_, and v_.

Referenced by newsize(), operator=(), and ~Matrix_().

double LinAlg::Matrix_::det  )  [inline]
 

Definition at line 373 of file mat.h.

References col(), row(), and v_.

Here is the call graph for this function:

void LinAlg::Matrix_::dim unsigned &  M,
unsigned &  N
const [inline]
 

Definition at line 40 of file mat.h.

References m_, and n_.

const_iterator LinAlg::Matrix_::end  )  const [inline]
 

Definition at line 61 of file mat.h.

References m_, n_, and t_.

iterator LinAlg::Matrix_::end  )  [inline]
 

Definition at line 59 of file mat.h.

References m_, n_, and t_.

void LinAlg::Matrix_::initialize unsigned  M,
unsigned  N
[inline, protected]
 

Definition at line 155 of file mat.h.

References m_, n_, t_, and v_.

Referenced by LinAlg::HMAT::HMAT(), Matrix_(), newsize(), and operator=().

Matrix_ & LinAlg::Matrix_::newsize unsigned  M,
unsigned  N
[inline]
 

Definition at line 250 of file mat.h.

References destroy(), initialize(), m_, and n_.

Here is the call graph for this function:

Vector LinAlg::Matrix_::operator * const Vector V  )  const [virtual]
 

Reimplemented in LinAlg::HMAT.

Definition at line 6 of file mat.cpp.

References LinAlg::Vector::dim(), m_, n_, and v_.

Here is the call graph for this function:

Matrix_ & LinAlg::Matrix_::operator *= const double &  scalar  )  [inline]
 

Definition at line 336 of file mat.h.

References m_, n_, and v_.

Matrix_::const_reference LinAlg::Matrix_::operator() int  i,
int  j
const [inline]
 

Definition at line 240 of file mat.h.

References v_.

Matrix_::reference LinAlg::Matrix_::operator() int  i,
int  j
[inline]
 

Definition at line 226 of file mat.h.

References m_, n_, safe, and v_.

Referenced by setBlock().

Matrix_ & LinAlg::Matrix_::operator+= const Matrix_ A  )  [inline]
 

Definition at line 314 of file mat.h.

References m_, n_, and v_.

Matrix_ & LinAlg::Matrix_::operator-= const Matrix_ A  )  [inline]
 

Definition at line 325 of file mat.h.

References m_, n_, and v_.

Matrix_ & LinAlg::Matrix_::operator= const double &  scalar  )  [inline]
 

Definition at line 307 of file mat.h.

References set().

Here is the call graph for this function:

Matrix_ & LinAlg::Matrix_::operator= const Matrix_ A  )  [inline]
 

Definition at line 289 of file mat.h.

References copy(), destroy(), initialize(), m_, n_, t_, and v_.

Here is the call graph for this function:

Matrix_::const_reference LinAlg::Matrix_::operator[] int  k  )  const [inline]
 

Definition at line 361 of file mat.h.

References n_, and v_.

Matrix_::reference LinAlg::Matrix_::operator[] int  k  )  [inline]
 

Definition at line 344 of file mat.h.

References m_, n_, safe, and v_.

unsigned LinAlg::Matrix_::row  )  const [inline]
 

Definition at line 41 of file mat.h.

References m_.

Referenced by det(), LinAlg::inverse(), LinAlg::operator *(), LinAlg::operator+(), LinAlg::operator-(), LinAlg::operator<<(), LinAlg::operator==(), and LinAlg::transpose().

void LinAlg::Matrix_::safeOutOfBounds const bool  on = true  )  [inline]
 

Definition at line 44 of file mat.h.

References safe.

void LinAlg::Matrix_::set const double &  val  )  [inline, protected]
 

Definition at line 138 of file mat.h.

References m_, n_, and v_.

Referenced by Matrix_(), operator=(), and LinAlg::HMAT::setIdt().

void LinAlg::Matrix_::setBlock const int  m,
const unsigned  nrow,
const int  n,
const unsigned  ncol,
const double &  value = double(0)
[inline]
 

Definition at line 277 of file mat.h.

References operator()().

Here is the call graph for this function:

void LinAlg::Matrix_::setNeutral const double &  value  )  [inline]
 

Definition at line 45 of file mat.h.

References neutral.


Friends And Related Function Documentation

Matrix_ inverse const Matrix_ A  )  [friend]
 

Matrix_ operator * double  s,
const Matrix_ A
[friend]
 

Matrix_ operator * const Matrix_ A,
double  s
[friend]
 

Matrix_ operator * const Matrix_ A,
const Matrix_ B
[friend]
 

bool operator!= const Matrix_ A,
const Matrix_ B
[friend]
 

Matrix_ operator+ const Matrix_ A,
const Matrix_ B
[friend]
 

Matrix_ operator- const Matrix_ A  )  [friend]
 

Matrix_ operator- const Matrix_ A,
const Matrix_ B
[friend]
 

std::ostream& operator<< std::ostream &  s,
const Matrix_ A
[friend]
 

bool operator== const Matrix_ A,
const Matrix_ B
[friend]
 

Matrix_ transpose const Matrix_ A  )  [friend]
 


Member Data Documentation

unsigned LinAlg::Matrix_::m_ [protected]
 

Definition at line 92 of file mat.h.

Referenced by addToDiagonal(), copy(), destroy(), dim(), end(), initialize(), Matrix_(), newsize(), operator *(), operator *=(), operator()(), operator+=(), operator-=(), operator=(), operator[](), row(), and set().

unsigned LinAlg::Matrix_::n_ [protected]
 

Definition at line 92 of file mat.h.

Referenced by addToDiagonal(), col(), copy(), destroy(), dim(), end(), initialize(), Matrix_(), newsize(), operator *(), operator *=(), operator()(), operator+=(), operator-=(), operator=(), operator[](), and set().

double LinAlg::Matrix_::neutral [protected]
 

Definition at line 94 of file mat.h.

Referenced by setNeutral().

bool LinAlg::Matrix_::safe [protected]
 

Definition at line 93 of file mat.h.

Referenced by operator()(), operator[](), and safeOutOfBounds().

double* LinAlg::Matrix_::t_ [protected]
 

Definition at line 91 of file mat.h.

Referenced by begin(), copy(), destroy(), end(), initialize(), Matrix_(), and operator=().

double** LinAlg::Matrix_::v_ [protected]
 

Definition at line 90 of file mat.h.

Referenced by addToDiagonal(), copy(), destroy(), det(), LinAlg::HMAT::getColumn(), LinAlg::HMAT::getRow(), LinAlg::HMAT::HMAT(), initialize(), LinAlg::inverse(), Matrix_(), LinAlg::HMAT::mult(), LinAlg::operator *(), operator *(), operator *=(), LinAlg::HMAT::operator MatriX &(), operator()(), LinAlg::operator+(), operator+=(), LinAlg::operator-(), operator-=(), LinAlg::operator<<(), operator=(), LinAlg::operator==(), operator[](), set(), LinAlg::HMAT::setColumn(), LinAlg::HMAT::setRow(), and LinAlg::transpose().


The documentation for this class was generated from the following files:
Generated on Thu Dec 1 10:14:46 2005 for COME - Biomechanical Joint Model by  doxygen 1.4.5