test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/frequency/CountMinSketchAltTest.java
test_class.identifier: CountMinSketchAltTest
test_case.body: @Test(expected = CMSMergeException.class)
      public void testUncompatibleMerge() throws CMSMergeException
      {
          CountMinSketchAlt cms1 = new CountMinSketchAlt(1, 1, 0);
          CountMinSketchAlt cms2 = new CountMinSketchAlt(0.1, 0.1, 0);
          CountMinSketchAlt.merge(cms1, cms2);
      }
test_case.class_method_signature: CountMinSketchAltTest.testUncompatibleMerge()
test_case.full_signature: @Test(expected = CMSMergeException.class) public void testUncompatibleMerge()
test_case.identifier: testUncompatibleMerge
test_case.invocations: merge
test_case.modifiers: @Test(expected = CMSMergeException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUncompatibleMerge()
focal_class.declarator: PRIME_MODULUS = (1L << 31) - 1
focal_class.modifier: public static final
focal_class.original_string: public static final long PRIME_MODULUS = (1L << 31) - 1;
focal_class.type: long
focal_class.var_name: PRIME_MODULUS
focal_class.declarator: depth
focal_class.modifier: private
focal_class.original_string: private int depth;
focal_class.type: int
focal_class.var_name: depth
focal_class.declarator: width
focal_class.modifier: private
focal_class.original_string: private int width;
focal_class.type: int
focal_class.var_name: width
focal_class.declarator: table
focal_class.modifier: private
focal_class.original_string: private long[][] table;
focal_class.type: long[][]
focal_class.var_name: table
focal_class.declarator: hashA
focal_class.modifier: private
focal_class.original_string: private long[] hashA;
focal_class.type: long[]
focal_class.var_name: hashA
focal_class.declarator: size
focal_class.modifier: private
focal_class.original_string: private long size;
focal_class.type: long
focal_class.var_name: size
focal_class.declarator: eps
focal_class.modifier: private
focal_class.original_string: private double eps;
focal_class.type: double
focal_class.var_name: eps
focal_class.declarator: confidence
focal_class.modifier: private
focal_class.original_string: private double confidence;
focal_class.type: double
focal_class.var_name: confidence
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/frequency/CountMinSketchAlt.java
focal_class.identifier: CountMinSketchAlt
focal_class.interfaces: implements ISimpleFrequency<Object>
focal_class.class_method_signature: CountMinSketchAlt.CountMinSketchAlt()
focal_class.full_signature: private  CountMinSketchAlt()
focal_class.identifier: CountMinSketchAlt
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  CountMinSketchAlt()
focal_class.class_method_signature: CountMinSketchAlt.CountMinSketchAlt(int depth, int width, int seed)
focal_class.full_signature: public  CountMinSketchAlt(int depth, int width, int seed)
focal_class.identifier: CountMinSketchAlt
focal_class.modifiers: public
focal_class.parameters: (int depth, int width, int seed)
focal_class.signature:  CountMinSketchAlt(int depth, int width, int seed)
focal_class.class_method_signature: CountMinSketchAlt.CountMinSketchAlt(double epsOfTotalCount, double confidence, int seed)
focal_class.full_signature: public  CountMinSketchAlt(double epsOfTotalCount, double confidence, int seed)
focal_class.identifier: CountMinSketchAlt
focal_class.modifiers: public
focal_class.parameters: (double epsOfTotalCount, double confidence, int seed)
focal_class.signature:  CountMinSketchAlt(double epsOfTotalCount, double confidence, int seed)
focal_class.class_method_signature: CountMinSketchAlt.CountMinSketchAlt(int depth, int width, int size, long[] hashA, long[][] table)
focal_class.full_signature: private  CountMinSketchAlt(int depth, int width, int size, long[] hashA, long[][] table)
focal_class.identifier: CountMinSketchAlt
focal_class.modifiers: private
focal_class.parameters: (int depth, int width, int size, long[] hashA, long[][] table)
focal_class.signature:  CountMinSketchAlt(int depth, int width, int size, long[] hashA, long[][] table)
focal_class.class_method_signature: CountMinSketchAlt.initTablesWith(int depth, int width, int seed)
focal_class.full_signature: private void initTablesWith(int depth, int width, int seed)
focal_class.identifier: initTablesWith
focal_class.modifiers: private
focal_class.parameters: (int depth, int width, int seed)
focal_class.return: void
focal_class.signature: void initTablesWith(int depth, int width, int seed)
focal_class.class_method_signature: CountMinSketchAlt.getRelativeError()
focal_class.full_signature: public double getRelativeError()
focal_class.identifier: getRelativeError
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getRelativeError()
focal_class.class_method_signature: CountMinSketchAlt.getConfidence()
focal_class.full_signature: public double getConfidence()
focal_class.identifier: getConfidence
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getConfidence()
focal_class.class_method_signature: CountMinSketchAlt.hash(long item, int i)
focal_class.full_signature: private int hash(long item, int i)
focal_class.identifier: hash
focal_class.modifiers: private
focal_class.parameters: (long item, int i)
focal_class.return: int
focal_class.signature: int hash(long item, int i)
focal_class.class_method_signature: CountMinSketchAlt.add(Object item)
focal_class.full_signature: @Override public boolean add(Object item)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (Object item)
focal_class.return: boolean
focal_class.signature: boolean add(Object item)
focal_class.class_method_signature: CountMinSketchAlt.add(Object item, long count)
focal_class.full_signature: @Override public boolean add(Object item, long count)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (Object item, long count)
focal_class.return: boolean
focal_class.signature: boolean add(Object item, long count)
focal_class.class_method_signature: CountMinSketchAlt.estimateCount(Object item)
focal_class.full_signature: @Override public long estimateCount(Object item)
focal_class.identifier: estimateCount
focal_class.modifiers: @Override public
focal_class.parameters: (Object item)
focal_class.return: long
focal_class.signature: long estimateCount(Object item)
focal_class.class_method_signature: CountMinSketchAlt.size()
focal_class.full_signature: @Override public long size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long size()
focal_class.class_method_signature: CountMinSketchAlt.addLong(long item, long count)
focal_class.full_signature: private void addLong(long item, long count)
focal_class.identifier: addLong
focal_class.modifiers: private
focal_class.parameters: (long item, long count)
focal_class.return: void
focal_class.signature: void addLong(long item, long count)
focal_class.class_method_signature: CountMinSketchAlt.estimateCountLong(long item)
focal_class.full_signature: private long estimateCountLong(long item)
focal_class.identifier: estimateCountLong
focal_class.modifiers: private
focal_class.parameters: (long item)
focal_class.return: long
focal_class.signature: long estimateCountLong(long item)
focal_class.class_method_signature: CountMinSketchAlt.merge(CountMinSketchAlt... estimators)
focal_class.full_signature: public static CountMinSketchAlt merge(CountMinSketchAlt... estimators)
focal_class.identifier: merge
focal_class.modifiers: public static
focal_class.parameters: (CountMinSketchAlt... estimators)
focal_class.return: CountMinSketchAlt
focal_class.signature: CountMinSketchAlt merge(CountMinSketchAlt... estimators)
focal_class.class_method_signature: CountMinSketchAlt.serialize(CountMinSketchAlt sketch)
focal_class.full_signature: public static byte[] serialize(CountMinSketchAlt sketch)
focal_class.identifier: serialize
focal_class.modifiers: public static
focal_class.parameters: (CountMinSketchAlt sketch)
focal_class.return: byte[]
focal_class.signature: byte[] serialize(CountMinSketchAlt sketch)
focal_class.class_method_signature: CountMinSketchAlt.deserialize(byte[] data)
focal_class.full_signature: public static CountMinSketchAlt deserialize(byte[] data)
focal_class.identifier: deserialize
focal_class.modifiers: public static
focal_class.parameters: (byte[] data)
focal_class.return: CountMinSketchAlt
focal_class.signature: CountMinSketchAlt deserialize(byte[] data)
focal_class.class_method_signature: CountMinSketchAlt.contains(Object item)
focal_class.full_signature: public boolean contains(Object item)
focal_class.identifier: contains
focal_class.modifiers: public
focal_class.parameters: (Object item)
focal_class.return: boolean
focal_class.signature: boolean contains(Object item)
focal_method.body: public static CountMinSketchAlt merge(CountMinSketchAlt... estimators) throws CMSMergeException {
          CountMinSketchAlt merged = null;
          if (estimators != null && estimators.length > 0) {
              int depth = estimators[0].depth;
              int width = estimators[0].width;
              long[] hashA = Arrays.copyOf(estimators[0].hashA, estimators[0].hashA.length);
  
              long[][] table = new long[depth][width];
              int size = 0;
  
              for (CountMinSketchAlt estimator : estimators) {
                  if (estimator.depth != depth) {
                      throw new CMSMergeException("Cannot merge estimators of different depth");
                  }
                  if (estimator.width != width) {
                      throw new CMSMergeException("Cannot merge estimators of different width");
                  }
                  if (!Arrays.equals(estimator.hashA, hashA)) {
                      throw new CMSMergeException("Cannot merge estimators of different seed");
                  }
  
                  for (int i = 0; i < table.length; i++) {
                      for (int j = 0; j < table[i].length; j++) {
                          table[i][j] += estimator.table[i][j];
                      }
                  }
                  size += estimator.size;
              }
  
              merged = new CountMinSketchAlt(depth, width, size, hashA, table);
          }
  
          return merged;
      }
focal_method.class_method_signature: CountMinSketchAlt.merge(CountMinSketchAlt... estimators)
focal_method.full_signature: public static CountMinSketchAlt merge(CountMinSketchAlt... estimators)
focal_method.identifier: merge
focal_method.invocations: copyOf equals
focal_method.modifiers: public static
focal_method.parameters: (CountMinSketchAlt... estimators)
focal_method.return: CountMinSketchAlt
focal_method.signature: CountMinSketchAlt merge(CountMinSketchAlt... estimators)