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

itk::SingleValuedVnlCostFunctionAdaptor Class Reference
[Numerics]

#include <itkSingleValuedVnlCostFunctionAdaptor.h>

Collaboration diagram for itk::SingleValuedVnlCostFunctionAdaptor:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

This class returns a single valued.

Optimizers

Definition at line 36 of file itkSingleValuedVnlCostFunctionAdaptor.h.

Public Types

typedef SingleValuedCostFunction::DerivativeType DerivativeType
typedef vnl_vector< double > InternalDerivativeType
typedef double InternalMeasureType
typedef vnl_vector< double > InternalParametersType
typedef SingleValuedCostFunction::MeasureType MeasureType
typedef SingleValuedCostFunction::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) 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 it only returns previous
values Therefore the values
here *are only valid after
you invoke the 
f () or gradf() methods.*/const MeasureType &GetCachedValue() const
Set Get Negate cost function
The purpose of this boolean
flag is to make *possible
to take certain VNL optimizers
that are only and use *them
for maximizing functions When
the boolean flag is set to
the *values returned by GetValue
in the internal ITK cost function
will be *multiplied by before
returning it in the 
f () function.Similar *operations will be done for the gradf() and compute() methods.When the *boolean flag is set to false
virtual InternalMeasureType f (const InternalParametersType &inparameters)
const ParametersTypeGetCachedCurrentParameters () const
const DerivativeTypeGetCachedDerivative () const
const SingleValuedCostFunctionGetCostFunction (void) const
bool GetNegateCostFunction () const
virtual void gradf (const InternalParametersType &inparameters, InternalDerivativeType &gradient)
void NegateCostFunctionOff ()
void NegateCostFunctionOn ()
void SetCostFunction (SingleValuedCostFunction *costFunction)
Set Get Negate cost function
The purpose of this boolean
flag is to make *possible
to take certain VNL optimizers
that are only and use *them
for maximizing functions When
the boolean flag is set to
the *values returned by GetValue
in the internal ITK cost function
will be *multiplied by before
returning it in the then the
values returned by the ITK
cost *function will be passed
unchanged to the VNL optimizers
*void 
SetNegateCostFunction (bool value)
void SetScales (const ScalesType &scales)
 SingleValuedVnlCostFunctionAdaptor (unsigned int spaceDimension)

Public Attributes

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
Set Get Negate cost function
The purpose of this boolean
flag is to make *possible
to take certain VNL optimizers
that are only 
minimizers
Set Get Negate cost function
The purpose of this boolean
flag is to make *possible
to take certain VNL optimizers
that are only and use *them
for maximizing functions When
the boolean flag is set to 
true

Protected Member Functions

void ReportIteration (const EventObject &event) const


Member Typedef Documentation

typedef SingleValuedCostFunction::DerivativeType itk::SingleValuedVnlCostFunctionAdaptor::DerivativeType
 

Derivatives of the SingleValuedCostFunction

Definition at line 54 of file itkSingleValuedVnlCostFunctionAdaptor.h.

typedef vnl_vector<double> itk::SingleValuedVnlCostFunctionAdaptor::InternalDerivativeType
 

InternalGradientType typedef.

Definition at line 48 of file itkSingleValuedVnlCostFunctionAdaptor.h.

typedef double itk::SingleValuedVnlCostFunctionAdaptor::InternalMeasureType
 

InternalMeasureType typedef.

Definition at line 45 of file itkSingleValuedVnlCostFunctionAdaptor.h.

typedef vnl_vector<double> itk::SingleValuedVnlCostFunctionAdaptor::InternalParametersType
 

InternalParametersType typedef.

Definition at line 42 of file itkSingleValuedVnlCostFunctionAdaptor.h.

typedef SingleValuedCostFunction::MeasureType itk::SingleValuedVnlCostFunctionAdaptor::MeasureType
 

Type of the SingleValuedCostFunction value

Definition at line 57 of file itkSingleValuedVnlCostFunctionAdaptor.h.

typedef SingleValuedCostFunction::ParametersType itk::SingleValuedVnlCostFunctionAdaptor::ParametersType
 

Parameters of the SingleValuedCostFunction

Definition at line 51 of file itkSingleValuedVnlCostFunctionAdaptor.h.

typedef Array<double> itk::SingleValuedVnlCostFunctionAdaptor::ScalesType
 

Scales typedef

Definition at line 60 of file itkSingleValuedVnlCostFunctionAdaptor.h.


