Skip to content

Basic information on networks

# SpeciesInteractionNetworks.speciesFunction.

species(N::Bipartite)

Returns the list of species in a bipartite list of nodes, as a single vector.

source

species(N::Unipartite)

Returns the list of species in a unipartite list of nodes, as a single vector.

source

species(N::SpeciesInteractionNetwork)

Returns the list of species in a network, by calling the species method corresponding to the appropriate species list.

source

species(N::SpeciesInteractionNetwork, dims::Integer)

Returns the list of species on the top (1 as last argument) or bottom (2 as second argument) for the network. For unipartite networks, this will return the same list of species.

source

# SpeciesInteractionNetworks.richnessFunction.

richness(N::SpeciesInteractionNetwork)

Returns the number of species in a network, measured as the length of the species items.

source

richness(N::SpeciesInteractionNetwork, dims::Integer)

Returns the number of species in a network, either on the top (1 as last argument) or bottom (2 as last argument), measured as the length of the species items on this side.

source

# SpeciesInteractionNetworks.interactionsFunction.

interactions(N::SpeciesInteractionNetwork)

Returns a vector of all interactions in the network.

Each interactions is returned an un-named tuple of three elements: the source, the destination, and the value. For a binary network, for example, an interaction from :a to :b will be represented as (:a,:b,true). The type of the tuple that is returned is given by eltype(N), and is the same as the output of using iteration on a network.

Note that this method is substantially faster and more memory-efficient than using iteration (int for int in N), for reasons related to the indexing of non-zero interactions in the underlying data structure of the network.

source

# SpeciesInteractionNetworks.predecessorsFunction.

predecessors(N::SpeciesInteractionNetwork{Bipartite{T}, <:Interactions}, sp::T) where {T}

The predecessors of a species in a bipartite network is the list of all species it receives a non-zero interaction from. For probabilistic networks, this includes all species with a non-zero probability of interaction.

If the species is at the top of the network, or if the specis has no predecessors, this method will retun an empty list of species, specifically Set{T}().

source

predecessors(N::SpeciesInteractionNetwork{Unipartite{T}, <:Interactions}, sp::T) where {T}

The predecessors of a species in a unipartite network is the list of all species it receives a non-zero interaction from. For probabilistic networks, this includes all species with a non-zero probability of interaction.

If the specis has no predecessors, this method will retun an empty list of species, specifically Set{T}().

source

# SpeciesInteractionNetworks.successorsFunction.

successors(N::SpeciesInteractionNetwork{Bipartite{T}, <:Interactions}, sp::T) where {T}

The successors of a species in a bipartite network is the list of all species it establishes a non-zero interaction with. For probabilistic networks, this includes all species with a non-zero probability of interaction.

If the species is at the bottom of the network, or if the specis has no successors, this method will retun an empty list of species, specifically Set{T}().

source

successors(N::SpeciesInteractionNetwork{Unipartite{T}, <:Interactions}, sp::T) where {T}

The successors of a species in a unipartite network is the list of all species it establishes a non-zero interaction with. For probabilistic networks, this includes all species with a non-zero probability of interaction.

If the specis has no successors, this method will retun an empty list of species, specifically Set{T}().

source

# SpeciesInteractionNetworks.neighborsFunction.

neighbors(N::SpeciesInteractionNetwork{<:Partiteness{T}, <:Interactions}) where {T}

The neighbors of a species is the list of both its successors and prde

source