endas.localization.CoordinateSystem¶
-
class
endas.localization.CoordinateSystem¶ Bases:
objectCoordinate system abstraction.
Each coordinate system is characterized by its dimension (i.e. the number of components each coordinate takes) and must provide a distance metric via the distance() method.
-
ndim¶ Returns the number of dimensions.
-
is_cartesian¶ Returns
Trueif this is a Cartesian coordinate system.
-
distance(A, B, out=None)¶ Implements distance metric for this coordinate system.
The method computes distance between pairs of points in sets A and B. The dimension of each point must be equal to
self.ndimand are stored row-wise. Therefore, the sets A and B must be arrays of shape (n, ndim), where n is the number of points to process.Parameters: - B (A,) – n x ndim arrays containing
ncoordinates in the setsAandB - out – Existing array of length
nwhere the result should be stored, is possible. IfNoneis given, new array is allocated.
Returns: Array of length n containing the computed distances.
- B (A,) – n x ndim arrays containing
-