LAMA
lama::Norm Class Reference

Norm is a abstract functor to calculate the norms for the passed values. More...

#include <Norm.hpp>

Inheritance diagram for lama::Norm:

Public Member Functions

 Norm ()
 Constructs a empty norm object.
virtual ~Norm ()
 Destroys this.
Scalar operator() (const Scalar &scalar) const
 Calculates the norm of the passed Scalar.
Scalar operator() (const Vector &vector) const
 Calculates the norm of the passed Vector.
virtual Scalar apply (const Scalar &scalar) const =0
 Calculates the norm of the passed Scalar.
virtual Scalar apply (const Vector &vector) const =0
 Calculates the norm of the passed Vector.

Detailed Description

Norm is a abstract functor to calculate the norms for the passed values.

The Functor Norm is mainly used by the stopping criteria ResidualThreshold and ResidualStagnation, to allow a to customize the Norms for these stopping criteria.


Constructor & Destructor Documentation

Constructs a empty norm object.

lama::Norm::~Norm ( ) [virtual]

Destroys this.


Member Function Documentation

virtual Scalar lama::Norm::apply ( const Scalar scalar) const [pure virtual]

Calculates the norm of the passed Scalar.

Parameters:
[in]scalarthe Scalar to caluclate the norm for.
Returns:
the norm of scalar.

Implemented in lama::L2Norm, lama::L1Norm, and lama::MaxNorm.

Referenced by operator()().

virtual Scalar lama::Norm::apply ( const Vector vector) const [pure virtual]

Calculates the norm of the passed Vector.

Parameters:
[in]vectorthe Vector to caluclate the norm for.
Returns:
the norm of vector.

Implemented in lama::L2Norm, lama::L1Norm, and lama::MaxNorm.

Scalar lama::Norm::operator() ( const Scalar scalar) const

Calculates the norm of the passed Scalar.

To call this is equivalent to call apply with the same argument.

Parameters:
[in]scalarthe Scalar to caluclate the norm for.
Returns:
the norm of scalar.

References apply().

Scalar lama::Norm::operator() ( const Vector vector) const

Calculates the norm of the passed Vector.

To call this is equivalent to call apply with the same argument.

Parameters:
[in]vectorthe Vector to caluclate the norm for.
Returns:
the norm of vector.

References apply().


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