Internal Documentation

Documentation for EcologicalNetworksDynamics.jl internal interface.

Index

Functions

Base.filterMethod

Filter species of the network (net) for which f(species_index, net) = true.

source
Base.lengthMethod
length(n::NutrientIntake)

Number of nutrients in the nutrient intake model.

source
Base.mapMethod

Transform species of the network (net) by applying f to each species.

source
Base.showMethod
Base.show(io::IO, temperature_response::TemperatureResponse)

One-line TemperatureResponse display.

source
Base.showMethod

Multiline TemperatureResponse::ExponentialBA display.

source
EcologicalNetworksDynamics.Internals.asymmetrizeMethod
asymmetrize(V)

Remove duplicate tuples from a symmetric vector of tuples. A vector V of tuples is said to be symmetric ⟺ ((i,j) ∈ V ⟺ (j,i) ∈ V). The tuple that has its 1st element less than its 2nd element is kept i.e. if i < j (i,j) is kept, and (j,i) otherwise.

See also symmetrize.

source
EcologicalNetworksDynamics.Internals.dudt!Method
dudt!(du, u, p, _)

Compute the species and nutrient (when relevant) abundance derivatives du, given the abundances u and the model p. The last silent argument is the time at which is evaluated the derivatives and is a requirement of DifferentialEquations.

source
EcologicalNetworksDynamics.Internals.fill_sparsematrixMethod
fill_sparsematrix(scalar, template_matrix)

Return a matrix filled with a constant (scalar) for indexes where the value of the template_matrix is non-zero.

Examples

julia> template_matrix = ones(2, 2);

julia> Internals.fill_sparsematrix(10, template_matrix)
2×2 SparseArrays.SparseMatrixCSC{Float64, Int64} with 4 stored entries:
 10.0  10.0
 10.0  10.0

julia> template_matrix[1, 1] = 0;

julia> Internals.fill_sparsematrix(10, template_matrix)
2×2 SparseArrays.SparseMatrixCSC{Float64, Int64} with 3 stored entries:
   ⋅   10.0
 10.0  10.0
source
EcologicalNetworksDynamics.Internals.model_foodwebMethod

Generate a food web of S species and number of links L from a structural model. Loop until the generated has a number of links in [L - ΔL; L + ΔL]. If the maximum number of iterations is reached an error is thrown instead.

source
EcologicalNetworksDynamics.Internals.nutrient_dynamicsMethod
nutrient_dynamics(model::ModelParameters, B, i_nutrients, n, G)

Compute the dynamics of the nutrient i_nutrient given its abundance n, the species biomass B and the vector of species growths G and the model p.

The nutrient dynamics is applicable only if p is of type NutrientIntake.

source
EcologicalNetworksDynamics.Internals.replaceMethod

Construct a copy of the expression with the replacements given in rep.

julia> import EcologicalNetworksDynamics.Internals: replace

julia> replace(:(a + (b + c / a)), Dict(:a => 5, :b => 8))
:(5 + (8 + c / 5))
source
EcologicalNetworksDynamics.Internals.xp_sumMethod

Repeat the given expression into terms of a sum, successively replacing indexes in term by elements in (zipped) lists.

julia> import EcologicalNetworksDynamics.Internals: xp_sum

julia> xp_sum([:i], [[1, 2, 3]], :(u^i)) #  Three terms.
:(u ^ 1 + u ^ 2 + u ^ 3)

julia> xp_sum([:i], [[1]], :(u^i)) #  Single term.
:(u ^ 1)

julia> xp_sum([:i], [[]], :(u^i)) #  No terms.
0

julia> xp_sum([:i, :j], [[:a, :b, :c], [5, 8, 13]], :(j * i)) #  Zipped indices.
:(5a + 8b + 13c)
source