18 #ifndef __itkMultipleValuedVnlCostFunctionAdaptor_h
19 #define __itkMultipleValuedVnlCostFunctionAdaptor_h
22 #include "vnl/vnl_least_squares_function.h"
37 public vnl_least_squares_function
64 unsigned int numberOfValues);
68 { m_CostFunction = costFunction; }
72 {
return m_CostFunction; }
75 virtual void f(
const InternalParametersType & inparameters,
76 InternalMeasureType & measures);
79 virtual void gradf(
const InternalParametersType & inparameters,
80 InternalDerivativeType & gradient);
83 virtual void compute(
const InternalParametersType & x,
84 InternalMeasureType *f,
85 InternalDerivativeType *g);
88 void ConvertExternalToInternalGradient(
89 const DerivativeType & input,
90 InternalDerivativeType & output);
93 void ConvertExternalToInternalMeasures(
94 const MeasureType & input,
95 InternalMeasureType & output);
100 void SetUseGradient(
bool);
104 bool GetUseGradient()
const;
107 void SetScales(
const ScalesType & scales);
119 const MeasureType & GetCachedValue()
const;
121 const DerivativeType & GetCachedDerivative()
const;
123 const ParametersType & GetCachedCurrentParameters()
const;
129 void ReportIteration(
const EventObject & event)
const;