DMRITool
v0.1.1-139-g860d86b4
Diffusion MRI Tool
|
#include <itkL2RegularizedLeastSquaresSolver.h>
solve least square problem with L2 regularization
The least square with L2 regularization is
where A, are matrices, b, x are vectors.
Definition at line 43 of file itkL2RegularizedLeastSquaresSolver.h.
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef Superclass::MatrixPointer | MatrixPointer |
typedef Superclass::MatrixType | MatrixType |
typedef SmartPointer< Self > | Pointer |
typedef L2RegularizedLeastSquaresSolver | Self |
typedef SolverBase< TPrecision > | Superclass |
typedef Superclass::ValueContainerType | ValueContainerType |
typedef Superclass::ValueType | ValueType |
typedef Superclass::VectorPointer | VectorPointer |
typedef Superclass::VectorType | VectorType |
Public Types inherited from itk::SolverBase< TPrecision > | |
typedef utl_shared_ptr< MatrixType > | MatrixPointer |
typedef utl::NDArray< ValueType, 2 > | MatrixType |
typedef SmartPointer< Self > | Pointer |
typedef SolverBase | Self |
typedef Object | Superclass |
typedef utl_shared_ptr< std::vector< ValueType > > | ValueContainerPointer |
typedef std::vector< ValueType > | ValueContainerType |
typedef TPrecision | ValueType |
typedef utl_shared_ptr< VectorType > | VectorPointer |
typedef utl::NDArray< ValueType, 1 > | VectorType |
Public Member Functions | |
void | Clear () ITK_OVERRIDE |
void | ClearA () |
void | Clearb () |
void | ClearLambda () |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
ValueType | EvaluateCostFunction (const VectorType &x=VectorType()) const ITK_OVERRIDE |
virtual MatrixPointer | GetA () |
virtual VectorPointer | Getb () |
virtual ValueType | GetConditionNumber () |
virtual MatrixPointer | GetLambda () |
virtual MatrixPointer | GetLS () |
virtual const char * | GetNameOfClass () const |
int | GetXDimension () const ITK_OVERRIDE |
void | Initialize (const VectorType &xInitial=VectorType()) ITK_OVERRIDE |
void | SetA (const MatrixPointer &mat) |
virtual void | Setb (VectorPointer _arg) |
void | SetLambda (const MatrixPointer &mat) |
void | Solve (const VectorType &xInitial=VectorType()) ITK_OVERRIDE |
void | VerifyInputs () const ITK_OVERRIDE |
Public Member Functions inherited from itk::SolverBase< TPrecision > | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual void | EndSolve () |
virtual ValueType | EvaluateCostFunction (const MatrixType &x=MatrixType()) const |
virtual VectorType | EvaluateGradientOfCostFunction (const VectorType &x) const |
virtual const VectorType & | Getx () |
virtual void | Solve (const MatrixType &xInitial=MatrixType()) |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::SolverBase< TPrecision > | |
static Pointer | New () |
Protected Member Functions | |
virtual LightObject::Pointer | InternalClone () const ITK_OVERRIDE |
L2RegularizedLeastSquaresSolver () | |
void | PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE |
virtual | ~L2RegularizedLeastSquaresSolver () |
Protected Member Functions inherited from itk::SolverBase< TPrecision > | |
void | PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE |
SolverBase () | |
virtual | ~SolverBase () |
Protected Attributes | |
MatrixPointer | m_A |
VectorPointer | m_b |
bool | m_IsLambdaSymmetric |
MatrixPointer | m_Lambda |
Protected Attributes inherited from itk::SolverBase< TPrecision > | |
VectorType | m_x |
Private Member Functions | |
L2RegularizedLeastSquaresSolver (const Self &) | |
void | operator= (const Self &) |
Private Attributes | |
ValueType | m_ConditionNumber |
MatrixPointer | m_LS |
typedef SmartPointer<const Self> itk::L2RegularizedLeastSquaresSolver< TPrecision >::ConstPointer |
Definition at line 50 of file itkL2RegularizedLeastSquaresSolver.h.
typedef Superclass::MatrixPointer itk::L2RegularizedLeastSquaresSolver< TPrecision >::MatrixPointer |
Definition at line 61 of file itkL2RegularizedLeastSquaresSolver.h.
typedef Superclass::MatrixType itk::L2RegularizedLeastSquaresSolver< TPrecision >::MatrixType |
Definition at line 59 of file itkL2RegularizedLeastSquaresSolver.h.
typedef SmartPointer<Self> itk::L2RegularizedLeastSquaresSolver< TPrecision >::Pointer |
Definition at line 49 of file itkL2RegularizedLeastSquaresSolver.h.
typedef L2RegularizedLeastSquaresSolver itk::L2RegularizedLeastSquaresSolver< TPrecision >::Self |
Standard class typedefs.
Definition at line 47 of file itkL2RegularizedLeastSquaresSolver.h.
typedef SolverBase<TPrecision> itk::L2RegularizedLeastSquaresSolver< TPrecision >::Superclass |
Definition at line 48 of file itkL2RegularizedLeastSquaresSolver.h.
typedef Superclass::ValueContainerType itk::L2RegularizedLeastSquaresSolver< TPrecision >::ValueContainerType |
Definition at line 64 of file itkL2RegularizedLeastSquaresSolver.h.
typedef Superclass::ValueType itk::L2RegularizedLeastSquaresSolver< TPrecision >::ValueType |
Definition at line 56 of file itkL2RegularizedLeastSquaresSolver.h.
typedef Superclass::VectorPointer itk::L2RegularizedLeastSquaresSolver< TPrecision >::VectorPointer |
Definition at line 62 of file itkL2RegularizedLeastSquaresSolver.h.
typedef Superclass::VectorType itk::L2RegularizedLeastSquaresSolver< TPrecision >::VectorType |
Definition at line 60 of file itkL2RegularizedLeastSquaresSolver.h.
|
protected |
Definition at line 33 of file itkL2RegularizedLeastSquaresSolver.hxx.
References itk::L2RegularizedLeastSquaresSolver< TPrecision >::SetA().
|
inlineprotectedvirtual |
Definition at line 113 of file itkL2RegularizedLeastSquaresSolver.h.
References ITK_OVERRIDE.
|
private |
|
virtual |
m_LS is released when releasing m_A and m_lambda
Reimplemented from itk::SolverBase< TPrecision >.
Definition at line 98 of file itkL2RegularizedLeastSquaresSolver.hxx.
References itk::L2RegularizedLeastSquaresSolver< TPrecision >::Initialize().
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::VerifyInputs().
|
inline |
Definition at line 86 of file itkL2RegularizedLeastSquaresSolver.h.
|
inline |
Definition at line 99 of file itkL2RegularizedLeastSquaresSolver.h.
References ITK_OVERRIDE.
|
inline |
Definition at line 92 of file itkL2RegularizedLeastSquaresSolver.h.
virtual::itk::LightObject::Pointer itk::L2RegularizedLeastSquaresSolver< TPrecision >::CreateAnother | ( | void | ) | const |
|
virtual |
if x is not set, evaluate the cost function for m_x
Reimplemented from itk::SolverBase< TPrecision >.
Definition at line 145 of file itkL2RegularizedLeastSquaresSolver.hxx.
References utl::NDArrayBase< T, Dim >::InnerProduct(), itk::L2RegularizedLeastSquaresSolver< TPrecision >::InternalClone(), utl::ProductUtlMv(), utl::ProductUtlvM(), and utl::NDArrayBase< T, Dim >::Size().
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::Solve().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Run-time type information (and related methods)
Reimplemented from itk::SolverBase< TPrecision >.
|
inlinevirtual |
Reimplemented from itk::SolverBase< TPrecision >.
Definition at line 77 of file itkL2RegularizedLeastSquaresSolver.h.
References ITK_OVERRIDE, and utlException.
|
virtual |
m_LS is re-calcutated only if m_A or m_Lambda is re-set
Reimplemented from itk::SolverBase< TPrecision >.
Definition at line 110 of file itkL2RegularizedLeastSquaresSolver.hxx.
References utl::ProductUtlMMt(), utl::ProductUtlXtX(), and itk::L2RegularizedLeastSquaresSolver< TPrecision >::Solve().
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::Clear().
|
protectedvirtual |
Reimplemented from itk::SolverBase< TPrecision >.
Definition at line 162 of file itkL2RegularizedLeastSquaresSolver.hxx.
References itk::L2RegularizedLeastSquaresSolver< TPrecision >::PrintSelf().
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::EvaluateCostFunction().
|
static |
Method for creation through the object factory.
|
private |
|
protected |
Definition at line 182 of file itkL2RegularizedLeastSquaresSolver.hxx.
References utl::PrintUtlMatrix(), and utl::PrintUtlVector().
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::InternalClone().
void itk::L2RegularizedLeastSquaresSolver< TPrecision >::SetA | ( | const MatrixPointer & | mat | ) |
m_LS is released when setting m_A and m_lambda
Definition at line 47 of file itkL2RegularizedLeastSquaresSolver.hxx.
References itk::L2RegularizedLeastSquaresSolver< TPrecision >::SetLambda().
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::L2RegularizedLeastSquaresSolver().
|
virtual |
void itk::L2RegularizedLeastSquaresSolver< TPrecision >::SetLambda | ( | const MatrixPointer & | mat | ) |
Definition at line 64 of file itkL2RegularizedLeastSquaresSolver.hxx.
References itk::L2RegularizedLeastSquaresSolver< TPrecision >::VerifyInputs().
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::SetA().
|
virtual |
Reimplemented from itk::SolverBase< TPrecision >.
Definition at line 135 of file itkL2RegularizedLeastSquaresSolver.hxx.
References itk::L2RegularizedLeastSquaresSolver< TPrecision >::EvaluateCostFunction(), and utl::ProductUtlMv().
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::Initialize().
|
virtual |
Reimplemented from itk::SolverBase< TPrecision >.
Definition at line 81 of file itkL2RegularizedLeastSquaresSolver.hxx.
References itk::L2RegularizedLeastSquaresSolver< TPrecision >::Clear(), and utlGlobalException.
Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::SetLambda().
|
protected |
MxN matrix
Definition at line 120 of file itkL2RegularizedLeastSquaresSolver.h.
|
protected |
Mx1 vector
Definition at line 122 of file itkL2RegularizedLeastSquaresSolver.h.
|
private |
Definition at line 136 of file itkL2RegularizedLeastSquaresSolver.h.
|
protected |
Definition at line 127 of file itkL2RegularizedLeastSquaresSolver.h.
|
protected |
NxN matrix
Definition at line 125 of file itkL2RegularizedLeastSquaresSolver.h.
|
private |
MxN matrix
Definition at line 135 of file itkL2RegularizedLeastSquaresSolver.h.