egttools.plotting.simplex2d.perturb_state_discrete¶
- perturb_state_discrete(state, size, perturbation=1)[source]¶
Produces a number of points in the simplex close to the state.
If the sate is a vertex or in an edge, the perturbation is only made across the edges (we don’t look for points in the interior of the simplex).
- Parameters
state (Union[Tuple[float, float, float], numpy.ndarray]) – The barycentric coordinates of a point inside the simplex.
size (int) – The size of the edges of the simplex. This should coincide with the size of the finite population in Moran dynamics.
perturbation (int) – The amount of perturbation to apply to the point.
- Returns
A list of points (in barycentric coordinates) which are close to the state in the simplex.
- Return type
List[numpy.ndarray]