Package org.ddogleg.optimization
Class LeastSquaresSwitcher<S extends DMatrix>
java.lang.Object
org.ddogleg.optimization.LeastSquaresSwitcher<S>
Class that lets you easily switch between different
GaussNewtonBase_F64
solvers and matrix formats.
You must first call setSolver(org.ddogleg.optimization.ConfigNonLinearLeastSquares, boolean, boolean)
before you call setFunction(org.ddogleg.optimization.functions.FunctionNtoM, org.ddogleg.optimization.LeastSquaresSwitcher.ProcessJacobianOut)
. Supports implementations
that can be specified using ConfigNonLinearLeastSquares
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Abstracts writing to the Jacobian so thatLeastSquaresSwitcher.ProcessJacobianOut
doesn't need to know the formatstatic interface
High level interface for implementing the Jacobian. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjacobianOutWrap
(DMatrixRMaj output) void
setFunction
(FunctionNtoM function, LeastSquaresSwitcher.ProcessJacobianOut jacobian) Specifies the cost residual function and it's Jacobian.void
setSolver
(ConfigNonLinearLeastSquares config, boolean sparse, boolean schur) Used to specify the solver using a configuration which is then passed on to a factory
-
Constructor Details
-
LeastSquaresSwitcher
public LeastSquaresSwitcher()
-
-
Method Details
-
setFunction
Specifies the cost residual function and it's Jacobian. Must be called after the solver has been specified. -
setSolver
Used to specify the solver using a configuration which is then passed on to a factory- Parameters:
config
- Which solver to usersparse
- Should it use a sparse matrix format?schur
- Should it use a schur decomposition?
-
jacobianOutWrap
-