test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/cardinality/TestCountThenEstimate.java
test_class.identifier: TestCountThenEstimate
test_case.body: @Test
      public void testTip() throws IOException, ClassNotFoundException
      {
          CountThenEstimate cte = new CountThenEstimate(10000, new LinearCounting.Builder(1024));
          CountThenEstimate clone = new CountThenEstimate(cte.getBytes());
          assertCountThenEstimateEquals(cte, clone);
  
          for (int i = 0; i < 128; i++)
          {
              cte.offer(Integer.toString(i));
          }
  
          clone = new CountThenEstimate(cte.getBytes());
          assertEquals(128, cte.cardinality());
          assertCountThenEstimateEquals(cte, clone);
  
          for (int i = 128; i < 256; i++)
          {
              cte.offer(Integer.toString(i));
          }
  
          clone = new CountThenEstimate(cte.getBytes());
          assertFalse(cte.tipped());
          assertEquals(256, cte.cardinality());
          assertTrue(clone.tipped());
          double error = Math.abs(cte.cardinality() - 256) / 256D;
          assertEquals(0.1, error, 0.1);
  
      }
test_case.class_method_signature: TestCountThenEstimate.testTip()
test_case.full_signature: @Test public void testTip()
test_case.identifier: testTip
test_case.invocations: getBytes assertCountThenEstimateEquals offer toString getBytes assertEquals cardinality assertCountThenEstimateEquals offer toString getBytes assertFalse tipped assertEquals cardinality assertTrue tipped abs cardinality assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTip()
focal_class.declarator: LC = 1
focal_class.modifier: protected final static
focal_class.original_string: protected final static byte LC = 1;
focal_class.type: byte
focal_class.var_name: LC
focal_class.declarator: AC = 2
focal_class.modifier: protected final static
focal_class.original_string: protected final static byte AC = 2;
focal_class.type: byte
focal_class.var_name: AC
focal_class.declarator: HLC = 3
focal_class.modifier: protected final static
focal_class.original_string: protected final static byte HLC = 3;
focal_class.type: byte
focal_class.var_name: HLC
focal_class.declarator: LLC = 4
focal_class.modifier: protected final static
focal_class.original_string: protected final static byte LLC = 4;
focal_class.type: byte
focal_class.var_name: LLC
focal_class.declarator: HLPC = 5
focal_class.modifier: protected final static
focal_class.original_string: protected final static byte HLPC = 5;
focal_class.type: byte
focal_class.var_name: HLPC
focal_class.declarator: tippingPoint
focal_class.modifier: protected
focal_class.original_string: protected int tippingPoint;
focal_class.type: int
focal_class.var_name: tippingPoint
focal_class.declarator: tipped = false
focal_class.modifier: protected
focal_class.original_string: protected boolean tipped = false;
focal_class.type: boolean
focal_class.var_name: tipped
focal_class.declarator: builder
focal_class.modifier: protected
focal_class.original_string: protected IBuilder<IRichCardinality> builder;
focal_class.type: IBuilder<IRichCardinality>
focal_class.var_name: builder
focal_class.declarator: estimator
focal_class.modifier: protected
focal_class.original_string: protected IRichCardinality estimator;
focal_class.type: IRichCardinality
focal_class.var_name: estimator
focal_class.declarator: counter
focal_class.modifier: protected
focal_class.original_string: protected Set<Object> counter;
focal_class.type: Set<Object>
focal_class.var_name: counter
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/cardinality/CountThenEstimate.java
focal_class.identifier: CountThenEstimate
focal_class.interfaces: implements IRichCardinality, Externalizable
focal_class.class_method_signature: CountThenEstimate.CountThenEstimate()
focal_class.full_signature: public  CountThenEstimate()
focal_class.identifier: CountThenEstimate
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  CountThenEstimate()
focal_class.class_method_signature: CountThenEstimate.CountThenEstimate(int tippingPoint, IBuilder<IRichCardinality> builder)
focal_class.full_signature: public  CountThenEstimate(int tippingPoint, IBuilder<IRichCardinality> builder)
focal_class.identifier: CountThenEstimate
focal_class.modifiers: public
focal_class.parameters: (int tippingPoint, IBuilder<IRichCardinality> builder)
focal_class.signature:  CountThenEstimate(int tippingPoint, IBuilder<IRichCardinality> builder)
focal_class.class_method_signature: CountThenEstimate.CountThenEstimate(byte[] bytes)
focal_class.full_signature: public  CountThenEstimate(byte[] bytes)
focal_class.identifier: CountThenEstimate
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.signature:  CountThenEstimate(byte[] bytes)
focal_class.class_method_signature: CountThenEstimate.cardinality()
focal_class.full_signature: @Override public long cardinality()
focal_class.identifier: cardinality
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long cardinality()
focal_class.class_method_signature: CountThenEstimate.offerHashed(long hashedLong)
focal_class.full_signature: @Override public boolean offerHashed(long hashedLong)
focal_class.identifier: offerHashed
focal_class.modifiers: @Override public
focal_class.parameters: (long hashedLong)
focal_class.return: boolean
focal_class.signature: boolean offerHashed(long hashedLong)
focal_class.class_method_signature: CountThenEstimate.offerHashed(int hashedInt)
focal_class.full_signature: @Override public boolean offerHashed(int hashedInt)
focal_class.identifier: offerHashed
focal_class.modifiers: @Override public
focal_class.parameters: (int hashedInt)
focal_class.return: boolean
focal_class.signature: boolean offerHashed(int hashedInt)
focal_class.class_method_signature: CountThenEstimate.offer(Object o)
focal_class.full_signature: @Override public boolean offer(Object o)
focal_class.identifier: offer
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean offer(Object o)
focal_class.class_method_signature: CountThenEstimate.sizeof()
focal_class.full_signature: @Override public int sizeof()
focal_class.identifier: sizeof
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int sizeof()
focal_class.class_method_signature: CountThenEstimate.tip()
focal_class.full_signature: private void tip()
focal_class.identifier: tip
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void tip()
focal_class.class_method_signature: CountThenEstimate.tipped()
focal_class.full_signature: public boolean tipped()
focal_class.identifier: tipped
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean tipped()
focal_class.class_method_signature: CountThenEstimate.getBytes()
focal_class.full_signature: @Override public byte[] getBytes()
focal_class.identifier: getBytes
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getBytes()
focal_class.class_method_signature: CountThenEstimate.readExternal(ObjectInput in)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public void readExternal(ObjectInput in)
focal_class.identifier: readExternal
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (ObjectInput in)
focal_class.return: void
focal_class.signature: void readExternal(ObjectInput in)
focal_class.class_method_signature: CountThenEstimate.writeExternal(ObjectOutput out)
focal_class.full_signature: @Override public void writeExternal(ObjectOutput out)
focal_class.identifier: writeExternal
focal_class.modifiers: @Override public
focal_class.parameters: (ObjectOutput out)
focal_class.return: void
focal_class.signature: void writeExternal(ObjectOutput out)
focal_class.class_method_signature: CountThenEstimate.merge(IRichCardinality... estimators)
focal_class.full_signature: @Override public IRichCardinality merge(IRichCardinality... estimators)
focal_class.identifier: merge
focal_class.modifiers: @Override public
focal_class.parameters: (IRichCardinality... estimators)
focal_class.return: IRichCardinality
focal_class.signature: IRichCardinality merge(IRichCardinality... estimators)
focal_class.class_method_signature: CountThenEstimate.mergeEstimators(CountThenEstimate... estimators)
focal_class.full_signature: public static CountThenEstimate mergeEstimators(CountThenEstimate... estimators)
focal_class.identifier: mergeEstimators
focal_class.modifiers: public static
focal_class.parameters: (CountThenEstimate... estimators)
focal_class.return: CountThenEstimate
focal_class.signature: CountThenEstimate mergeEstimators(CountThenEstimate... estimators)
focal_method.body: private void tip() {
          estimator = builder.build();
  
          for (Object o : counter) {
              estimator.offer(o);
          }
  
          counter = null;
          builder = null;
          tipped = true;
      }
focal_method.class_method_signature: CountThenEstimate.tip()
focal_method.full_signature: private void tip()
focal_method.identifier: tip
focal_method.invocations: build offer
focal_method.modifiers: private
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void tip()