As opposed to re-generating networks from a template of probabilities, network permutations shuffles interactions within a network. This is done by enforcing different constraints on degree distribution: either only the fill is maintained, or only the in or out degree, or both.
EcologicalNetwork.swaps — Function.
Generates permutations of a network
swaps(N::DeterministicNetwork, r::Int64; constraint::Symbol=:degree, swapsize::Int64=3, n::Int64=3000)
By default, this method will look for random (x, x) sub-matrices, where x is given by the
swapsize keyword, and shuffle them. There are four possible constraints:
||both in and out degree||
||only out degree||
||only in degree||
||only number of links||
r, the number of randomized networks to generate
constraint: can be
swapsize: the size of the square sub-matrix to swap (defaults to 3)
n: the number of sub-matrices to swap (defaults to 3000)
It is also possible to produce a single permutation of a network if needed.
EcologicalNetwork.swap — Function.
Swaps a unipartite network while enforcing a constraint on degree distribution.
Generate a single permutation of a network
swap(N::BipartiteNetwork; constraint::Symbol=:degree, swapsize::Int64=3, n::Int64=3000)
Swaps a bipartite network while enforcing a constraint on degree distribution. See the documentation for
swaps for the complete explanation of arguments.