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 testGetZoomIndex() throws Exception {
          assertEquals(0, SampledXYSeries.getZoomIndex(2, 2));
          assertEquals(1, SampledXYSeries.getZoomIndex(3, 2));
          assertEquals(1, SampledXYSeries.getZoomIndex(4, 2));
          assertEquals(2, SampledXYSeries.getZoomIndex(8, 2));
          assertEquals(2, SampledXYSeries.getZoomIndex(9, 2));
          assertEquals(2, SampledXYSeries.getZoomIndex(10, 2));
          assertEquals(3, SampledXYSeries.getZoomIndex(15, 2));
          assertEquals(3, SampledXYSeries.getZoomIndex(16, 2));
          assertEquals(3, SampledXYSeries.getZoomIndex(17, 2));
          assertEquals(4, SampledXYSeries.getZoomIndex(31, 2));
          assertEquals(4, SampledXYSeries.getZoomIndex(32, 2));
  
          assertEquals(0, SampledXYSeries.getZoomIndex(1, 4));
          assertEquals(0, SampledXYSeries.getZoomIndex(4, 4));
          assertEquals(1, SampledXYSeries.getZoomIndex(15, 4));
          assertEquals(1, SampledXYSeries.getZoomIndex(16, 4));
          assertEquals(1, SampledXYSeries.getZoomIndex(17, 4));
          assertEquals(2, SampledXYSeries.getZoomIndex(63, 4));
          assertEquals(2, SampledXYSeries.getZoomIndex(64, 4));
          assertEquals(2, SampledXYSeries.getZoomIndex(65, 4));
      }
test_case.class_method_signature: SampledXYSeriesTest.testGetZoomIndex()
test_case.full_signature: @Test public void testGetZoomIndex()
test_case.identifier: testGetZoomIndex
test_case.invocations: assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex assertEquals getZoomIndex
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetZoomIndex()
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: protected static int getZoomIndex(double zoomFactor, double ratio) {
          final double lhs = Math.log(zoomFactor);
          final double rhs = Math.log(ratio);
          final double log = lhs / rhs;
          final int index = (int) Math.round(log);
          return index > 0 ? index - 1 : 0;
      }
focal_method.class_method_signature: SampledXYSeries.getZoomIndex(double zoomFactor, double ratio)
focal_method.full_signature: protected static int getZoomIndex(double zoomFactor, double ratio)
focal_method.identifier: getZoomIndex
focal_method.invocations: log log round
focal_method.modifiers: protected static
focal_method.parameters: (double zoomFactor, double ratio)
focal_method.return: int
focal_method.signature: int getZoomIndex(double zoomFactor, double ratio)