public class BacktrackingLineSearch extends Object
RealTransform
.
This should never be used when a closed-form inverse is available.Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
Constructor and Description |
---|
BacktrackingLineSearch(DifferentiableRealTransform fwdXfm) |
BacktrackingLineSearch(int nd) |
Modifier and Type | Method and Description |
---|---|
double |
backtrackingLineSearch(double c,
double beta,
int maxtries,
double t0)
Perform backtracking line search.
|
double |
dirMag() |
double |
getLastError() |
double |
getLastSquaredError() |
double |
iterativeInverse(double[] source,
double[] destination)
Find the source point that, when pushed through the forward transform,
results in the given destination point.
|
void |
setBeta(double beta) |
void |
setC(double c) |
void |
setDirection(double[] dir) |
void |
setEpsilon(double eps) |
void |
setEstimate(double[] est) |
void |
setForwardTransform(DifferentiableRealTransform fwdXfm) |
void |
setInitStep(double initStepSize) |
void |
setMaxIterations(int maxIters) |
void |
setMaxLineSearchTries(int lineSearchMaxTries) |
void |
setTarget(double[] tgt) |
double |
squaredError(double[] estimate)
Compute the squared error between this estimate and the target.
|
double |
squaredErrorAt(double[] source)
Compute the squared error between the destination of the input source point
and the target.
|
public BacktrackingLineSearch(int nd)
public BacktrackingLineSearch(DifferentiableRealTransform fwdXfm)
public void setForwardTransform(DifferentiableRealTransform fwdXfm)
public void setC(double c)
public void setBeta(double beta)
public void setInitStep(double initStepSize)
public void setMaxIterations(int maxIters)
public void setMaxLineSearchTries(int lineSearchMaxTries)
public void setEpsilon(double eps)
public void setEstimate(double[] est)
public void setTarget(double[] tgt)
public void setDirection(double[] dir)
public double squaredError(double[] estimate)
estimate
- the current estimatepublic double squaredErrorAt(double[] source)
source
- the current sourcepublic double dirMag()
public double backtrackingLineSearch(double c, double beta, int maxtries, double t0)
c
- the armijoCondition parameterbeta
- the fraction to multiply the step size at each iteration ( < 1 )maxtries
- max number of triest0
- initial step sizepublic double iterativeInverse(double[] source, double[] destination)
Terminates either when a maximum iteration count has been reached, or the error falls below a specified threshold.
source
- the source point that will be overwrittendestination
- the destination pointpublic double getLastSquaredError()
public double getLastError()
Copyright © 2015–2022 ImgLib2. All rights reserved.