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

Variable Index

 o approximationScout
 o bSpace
 o directionScout
 o hasMoreIterations
 o p
 o r
 o rtrNew
 o xSpace

Constructor Index

 o CGNonlinSolver(Space, Space)
 o CGNonlinSolver(Space, Space, ApproximationScout, DirectionScout, Iterator)
 o CGNonlinSolver(Space, Space, Iterator)

Method Index

 o finish()
executed after the last iteration
 o getNormResidual()
 o getResidual()
 o hasMoreIterations()
 o nextIteration()
executed at each iteration
 o setFletcherReevesScout()
chooses FletcherReeves' beta for finding the next direction.
 o setFletcherReevesScout(int)
 o setNewtonRaphsonScout()
 o setNewtonRaphsonScout(float, int)
chooses the Newton-Raphson method to do the line search for the x approximation (alpha) step.
 o setPolakRibiereScout()
chooses Polak-Ribiere's beta for finding the next direction.
 o setPolakRibiereScout(int)
chooses Polak-Ribiere's beta for finding the next direction.
 o setSecantLineScout()
chooses the secant method to do the line search for the x approximation (alpha) step.
 o setSecantLineScout(float, float, int)
chooses the secant method to do the line search for the x approximation (alpha) step.
 o solve(hasGradient, Vector)
 o solve(hasGradient, Vector, Vector)
 o solve(hasHessian, Vector, Vector)
 o solve(Operator, Vector, Vector)
Solves Ax = b for x
"Solve" is used in a loose sense.
 o start()
initializes before the first iteration

Variables

 o xSpace
 protected Space xSpace
 o bSpace
 protected Space bSpace
 o directionScout
 protected DirectionScout directionScout
 o approximationScout
 protected ApproximationScout approximationScout
 o hasMoreIterations
 protected boolean hasMoreIterations
 o r
 protected Vector r
 o p
 protected Vector p
 o rtrNew
 protected float rtrNew

Constructors

 o CGNonlinSolver
 public CGNonlinSolver(Space xSpace,
                       Space bSpace)
Parameters:
xSpace - is the model space
bSpace - is the data space
 o CGNonlinSolver
 public CGNonlinSolver(Space xSpace,
                       Space bSpace,
                       Iterator iterator)
 o 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

Methods

 o getResidual
 public Vector getResidual()
Overrides:
getResidual in class IterativeSlv
 o getNormResidual
 public float getNormResidual()
Overrides:
getNormResidual in class IterativeSlv
 o setFletcherReevesScout
 public void setFletcherReevesScout()
chooses FletcherReeves' beta for finding the next direction.

 o setFletcherReevesScout
 public void setFletcherReevesScout(int resetMax)
Parameters:
resetMax - sets the maximal number of iterations before ensuring conjugacy (Tip: try resetMax = the number of unknowns).
 o setPolakRibiereScout
 public void setPolakRibiereScout()
chooses Polak-Ribiere's beta for finding the next direction.

 o 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).
 o 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
 o setSecantLineScout
 public void setSecantLineScout()
chooses the secant method to do the line search for the x approximation (alpha) step.

 o 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
 o setNewtonRaphsonScout
 public void setNewtonRaphsonScout()
 o 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
 o solve
 public void solve(hasGradient A,
                   Vector b,
                   Vector x)
 o solve
 public void solve(hasHessian A,
                   Vector b,
                   Vector x)
 o solve
 public void solve(hasGradient f,
                   Vector x)
 o start
 protected void start()
initializes before the first iteration

 o nextIteration
 protected void nextIteration()
executed at each iteration

 o finish
 protected void finish()
executed after the last iteration

 o hasMoreIterations
 protected boolean hasMoreIterations()

All Packages  Class Hierarchy  This Package  Previous  Next  Index