Top Description Fields Constructors Methods
org.apache.commons.math3.fitting.leastsquares

public Class LeastSquaresAdapter

extends Object
implements LeastSquaresProblem
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem, org.apache.commons.math3.optim.OptimizationProblem
Imports
org.apache.commons.math3.linear.RealVector, org.apache.commons.math3.optim.ConvergenceChecker, org.apache.commons.math3.util.Incrementor

An adapter that delegates to another implementation of LeastSquaresProblem.
Since
3.3

Field Summary

Modifier and TypeField and Description
private final LeastSquaresProblem
problem

the delegate problem

Constructor Summary

AccessConstructor and Description
public
LeastSquaresAdapter(final LeastSquaresProblem
the delegate
problem
)

Delegate the LeastSquaresProblem interface to the given implementation.

Method Summary

Modifier and TypeMethod and Description
public LeastSquaresProblem.Evaluation
evaluate(final RealVector point)

Implements org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.evaluate.

Evaluate the model at the specified point.

public ConvergenceChecker<LeastSquaresProblem.Evaluation>
public Incrementor
getEvaluationCounter()

Implements org.apache.commons.math3.optim.OptimizationProblem.getEvaluationCounter.

Deprecated as a consequence of Incrementor being deprecated.

Get a independent Incrementor that counts up to the maximum number of evaluations and then throws an exception.

public Incrementor
getIterationCounter()

Implements org.apache.commons.math3.optim.OptimizationProblem.getIterationCounter.

Deprecated as a consequence of Incrementor being deprecated.

Get a independent Incrementor that counts up to the maximum number of iterations and then throws an exception.

public int
getObservationSize()

Implements org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.getObservationSize.

Get the number of observations (rows in the Jacobian) in this problem.

public int
getParameterSize()

Implements org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.getParameterSize.

Get the number of parameters (columns in the Jacobian) in this problem.

public RealVector
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

problemback to summary
private final LeastSquaresProblem problem

the delegate problem

Constructor Detail

LeastSquaresAdapterback to summary
public LeastSquaresAdapter(final LeastSquaresProblem problem)

Delegate the LeastSquaresProblem interface to the given implementation.

Parameters
problem:LeastSquaresProblem

the delegate

Method Detail

evaluateback to summary
public LeastSquaresProblem.Evaluation evaluate(final RealVector point)

Implements org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.evaluate.

Doc from org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.evaluate.

Evaluate the model at the specified point.

Returns:LeastSquaresProblem.Evaluation

the model's value and derivative at the given point.

getConvergenceCheckerback to summary
public ConvergenceChecker<LeastSquaresProblem.Evaluation> getConvergenceChecker()

Implements org.apache.commons.math3.optim.OptimizationProblem.getConvergenceChecker.

Doc from org.apache.commons.math3.optim.OptimizationProblem.getConvergenceChecker.

Gets the convergence checker.

Returns:ConvergenceChecker<LeastSquaresProblem.Evaluation>

the object used to check for convergence.

getEvaluationCounterback to summary
public Incrementor getEvaluationCounter()

Implements org.apache.commons.math3.optim.OptimizationProblem.getEvaluationCounter.

Doc from org.apache.commons.math3.optim.OptimizationProblem.getEvaluationCounter.

Deprecated

as a consequence of Incrementor being deprecated. See corresponding docs for further information.

Get a independent Incrementor that counts up to the maximum number of evaluations and then throws an exception.

Returns:Incrementor

a counter for the evaluations.

getIterationCounterback to summary
public Incrementor getIterationCounter()

Implements org.apache.commons.math3.optim.OptimizationProblem.getIterationCounter.

Doc from org.apache.commons.math3.optim.OptimizationProblem.getIterationCounter.

Deprecated

as a consequence of Incrementor being deprecated. See corresponding docs for further information.

Get a independent Incrementor that counts up to the maximum number of iterations and then throws an exception.

Returns:Incrementor

a counter for the evaluations.

getObservationSizeback to summary
public int getObservationSize()

Implements org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.getObservationSize.

Doc from org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.getObservationSize.

Get the number of observations (rows in the Jacobian) in this problem.

Returns:int

the number of scalar observations

getParameterSizeback to summary
public int getParameterSize()

Implements org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.getParameterSize.

Doc from org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.getParameterSize.

Get the number of parameters (columns in the Jacobian) in this problem.

Returns:int

the number of scalar parameters

getStartback to summary
public RealVector getStart()

Implements org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.getStart.

Doc from org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem.getStart.

Gets the initial guess.

Returns:RealVector

the initial guess values.