18 #ifndef __itkSolverBase_h 19 #define __itkSolverBase_h 21 #include <itkObject.h> 22 #include <itkObjectFactory.h> 23 #include "vnl/vnl_matrix.h" 38 template <
class TPrecision>
63 itkGetConstReferenceMacro(x, VectorType);
66 virtual void Initialize(
const VectorType& xInitial=VectorType());
75 virtual void Solve(
const VectorType& xInitial=VectorType());
77 virtual void Solve(
const MatrixType& xInitial=MatrixType())
88 void PrintSelf(std::ostream& os, Indent indent)
const ITK_OVERRIDE;
90 virtual typename LightObject::Pointer InternalClone()
const ITK_OVERRIDE;
97 void operator=(
const Self&);
104 #define ITK_TEMPLATE_SolverBase(_, EXPORT, TypeX, TypeY) \ 107 _( 1 ( class EXPORT SolverBase< ITK_TEMPLATE_1 TypeX > ) ) \ 108 namespace Templates \ 110 typedef SolverBase< ITK_TEMPLATE_1 TypeX > SolverBase##TypeY; \ 114 #if ITK_TEMPLATE_EXPLICIT 115 #include "Templates/itkSolverBase+-.h" 118 #if !defined(ITK_MANUAL_INSTANTIATION) && !defined(__itkSolverBase_hxx) NDArray is a N-Dimensional array class (row-major, c version)
virtual void Solve(const MatrixType &xInitial=MatrixType())
virtual VectorType EvaluateGradientOfCostFunction(const VectorType &x) const
virtual ValueType EvaluateCostFunction(const VectorType &x=VectorType()) const
SmartPointer< Self > Pointer
virtual ValueType EvaluateCostFunction(const MatrixType &x=MatrixType()) const
virtual void VerifyInputs() const
utl_shared_ptr< VectorType > VectorPointer
utl_shared_ptr< MatrixType > MatrixPointer
virtual int GetXDimension() const
utl::NDArray< ValueType, 1 > VectorType
utl::NDArray< ValueType, 2 > MatrixType
Base class for some optimization solvers using primal-dual updates.
std::vector< ValueType > ValueContainerType
utl_shared_ptr< std::vector< ValueType > > ValueContainerPointer