Metrics
EvoId.H_discrete — MethodH_discrete(s)Interconnectedness measure as in Nordbotten 2018 for discrete setup.
EvoId.covgeo — Functioncovgeo(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
EvoId.findclusters — Functionfindclusters(v::Vector,allextrema =true)Returns a tuple with the cluster mean and its associated weight.
EvoId.get_alpha_div — Functionget_alpha_div(world::World,trait=1,average=true)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
EvoId.get_beta_div — Functionget_beta_div(world::Array{U,1},t::Number,trait=1) where U <: Union{Missing,Agent}Variance of the mean of trait per patch
Arguments
EvoId.get_dist_hist — Functionfunction 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.
EvoId.get_local_abundance — Functionget_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
EvoId.get_local_pairwise_average_isolation — Methodfunction 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.
EvoId.get_pairwise_average_isolation — Methodfunction 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.
EvoId.hamming — Methodhamming(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.
Statistics.mean — Methodmean(world::World;trait=1)Returns the mean of the world's trait distribution. If trait = 0, returns the variance of the geotrait,
Statistics.var — Methodvar(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)