All Packages Class Hierarchy This Package Previous Next Index
Class juice.solver.CGNonlinSolver
java.lang.Object
|
+----juice.solver.IterativeSlv
|
+----juice.solver.CGNonlinSolver
- public class CGNonlinSolver
- extends IterativeSlv
- implements Solver
Conjugate Gradient Solver.
Maybe this thing needs a factory?
- See Also:
- CGNonlinPrecondSolver, CGSolver
-
approximationScout
-
-
bSpace
-
-
directionScout
-
-
hasMoreIterations
-
-
p
-
-
r
-
-
rtrNew
-
-
xSpace
-
-
CGNonlinSolver(Space, Space)
-
-
CGNonlinSolver(Space, Space, ApproximationScout, DirectionScout, Iterator)
-
-
CGNonlinSolver(Space, Space, Iterator)
-
-
finish()
- executed after the last iteration
-
getNormResidual()
-
-
getResidual()
-
-
hasMoreIterations()
-
-
nextIteration()
- executed at each iteration
-
setFletcherReevesScout()
- chooses FletcherReeves' beta for finding the next direction.
-
setFletcherReevesScout(int)
-
-
setNewtonRaphsonScout()
-
-
setNewtonRaphsonScout(float, int)
- chooses the Newton-Raphson method to do the line search for
the x approximation (alpha) step.
-
setPolakRibiereScout()
- chooses Polak-Ribiere's beta for finding the next direction.
-
setPolakRibiereScout(int)
- chooses Polak-Ribiere's beta for finding the next direction.
-
setSecantLineScout()
- chooses the secant method to do the line search for the x approximation
(alpha) step.
-
setSecantLineScout(float, float, int)
- chooses the secant method to do the line search for the x approximation
(alpha) step.
-
solve(hasGradient, Vector)
-
-
solve(hasGradient, Vector, Vector)
-
-
solve(hasHessian, Vector, Vector)
-
-
solve(Operator, Vector, Vector)
- Solves Ax = b for x
"Solve" is used in a loose sense.
-
start()
- initializes before the first iteration
xSpace
protected Space xSpace
bSpace
protected Space bSpace
directionScout
protected DirectionScout directionScout
approximationScout
protected ApproximationScout approximationScout
hasMoreIterations
protected boolean hasMoreIterations
r
protected Vector r
p
protected Vector p
rtrNew
protected float rtrNew
CGNonlinSolver
public CGNonlinSolver(Space xSpace,
Space bSpace)
- Parameters:
- xSpace - is the model space
- bSpace - is the data space
CGNonlinSolver
public CGNonlinSolver(Space xSpace,
Space bSpace,
Iterator iterator)
CGNonlinSolver
public CGNonlinSolver(Space xSpace,
Space bSpace,
ApproximationScout approximationScout,
DirectionScout directionScout,
Iterator iterator)
- Parameters:
- xSpace - is the model space
- bSpace - is the data space
- approximationScout - is updates solution x at each iteration
- directionScout - is updates the search direction at each iteration
- iterator - marshals the iteration process
getResidual
public Vector getResidual()
- Overrides:
- getResidual in class IterativeSlv
getNormResidual
public float getNormResidual()
- Overrides:
- getNormResidual in class IterativeSlv
setFletcherReevesScout
public void setFletcherReevesScout()
- chooses FletcherReeves' beta for finding the next direction.
setFletcherReevesScout
public void setFletcherReevesScout(int resetMax)
- Parameters:
- resetMax - sets the maximal number of iterations before
ensuring conjugacy (Tip: try resetMax = the number of unknowns).
setPolakRibiereScout
public void setPolakRibiereScout()
- chooses Polak-Ribiere's beta for finding the next direction.
setPolakRibiereScout
public void setPolakRibiereScout(int resetMax)
- chooses Polak-Ribiere's beta for finding the next direction.
- Parameters:
- xSpace - the model space
- resetMax - sets the maximal number of iterations before
ensuring conjugacy (Tip: try resetMax = the number of unknowns).
setSecantLineScout
public void setSecantLineScout(float sigma,
float alphaMin,
int maxSteps)
- chooses the secant method to do the line search for the x approximation
(alpha) step.
- Parameters:
- Sigma - is a starting step-length. It is dynamically readjusted
- alphaMin - is the minimum value of alpha the search finds acceptable
- maxSteps - is the maximum number of steps the search can take
(a small maxSteps (inexact line search) is often sufficient)
- xSpace - is the space of the approximation x
setSecantLineScout
public void setSecantLineScout()
- chooses the secant method to do the line search for the x approximation
(alpha) step.
setNewtonRaphsonScout
public void setNewtonRaphsonScout(float alphaMin,
int maxSteps)
- chooses the Newton-Raphson method to do the line search for
the x approximation (alpha) step.
- Parameters:
- alphaMin - is the minimum value of alpha the search finds acceptable
- maxSteps - is the maximum number of steps the search can take
setNewtonRaphsonScout
public void setNewtonRaphsonScout()
solve
public void solve(Operator A,
Vector b,
Vector x)
- Solves Ax = b for x
"Solve" is used in a loose sense.
- Overrides:
- solve in class IterativeSlv
solve
public void solve(hasGradient A,
Vector b,
Vector x)
solve
public void solve(hasHessian A,
Vector b,
Vector x)
solve
public void solve(hasGradient f,
Vector x)
start
protected void start()
- initializes before the first iteration
nextIteration
protected void nextIteration()
- executed at each iteration
finish
protected void finish()
- executed after the last iteration
hasMoreIterations
protected boolean hasMoreIterations()
All Packages Class Hierarchy This Package Previous Next Index