Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Trophic bugfixes #204

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
📚 adding docstring for omnivory function including reference
mjsmith037 committed Feb 10, 2022
commit fe9f81feda011455a56d9e69c3cd4f34a84913e5
13 changes: 13 additions & 0 deletions src/foodwebs/omnivory.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
"""
omnivory(N::T) where {T <: UnipartiteNetwork}

Returns a vector of length |species(N)| with an index of consumption across
trophic levels. Note we explicitly assume that diet contribution is spread
evenly across prey species.

#### References
- Christensen, Villy, and Daniel Pauly. "ECOPATH II—a software for balancing
steady-state ecosystem models and calculating network characteristics."
Ecological modelling 61, no. 3-4 (1992): 169-185.

"""
function omnivory(N::T) where {T <: UnipartiteNetwork}
OI = Dict([s => 0.0 for s in species(N)])