Package com.titan.math.solver
Class PredictorCorrector
java.lang.Object
com.titan.math.solver.PredictorCorrector
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PredictorCorrector
public PredictorCorrector()
-
-
Method Details
-
solve
public Vector[] solve(Function f, Vector positions, Vector velocities, Vector masses, double h, double t) takes one step forward and calculates the state of the solar system using the Predictor-Corrector approach method- Specified by:
solve
in interfaceSolver
- Parameters:
f
-Function
that is used to estimate the next steppositions
- positions of celestial bodies in the systemvelocities
- velocities of celestial bodies in the systemmasses
- masses of celestial bodies in the systemh
- step-sizet
- time step we are currently on- Returns:
- returns the state of the system after one step
-