public class LinearDataReducer<X extends Number,Y extends Number> extends Object implements DataReducer<Number,Number>
Constructor and Description |
---|
LinearDataReducer() |
Modifier and Type | Method and Description |
---|---|
List<XYChart.Data<Number,Number>> |
reduce(ChartData<Number,Number> data,
Range<Double> dataRange,
int maxPointsCount)
Reduces the number of data points to be equal or less than specified
maxPointsCount . |
List<XYChart.Data<Number,Number>> |
reduce(double[] xIn,
double[] yIn,
double xMin,
double xMax,
int width_scene)
Algorithm that actually does the work.
|
public List<XYChart.Data<Number,Number>> reduce(ChartData<Number,Number> data, Range<Double> dataRange, int maxPointsCount)
DataReducer
maxPointsCount
.reduce
in interface DataReducer<Number,Number>
data
- data to be reduceddataRange
- range of data (lowerBound and upperBound) from which given data should be reducedmaxPointsCount
- the maximum number of points that the reduced list should containmaxPointsCount
elementspublic List<XYChart.Data<Number,Number>> reduce(double[] xIn, double[] yIn, double xMin, double xMax, int width_scene)
xIn
- x-axis input data (original), must have the same length as yIn
yIn
- y-axis input data (original), must have the same length as xIn
xMin
- lower bound of data to be reduced, given in original x units. By default this is the first value of
xIn, i.e. xIn[0]
xMax
- upper bound of data to be reduced, given in original x units. By default this is last value of xIn,
i.e. xIn[xIn.length-1]
width_scene
- in pixels = number of points the reduced data shall havewidth_scene
elementsCopyright © 2019 CERN. All rights reserved.