Constructor & Destructor Documentation

itk::SingleValuedVnlCostFunctionAdaptor::SingleValuedVnlCostFunctionAdaptor unsigned int  spaceDimension  ) 
 

Constructor with size


Member Function Documentation

unsigned long itk::SingleValuedVnlCostFunctionAdaptor::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::SingleValuedVnlCostFunctionAdaptor::compute const InternalParametersType x,
InternalMeasureType f,
InternalDerivativeType g
[virtual]
 

Delegate computation of value and gradient to the costFunction.

void itk::SingleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalGradient const DerivativeType input,
InternalDerivativeType output
const
 

Convert external derviative measures into internal type

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 it only returns previous values Therefore the values here* are only valid after you invoke the itk::SingleValuedVnlCostFunctionAdaptor::f  )  const
 

Set Get Negate cost function The purpose of this boolean flag is to make* possible to take certain VNL optimizers that are only and use* them for maximizing functions When the boolean flag is set to the* values returned by GetValue in the internal ITK cost function will be* multiplied by before returning it in the itk::SingleValuedVnlCostFunctionAdaptor::f  ) 
 

virtual InternalMeasureType itk::SingleValuedVnlCostFunctionAdaptor::f const InternalParametersType inparameters  )  [virtual]
 

Delegate computation of the value to the CostFunction.

const ParametersType& itk::SingleValuedVnlCostFunctionAdaptor::GetCachedCurrentParameters  )  const
 

const DerivativeType& itk::SingleValuedVnlCostFunctionAdaptor::GetCachedDerivative  )  const
 

const SingleValuedCostFunction* itk::SingleValuedVnlCostFunctionAdaptor::GetCostFunction void   )  const [inline]
 

Get the CostFunction deriving from SingleValuedCostFunction

Definition at line 71 of file itkSingleValuedVnlCostFunctionAdaptor.h.

bool itk::SingleValuedVnlCostFunctionAdaptor::GetNegateCostFunction  )  const
 

virtual void itk::SingleValuedVnlCostFunctionAdaptor::gradf const InternalParametersType inparameters,
InternalDerivativeType gradient
[virtual]
 

Delegate computation of the gradient to the costFunction.

void itk::SingleValuedVnlCostFunctionAdaptor::NegateCostFunctionOff  )  [inline]
 

Definition at line 106 of file itkSingleValuedVnlCostFunctionAdaptor.h.

void itk::SingleValuedVnlCostFunctionAdaptor::NegateCostFunctionOn  )  [inline]
 

Definition at line 105 of file itkSingleValuedVnlCostFunctionAdaptor.h.

void itk::SingleValuedVnlCostFunctionAdaptor::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::SingleValuedVnlCostFunctionAdaptor::SetCostFunction SingleValuedCostFunction costFunction  )  [inline]
 

Set the CostFunction deriving from SingleValuedCostFunction

Definition at line 67 of file itkSingleValuedVnlCostFunctionAdaptor.h.

Set Get Negate cost function The purpose of this boolean flag is to make* possible to take certain VNL optimizers that are only and use* them for maximizing functions When the boolean flag is set to the* values returned by GetValue in the internal ITK cost function will be* multiplied by before returning it in the then the values returned by the ITK cost* function will be passed unchanged to the VNL optimizers* void itk::SingleValuedVnlCostFunctionAdaptor::SetNegateCostFunction bool  value  ) 
 

void itk::SingleValuedVnlCostFunctionAdaptor::SetScales const ScalesType scales  ) 
 

Set current parameters scaling.


Member Data Documentation

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 itk::SingleValuedVnlCostFunctionAdaptor::derivatives
 

Definition at line 117 of file itkSingleValuedVnlCostFunctionAdaptor.h.

Set Get Negate cost function The purpose of this boolean flag is to make* possible to take certain VNL optimizers that are only itk::SingleValuedVnlCostFunctionAdaptor::minimizers
 

Definition at line 96 of file itkSingleValuedVnlCostFunctionAdaptor.h.

Set Get Negate cost function The purpose of this boolean flag is to make* possible to take certain VNL optimizers that are only and use* them for maximizing functions When the boolean flag is set to itk::SingleValuedVnlCostFunctionAdaptor::true
 

Definition at line 96 of file itkSingleValuedVnlCostFunctionAdaptor.h.


The documentation for this class was generated from the following file:
Generated at Sun Jul 9 21:29:24 2006 for ITK by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2000