Internal Documentation
Documentation for EcologicalNetworksDynamics.jl internal interface.
Index
EcologicalNetworksDynamics.Internals.GeneratedExpression
Base.convert
Base.filter
Base.length
Base.map
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
Base.show
EcologicalNetworksDynamics.Internals.A_nti_full
EcologicalNetworksDynamics.Internals.allometricparams_to_vec
EcologicalNetworksDynamics.Internals.allometricscale
EcologicalNetworksDynamics.Internals.asymmetrize
EcologicalNetworksDynamics.Internals.clean_labels
EcologicalNetworksDynamics.Internals.clean_metabolic_class
EcologicalNetworksDynamics.Internals.consumption
EcologicalNetworksDynamics.Internals.dudt!
EcologicalNetworksDynamics.Internals.effect_competition
EcologicalNetworksDynamics.Internals.effect_facilitation
EcologicalNetworksDynamics.Internals.effect_refuge
EcologicalNetworksDynamics.Internals.fill_sparsematrix
EcologicalNetworksDynamics.Internals.get_trophic_adjacency
EcologicalNetworksDynamics.Internals.invertebrates
EcologicalNetworksDynamics.Internals.is_model_net_valid
EcologicalNetworksDynamics.Internals.isinvertebrate
EcologicalNetworksDynamics.Internals.isvertebrate
EcologicalNetworksDynamics.Internals.mass_ratio
EcologicalNetworksDynamics.Internals.mass_ratio
EcologicalNetworksDynamics.Internals.model_foodweb
EcologicalNetworksDynamics.Internals.model_foodweb_from_C
EcologicalNetworksDynamics.Internals.number_of_resource
EcologicalNetworksDynamics.Internals.number_of_resource
EcologicalNetworksDynamics.Internals.nutrient_dynamics
EcologicalNetworksDynamics.Internals.parse_pair
EcologicalNetworksDynamics.Internals.predators
EcologicalNetworksDynamics.Internals.preys
EcologicalNetworksDynamics.Internals.process_idxs
EcologicalNetworksDynamics.Internals.replace
EcologicalNetworksDynamics.Internals.replace_vertebrates!
EcologicalNetworksDynamics.Internals.share_prey
EcologicalNetworksDynamics.Internals.symmetrize
EcologicalNetworksDynamics.Internals.vertebrates
EcologicalNetworksDynamics.Internals.xp_sum
Functions
EcologicalNetworksDynamics.Internals.GeneratedExpression
— TypeWraps a Julia Expression generated by generate_dbdt
. Mostly useful for pretty-printing, but you can eval
uate it like a regular expression. The actual expression lies inside the .expr
attribute.
Base.convert
— MethodConvert a MultiplexNetwork
to a FoodWeb
. The convertion consists in removing the non-trophic layers of the multiplex network.
Base.filter
— MethodFilter species of the network (net
) for which f(species_index, net) = true
.
Base.length
— Methodlength(n::NutrientIntake)
Number of nutrients in the n
utrient intake model.
Base.map
— MethodTransform species of the network (net
) by applying f
to each species.
Base.show
— MethodOne line ModelParameters display.
Base.show
— MethodOne line BioRates
display.
Base.show
— MethodOne line Environment display.
Base.show
— MethodOne line FoodWeb display.
Base.show
— MethodOne line display FunctionalResponse
Base.show
— MethodOne line Layer
display.
Base.show
— MethodOne line MultiplexNetwork
display.
Base.show
— MethodOne line display FunctionalResponse
Base.show
— MethodBase.show(io::IO, temperature_response::TemperatureResponse)
One-line TemperatureResponse display.
Base.show
— MethodMultiline ModelParameters display.
Base.show
— MethodMultiline BioRates
display.
Base.show
— MethodMultiline BioenergeticResponse display.
Base.show
— MethodMultiline ClassicResponse display.
Base.show
— MethodMultiline Environment display.
Base.show
— MethodMultiline TemperatureResponse::ExponentialBA display.
Base.show
— MethodMultiline FoodWeb display.
Base.show
— MethodMultiline LinearResponse display.
Base.show
— MethodMultiline LogisticGrowth display.
Base.show
— MethodMultiline MultiplexNetwork
display.
Base.show
— MethodMultiline NutrientIntake display.
EcologicalNetworksDynamics.Internals.A_nti_full
— MethodAdjacency matrix of potential links given by the potential_links
function in net
.
EcologicalNetworksDynamics.Internals.allometricparams_to_vec
— MethodCreate species parameter vectors for a, b of length S (species richness) given the allometric parameters for the different metabolic classes (aₚ,aᵢ,...).
EcologicalNetworksDynamics.Internals.allometricscale
— MethodAllometric scaling: parameter expressed as a power law of body-mass (M).
EcologicalNetworksDynamics.Internals.asymmetrize
— Methodasymmetrize(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
.
EcologicalNetworksDynamics.Internals.clean_labels
— MethodCheck that labels have the correct format and convert them to String
s if needed.
EcologicalNetworksDynamics.Internals.clean_metabolic_class
— MethodCheck that provided metabolic classes are valid.
EcologicalNetworksDynamics.Internals.consumption
— MethodCompute consumption terms of ODEs.
EcologicalNetworksDynamics.Internals.dudt!
— Methoddudt!(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.
EcologicalNetworksDynamics.Internals.effect_competition
— MethodEffect of competition on the net growth rate.
EcologicalNetworksDynamics.Internals.effect_facilitation
— MethodEffect of facilitation on intrinsic growth rate.
EcologicalNetworksDynamics.Internals.effect_refuge
— MethodEffect of refuge on attack rate.
EcologicalNetworksDynamics.Internals.fill_sparsematrix
— Methodfill_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
EcologicalNetworksDynamics.Internals.get_trophic_adjacency
— MethodReturn the adjacency matrix of the trophic interactions.
EcologicalNetworksDynamics.Internals.invertebrates
— MethodReturn indices of the invertebrates of the network (net
).
EcologicalNetworksDynamics.Internals.is_model_net_valid
— MethodCheck that net
does not contain cycles and does not have disconnected nodes.
EcologicalNetworksDynamics.Internals.isinvertebrate
— MethodIs species i
an invertebrate?
EcologicalNetworksDynamics.Internals.isvertebrate
— MethodIs species i
an ectotherm vertebrate?
EcologicalNetworksDynamics.Internals.mass_ratio
— Methodmass_ratio(p::ModelParameters)
Mean predator-prey body mass ratio given the model p
arameters.
EcologicalNetworksDynamics.Internals.mass_ratio
— Methodmass_ratio(network::EcologicalNetwork)
Mean predator-prey body mass ratio given the network
.
EcologicalNetworksDynamics.Internals.model_foodweb
— MethodGenerate 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.
EcologicalNetworksDynamics.Internals.model_foodweb_from_C
— MethodGenerate a food web of S
species and connectance C
from a structural model
. Loop until the generated has connectance in [C - ΔC; C + ΔC].
EcologicalNetworksDynamics.Internals.number_of_resource
— MethodNumber of resources species i
is feeding on.
EcologicalNetworksDynamics.Internals.number_of_resource
— MethodReturn a vector where element i is the number of resource(s) of species i.
EcologicalNetworksDynamics.Internals.nutrient_dynamics
— Methodnutrient_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
.
EcologicalNetworksDynamics.Internals.parse_pair
— MethodParse pairs within FoodWeb()
method working on adjacency list.
EcologicalNetworksDynamics.Internals.predators
— MethodReturn indices of the predators of the given network
.
EcologicalNetworksDynamics.Internals.preys
— MethodReturn indices of the preys of the network (net
).
EcologicalNetworksDynamics.Internals.process_idxs
— Methodprocess_idxs(solution; idxs = nothing)
Check and sanitize the species indices or names provided (idxs
). Used in extract_last_timesteps
and living_species
.
EcologicalNetworksDynamics.Internals.replace
— MethodConstruct 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))
EcologicalNetworksDynamics.Internals.replace_vertebrates!
— MethodDoes the user want to replace 'vertebrates' by 'ectotherm vertebrates'?
EcologicalNetworksDynamics.Internals.share_prey
— MethodDo species i
and j
share at least one prey?
EcologicalNetworksDynamics.Internals.symmetrize
— Methodsymmetrize(V)
Add symmetric tuples from an asymmetric vector of tuples. A vector V
of tuples is said to be asymmetric ⟺ ((i,j) ∈ V
⇒ (j,i) ∉ V
).
See also asymmetrize
.
EcologicalNetworksDynamics.Internals.vertebrates
— MethodReturn indices of the vertebrates of the network (net
).
EcologicalNetworksDynamics.Internals.xp_sum
— MethodRepeat 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)