egttools.plotting.helpers.calculate_stability¶
- calculate_stability(roots, f, atol=1e-07, return_mode='bool')[source]¶
Calculates the stability of the roots. Returns stability classification for each root.
- Parameters:
roots (List[NDArray[np.float64]]) – A list of barycentric coordinates of the roots.
f (Callable[[NDArray[np.float64]], NDArray[np.float64]]) – A function which computes the gradient at any point in the simplex.
atol (float, default=1e-7) – Numerical tolerance for zero comparisons.
return_mode ({'bool', 'int'}, default='bool') –
‘bool’ returns True for stable, False otherwise.
’int’ returns 1 (stable), -1 (unstable), or 0 (saddle).
- Returns:
Stability of each root, as booleans or ternary integers.
- Return type: