Description Usage Arguments Details Examples
dist calculates the distance between two individuals, and should be used by the end user for exploring simulation results.
1 2 3 |
a1,a2 |
individuals |
sqDist calculates the squared distance between two individuals. For most application (such as determining neighbors) knowing the square distance is enough, and square roots are computationally expensive. Also, this function does not check for obvious errors (such as the parameters not being individuals, or being individuals from different landscapes), as it is designed to be as efficient as possible.
1 2 3 4 5 | L <- Landscape(bound.condition="p", numb.cells = 50) # x ranges from -25 to 25
S <- Species(L)
a1 <- Individual(S, 25, 25)
a2 <- Individual(S, -20, -20)
sqDist(a1, a2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.