#include <freSingleValuedVnlSOMetricAdaptor.h>

FREE::SetupOptimizationMetrics to vnl_optimizers expecting a vnl_cost_function with one return value.
This class returns a single valued.
Definition at line 46 of file freSingleValuedVnlSOMetricAdaptor.h.
| typedef vnl_vector<double> FREE::SingleValuedVnlSOMetricAdaptor::InternalParametersType |
InternalParametersType typedef.
Definition at line 52 of file freSingleValuedVnlSOMetricAdaptor.h.
| typedef double FREE::SingleValuedVnlSOMetricAdaptor::InternalMeasureType |
InternalMeasureType typedef.
Definition at line 55 of file freSingleValuedVnlSOMetricAdaptor.h.
| typedef vnl_vector<double> FREE::SingleValuedVnlSOMetricAdaptor::InternalDerivativeType |
InternalGradientType typedef.
Definition at line 58 of file freSingleValuedVnlSOMetricAdaptor.h.
| typedef SetupOptimizationMetric::ParametersType FREE::SingleValuedVnlSOMetricAdaptor::ParametersType |
Parameters of the SetupOptimizationMetric
Definition at line 61 of file freSingleValuedVnlSOMetricAdaptor.h.
| typedef itk::Array<double> FREE::SingleValuedVnlSOMetricAdaptor::DerivativeType |
Derivatives of the SetupOptimizationMetric
Definition at line 64 of file freSingleValuedVnlSOMetricAdaptor.h.
Type of the SetupOptimizationMetric value
Definition at line 67 of file freSingleValuedVnlSOMetricAdaptor.h.
| typedef SetupOptimizationMetric::DecomposedMeasureType FREE::SingleValuedVnlSOMetricAdaptor::DecomposedMeasureType |
Definition at line 69 of file freSingleValuedVnlSOMetricAdaptor.h.
| typedef itk::Array<double> FREE::SingleValuedVnlSOMetricAdaptor::ScalesType |
Scales typedef
Definition at line 72 of file freSingleValuedVnlSOMetricAdaptor.h.
| typedef itk::Array<double> FREE::SingleValuedVnlSOMetricAdaptor::MetricScalesType |
Metric scales typedef
Definition at line 75 of file freSingleValuedVnlSOMetricAdaptor.h.
| FREE::SingleValuedVnlSOMetricAdaptor::SingleValuedVnlSOMetricAdaptor | ( | unsigned int | spaceDimension | ) |
Constructor with size
Constructor.
Definition at line 29 of file freSingleValuedVnlSOMetricAdaptor.cxx.
| virtual const char* FREE::SingleValuedVnlSOMetricAdaptor::GetNameOfClass | ( | ) | const [inline, virtual] |
Reimplemented in FREE::SVLimitedAxisVnlSOMetricAdaptor.
Definition at line 77 of file freSingleValuedVnlSOMetricAdaptor.h.
| void FREE::SingleValuedVnlSOMetricAdaptor::SetCostFunction | ( | SetupOptimizationMetric * | costFunction | ) | [inline] |
Set the CostFunction deriving from SingleValuedCostFunction
Definition at line 83 of file freSingleValuedVnlSOMetricAdaptor.h.
References m_CostFunction.
Referenced by FREE::LimitedAxisAmoebaSOOptimizer::SetCostFunction(), and FREE::AmoebaSOOptimizer::SetCostFunction().
| const SetupOptimizationMetric* FREE::SingleValuedVnlSOMetricAdaptor::GetCostFunction | ( | void | ) | const [inline] |
Get the CostFunction deriving from SingleValuedCostFunction
Definition at line 87 of file freSingleValuedVnlSOMetricAdaptor.h.
References m_CostFunction.
| SingleValuedVnlSOMetricAdaptor::InternalMeasureType FREE::SingleValuedVnlSOMetricAdaptor::f | ( | const InternalParametersType & | inparameters | ) | [virtual] |
Delegate computation of the value to the CostFunction.
Definition at line 94 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References ConvertInternalToParameter(), m_CachedCurrentParameters, m_CachedDecomposedValue, m_CachedValue, m_CostFunction, m_NegateCostFunction, and ReportIteration().

