egttools.helpers.vectorized

Set of vectorized functions that can be used to apply these functions on large tensors.

Functions

barycentric_to_xy_coordinates

Transforms barycentric into cartesian coordinates.

cpp_vectorized_replicator_equation_n_player

vectorized_replicator_equation_n_player(x1: numpy.ndarray[numpy.float64[m, n]], x2: numpy.ndarray[numpy.float64[m, n]], x3: numpy.ndarray[numpy.float64[m, n]], payoff_matrix: numpy.ndarray[numpy.float64[m, n]], group_size: int) -> Tuple[numpy.ndarray[numpy.float64[m, n]], numpy.ndarray[numpy.float64[m, n]], numpy.ndarray[numpy.float64[m, n]]]

replicator_equation_n_player

Calculates the gradient of the replicator dynamics given the current population state.

vectorized_barycentric_to_xy_coordinates

Transform a tensor of barycentric coordinates to cartesian coordinates.

vectorized_replicator_equation

This function provides an easy way to calculate a matrix of gradients in a simplex in one go.

vectorized_replicator_equation_n_player

This function provides an easy way to calculate a matrix of gradients in a simplex in one go.