class SampledXYSeries implements FastXYSeries, OrderedXYSeries {

    public void setZoomFactor(double factor) {
        if(factor <= 1) {
            activeSeries = rawData;
        } else {
            //int i = (int) Math.round(Math.sqrt(factor) - 1);
            int i = getZoomIndex(factor, getRatio());
            if (i < zoomLevels.size()) {
                activeSeries = zoomLevels.get(i);
            } else {
                activeSeries = zoomLevels.get(zoomLevels.size() - 1);
            }
        }
    }

    public  SampledXYSeries(XYSeries rawData, XOrder xOrder, float ratio, int threshold);
    public  SampledXYSeries(XYSeries rawData, float ratio, int threshold);

}