CVR-Lib last update 20 Sep 2009

cvr::validator Class Reference

Matrix and Vector validity check. More...

#include <cvrValidator.h>

Inheritance diagram for cvr::validator:

Inheritance graph
[legend]
Collaboration diagram for cvr::validator:

Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 The parameters for the class validator. More...

Public Member Functions

typedef bool() doubleValidator (double)
typedef bool() floatValidator (float)
 validator ()
 validator (const validator &other)
virtual ~validator ()
bool apply (const vector< double > &src) const
bool apply (const vector< float > &src) const
bool apply (const vector< dcomplex > &src) const
bool apply (const vector< fcomplex > &src) const
bool apply (const matrix< double > &src) const
bool apply (const matrix< float > &src) const
bool apply (const matrix< dcomplex > &src) const
bool apply (const matrix< fcomplex > &src) const
validatorcopy (const validator &other)
validatoroperator= (const validator &other)
virtual const std::string & name () const
virtual functorclone () const
virtual functornewInstance () const
const parametersgetParameters () const


Detailed Description

Matrix and Vector validity check.

Checks the validity of a matrix or vector with float or double elements. A matrix is invalid, if it contains nan or inf elements. Otherwise, it is assumed to be valid.

Todo:
The pointer to functions are not a good idea, since it is not easily serializable. We need a family of functors that can belong to a factory, which can then be easily serialized through their names.

Constructor & Destructor Documentation

cvr::validator::validator (  ) 

Default constructor.

cvr::validator::validator ( const validator other  ) 

Copy constructor.

Parameters:
other the object to be copied

virtual cvr::validator::~validator (  )  [virtual]

Destructor.


Member Function Documentation

bool cvr::validator::apply ( const matrix< fcomplex > &  src  )  const

Operates on the given parameter.

Parameters:
src matrix<float> with the source data.
Returns:
true if the matrix is valid or false otherwise.

bool cvr::validator::apply ( const matrix< dcomplex > &  src  )  const

Operates on the given parameter.

Parameters:
src matrix<double> with the source data.
Returns:
true if the matrix is valid or false otherwise.

bool cvr::validator::apply ( const matrix< float > &  src  )  const

Operates on the given parameter.

Parameters:
src matrix<float> with the source data.
Returns:
true if the matrix is valid or false otherwise.

bool cvr::validator::apply ( const matrix< double > &  src  )  const

Operates on the given parameter.

Parameters:
src matrix<double> with the source data.
Returns:
true if the matrix is valid or false otherwise.

bool cvr::validator::apply ( const vector< fcomplex > &  src  )  const

Operates on the given parameter.

Parameters:
src vector<float> with the source data.
Returns:
true if the vector is valid or false otherwise.

bool cvr::validator::apply ( const vector< dcomplex > &  src  )  const

Operates on the given parameter.

Parameters:
src vector<double> with the source data.
Returns:
true if the vector is valid or false otherwise.

bool cvr::validator::apply ( const vector< float > &  src  )  const

Operates on the given parameter.

Parameters:
src vector<float> with the source data.
Returns:
true if the vector is valid or false otherwise.

bool cvr::validator::apply ( const vector< double > &  src  )  const

Operates on the given parameter.

Parameters:
src vector<double> with the source data.
Returns:
true if the vector is valid or false otherwise.

virtual functor* cvr::validator::clone (  )  const [virtual]

Returns a pointer to a clone of this functor.

Implements cvr::functor.

validator& cvr::validator::copy ( const validator other  ) 

Copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

typedef bool() cvr::validator::doubleValidator ( double   ) 

Type of a function that checks a single double value.

typedef bool() cvr::validator::floatValidator ( float   ) 

Type of a function that checks a single float value.

const parameters& cvr::validator::getParameters (  )  const

Returns used parameters.

Reimplemented from cvr::parametersManager.

virtual const std::string& cvr::validator::name (  )  const [virtual]

Returns the name of this class.

Implements cvr::functor.

virtual functor* cvr::validator::newInstance (  )  const [virtual]

Returns a pointer to a new instance of this functor.

Implements cvr::functor.

validator& cvr::validator::operator= ( const validator other  ) 

Alias for copy member.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object


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

Generated on Sun Sep 20 22:09:06 2009 for CVR-Lib by Doxygen 1.5.8