Ecological networks types follow the iteration interface, allowing them to be used within a loop. Iteration is done on interactions (species are already arrays), and return a named tuple with various information.
Network length
Base.length
— FunctionBase.length(N::T) where {T <: AbstractEcologicalNetwork}
The length of a network is the number of non-zero elements in it.
Iteration
Base.iterate
— FunctionBase.iterate(N::T) where {T <: AbstractEcologicalNetwork}
Returns the interactions in a network (this uses less memory than interactions
but is a bit slower).
Base.iterate(N::T) where {T <: AbstractEcologicalNetwork}
Returns the interactions in a network (this uses less memory than interactions
but is a bit slower).