P
- Point implementation typepublic interface Point<P extends Point<P>> extends Spatial
Implementations of this interface are sufficient to define a space since they define both the structure of the points making up the space and the operations permitted on them. The only mathematical requirement at this level is that the represented space have a defined distance metric, meaning an operation that can compute the distance between two points (ie, the space must be a metric space).
This interface uses self-referencing generic parameters to ensure that implementations are only used with instances of their own type. This removes the need for casting inside of methods in order to access implementation-specific data, such as coordinate values.
Modifier and Type | Method and Description |
---|---|
double |
distance(P p)
Compute the distance between this point and another point.
|
getDimension, isFinite, isInfinite, isNaN
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.