test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/cardinality/RegisterSetTest.java
test_class.identifier: RegisterSetTest
test_case.body: @Test
      public void testMerge()
      {
          Random rand = new Random(2);
          int count = 32;
          RegisterSet rs = new RegisterSet(count);
          RegisterSet[] rss = new RegisterSet[5];
  
          for (int i = 0; i < rss.length; i++)
          {
              rss[i] = new RegisterSet(count);
  
              for (int pos = 0; pos < rs.count; pos++)
              {
                  int val = rand.nextInt(10);
                  rs.updateIfGreater(pos, val);
                  rss[i].set(pos, val);
              }
          }
  
          RegisterSet merged = new RegisterSet(count);
          for (int i = 0; i < rss.length; i++)
          {
             merged.merge(rss[i]);
          }
  
          for (int pos = 0; pos < rs.count; pos++)
          {
              assertEquals(rs.get(pos), merged.get(pos));
          }
      }
test_case.class_method_signature: RegisterSetTest.testMerge()
test_case.full_signature: @Test public void testMerge()
test_case.identifier: testMerge
test_case.invocations: nextInt updateIfGreater set merge assertEquals get get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMerge()
focal_class.declarator: LOG2_BITS_PER_WORD = 6
focal_class.modifier: public final static
focal_class.original_string: public final static int LOG2_BITS_PER_WORD = 6;
focal_class.type: int
focal_class.var_name: LOG2_BITS_PER_WORD
focal_class.declarator: REGISTER_SIZE = 5
focal_class.modifier: public final static
focal_class.original_string: public final static int REGISTER_SIZE = 5;
focal_class.type: int
focal_class.var_name: REGISTER_SIZE
focal_class.declarator: count
focal_class.modifier: public final
focal_class.original_string: public final int count;
focal_class.type: int
focal_class.var_name: count
focal_class.declarator: size
focal_class.modifier: public final
focal_class.original_string: public final int size;
focal_class.type: int
focal_class.var_name: size
focal_class.declarator: M
focal_class.modifier: private final
focal_class.original_string: private final int[] M;
focal_class.type: int[]
focal_class.var_name: M
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/cardinality/RegisterSet.java
focal_class.identifier: RegisterSet
focal_class.class_method_signature: RegisterSet.RegisterSet(int count)
focal_class.full_signature: public  RegisterSet(int count)
focal_class.identifier: RegisterSet
focal_class.modifiers: public
focal_class.parameters: (int count)
focal_class.signature:  RegisterSet(int count)
focal_class.class_method_signature: RegisterSet.RegisterSet(int count, int[] initialValues)
focal_class.full_signature: public  RegisterSet(int count, int[] initialValues)
focal_class.identifier: RegisterSet
focal_class.modifiers: public
focal_class.parameters: (int count, int[] initialValues)
focal_class.signature:  RegisterSet(int count, int[] initialValues)
focal_class.class_method_signature: RegisterSet.getBits(int count)
focal_class.full_signature: public static int getBits(int count)
focal_class.identifier: getBits
focal_class.modifiers: public static
focal_class.parameters: (int count)
focal_class.return: int
focal_class.signature: int getBits(int count)
focal_class.class_method_signature: RegisterSet.getSizeForCount(int count)
focal_class.full_signature: public static int getSizeForCount(int count)
focal_class.identifier: getSizeForCount
focal_class.modifiers: public static
focal_class.parameters: (int count)
focal_class.return: int
focal_class.signature: int getSizeForCount(int count)
focal_class.class_method_signature: RegisterSet.set(int position, int value)
focal_class.full_signature: public void set(int position, int value)
focal_class.identifier: set
focal_class.modifiers: public
focal_class.parameters: (int position, int value)
focal_class.return: void
focal_class.signature: void set(int position, int value)
focal_class.class_method_signature: RegisterSet.get(int position)
focal_class.full_signature: public int get(int position)
focal_class.identifier: get
focal_class.modifiers: public
focal_class.parameters: (int position)
focal_class.return: int
focal_class.signature: int get(int position)
focal_class.class_method_signature: RegisterSet.updateIfGreater(int position, int value)
focal_class.full_signature: public boolean updateIfGreater(int position, int value)
focal_class.identifier: updateIfGreater
focal_class.modifiers: public
focal_class.parameters: (int position, int value)
focal_class.return: boolean
focal_class.signature: boolean updateIfGreater(int position, int value)
focal_class.class_method_signature: RegisterSet.merge(RegisterSet that)
focal_class.full_signature: public void merge(RegisterSet that)
focal_class.identifier: merge
focal_class.modifiers: public
focal_class.parameters: (RegisterSet that)
focal_class.return: void
focal_class.signature: void merge(RegisterSet that)
focal_class.class_method_signature: RegisterSet.readOnlyBits()
focal_class.full_signature:  int[] readOnlyBits()
focal_class.identifier: readOnlyBits
focal_class.parameters: ()
focal_class.return: int[]
focal_class.signature: int[] readOnlyBits()
focal_class.class_method_signature: RegisterSet.bits()
focal_class.full_signature: public int[] bits()
focal_class.identifier: bits
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int[]
focal_class.signature: int[] bits()
focal_method.body: public void merge(RegisterSet that)
      {
          for (int bucket = 0; bucket < M.length; bucket++)
          {
              int word = 0;
              for (int j = 0; j < LOG2_BITS_PER_WORD; j++)
              {
                  int mask = 0x1f << (REGISTER_SIZE * j);
  
                  int thisVal = (this.M[bucket] & mask);
                  int thatVal = (that.M[bucket] & mask);
                  word |= (thisVal < thatVal) ? thatVal : thisVal;
              }
              this.M[bucket] = word;
          }
      }
focal_method.class_method_signature: RegisterSet.merge(RegisterSet that)
focal_method.full_signature: public void merge(RegisterSet that)
focal_method.identifier: merge
focal_method.modifiers: public
focal_method.parameters: (RegisterSet that)
focal_method.return: void
focal_method.signature: void merge(RegisterSet that)