gridcells.core.common - common/shared definitions¶
common module is a collection of basic classes used
throughout the package:
||A pair of
||Positional information with a constant time step.|
||Calculate a distance between
A pair of
Position2D(x, y, dt)¶
Positional information with a constant time step.
twisted_torus_distance(a, others, dim)¶
Calculate a distance between
otherson a twisted torus.
awhich is a 2D position and others, which is a vector of 2D positions and compute the distances between them based on the topology of the twisted torus.
If you just want to remap a function of (X, Y), set a==[[0, 0]].
Specifies the initial position.
a.ymust be convertible to floats
Positions for which to compute the distance.
Dimensions of the torus.
dim.ymust be convertible to floats.
An array of positions, always of the length of others