egttools.plotting.simplified.find_roots_of_lattice_gradient

find_roots_of_lattice_gradient(lattice, atol=1e-10)[source]

Zeros of the piecewise-linear gradient built by lattice_gradient_interpolator().

Inside each lattice triangle the interpolated gradient is affine, so its zero is the solution of a 2x2 linear system and is found exactly; no initial guesses are needed. Population states where the gradient itself is zero (e.g. monomorphic states without mutation) are included. Triangles where the gradient vanishes identically (neutral drift) contribute only their vertices.

Parameters:
Returns:

Roots in barycentric coordinates (fractions summing to 1), without duplicates.

Return type:

List[NDArray[double]]