RVL::FunctionalProductDomain< Scalar > Class Template Reference

A specialization of Functional which also has partial derivatives. More...

#include <functional.hh>

Inheritance diagram for RVL::FunctionalProductDomain< Scalar >:

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

Public Member Functions

 FunctionalProductDomain ()
 FunctionalProductDomain (const FunctionalProductDomain< Scalar > &)
virtual ~FunctionalProductDomain ()
const Space< Scalar > & getDomain () const
 getDomain() returns a reference to the domain of the underlying function.
virtual const ProductSpace<
Scalar > & 
getProductDomain () const =0
 ProductDomain() returns a reference to the domain of the underlying function, as an instance of HCL_ProductSpace.

Protected Member Functions

virtual void applyPartialGradient (int i, const Vector< Scalar > &x, Vector< Scalar > &g) const =0
 applyPartialGradient() computes the component of the gradient corresponding to the ith component of the independent variable.
void export_applyPartialGradient (FunctionalProductDomain< Scalar > const &f, int i, const Vector< Scalar > &x, Vector< Scalar > &g) const
virtual void applyGradient (const Vector< Scalar > &x, Vector< Scalar > &g) const
 applyGradient() computes the gradient of the function.
virtual void applyPartialHessian (int i, int j, const Vector< Scalar > &x, const Vector< Scalar > &dxj, Vector< Scalar > &dxi) const =0
 applyPartialHessian() computes the image of the (i,j) block of the Hessian on dxi, giving dxj.
void export_applyPartialHessian (FunctionalProductDomain< Scalar > const &f, int i, int j, const Vector< Scalar > &x, const Vector< Scalar > &dxj, Vector< Scalar > &dxi) const
virtual void applyHessian (const Vector< Scalar > &x, const Vector< Scalar > &yin, Vector< Scalar > &yout) const
 applyHessian() computes the image of the Hessian of the function.
virtual FunctionalProductDomain<
Scalar > * 
clonePD () const =0
Functional< Scalar > * clone () const

Friends

class FunctionalEvaluation< Scalar >
class FunctionalProductDomainEvaluation< Scalar >

Detailed Description

template<class Scalar>
class RVL::FunctionalProductDomain< Scalar >

A specialization of Functional which also has partial derivatives.

Definition at line 244 of file functional.hh.


Constructor & Destructor Documentation

template<class Scalar>
RVL::FunctionalProductDomain< Scalar >::FunctionalProductDomain (  ) 

Definition at line 351 of file functional.hh.

template<class Scalar>
RVL::FunctionalProductDomain< Scalar >::FunctionalProductDomain ( const FunctionalProductDomain< Scalar > &   ) 

Definition at line 353 of file functional.hh.

template<class Scalar>
virtual RVL::FunctionalProductDomain< Scalar >::~FunctionalProductDomain (  )  [virtual]

Definition at line 355 of file functional.hh.


Member Function Documentation

template<class Scalar>
virtual void RVL::FunctionalProductDomain< Scalar >::applyPartialGradient ( int  i,
const Vector< Scalar > &  x,
Vector< Scalar > &  g 
) const [protected, pure virtual]

applyPartialGradient() computes the component of the gradient corresponding to the ith component of the independent variable.

This is a virtual function and must be implemented in any derived class.

Referenced by RVL::FunctionalProductDomain< Scalar >::applyGradient(), and RVL::FunctionalProductDomain< Scalar >::export_applyPartialGradient().

template<class Scalar>
void RVL::FunctionalProductDomain< Scalar >::export_applyPartialGradient ( FunctionalProductDomain< Scalar > const &  f,
int  i,
const Vector< Scalar > &  x,
Vector< Scalar > &  g 
) const [protected]

Definition at line 259 of file functional.hh.

References RVL::FunctionalProductDomain< Scalar >::applyPartialGradient().

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

applyGradient() computes the gradient of the function.

This method is implemented in this (the base) class, using PartialGradient(), and can be (but need not be) re-implemented in a derived class.

Implements RVL::Functional< Scalar >.

Definition at line 275 of file functional.hh.

References RVL::FunctionalProductDomain< Scalar >::applyPartialGradient(), RVL::Components< Scalar >::getSize(), and RVL::Vector< Scalar >::linComb().

template<class Scalar>
virtual void RVL::FunctionalProductDomain< Scalar >::applyPartialHessian ( int  i,
int  j,
const Vector< Scalar > &  x,
const Vector< Scalar > &  dxj,
Vector< Scalar > &  dxi 
) const [protected, pure virtual]

applyPartialHessian() computes the image of the (i,j) block of the Hessian on dxi, giving dxj.

Note the implicit use of duality: the action of the (i,j) second partial derivative on (dxj,dxi) is the inner product of dxi with applyPartialHessian(i,j,x,dxj,*).

Note also that the adjoint of the (i,j) block is the (j,i) block.

Referenced by RVL::FunctionalProductDomain< Scalar >::applyHessian(), RVL::FunctionalEvaluation< Scalar >::applyPartialHessian(), and RVL::FunctionalProductDomain< Scalar >::export_applyPartialHessian().

template<class Scalar>
void RVL::FunctionalProductDomain< Scalar >::export_applyPartialHessian ( FunctionalProductDomain< Scalar > const &  f,
int  i,
int  j,
const Vector< Scalar > &  x,
const Vector< Scalar > &  dxj,
Vector< Scalar > &  dxi 
) const [protected]

Definition at line 306 of file functional.hh.

References RVL::FunctionalProductDomain< Scalar >::applyPartialHessian().

template<class Scalar>
virtual void RVL::FunctionalProductDomain< Scalar >::applyHessian ( const Vector< Scalar > &  x,
const Vector< Scalar > &  yin,
Vector< Scalar > &  yout 
) const [protected, virtual]

applyHessian() computes the image of the Hessian of the function.

This method is implemented in this (the base) class, using applyPartialHessian, but may be re-implemented in a derived class.

Implements RVL::Functional< Scalar >.

Definition at line 325 of file functional.hh.

References RVL::FunctionalProductDomain< Scalar >::applyPartialHessian(), and RVL::Components< Scalar >::getSize().

template<class Scalar>
virtual FunctionalProductDomain<Scalar>* RVL::FunctionalProductDomain< Scalar >::clonePD (  )  const [protected, pure virtual]

Referenced by RVL::FunctionalProductDomain< Scalar >::clone().

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

Implements RVL::Functional< Scalar >.

Definition at line 346 of file functional.hh.

References RVL::FunctionalProductDomain< Scalar >::clonePD().

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

getDomain() returns a reference to the domain of the underlying function.

Implements RVL::Functional< Scalar >.

Definition at line 359 of file functional.hh.

References RVL::FunctionalProductDomain< Scalar >::getProductDomain().

template<class Scalar>
virtual const ProductSpace<Scalar>& RVL::FunctionalProductDomain< Scalar >::getProductDomain (  )  const [pure virtual]

ProductDomain() returns a reference to the domain of the underlying function, as an instance of HCL_ProductSpace.

This method is implemented using Domain(), and need not be re-implemented in a derived class.

Referenced by RVL::FunctionalProductDomain< Scalar >::getDomain(), and RVL::FunctionalEvaluation< Scalar >::getProductDomain().


Friends And Related Function Documentation

template<class Scalar>
friend class FunctionalEvaluation< Scalar > [friend]

Reimplemented from RVL::Functional< Scalar >.

Definition at line 246 of file functional.hh.

template<class Scalar>
friend class FunctionalProductDomainEvaluation< Scalar > [friend]

Definition at line 247 of file functional.hh.


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