Class LeastSquaresAdapter
java.lang.Object
org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresAdapter
- All Implemented Interfaces:
LeastSquaresProblem
,OptimizationProblem<LeastSquaresProblem.Evaluation>
An adapter that delegates to another implementation of
LeastSquaresProblem
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresProblem
LeastSquaresProblem.Evaluation
-
Constructor Summary
ConstructorDescriptionLeastSquaresAdapter
(LeastSquaresProblem problem) Delegate theLeastSquaresProblem
interface to the given implementation. -
Method Summary
Modifier and TypeMethodDescriptionevaluate
(RealVector point) Evaluate the model at the specified point.Gets the convergence checker.Get a independent Incrementor that counts up to the maximum number of evaluations and then throws an exception.Get a independent Incrementor that counts up to the maximum number of iterations and then throws an exception.int
Get the number of observations (rows in the Jacobian) in this problem.int
Get the number of parameters (columns in the Jacobian) in this problem.getStart()
Gets the initial guess.
-
Constructor Details
-
LeastSquaresAdapter
Delegate theLeastSquaresProblem
interface to the given implementation.- Parameters:
problem
- the delegate
-
-
Method Details
-
getStart
Gets the initial guess.- Specified by:
getStart
in interfaceLeastSquaresProblem
- Returns:
- the initial guess values.
-
getObservationSize
public int getObservationSize()Get the number of observations (rows in the Jacobian) in this problem.- Specified by:
getObservationSize
in interfaceLeastSquaresProblem
- Returns:
- the number of scalar observations
-
getParameterSize
public int getParameterSize()Get the number of parameters (columns in the Jacobian) in this problem.- Specified by:
getParameterSize
in interfaceLeastSquaresProblem
- Returns:
- the number of scalar parameters
-
evaluate
Evaluate the model at the specified point.- Specified by:
evaluate
in interfaceLeastSquaresProblem
- Parameters:
point
- the parameter values.- Returns:
- the model's value and derivative at the given point.
-
getEvaluationCounter
Get a independent Incrementor that counts up to the maximum number of evaluations and then throws an exception.- Specified by:
getEvaluationCounter
in interfaceOptimizationProblem<LeastSquaresProblem.Evaluation>
- Returns:
- a counter for the evaluations.
-
getIterationCounter
Get a independent Incrementor that counts up to the maximum number of iterations and then throws an exception.- Specified by:
getIterationCounter
in interfaceOptimizationProblem<LeastSquaresProblem.Evaluation>
- Returns:
- a counter for the evaluations.
-
getConvergenceChecker
Gets the convergence checker.- Specified by:
getConvergenceChecker
in interfaceOptimizationProblem<LeastSquaresProblem.Evaluation>
- Returns:
- the object used to check for convergence.
-