18 #ifndef __itkIterativeSolverBase_h 19 #define __itkIterativeSolverBase_h 33 template <
class TPrecision>
64 itkGetConstReferenceMacro(CostFunction, ValueContainerType);
66 itkGetConstReferenceMacro(DifferenceNormOfPrimalResidual, ValueContainerType);
68 itkGetConstReferenceMacro(DifferenceNormOfDualResidual, ValueContainerType);
70 itkGetConstReferenceMacro(EPSOfPrimalResidual, ValueContainerType);
72 itkGetConstReferenceMacro(EPSOfDualResidual, ValueContainerType);
76 itkSetMacro(MaxNumberOfIterations,
int);
77 itkGetConstReferenceMacro(MaxNumberOfIterations,
int);
79 itkGetConstReferenceMacro(NumberOfIterations,
int);
80 itkSetMacro(MinRelativeChangeOfCostFunction, ValueType);
81 itkGetConstReferenceMacro(MinRelativeChangeOfCostFunction, ValueType);
82 itkSetMacro(MinRelativeChangeOfPrimalResidual, ValueType);
83 itkGetConstReferenceMacro(MinRelativeChangeOfPrimalResidual, ValueType);
84 itkSetMacro(MinRelativeChangeOfDualResidual, ValueType);
85 itkGetConstReferenceMacro(MinRelativeChangeOfDualResidual, ValueType);
89 itkSetMacro(EPSOfVaribles, ValueType);
90 itkGetConstReferenceMacro(EPSOfVaribles, ValueType);
92 itkSetMacro(NumberOfChangeLessThanThreshold,
int);
93 itkGetConstReferenceMacro(NumberOfChangeLessThanThreshold,
int);
95 void Initialize(
const VectorType& xInitial=VectorType())
ITK_OVERRIDE;
96 virtual
void Iterate() {}
101 virtual void Solve(
const VectorType& xInitial=VectorType())
ITK_OVERRIDE;
109 void PrintSelf(std::ostream& os, Indent indent)
const ITK_OVERRIDE;
110 virtual typename LightObject::Pointer InternalClone()
const ITK_OVERRIDE;
134 void operator=(
const Self&);
141 #define ITK_TEMPLATE_IterativeSolverBase(_, EXPORT, TypeX, TypeY) \ 144 _( 1 ( class EXPORT IterativeSolverBase< ITK_TEMPLATE_1 TypeX > ) ) \ 145 namespace Templates \ 147 typedef IterativeSolverBase< ITK_TEMPLATE_1 TypeX > IterativeSolverBase##TypeY; \ 151 #if ITK_TEMPLATE_EXPLICIT 152 #include "Templates/itkIterativeSolverBase+-.h" 155 #if !defined(ITK_MANUAL_INSTANTIATION) && !defined(__itkIterativeSolverBase_hxx) std::vector< ValueType > ValueContainerType
NDArray is a N-Dimensional array class (row-major, c version)
UpdateInfomationType m_UpdateInformation
int m_MaxNumberOfIterations
ValueType m_MinRelativeChangeOfCostFunction
Base class for some optimization solvers using primal-dual updates.
int m_NumberOfChangeLessThanThreshold
ValueContainerType m_CostFunction
Superclass::VectorType VectorType
SolverBase< TPrecision > Superclass
ValueType m_EPSOfVaribles
virtual void HistoryUpdateAndConvergenceCheck()
ValueContainerType m_DifferenceNormOfDualResidual
ValueContainerType m_EPSOfPrimalResidual
ValueType m_MinRelativeChangeOfPrimalResidual
virtual ~IterativeSolverBase()
ValueType m_MinRelativeChangeOfDualResidual
ValueContainerType m_DifferenceNormOfPrimalResidual
ValueContainerType m_EPSOfDualResidual
Base class for some optimization solvers using primal-dual updates.
SmartPointer< Self > Pointer
Superclass::MatrixType MatrixType