Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::MultipleValuedVnlCostFunctionAdaptor Class Reference
[NumericsOptimizers]

#include <itkMultipleValuedVnlCostFunctionAdaptor.h>

Collaboration diagram for itk::MultipleValuedVnlCostFunctionAdaptor:

Collaboration graph
[legend]

List of all members.


Detailed Description

This class is an Adaptor that allows to pass itk::MultipleValuedCostFunctions to vnl_optimizers expecting a vnl_cost_function.

This class returns a single valued.

Definition at line 36 of file itkMultipleValuedVnlCostFunctionAdaptor.h.


Public Types

typedef
MultipleValuedCostFunction::DerivativeType 
DerivativeType
typedef vnl_matrix< double > InternalDerivativeType
typedef vnl_vector< double > InternalMeasureType
typedef vnl_vector< double > InternalParametersType
typedef
MultipleValuedCostFunction::MeasureType 
MeasureType
typedef
MultipleValuedCostFunction::ParametersType 
ParametersType
typedef Array< double > ScalesType

Public Member Functions

unsigned long AddObserver (const EventObject &event, Command *) const
virtual void compute (const InternalParametersType &x, InternalMeasureType *f, InternalDerivativeType *g)
void ConvertExternalToInternalGradient (const DerivativeType &input, InternalDerivativeType &output)
void ConvertExternalToInternalMeasures (const MeasureType &input, InternalMeasureType &output)
virtual void f (const InternalParametersType &inparameters, InternalMeasureType &measures)
const MultipleValuedCostFunctionGetCostFunction (void) const
virtual void gradf (const InternalParametersType &inparameters, InternalDerivativeType &gradient)
 MultipleValuedVnlCostFunctionAdaptor (unsigned int spaceDimension, unsigned int numberOfValues)
void SetCostFunction (MultipleValuedCostFunction *costFunction)
void SetScales (const ScalesType &scales)
const ParametersTypeGetCachedCurrentParameters () const
const DerivativeTypeGetCachedDerivative () const
const MeasureTypeGetCachedValue () const
bool GetUseGradient () const
void SetUseGradient (bool)
void UseGradientOff ()
void UseGradientOn ()

Protected Member Functions

void ReportIteration (const EventObject &event) const

Member Typedef Documentation

Derivatives of the MultipleValuedCostFunction

Definition at line 57 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

InternalGradientType typedef.

Definition at line 48 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

InternalMeasureType typedef.

Definition at line 45 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

InternalParametersType typedef.

Definition at line 42 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

MeasureType of the MultipleValuedCostFunction

Definition at line 51 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

Parameters of the MultipleValuedCostFunction

Definition at line 54 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

Scales typedef

Definition at line 60 of file itkMultipleValuedVnlCostFunctionAdaptor.h.


Constructor & Destructor Documentation

itk::MultipleValuedVnlCostFunctionAdaptor::MultipleValuedVnlCostFunctionAdaptor ( unsigned int  spaceDimension,
unsigned int  numberOfValues 
)

Constructor with size


Member Function Documentation

unsigned long itk::MultipleValuedVnlCostFunctionAdaptor::AddObserver ( const EventObject event,
Command  
) const

This AddObserver method allows to simulate that this class derives from an itkObject for the purpose of reporting iteration events. The goal of this method is to allow ITK-vnl optimizer adaptors to get iteration events despite the fact that VNL does not provide callbacks.

virtual void itk::MultipleValuedVnlCostFunctionAdaptor::compute ( const InternalParametersType x,
InternalMeasureType f,
InternalDerivativeType g 
) [virtual]

Delegate computation of value and gradient to the costFunction.

void itk::MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalGradient ( const DerivativeType input,
InternalDerivativeType output 
)

Convert external derviative measures into internal type

void itk::MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalMeasures ( const MeasureType input,
InternalMeasureType output 
)

Convert external measures into internal type

virtual void itk::MultipleValuedVnlCostFunctionAdaptor::f ( const InternalParametersType inparameters,
InternalMeasureType measures 
) [virtual]

Delegate computation of the value to the CostFunction.

const ParametersType& itk::MultipleValuedVnlCostFunctionAdaptor::GetCachedCurrentParameters (  )  const

Return the value of the last evaluation to the value of the cost function. Note that this method DOES NOT triggers a computation of the function or the derivatives, it only returns previous values. Therefore the values here are only valid after you invoke the f() or gradf() methods.

const DerivativeType& itk::MultipleValuedVnlCostFunctionAdaptor::GetCachedDerivative (  )  const

Return the value of the last evaluation to the value of the cost function. Note that this method DOES NOT triggers a computation of the function or the derivatives, it only returns previous values. Therefore the values here are only valid after you invoke the f() or gradf() methods.

const MeasureType& itk::MultipleValuedVnlCostFunctionAdaptor::GetCachedValue (  )  const

Return the value of the last evaluation to the value of the cost function. Note that this method DOES NOT triggers a computation of the function or the derivatives, it only returns previous values. Therefore the values here are only valid after you invoke the f() or gradf() methods.

const MultipleValuedCostFunction* itk::MultipleValuedVnlCostFunctionAdaptor::GetCostFunction ( void   )  const [inline]

Get the CostFunction deriving from MultipleValuedCostFunction

Definition at line 71 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

bool itk::MultipleValuedVnlCostFunctionAdaptor::GetUseGradient (  )  const

Define if the Cost function should provide a customized Gradient computation or the gradient can be computed internally using a default approach

virtual void itk::MultipleValuedVnlCostFunctionAdaptor::gradf ( const InternalParametersType inparameters,
InternalDerivativeType gradient 
) [virtual]

Delegate computation of the gradient to the costFunction.

void itk::MultipleValuedVnlCostFunctionAdaptor::ReportIteration ( const EventObject event  )  const [protected]

This method is intended to be called by the derived classes in order to notify of an iteration event to any Command/Observers

void itk::MultipleValuedVnlCostFunctionAdaptor::SetCostFunction ( MultipleValuedCostFunction costFunction  )  [inline]

Set the CostFunction deriving from MultipleValuedCostFunction

Definition at line 67 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

void itk::MultipleValuedVnlCostFunctionAdaptor::SetScales ( const ScalesType scales  ) 

Set current parameters scaling.

void itk::MultipleValuedVnlCostFunctionAdaptor::SetUseGradient ( bool   ) 

Define if the Cost function should provide a customized Gradient computation or the gradient can be computed internally using a default approach

Referenced by UseGradientOff(), and UseGradientOn().

void itk::MultipleValuedVnlCostFunctionAdaptor::UseGradientOff (  )  [inline]

Define if the Cost function should provide a customized Gradient computation or the gradient can be computed internally using a default approach

Definition at line 102 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

References SetUseGradient().

void itk::MultipleValuedVnlCostFunctionAdaptor::UseGradientOn (  )  [inline]

Define if the Cost function should provide a customized Gradient computation or the gradient can be computed internally using a default approach

Definition at line 101 of file itkMultipleValuedVnlCostFunctionAdaptor.h.

References SetUseGradient().


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

Generated at Sat Feb 28 16:57:28 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000