Rcpp alternative for the group centroid utility function.
Usage
gc_utility_rcpp(
a_group_centroid,
b_group_centroid,
radius,
cell_distances,
stop_utility,
number_agents
)Arguments
- a_group_centroid
Numeric denoting the power to which to take the utility.
- b_group_centroid
Numeric denoting the slope of the utility function.
- radius
Numeric denoting the radius of the agent.
- cell_distances
Numeric vector denoting the distance of each cell in the
centersto the predicted group centroid.- stop_utility
Numeric denoting the utility of stopping. Is used to ensure the agents do not freeze when they are too far away from each other.
- number_agents
Numeric denoting the number of ingroup members.
See also
distance_group_centroid,
params_from_csv,
utility-agent