ostk.astrodynamics.RootSolver¶
- class RootSolver(
- self: ostk.astrodynamics.RootSolver,
- maximum_iteration_count: int,
- tolerance: ostk.core.type.Real,
- maximum_iteration_count: int,
Bases:
pybind11_object
A root solver is an algorithm for finding a zero-crossing of a function.
Constructor.
- Parameters:
int -- The maximum number of iterations allowed.
float -- The tolerance of the root solver.
Methods
Solve the root of a function using the bisection method.
Bracket and solve the root of a function.
Return the default root solver.
Get the maximum number of iterations allowed.
Get the tolerance of the root solver.
Solve the root of a function.
- class Solution¶
Bases:
pybind11_object
A root solver solution.
- property has_converged¶
Whether the root solver has converged.
- Type:
bool
- property iteration_count¶
The number of iterations required to find the root.
- Type:
int
- property root¶
The root of the function.
- Type:
float
- bisection(
- self: ostk.astrodynamics.RootSolver,
- function: Callable[[float], float],
- lower_bound: ostk.core.type.Real,
- upper_bound: ostk.core.type.Real,
- function: Callable[[float], float],
Solve the root of a function using the bisection method.
- bracket_and_solve(
- self: ostk.astrodynamics.RootSolver,
- function: Callable[[float], float],
- initial_guess: ostk.core.type.Real,
- is_rising: bool,
- function: Callable[[float], float],
Bracket and solve the root of a function.
- static default() ostk.astrodynamics.RootSolver ¶
Return the default root solver.
- Returns:
The default root solver.
- Return type:
- get_maximum_iteration_count(self: ostk.astrodynamics.RootSolver) int ¶
Get the maximum number of iterations allowed.
- Returns:
The maximum number of iterations allowed.
- Return type:
- get_tolerance(self: ostk.astrodynamics.RootSolver) ostk.core.type.Real ¶
Get the tolerance of the root solver.
- Returns:
The tolerance of the root solver.
- Return type:
- solve(
- self: ostk.astrodynamics.RootSolver,
- function: Callable[[float], float],
- lower_bound: ostk.core.type.Real,
- upper_bound: ostk.core.type.Real,
- function: Callable[[float], float],
Solve the root of a function.