test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/quantile/Frugal2UTest.java
test_class.identifier: Frugal2UTest
test_case.body: @Test
      public void testOffer() throws QuantilesException {
          System.out.println("offer");
  
          double[] quantiles = new double[]{0.05, 0.25, 0.5, 0.75, 0.95};
          Frugal2U instance = new Frugal2U(quantiles, 0);
          ExactQuantilesAll<Integer> exact = new ExactQuantilesAll<Integer>();
          
          RandomEngine r = new MersenneTwister64(0);
          Normal dist = new Normal(100, 50, r);
          int numSamples = 1000;
                  
          for(int i = 0; i < numSamples; ++i) {
              int num = (int) Math.max(0, dist.nextDouble());
              instance.offer(num);
              exact.offer(num);
          }
          
          System.out.println("Q\tEst\tExact");
          for (double q : quantiles) {
              System.out.println(q + "\t" + instance.getQuantile(q) + "\t" + exact.getQuantile(q));
          }
          
          
      }
test_case.class_method_signature: Frugal2UTest.testOffer()
test_case.full_signature: @Test public void testOffer()
test_case.identifier: testOffer
test_case.invocations: println max nextDouble offer offer println println getQuantile getQuantile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOffer()
focal_class.declarator: quantiles[]
focal_class.modifier: private final
focal_class.original_string: private final Quantile quantiles[];
focal_class.type: Quantile
focal_class.var_name: quantiles
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/quantile/Frugal2U.java
focal_class.identifier: Frugal2U
focal_class.interfaces: implements IQuantiles<Integer>
focal_class.class_method_signature: Frugal2U.Frugal2U(Quantile[] quantiles)
focal_class.full_signature: public  Frugal2U(Quantile[] quantiles)
focal_class.identifier: Frugal2U
focal_class.modifiers: public
focal_class.parameters: (Quantile[] quantiles)
focal_class.signature:  Frugal2U(Quantile[] quantiles)
focal_class.class_method_signature: Frugal2U.Frugal2U(double[] quantiles, int initialEstimate)
focal_class.full_signature: public  Frugal2U(double[] quantiles, int initialEstimate)
focal_class.identifier: Frugal2U
focal_class.modifiers: public
focal_class.parameters: (double[] quantiles, int initialEstimate)
focal_class.signature:  Frugal2U(double[] quantiles, int initialEstimate)
focal_class.class_method_signature: Frugal2U.offer(Integer value)
focal_class.full_signature: @Override public void offer(Integer value)
focal_class.identifier: offer
focal_class.modifiers: @Override public
focal_class.parameters: (Integer value)
focal_class.return: void
focal_class.signature: void offer(Integer value)
focal_class.class_method_signature: Frugal2U.getQuantile(double q)
focal_class.full_signature: @Override public Integer getQuantile(double q)
focal_class.identifier: getQuantile
focal_class.modifiers: @Override public
focal_class.parameters: (double q)
focal_class.return: Integer
focal_class.signature: Integer getQuantile(double q)
focal_method.body: @Override
      public void offer(Integer value) {
          for (Quantile q : quantiles) {
              q.insert(value);
          }
      }
focal_method.class_method_signature: Frugal2U.offer(Integer value)
focal_method.full_signature: @Override public void offer(Integer value)
focal_method.identifier: offer
focal_method.invocations: insert
focal_method.modifiers: @Override public
focal_method.parameters: (Integer value)
focal_method.return: void
focal_method.signature: void offer(Integer value)