test_class.file: androidplot-core/src/test/java/com/androidplot/xy/SampledXYSeriesTest.java
test_class.identifier: SampledXYSeriesTest
test_class.superclass: extends AndroidplotTest
test_case.body: @Test
      public void testSetZoomFactor() throws Exception {
          XYSeries rawData = TestUtils.generateXYSeries("my series", 2000);
          SampledXYSeries sampledXYSeries = spy(new SampledXYSeries(rawData, 2, 100));
          sampledXYSeries.setZoomFactor(2);
          assertEquals(1000, sampledXYSeries.size());
          sampledXYSeries.setZoomFactor(4);
          assertEquals(500, sampledXYSeries.size());
          sampledXYSeries.setZoomFactor(8);
          assertEquals(250, sampledXYSeries.size());
          sampledXYSeries.setZoomFactor(16);
          assertEquals(125, sampledXYSeries.size());
      }
test_case.class_method_signature: SampledXYSeriesTest.testSetZoomFactor()
test_case.full_signature: @Test public void testSetZoomFactor()
test_case.identifier: testSetZoomFactor
test_case.invocations: generateXYSeries spy setZoomFactor assertEquals size setZoomFactor assertEquals size setZoomFactor assertEquals size setZoomFactor assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetZoomFactor()
focal_class.declarator: threshold
focal_class.modifier: private
focal_class.original_string: private int threshold;
focal_class.type: int
focal_class.var_name: threshold
focal_class.declarator: algorithm = new LTTBSampler()
focal_class.modifier: private
focal_class.original_string: private Sampler algorithm = new LTTBSampler();
focal_class.type: Sampler
focal_class.var_name: algorithm
focal_class.declarator: rawData
focal_class.modifier: private
focal_class.original_string: private XYSeries rawData;
focal_class.type: XYSeries
focal_class.var_name: rawData
focal_class.declarator: zoomLevels
focal_class.modifier: private
focal_class.original_string: private List<EditableXYSeries> zoomLevels;
focal_class.type: List<EditableXYSeries>
focal_class.var_name: zoomLevels
focal_class.declarator: activeSeries
focal_class.modifier: private
focal_class.original_string: private XYSeries activeSeries;
focal_class.type: XYSeries
focal_class.var_name: activeSeries
focal_class.declarator: bounds
focal_class.modifier: private
focal_class.original_string: private RectRegion bounds;
focal_class.type: RectRegion
focal_class.var_name: bounds
focal_class.declarator: lastResamplingException
focal_class.modifier: private
focal_class.original_string: private Exception lastResamplingException;
focal_class.type: Exception
focal_class.var_name: lastResamplingException
focal_class.declarator: xOrder
focal_class.modifier: private final
focal_class.original_string: private final XOrder xOrder;
focal_class.type: XOrder
focal_class.var_name: xOrder
focal_class.declarator: ratio
focal_class.modifier: private
focal_class.original_string: private float ratio;
focal_class.type: float
focal_class.var_name: ratio
focal_class.file: androidplot-core/src/main/java/com/androidplot/xy/SampledXYSeries.java
focal_class.identifier: SampledXYSeries
focal_class.interfaces: implements FastXYSeries, OrderedXYSeries
focal_class.class_method_signature: SampledXYSeries.SampledXYSeries(XYSeries rawData, XOrder xOrder, float ratio, int threshold)
focal_class.full_signature: public  SampledXYSeries(XYSeries rawData, XOrder xOrder, float ratio, int threshold)
focal_class.identifier: SampledXYSeries
focal_class.modifiers: public
focal_class.parameters: (XYSeries rawData, XOrder xOrder, float ratio, int threshold)
focal_class.signature:  SampledXYSeries(XYSeries rawData, XOrder xOrder, float ratio, int threshold)
focal_class.class_method_signature: SampledXYSeries.SampledXYSeries(XYSeries rawData, float ratio, int threshold)
focal_class.full_signature: public  SampledXYSeries(XYSeries rawData, float ratio, int threshold)
focal_class.identifier: SampledXYSeries
focal_class.modifiers: public
focal_class.parameters: (XYSeries rawData, float ratio, int threshold)
focal_class.signature:  SampledXYSeries(XYSeries rawData, float ratio, int threshold)
focal_class.class_method_signature: SampledXYSeries.resample()
focal_class.full_signature: public void resample()
focal_class.identifier: resample
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void resample()
focal_class.class_method_signature: SampledXYSeries.getZoomLevels()
focal_class.full_signature: protected List<EditableXYSeries> getZoomLevels()
focal_class.identifier: getZoomLevels
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: List<EditableXYSeries>
focal_class.signature: List<EditableXYSeries> getZoomLevels()
focal_class.class_method_signature: SampledXYSeries.setZoomFactor(double factor)
focal_class.full_signature: public void setZoomFactor(double factor)
focal_class.identifier: setZoomFactor
focal_class.modifiers: public
focal_class.parameters: (double factor)
focal_class.return: void
focal_class.signature: void setZoomFactor(double factor)
focal_class.class_method_signature: SampledXYSeries.getZoomIndex(double zoomFactor, double ratio)
focal_class.full_signature: protected static int getZoomIndex(double zoomFactor, double ratio)
focal_class.identifier: getZoomIndex
focal_class.modifiers: protected static
focal_class.parameters: (double zoomFactor, double ratio)
focal_class.return: int
focal_class.signature: int getZoomIndex(double zoomFactor, double ratio)
focal_class.class_method_signature: SampledXYSeries.getMaxZoomFactor()
focal_class.full_signature: public double getMaxZoomFactor()
focal_class.identifier: getMaxZoomFactor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getMaxZoomFactor()
focal_class.class_method_signature: SampledXYSeries.getAlgorithm()
focal_class.full_signature: public Sampler getAlgorithm()
focal_class.identifier: getAlgorithm
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Sampler
focal_class.signature: Sampler getAlgorithm()
focal_class.class_method_signature: SampledXYSeries.setAlgorithm(Sampler algorithm)
focal_class.full_signature: public void setAlgorithm(Sampler algorithm)
focal_class.identifier: setAlgorithm
focal_class.modifiers: public
focal_class.parameters: (Sampler algorithm)
focal_class.return: void
focal_class.signature: void setAlgorithm(Sampler algorithm)
focal_class.class_method_signature: SampledXYSeries.getTitle()
focal_class.full_signature: @Override public String getTitle()
focal_class.identifier: getTitle
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTitle()
focal_class.class_method_signature: SampledXYSeries.size()
focal_class.full_signature: @Override public int size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: SampledXYSeries.getX(int index)
focal_class.full_signature: @Override public Number getX(int index)
focal_class.identifier: getX
focal_class.modifiers: @Override public
focal_class.parameters: (int index)
focal_class.return: Number
focal_class.signature: Number getX(int index)
focal_class.class_method_signature: SampledXYSeries.getY(int index)
focal_class.full_signature: @Override public Number getY(int index)
focal_class.identifier: getY
focal_class.modifiers: @Override public
focal_class.parameters: (int index)
focal_class.return: Number
focal_class.signature: Number getY(int index)
focal_class.class_method_signature: SampledXYSeries.getThreshold()
focal_class.full_signature: public int getThreshold()
focal_class.identifier: getThreshold
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getThreshold()
focal_class.class_method_signature: SampledXYSeries.setThreshold(int threshold)
focal_class.full_signature: public void setThreshold(int threshold)
focal_class.identifier: setThreshold
focal_class.modifiers: public
focal_class.parameters: (int threshold)
focal_class.return: void
focal_class.signature: void setThreshold(int threshold)
focal_class.class_method_signature: SampledXYSeries.getBounds()
focal_class.full_signature: public RectRegion getBounds()
focal_class.identifier: getBounds
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: RectRegion
focal_class.signature: RectRegion getBounds()
focal_class.class_method_signature: SampledXYSeries.setBounds(RectRegion bounds)
focal_class.full_signature: public void setBounds(RectRegion bounds)
focal_class.identifier: setBounds
focal_class.modifiers: public
focal_class.parameters: (RectRegion bounds)
focal_class.return: void
focal_class.signature: void setBounds(RectRegion bounds)
focal_class.class_method_signature: SampledXYSeries.minMax()
focal_class.full_signature: @Override public RectRegion minMax()
focal_class.identifier: minMax
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: RectRegion
focal_class.signature: RectRegion minMax()
focal_class.class_method_signature: SampledXYSeries.getXOrder()
focal_class.full_signature: @Override public XOrder getXOrder()
focal_class.identifier: getXOrder
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: XOrder
focal_class.signature: XOrder getXOrder()
focal_class.class_method_signature: SampledXYSeries.getRatio()
focal_class.full_signature: public float getRatio()
focal_class.identifier: getRatio
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getRatio()
focal_class.class_method_signature: SampledXYSeries.setRatio(float ratio)
focal_class.full_signature: public void setRatio(float ratio)
focal_class.identifier: setRatio
focal_class.modifiers: public
focal_class.parameters: (float ratio)
focal_class.return: void
focal_class.signature: void setRatio(float ratio)
focal_method.body: 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);
              }
          }
      }
focal_method.class_method_signature: SampledXYSeries.setZoomFactor(double factor)
focal_method.full_signature: public void setZoomFactor(double factor)
focal_method.identifier: setZoomFactor
focal_method.invocations: getZoomIndex getRatio size get get size
focal_method.modifiers: public
focal_method.parameters: (double factor)
focal_method.return: void
focal_method.signature: void setZoomFactor(double factor)