Function Glossary
CoexistenceHoles.assembly_hypergraph_GLVCoexistenceHoles.betti_hypergraph_ripscomplexCoexistenceHoles.disassembly_hypergraphCoexistenceHoles.hypergraph_subdivideCoexistenceHoles.is_GLVlocallystableCoexistenceHoles.is_GLVpermanentCoexistenceHoles.minimal_simplicial_complexCoexistenceHoles.random_communitymatrixCoexistenceHoles.random_growthvectorCoexistenceHoles.randomize_communitymatrixCoexistenceHoles.randomize_growthvectorCoexistenceHoles.read_hypergraphCoexistenceHoles.save_hypergraph_dat
CoexistenceHoles.assembly_hypergraph_GLV — MethodassemblyhypergraphGLV(A,r; <keyword arguments>) Computes the assembly hypergraph for (A,r).
Arguments
A::Array{<:Real,2}: community matrixr::Array{<:Real, 1}: growth vectormethod::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
CoexistenceHoles.betti_hypergraph_ripscomplex — Methodbettihypergraphripscomplex(H; max_dim = 3)
Computes Betti numbers of hypergraph. Based on computing the hypergraph subdivision without expansion, which returns the inclusion graph
CoexistenceHoles.disassembly_hypergraph — Methoddisassembly_hypergraph(hypergraph)
CoexistenceHoles.hypergraph_subdivide — Methodhypergraph_subdivide(H; expansion = false)
CoexistenceHoles.is_GLVlocallystable — Methodis_GLVlocallystable(A, r)
Computes if the pair (A,r) has a feasible interior equilibrium that is stable.
Arguments
A::Array{Real,2}: community matrixr::Array{Real, 1}: growth vector
Outputs
stability::Bool: true = stable, false = not stable
CoexistenceHoles.is_GLVpermanent — Methodis_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 matrixr::Array{<:Real, 1}: growth vectorregularization::Real=0:z_tolerance::Real=-1e-60:iterations::Integer=1e4:
Outputs
permanence::Bool: true = permanent, false = not permanent
CoexistenceHoles.minimal_simplicial_complex — Methodminimalsimplicialcomplex(hypergraph)
Computes the minimal simplicial complex containig the hypergraph H
CoexistenceHoles.random_communitymatrix — Methodrandom_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 matrixseed::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
CoexistenceHoles.random_growthvector — Methodrandom_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 valueseed::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
CoexistenceHoles.randomize_communitymatrix — Methodrandomize_communitymatrix(A; <keyword arguments>)
Arguments
r::Array{<:Real,2}: growth vector (this can be generated randomly byrandom_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
CoexistenceHoles.randomize_growthvector — Methodrandomize_growthvector(r; <keyword arguments>)
Arguments
r::Array{<:Real,1}: growth vector (this can be generated randomly byrandom_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
CoexistenceHoles.read_hypergraph — Methodread_hypergraph(filename)
CoexistenceHoles.save_hypergraph_dat — Methodsavehypergraphdat(file, H)
Saves the hypergraph H into file as a list of hyperedges
Arguments
file::String: full file name (including the path where you want to save it)H::Array{Array{Int64,1},1}: hypergraph
See also: assembly_hypergraph_GLV