| void FREE::SingleValuedVnlSOMetricAdaptor::gradf | ( | const InternalParametersType & | inparameters, | |
| InternalDerivativeType & | gradient | |||
| ) | [virtual] |
Delegate computation of the gradient to the costFunction.
Delegate computation of the gradient to the costfunction.
Definition at line 131 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References ConvertExternalToInternalGradient(), ConvertInternalToParameter(), m_CachedCurrentParameters, m_CachedDerivative, m_CostFunction, and ReportIteration().

| void FREE::SingleValuedVnlSOMetricAdaptor::compute | ( | const InternalParametersType & | x, | |
| InternalMeasureType * | f, | |||
| InternalDerivativeType * | g | |||
| ) | [virtual] |
Delegate computation of value and gradient to the costFunction.
Delegate computation of value and gradient to the costfunction.
Definition at line 157 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References ConvertExternalToInternalGradient(), ConvertInternalToParameter(), m_CachedCurrentParameters, m_CachedDecomposedValue, m_CachedDerivative, m_CachedValue, m_CostFunction, m_NegateCostFunction, and ReportIteration().

| void FREE::SingleValuedVnlSOMetricAdaptor::ConvertExternalToInternalGradient | ( | const DerivativeType & | input, | |
| InternalDerivativeType & | output | |||
| ) | const |
Convert external derviative measures into internal type
Convert external derviative measures into internal type
Definition at line 208 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_NegateCostFunction.
| void FREE::SingleValuedVnlSOMetricAdaptor::SetScales | ( | const ScalesType & | scales | ) |
Set current parameters scaling.
Definition at line 41 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References throwExceptionMacro.
Referenced by FREE::LimitedAxisAmoebaSOOptimizer::StartOptimization().
| void FREE::SingleValuedVnlSOMetricAdaptor::SetNegateCostFunction | ( | bool | flag | ) |
Set/Get Negate cost function. The purpose of this boolean flag is to make possible to take certain VNL optimizers that are only minimizers, and use them for maximizing functions. When the boolean flag is set to true, the values returned by GetValue in the internal ITK cost function will be multiplied by -1 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, then the values returned by the ITK cost function will be passed unchanged to the VNL optimizers.
Set whether the cost function should be negated or not. This is useful for adapting optimizers that are only minimizers.
Definition at line 231 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_NegateCostFunction.
| bool FREE::SingleValuedVnlSOMetricAdaptor::GetNegateCostFunction | ( | ) | const |
Returns whether the cost function is going to be negated or not. This is useful for adapting optimizers that are only minimizers.
Definition at line 240 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_NegateCostFunction.
| void FREE::SingleValuedVnlSOMetricAdaptor::NegateCostFunctionOn | ( | ) | [inline] |
Definition at line 121 of file freSingleValuedVnlSOMetricAdaptor.h.
References m_NegateCostFunction.
Referenced by FREE::LimitedAxisAmoebaSOOptimizer::StartOptimization().
| void FREE::SingleValuedVnlSOMetricAdaptor::NegateCostFunctionOff | ( | ) | [inline] |
Definition at line 122 of file freSingleValuedVnlSOMetricAdaptor.h.
References m_NegateCostFunction.
| unsigned long FREE::SingleValuedVnlSOMetricAdaptor::AddObserver | ( | const itk::EventObject & | event, | |
| itk::Command * | 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.
Connects a Command/Observer to the internal reporter class. This is useful for reporting iteration event to potential observers.
Definition at line 258 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_Reporter.
Referenced by FREE::VnlSetupOptimizationOptimizer::SetCostFunctionAdaptor().
| const SingleValuedVnlSOMetricAdaptor::MeasureType & FREE::SingleValuedVnlSOMetricAdaptor::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.
Return the cached value of the cost function
Definition at line 267 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_CachedValue.
Referenced by FREE::VnlSetupOptimizationOptimizer::IterationReport().
| const SingleValuedVnlSOMetricAdaptor::DecomposedMeasureType & FREE::SingleValuedVnlSOMetricAdaptor::GetCachedDecomposedValue | ( | ) | const |
Return the cached value of the cost function
Definition at line 275 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_CachedDecomposedValue.
Referenced by FREE::VnlSetupOptimizationOptimizer::IterationReport().
| const SingleValuedVnlSOMetricAdaptor::DerivativeType & FREE::SingleValuedVnlSOMetricAdaptor::GetCachedDerivative | ( | ) | const |
Return the cached value of the cost function derivative
Definition at line 283 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_CachedDerivative.
Referenced by FREE::VnlSetupOptimizationOptimizer::IterationReport().
| const SingleValuedVnlSOMetricAdaptor::ParametersType & FREE::SingleValuedVnlSOMetricAdaptor::GetCachedCurrentParameters | ( | ) | const |
Return the cached value of the parameters used for computing the function
Definition at line 291 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_CachedCurrentParameters.
Referenced by FREE::VnlSetupOptimizationOptimizer::IterationReport().
| void FREE::SingleValuedVnlSOMetricAdaptor::ReportIteration | ( | const itk::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
Returns whether the cost function is going to be negated or not. This is useful for adapting optimizers that are only minimizers.
Definition at line 249 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_Reporter.
| SingleValuedVnlSOMetricAdaptor::ParametersType FREE::SingleValuedVnlSOMetricAdaptor::ConvertInternalToParameter | ( | const InternalParametersType & | inparameters | ) | [protected, virtual] |
Definition at line 50 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_Scales, and m_ScalesInitialized.
| SingleValuedVnlSOMetricAdaptor::InternalParametersType FREE::SingleValuedVnlSOMetricAdaptor::ConvertParameterToInternal | ( | const ParametersType & | parameters | ) | [protected, virtual] |
Definition at line 71 of file freSingleValuedVnlSOMetricAdaptor.cxx.
References m_Scales, and m_ScalesInitialized.
Definition at line 148 of file freSingleValuedVnlSOMetricAdaptor.h.
Referenced by compute(), f(), GetCostFunction(), gradf(), and SetCostFunction().
bool FREE::SingleValuedVnlSOMetricAdaptor::m_ScalesInitialized [protected] |
Definition at line 149 of file freSingleValuedVnlSOMetricAdaptor.h.
Referenced by ConvertInternalToParameter(), and ConvertParameterToInternal().
bool FREE::SingleValuedVnlSOMetricAdaptor::m_NegateCostFunction [protected] |
Definition at line 151 of file freSingleValuedVnlSOMetricAdaptor.h.
Referenced by compute(), ConvertExternalToInternalGradient(), f(), GetNegateCostFunction(), NegateCostFunctionOff(), NegateCostFunctionOn(), and SetNegateCostFunction().
itk::Object::Pointer FREE::SingleValuedVnlSOMetricAdaptor::m_Reporter [protected] |
Definition at line 152 of file freSingleValuedVnlSOMetricAdaptor.h.
Referenced by AddObserver(), and ReportIteration().
MeasureType FREE::SingleValuedVnlSOMetricAdaptor::m_CachedValue [mutable, protected] |
Definition at line 154 of file freSingleValuedVnlSOMetricAdaptor.h.
Referenced by compute(), f(), and GetCachedValue().
DecomposedMeasureType FREE::SingleValuedVnlSOMetricAdaptor::m_CachedDecomposedValue [mutable, protected] |
Definition at line 155 of file freSingleValuedVnlSOMetricAdaptor.h.
Referenced by compute(), f(), and GetCachedDecomposedValue().
DerivativeType FREE::SingleValuedVnlSOMetricAdaptor::m_CachedDerivative [mutable, protected] |
Definition at line 156 of file freSingleValuedVnlSOMetricAdaptor.h.
Referenced by compute(), GetCachedDerivative(), and gradf().
ParametersType FREE::SingleValuedVnlSOMetricAdaptor::m_CachedCurrentParameters [mutable, protected] |
Definition at line 157 of file freSingleValuedVnlSOMetricAdaptor.h.
Referenced by compute(), f(), GetCachedCurrentParameters(), and gradf().
1.5.3 written by Dimitri van Heesch,
© 1997-2000