org.stellarium.solve
Class DoubleSolve

java.lang.Object
  extended by org.stellarium.solve.DoubleSolve

public class DoubleSolve
extends java.lang.Object

Version:
Java
Author:
Jerome Beau

Nested Class Summary
static class DoubleSolve.DoublePair
           
static interface DoubleSolve.Pair
           
 
Constructor Summary
DoubleSolve()
           
 
Method Summary
static DoubleSolve.DoublePair solve_bisection(UnaryFunction f, double lower, double upper, double err, int maxIter)
          DoubleSolve a function using the bisection method.
static DoubleSolve.DoublePair solve_iteration(UnaryFunction f, double x0, double err, int maxIter)
          DoubleSolve using iteration; terminate when error is below err or the maximum number of iterations is reached.
static DoubleSolve.DoublePair solveIterationFixed(UnaryFunction f, double x0, int maxIter)
          DoubleSolve using iteration method and a fixed number of steps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleSolve

public DoubleSolve()
Method Detail

solve_bisection

public static DoubleSolve.DoublePair solve_bisection(UnaryFunction f,
                                                     double lower,
                                                     double upper,
                                                     double err,
                                                     int maxIter)
DoubleSolve a function using the bisection method. Returns a pair with the solution as the first element and the error as the second.


solve_iteration

public static DoubleSolve.DoublePair solve_iteration(UnaryFunction f,
                                                     double x0,
                                                     double err,
                                                     int maxIter)
DoubleSolve using iteration; terminate when error is below err or the maximum number of iterations is reached.


solveIterationFixed

public static DoubleSolve.DoublePair solveIterationFixed(UnaryFunction f,
                                                         double x0,
                                                         int maxIter)
DoubleSolve using iteration method and a fixed number of steps.