Package com.ggalmazor.ltdownsampling
Class LTThreeBuckets
java.lang.Object
com.ggalmazor.ltdownsampling.LTThreeBuckets
The LTThreeBuckets class is the main entry point to this library.
None of the methods in this class will mutate input lists or their elements.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a downsampled version of the providedinputlist.Returns a downsampled version of the providedinputlist.
-
Method Details
-
sorted
Returns a downsampled version of the providedinputlist.Notes:
- The input list must be sorted.
- This method doesn't mutate the input list or any of its elements.
The output list will have
desiredBuckets + 2elements: one per bucket plus the first and last points of the original series. -
sorted
Returns a downsampled version of the providedinputlist.Notes:
- The input list must be sorted.
- This method doesn't mutate the input list or any of its elements.
The output list will have
desiredBuckets + 2elements: one per bucket plus the first and last points of the original series.When the input contains
DoublePointinstances, an optimised struct-of-arrays path is used: x and y coordinates are extracted into contiguousdouble[]arrays before the selection loop, eliminating per-point pointer chasing in the hot path.When
desiredBucketsexceeds 512, the triangle-selection loop runs in parallel using the commonForkJoinPool.
-