Diversity measures

ABMEv.H_discreteMethod
H_discrete(s)

Interconnectedness measure as in Nordbotten 2018 for discrete setup

source
ABMEv.covgeoFunction
covgeo(world::Array{Agent,1},trait = 0)

If trait = 0, returns the variance of the geotrait, knowing that by default it is associated with position trait 1. If trait > 0, returns the covariance matrix, with first row geotrait and second row trait

Notes

This might be deprecated in the future

source
ABMEv.findclustersFunction
findclusters(v::Vector,allextrema =true)

Returns a tuple with the cluster mean and its associated weight

Arguments

source
ABMEv.get_alpha_divFunction
get_alpha_div(world::Array{U,1},t::Number,trait=1) where U <: Union{Missing,Agent}

Mean of the local variance of trait per patch. If trait=0, we get the mean of the local variance of the geotrait If average = false, returns the alpha div for each patch, ordered by vertices

source
ABMEv.get_beta_divFunction
get_beta_div(world::Array{U,1},t::Number,trait=1) where U <: Union{Missing,Agent}

Variance of the mean of trait per patch

Arguments

source
ABMEv.get_dist_histFunction
function get_dist_hist(a1,a2,dist,trait=1,time = 0)

Returns the integral of the distance dist through time of trait between a1.x and a2.x.

\[\int d(x_1,x_2,t)dt\]
source
ABMEv.get_local_abundanceFunction
get_alpha_div(world::Array{U,1},t::Number,trait=1) where U <: Union{Missing,Agent}

Mean of the local variance of trait per patch. If trait=0, we get the mean of the local variance of the geotrait If average = false, returns the alpha div for each patch, ordered by vertices

source
ABMEv.get_local_pairwise_average_isolationMethod
function get_local_pairwise_average_isolation(world,dist,trait=1)

Similar to get_pairwise_average_isolation, but the pairwise distance is calculated within demes. An average of this metrics by deme is return.

source
ABMEv.get_pairwise_average_isolationMethod
function get_pairwise_average_isolation(world;trait=1,trunc=false)

Returns the integrated pairwise squared distance between all agents of world wrt trait. If trunc=true then the distance is truncated to binary value 0 or 1.

source
ABMEv.hammingMethod
function hamming(world::Array{Agent,1})

Returns a matrix H where Hij = hamming(ai,a_j). The hamming distance is taken through the whole history and functional space of the agents.

source
Statistics.meanMethod
function mean(world::World;trait=1)

Returns the mean of the world's trait distribution. If trait = 0, returns the variance of the geotrait,

source
Statistics.varMethod
function var(world::World;trait=1)

Return the variance of the world's trait distribution. If trait = 0, returns the variance of the geotrait, knowing that by default it is associated with position trait 1.

Notes

For now, the variance of a trait defined on a GraphSpace is calculated thanks to the Fiedler vector (cf https://mathworld.wolfram.com/FiedlerVector.html)

source