test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/cardinality/KMinValuesTest.java
test_class.identifier: KMinValuesTest
test_case.body: @Test
      public void testOffer() {
          System.out.println("offer");
          KMinValues instance = new KMinValues(20);
          
          System.out.println("Approx.\tReal");
          for (int i=0; i<100; i++) {
              instance.offer(String.valueOf(i));
              System.out.println(instance.cardinality() + "\t" + (i+1));
          }
      }
test_case.class_method_signature: KMinValuesTest.testOffer()
test_case.full_signature: @Test public void testOffer()
test_case.identifier: testOffer
test_case.invocations: println println offer valueOf println cardinality
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOffer()
focal_class.declarator: kMin
focal_class.modifier: private
focal_class.original_string: private TreeSet<Integer> kMin;
focal_class.type: TreeSet<Integer>
focal_class.var_name: kMin
focal_class.declarator: k
focal_class.modifier: private
focal_class.original_string: private int k;
focal_class.type: int
focal_class.var_name: k
focal_class.declarator: hasher
focal_class.modifier: private
focal_class.original_string: private Hash hasher;
focal_class.type: Hash
focal_class.var_name: hasher
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/cardinality/KMinValues.java
focal_class.identifier: KMinValues
focal_class.interfaces: implements IBaseCardinality
focal_class.class_method_signature: KMinValues.KMinValues(int k)
focal_class.full_signature: public  KMinValues(int k)
focal_class.identifier: KMinValues
focal_class.modifiers: public
focal_class.parameters: (int k)
focal_class.signature:  KMinValues(int k)
focal_class.class_method_signature: KMinValues.KMinValues(int k, Hash hasher)
focal_class.full_signature: public  KMinValues(int k, Hash hasher)
focal_class.identifier: KMinValues
focal_class.modifiers: public
focal_class.parameters: (int k, Hash hasher)
focal_class.signature:  KMinValues(int k, Hash hasher)
focal_class.class_method_signature: KMinValues.offer(Object key)
focal_class.full_signature: public boolean offer(Object key)
focal_class.identifier: offer
focal_class.modifiers: public
focal_class.parameters: (Object key)
focal_class.return: boolean
focal_class.signature: boolean offer(Object key)
focal_class.class_method_signature: KMinValues.cardinality()
focal_class.full_signature: public long cardinality()
focal_class.identifier: cardinality
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long cardinality()
focal_class.class_method_signature: KMinValues.union(KMinValues... others)
focal_class.full_signature: public void union(KMinValues... others)
focal_class.identifier: union
focal_class.modifiers: public
focal_class.parameters: (KMinValues... others)
focal_class.return: void
focal_class.signature: void union(KMinValues... others)
focal_class.class_method_signature: KMinValues.jaccard(KMinValues other)
focal_class.full_signature: public double jaccard(KMinValues other)
focal_class.identifier: jaccard
focal_class.modifiers: public
focal_class.parameters: (KMinValues other)
focal_class.return: double
focal_class.signature: double jaccard(KMinValues other)
focal_class.class_method_signature: KMinValues.cardinalityUnion(KMinValues... others)
focal_class.full_signature: public double cardinalityUnion(KMinValues... others)
focal_class.identifier: cardinalityUnion
focal_class.modifiers: public
focal_class.parameters: (KMinValues... others)
focal_class.return: double
focal_class.signature: double cardinalityUnion(KMinValues... others)
focal_class.class_method_signature: KMinValues.cardHelp(TreeSet<Integer> kMin, int k)
focal_class.full_signature: private double cardHelp(TreeSet<Integer> kMin, int k)
focal_class.identifier: cardHelp
focal_class.modifiers: private
focal_class.parameters: (TreeSet<Integer> kMin, int k)
focal_class.return: double
focal_class.signature: double cardHelp(TreeSet<Integer> kMin, int k)
focal_class.class_method_signature: KMinValues.inAll(int item, KMinValues... others)
focal_class.full_signature: private boolean inAll(int item, KMinValues... others)
focal_class.identifier: inAll
focal_class.modifiers: private
focal_class.parameters: (int item, KMinValues... others)
focal_class.return: boolean
focal_class.signature: boolean inAll(int item, KMinValues... others)
focal_class.class_method_signature: KMinValues.directSum(KMinValues... others)
focal_class.full_signature: private DirectSum directSum(KMinValues... others)
focal_class.identifier: directSum
focal_class.modifiers: private
focal_class.parameters: (KMinValues... others)
focal_class.return: DirectSum
focal_class.signature: DirectSum directSum(KMinValues... others)
focal_class.class_method_signature: KMinValues.smallestK(KMinValues... others)
focal_class.full_signature: private int smallestK(KMinValues... others)
focal_class.identifier: smallestK
focal_class.modifiers: private
focal_class.parameters: (KMinValues... others)
focal_class.return: int
focal_class.signature: int smallestK(KMinValues... others)
focal_class.class_method_signature: KMinValues.index(Object key)
focal_class.full_signature: private int index(Object key)
focal_class.identifier: index
focal_class.modifiers: private
focal_class.parameters: (Object key)
focal_class.return: int
focal_class.signature: int index(Object key)
focal_method.body: public boolean offer(Object key) {
          int idx = index(key);
          
          if (kMin.size() < k) {
              if (!kMin.contains(idx)) {
                  kMin.add(idx);
                  return true;
              }
          } else {
              if (idx < kMin.last())
                  if (!kMin.contains(idx)) {
                      kMin.pollLast();
                      kMin.add(idx);
                      return true;
                  }
          }
          
          return false;
      }
focal_method.class_method_signature: KMinValues.offer(Object key)
focal_method.full_signature: public boolean offer(Object key)
focal_method.identifier: offer
focal_method.invocations: index size contains add last contains pollLast add
focal_method.modifiers: public
focal_method.parameters: (Object key)
focal_method.return: boolean
focal_method.signature: boolean offer(Object key)