RVL::EuclideanForm< Scalar > Class Template Reference

This functional is the standard Euclidean Form $f(x) = 0.5 |x|^{2}$. More...

#include <ls.hh>

Inheritance diagram for RVL::EuclideanForm< Scalar >:

RVL::Functional< Scalar > RVL::Writeable List of all members.

Public Member Functions

 EuclideanForm (const Space< Scalar > &_sp)
 EuclideanForm (const EuclideanForm< Scalar > &q)
 ~EuclideanForm ()
const Space< Scalar > & getDomain () const
ostream & write (ostream &str) const

Protected Member Functions

void apply (const Vector< Scalar > &x, Scalar &val) const
void applyGradient (const Vector< Scalar > &x, Vector< Scalar > &g) const
void applyHessian (const Vector< Scalar > &x, const Vector< Scalar > &delx, Vector< Scalar > &dely) const
virtual Functional< Scalar > * clone () const

Detailed Description

template<class Scalar>
class RVL::EuclideanForm< Scalar >

This functional is the standard Euclidean Form $f(x) = 0.5 |x|^{2}$.

Note that this form is differentiable over the reals, and the gradient provided is its derivative. However it is actually not differentiable for complex Scalar types, and accordingly the derivative test would fail.

A call to testRealOnly is included to catch this point at compile time.

Definition at line 223 of file ls.hh.


Constructor & Destructor Documentation

template<class Scalar>
RVL::EuclideanForm< Scalar >::EuclideanForm ( const Space< Scalar > &  _sp  ) 

Definition at line 291 of file ls.hh.

template<class Scalar>
RVL::EuclideanForm< Scalar >::EuclideanForm ( const EuclideanForm< Scalar > &  q  ) 

Definition at line 292 of file ls.hh.

template<class Scalar>
RVL::EuclideanForm< Scalar >::~EuclideanForm (  ) 

Definition at line 293 of file ls.hh.


Member Function Documentation

template<class Scalar>
void RVL::EuclideanForm< Scalar >::apply ( const Vector< Scalar > &  x,
Scalar &  val 
) const [protected, virtual]

Implements RVL::Functional< Scalar >.

Definition at line 232 of file ls.hh.

References RVL::Vector< Scalar >::getSpace(), and RVL::Vector< Scalar >::inner().

template<class Scalar>
void RVL::EuclideanForm< Scalar >::applyGradient ( const Vector< Scalar > &  x,
Vector< Scalar > &  g 
) const [protected, virtual]

Implements RVL::Functional< Scalar >.

Definition at line 249 of file ls.hh.

References RVL::Vector< Scalar >::copy(), and RVL::Vector< Scalar >::getSpace().

template<class Scalar>
void RVL::EuclideanForm< Scalar >::applyHessian ( const Vector< Scalar > &  x,
const Vector< Scalar > &  delx,
Vector< Scalar > &  dely 
) const [protected, virtual]

Implements RVL::Functional< Scalar >.

Definition at line 266 of file ls.hh.

References RVL::Vector< Scalar >::copy(), and RVL::Vector< Scalar >::getSpace().

template<class Scalar>
virtual Functional<Scalar>* RVL::EuclideanForm< Scalar >::clone (  )  const [protected, virtual]

Implements RVL::Functional< Scalar >.

Definition at line 285 of file ls.hh.

template<class Scalar>
const Space<Scalar>& RVL::EuclideanForm< Scalar >::getDomain (  )  const [virtual]

Implements RVL::Functional< Scalar >.

Definition at line 296 of file ls.hh.

template<class Scalar>
ostream& RVL::EuclideanForm< Scalar >::write ( ostream &  str  )  const [virtual]

Implements RVL::Writeable.

Definition at line 298 of file ls.hh.


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