|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API void MayaFlux::Kinesis::Discrete::lotka_volterra_step | ( | std::span< double > | levels, |
| std::span< const double > | growth, | ||
| std::span< const double > | interaction, | ||
| double | dt | ||
| ) |
One explicit step of generalised Lotka-Volterra competition.
| levels | Nonnegative levels, updated in place |
| growth | Growth rate of each level |
| interaction | Row-major N x N matrix; entry (i, j) is how strongly level j suppresses level i, the diagonal being self limitation |
| dt | Step |
Each level changes by dt * a_i * (growth_i - sum_j interaction_ij * a_j), all from the levels at the start of the step, then is held at zero or above. With suppression stronger between entries than within them, the levels take turns instead of settling together. Does nothing when the interaction matrix is smaller than N x N. Uses a per-thread scratch vector, so it allocates only the first time a size is seen.
Definition at line 46 of file Dynamics.cpp.
References weighted_sum().
Here is the call graph for this function: