RVL::GenMat< T > Class Template Reference

GenMat: simple matrix class, mostly for testing purposes. More...

#include <rnmat.hh>

Inheritance diagram for RVL::GenMat< T >:

RVL::LinearOp< T > RVL::Operator< Scalar > RVL::Writeable RVL::SymMat< T > List of all members.

Public Member Functions

 GenMat (RnSpace< T > const &_dom, RnSpace< T > const &_rng)
 main constructor requires only domain and range
 GenMat (GenMat< T > const &m)
 copy constructor, used in clone
 ~GenMat ()
Space< T > const & getDomain () const
Space< T > const & getRange () const
int getNRows () const
 convenience access to row and col dims
int getNCols () const
T * getData ()
 access to data - essential for typical apps, eg.
T const * getData () const
T const & getElement (int i, int j) const
 element access - not so useful, but bound-checked and why not
T & getElement (int i, int j)
virtual void setElement (int i, int j, T e)
void eval (UnaryLocalFunctionObject< T > &f)
matvec< T > const & getMatVec () const
matvec< T > & getMatVec ()
virtual ostream & write (ostream &str) const

Protected Member Functions

virtual LinearOp< T > * clone () const
void apply (Vector< T > const &x, Vector< T > &y) const
void applyAdj (Vector< T > const &x, Vector< T > &y) const

Detailed Description

template<typename T>
class RVL::GenMat< T >

GenMat: simple matrix class, mostly for testing purposes.

A serious Matrix library would build on one of the standard libraries, like GSL or even LAPACK. This set of classes is self-contained and sufficient for testing and simple low-dimensional apps.

Definition at line 206 of file rnmat.hh.


Constructor & Destructor Documentation

template<typename T>
RVL::GenMat< T >::GenMat ( RnSpace< T > const &  _dom,
RnSpace< T > const &  _rng 
)

main constructor requires only domain and range

Definition at line 246 of file rnmat.hh.

template<typename T>
RVL::GenMat< T >::GenMat ( GenMat< T > const &  m  ) 

copy constructor, used in clone

Definition at line 250 of file rnmat.hh.

template<typename T>
RVL::GenMat< T >::~GenMat (  ) 

Definition at line 253 of file rnmat.hh.


Member Function Documentation

template<typename T>
virtual LinearOp<T>* RVL::GenMat< T >::clone (  )  const [protected, virtual]

Implements RVL::Operator< Scalar >.

Reimplemented in RVL::SymMat< T >.

Definition at line 217 of file rnmat.hh.

template<typename T>
void RVL::GenMat< T >::apply ( Vector< T > const &  x,
Vector< T > &  y 
) const [protected]

Definition at line 219 of file rnmat.hh.

References RVL::Vector< Scalar >::eval().

template<typename T>
void RVL::GenMat< T >::applyAdj ( Vector< T > const &  x,
Vector< T > &  y 
) const [protected, virtual]

Implements RVL::LinearOp< T >.

Definition at line 231 of file rnmat.hh.

References RVL::Vector< Scalar >::eval().

template<typename T>
Space<T> const& RVL::GenMat< T >::getDomain (  )  const [virtual]

Implements RVL::Operator< Scalar >.

Definition at line 255 of file rnmat.hh.

Referenced by RVL::SymMat< T >::write().

template<typename T>
Space<T> const& RVL::GenMat< T >::getRange (  )  const [virtual]

Implements RVL::Operator< Scalar >.

Definition at line 256 of file rnmat.hh.

template<typename T>
int RVL::GenMat< T >::getNRows (  )  const

convenience access to row and col dims

Definition at line 259 of file rnmat.hh.

References RVL::RnSpace< Scalar >::getSize().

template<typename T>
int RVL::GenMat< T >::getNCols (  )  const

Definition at line 260 of file rnmat.hh.

References RVL::RnSpace< Scalar >::getSize().

template<typename T>
T* RVL::GenMat< T >::getData (  ) 

access to data - essential for typical apps, eg.

calls to LAPACK

Definition at line 263 of file rnmat.hh.

template<typename T>
T const* RVL::GenMat< T >::getData (  )  const

Definition at line 264 of file rnmat.hh.

template<typename T>
T const& RVL::GenMat< T >::getElement ( int  i,
int  j 
) const

element access - not so useful, but bound-checked and why not

Definition at line 268 of file rnmat.hh.

template<typename T>
T& RVL::GenMat< T >::getElement ( int  i,
int  j 
)

Definition at line 276 of file rnmat.hh.

template<typename T>
virtual void RVL::GenMat< T >::setElement ( int  i,
int  j,
e 
) [virtual]

Reimplemented in RVL::SymMat< T >.

Definition at line 282 of file rnmat.hh.

template<typename T>
void RVL::GenMat< T >::eval ( UnaryLocalFunctionObject< T > &  f  ) 

Definition at line 288 of file rnmat.hh.

template<typename T>
matvec<T> const& RVL::GenMat< T >::getMatVec (  )  const

Definition at line 290 of file rnmat.hh.

template<typename T>
matvec<T>& RVL::GenMat< T >::getMatVec (  ) 

Definition at line 291 of file rnmat.hh.

template<typename T>
virtual ostream& RVL::GenMat< T >::write ( ostream &  str  )  const [virtual]

Implements RVL::Writeable.

Reimplemented in RVL::SymMat< T >.

Definition at line 293 of file rnmat.hh.

References RVL::RnSpace< Scalar >::getSize().


The documentation for this class was generated from the following file:
Generated on 5 Jan 2017 for LocalRVL by  doxygen 1.4.7