egttools.plotting.helpers.find_roots_in_discrete_barycentric_coordinates

find_roots_in_discrete_barycentric_coordinates(f, simplex_size, nb_edge_points=None, nb_interior_points=1000, delta=1e-12, atol=0.001)[source]

Searches for the roots inside the simplex and returns them in barycentric coordinates.

Parameters
  • f (Callable[[numpy.ndarray], numpy.ndarray]) – A function that calculates the gradient of any point inside the simplex.

  • simplex_size (int) – Discrete size of the edges of the simplex. This should correspond to the size of the finite population in Moran dynamics.

  • nb_edge_points (int) – Can be used to explore more points than the existing simplex size.

  • nb_interior_points (int) – Number of points to explore inside the simplex.

  • delta (float) – Tolerance to consider a point outside the unit simplex.

  • atol (float) – Tolerance to consider two roots to be equal.

Returns

A list with the barycentric coordinates of the roots.

Return type

List[numpy.ndarray]