Package com.titan.math.solver
Class EulerSolver
java.lang.Object
com.titan.math.solver.EulerSolver
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EulerSolver
public EulerSolver()
-
-
Method Details
-
solve
public Vector[] solve(Function f, Vector positions, Vector velocities, Vector masses, double h, double t) this method calculates the positions and velocities of all celestial objects after every iteration using the explicit Euler method- Specified by:
solve
in interfaceSolver
- Parameters:
f
-Function
that is used to estimate the next steppositions
- vector of all the positionsvelocities
- vector of all the velocitiesmasses
- masses (used like this in the instances of this interface)h
- step-sizet
- step we are currently on- Returns:
- resulting Vector of the function
-