finitediff
Public Member Functions | Private Member Functions | List of all members
SNgeneric< T, tp_size > Class Template Referenceabstract

This is the base class for the other matrices types. More...

#include <MathUtilities.h>

Inheritance diagram for SNgeneric< T, tp_size >:
Inheritance graph
[legend]

Public Member Functions

virtual unsigned int getSize () const final
 
virtual T & at (const m_num, const m_num) final
 
virtual T get (const m_num, const m_num) const final
 
virtual SNline< T, tp_size > getSNline (m_num l) const
 
template<class V , unsigned int s>
void subtract (const SNgeneric< V, s > &)
 
template<class V , unsigned int s>
void subtract (const SNgaussian< V, s > &)
 
SNgaussian< T, tp_size > getGaussian (const m_num c) const
 
template<class V , unsigned int s>
bool isNumericallyEqual (const SNgeneric< V, s > &A, const double &epsilon) const
 

Private Member Functions

virtual T _get (const m_num, const m_num) const =0
 
virtual T & _at (const m_num, const m_num)=0
 
virtual void checkRangeCorectness (const m_num &, const m_num &) const final
 

Detailed Description

template<class T, unsigned int tp_size>
class SNgeneric< T, tp_size >

This is the base class for the other matrices types.

A matrix can be

Each of these types have different implementations for storing the elements, perform equality tests (opertor==), multiplication (operator*) and so on.

What you need in your subclass :

As an example, on a lower diagonal matrix,

Member Function Documentation

template<class T, unsigned int tp_size>
virtual T& SNgeneric< T, tp_size >::_at ( const m_num  ,
const m_num   
)
privatepure virtual
template<class T, unsigned int tp_size>
virtual T SNgeneric< T, tp_size >::_get ( const m_num  ,
const m_num   
) const
privatepure virtual
template<class T , unsigned int tp_size>
T & SNgeneric< T, tp_size >::at ( const m_num  i,
const m_num  j 
)
finalvirtual
template<class T , unsigned int tp_size>
void SNgeneric< T, tp_size >::checkRangeCorectness ( const m_num l,
const m_num c 
) const
finalprivatevirtual

throws SNoutOfRangeException if the requested element is out of range (larger than 'tp_size').

template<class T , unsigned int tp_size>
T SNgeneric< T, tp_size >::get ( const m_num  i,
const m_num  j 
) const
finalvirtual
template<class T , unsigned int tp_size>
SNgaussian< T, tp_size > SNgeneric< T, tp_size >::getGaussian ( const m_num  c) const

return the gaussian matrix for the requested column 'c'

template<class T , unsigned int tp_size>
unsigned int SNgeneric< T, tp_size >::getSize ( ) const
finalvirtual
template<class T , unsigned int tp_size>
SNline< T, tp_size > SNgeneric< T, tp_size >::getSNline ( m_num  l) const
virtual
template<class T , unsigned int tp_size>
template<class V , unsigned int s>
bool SNgeneric< T, tp_size >::isNumericallyEqual ( const SNgeneric< V, s > &  A,
const double &  epsilon 
) const

numerical equality test 'up to epsilon'. If the max norm of "this-A" is strictly larger than epsilon, return false. Else return true.

For this reason, the template parameter T has to support std::abs

template<class T , unsigned int tp_size>
template<class V , unsigned int s>
void SNgeneric< T, tp_size >::subtract ( const SNgeneric< V, s > &  S)

subtract the given matrix from this matrix. This is in-place replacement. Thus the least const in the world.

template<class T , unsigned int tp_size>
template<class V , unsigned int s>
void SNgeneric< T, tp_size >::subtract ( const SNgaussian< V, s > &  G)

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