Package com.ggalmazor.ltdownsampling
Interface Point
- All Known Implementing Classes:
DoublePoint
public interface Point
Defines the properties of points that can be processed by
LTThreeBuckets.
Users of this library must use DoublePoint or implement their own subtypes of
this interface.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DoublePointcenterBetween(Point a, Point b) Computes the geometric center point of the segment linking the providedaandbpoints.doublex()Returns the x (horizontal / time) value of this point.doubley()Returns the y (vertical / value) value of this point.
-
Method Details
-
centerBetween
Computes the geometric center point of the segment linking the providedaandbpoints.- Parameters:
a- the first point of the segmentb- the second point of the segment- Returns:
- a
DoublePointin the geometric center between the two provided points
-
x
double x()Returns the x (horizontal / time) value of this point.Contract:
x()must be monotonically non-decreasing across a sorted input list — i.e. for any two consecutive pointsaandbin the list passed toLTThreeBuckets.sorted(java.util.List<T>, int),a.x() <= b.x()must hold. The algorithm does not verify this; violating it produces undefined output.This contract is also required for fixed-size bucketization (
BucketizationStrategy.FIXED), wherex()is used to compute equal-width x-span intervals. Non-monotonic or unorderedx()values will produce incorrect bucket assignments.- Returns:
- the x (horizontal / time) value of this point
-
y
double y()Returns the y (vertical / value) value of this point.- Returns:
- the y (vertical / value) value of this point
-