Function Glossary

CoexistenceHoles.assembly_hypergraph_GLVMethod

assemblyhypergraphGLV(A,r; <keyword arguments>) Computes the assembly hypergraph for (A,r).

Arguments

  • A::Array{<:Real,2}: community matrix
  • r::Array{<:Real, 1}: growth vector
  • method::String="permanence": will return a randomized growthvector using one of the following methods
    • "permanence": uses the is_GLVpermantent(@ref) to determine interspecies coexistance
    • "localstability": uses the is_GLVlocallystable(@ref) to determine interspecies coexistance
  • regularization::Real=0:

Outputs

  • hypergraph::Array{Array{Int64,1},1}: array of hyper edges: species in edge => species coexist
source
CoexistenceHoles.is_GLVlocallystableMethod

is_GLVlocallystable(A, r)

Computes if the pair (A,r) has a feasible interior equilibrium that is stable.

Arguments

  • A::Array{Real,2}: community matrix
  • r::Array{Real, 1}: growth vector

Outputs

  • stability::Bool: true = stable, false = not stable
source
CoexistenceHoles.is_GLVpermanentMethod

is_GLVpermanent(A, r; <keyword arguments>)

Computes permanence of the pair (A,r) using Jansen's criterion of mutual invasibility. is_permanente(A,r;) -> Boolean

Arguments

  • A::Array{<:Real,2}: community matrix
  • r::Array{<:Real, 1}: growth vector
  • regularization::Real=0:
  • z_tolerance::Real=-1e-60:
  • iterations::Integer=1e4:

Outputs

  • permanence::Bool: true = permanent, false = not permanent
source
CoexistenceHoles.random_communitymatrixMethod

random_communitymatrix(N, σ, p)

Generates a random community matrix (the "A" matrix in the generalized Lotka-Voltera equation). entries according to a Bernoulli distribution with success rate parameter, p (the entries that are not "populated" are set to 0)

Arguments

  • N::Real: dimension of returned square matrix (N x N)
  • σ::Real: standard deviation of normal distribution used to generate each entry (μ = 0)
  • p::Real: success rate of Bernoulli distribution used to populate the returned matrix
  • seed::Union{Nothing, <:Int}=nothing: if specified, this seed will be used in the random number generator, allowing reproducibility

Output

  • community_matrix::Array{<:Real,2}

See also: randomize_communitymatrix

source
CoexistenceHoles.random_growthvectorMethod

random_growthvector(N, μ, σ; seed=nothing)

Generates a random growth vector (the "r" vector in the generalized Lotka-Voltera equation)

Arguments

  • N::Real: length of returned growth vector
  • μ::Real: mean of LogNormal distribution used to generate each value
  • σ::Real: standard deviation of LogNormal distribution used to generate each value
  • seed::Union{Nothing, <:Int}=nothing: if specified, this seed will be used in the random number generator, allowing reproducibility

Output

  • growth_vector::Array{<:Real,1}

See also: randomize_growthvector

source
CoexistenceHoles.randomize_communitymatrixMethod

randomize_communitymatrix(A; <keyword arguments>)

Arguments

  • r::Array{<:Real,2}: growth vector (this can be generated randomly by random_growthvector)
  • method::String="shuffle": will return a randomized community matrix using one of the following methods
    • "shuffle": shuffles all of the entries except for the ones on the diagonals
    • "preserve_sign_shuffle": same as "shuffle" but the signs are not modified
  • seed::Union{Nothing, <:Int}=nothing: if specified, this seed will be used in the random number generator, allowing reproducibility

Output

  • community_matrix::Array{<:Real,2}

See also: random_communitymatrix

source
CoexistenceHoles.randomize_growthvectorMethod

randomize_growthvector(r; <keyword arguments>)

Arguments

  • r::Array{<:Real,1}: growth vector (this can be generated randomly by random_growthvector)
  • method::String="preserve_norm": will return a randomized growthvector using one of the following methods
    • "preserve_norm": generated using a normal distribution for each entry, and then scaled to have the same norm as growth vector input (r)
    • "shuffle": randomly permute growth vector input (r)
    • "sample": randomly sample (with replacement) entries of growth vector input (r)
    • "preserve_sign_shuffle": same as "shuffle" but the signs are not modified
    • "preserve_sign_sample": same as "sample" but the signs are not modified
  • seed::Union{Nothing, <:Int}=nothing: if specified, this seed will be used in the random number generator, allowing reproducibility

Output

  • growth_vector::Array{<:Real,1}

See also: random_growthvector

source