# Internal Documentation

## Functions and methods for networks

# BioEnergeticFoodWebs.connectanceFunction.

Connectance of a network

Returns the connectance of a square matrix, defined as $S/L^2$.

# BioEnergeticFoodWebs.distance_to_producerFunction.

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_rankFunction.

Trophic rank

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_webFunction.

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.dBdtFunction.

Derivatives

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.growthrateFunction.

Growth rate

TODO

## Functions to work on output

# BioEnergeticFoodWebs.coefficient_of_variationFunction.

Coefficient of variation

Corrected for the sample size.

# BioEnergeticFoodWebs.shannonFunction.

Shannon's entropy

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_parametersFunction.

Make initial parameters

Used internally by model_parameters.

# BioEnergeticFoodWebs.make_parametersFunction.

Make the complete set of parameters

This function will add simulation parameters, based on the output of make_initial_parameters. Used internally by model_parameters.

# BioEnergeticFoodWebs.check_initial_parametersFunction.

Check initial parameters

# BioEnergeticFoodWebs.check_parametersFunction.

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.