- Internal Documentation
Functions and methods for networks
BioEnergeticFoodWebs.connectance — Function.
Connectance of a network
Returns the connectance of a square matrix, defined as $S/L^2$.
BioEnergeticFoodWebs.distance_to_producer — Function.
Distance to a primary producer
This function measures, for every species, its shortest path to a primary producer using matrix exponentiation. A primary producer has a value of 1, a primary consumer a value of 2, and so forth.
BioEnergeticFoodWebs.trophic_rank — Function.
Based on the average distance of preys to primary producers. Specifically, the rank is defined as the average of the distance of preys to primary producers (recursively). Primary producers always have a trophic rank of 1.
BioEnergeticFoodWebs.check_food_web — Function.
Is the matrix correctly formatted?
A correct matrix has only 0 and 1, two dimensions, and is square.
This function returns nothing, but raises an
AssertionError if one of the conditions is not met.
ODE wrappers and functions for integration
BioEnergeticFoodWebs.dBdt — Function.
This function is the one wrapped by the various integration routines. Based on a timepoint
t, an array of biomasses
biomass, and a series of simulation parameters
p, it will return
dB/dt for every species.
BioEnergeticFoodWebs.growthrate — Function.
Functions to work on output
BioEnergeticFoodWebs.coefficient_of_variation — Function.
Coefficient of variation
Corrected for the sample size.
BioEnergeticFoodWebs.shannon — Function.
Corrected for the number of species, removes negative and null values, return
NaN in case of problem.
Functions to prepare and check parameters
BioEnergeticFoodWebs.make_initial_parameters — Function.
Make initial parameters
Used internally by
BioEnergeticFoodWebs.make_parameters — Function.
Make the complete set of parameters
This function will add simulation parameters, based on the output of
make_initial_parameters. Used internally by
BioEnergeticFoodWebs.check_initial_parameters — Function.
Check initial parameters
BioEnergeticFoodWebs.check_parameters — Function.
Are the simulation parameters present?
This function will make sure that all the required parameters are here, and that the arrays and matrices have matching dimensions.