public class QuadraticSolver
extends java.lang.Object
x = p = u = 0; beta = 0; g = b; a = A g; q = H a; do { p = -a + beta p u = Hp = -q + beta u scalar = -p'g/p'u x = x + scalar p if (done) return x g = H x + b = g + scalar u a = A g q = H a beta = p'H A g / p'H p = p'q/p'u }Also contains a solver for a least-squares inverse of a linear transform, using QuadraticTransform as a wrapper.
Constructor and Description |
---|
QuadraticSolver(Quadratic quadratic)
Implement the Quadratic interface and pass to this constructor.
|
Modifier and Type | Method and Description |
---|---|
Vect |
solve(int numberIterations,
Monitor monitor)
Return a new solution after the number of conjugate gradient
iterations.
|
static Vect |
solve(VectConst data,
VectConst referenceModel,
LinearTransform linearTransform,
boolean dampOnlyPerturbation,
int conjugateGradIterations,
Monitor monitor)
Solve quadratic objective function for linear transform.
|
public QuadraticSolver(Quadratic quadratic)
quadratic
- Defines the Hessian quadratic term.public Vect solve(int numberIterations, Monitor monitor)
numberIterations
- is the number of iterations to perform.monitor
- If non-null, then track all progress.public static Vect solve(VectConst data, VectConst referenceModel, LinearTransform linearTransform, boolean dampOnlyPerturbation, int conjugateGradIterations, Monitor monitor)
[F(m+x)-data]'N[F(m+x)-data] + (m+x)'M(m+x)if dampOnlyPerturbation is true and
[F(m+x)-data]'N[F(m+x)-data] + (x)'M(x)if dampOnlyPerturbation is false.
data
- The data to be fit.referenceModel
- Initialize with this model.linearTransform
- Describes the linear transform.dampOnlyPerturbation
- If true then, only damp perturbations
to reference model. If false, then damp the reference model plus
the perturbation.conjugateGradIterations
- The specified number of conjugate
gradient iterations.monitor
- Report progress here, if non-null.