# Number of links and connectance

## Number of links

#
** EcologicalNetwork.links** —

*Function*.

**Number of links in a network**

links(N::EcoNetwork)

For all type of networks, this is the sum of the adjacency matrix. Note that for quantitative networks, this is the cumulative sum of link weights.

#
** EcologicalNetwork.link_number** —

*Function*.

**Number of links in a quantitative network**

link_number(N::QuantitativeNetwork)

In quantitative networks only, returns the number of non-zero interactions.

#
** EcologicalNetwork.links_var** —

*Function*.

**Variance in the expected number of links**

links_var(N::ProbabilisticNetwork)

Expected variance of the number of links for a probabilistic network.

## Linkage density

#
** EcologicalNetwork.linkage_density** —

*Function*.

**Linkage density**

linkage_density(N::DeterministicNetwork)

Number of links divided by species richness.

## Connectance

#
** EcologicalNetwork.connectance** —

*Function*.

**Connectance**

connectance(N::EcoNetwork)

Number of links divided by the number of possible interactions. In unipartite networks, this is $L/S^2$. In bipartite networks, this is $L/(T × B)$.

**Connectance of a quantitative network**

connectance(N::QuantitativeNetwork)

Connectance of a quantitative network – the information on link weight is ignored.

#
** EcologicalNetwork.connectance_var** —

*Function*.

**Variance in the expected connectance**

connectance_var(N::ProbabilisticNetwork)

Expected variance of the connectance for a probabilistic matrix, measured as the variance of the number of links divided by the squared size of the matrix.