test_class.declarator: firstBitVector
test_class.modifier: private static
test_class.original_string: private static BitVector firstBitVector;
test_class.type: BitVector
test_class.var_name: firstBitVector
test_class.declarator: secondBitVector
test_class.modifier: private static
test_class.original_string: private static BitVector secondBitVector;
test_class.type: BitVector
test_class.var_name: secondBitVector
test_class.file: singa-mathematics/src/test/java/bio/singa/mathematics/vectors/BitVectorsTest.java
test_class.identifier: BitVectorsTest
test_case.body: @Test
      void count() {
          Vector count = BitVectors.count(Stream.of(firstBitVector, secondBitVector)
                  .collect(Collectors.toList()));
          assertArrayEquals(new double[]{2.0, 1.0, 1.0, 2.0, 0.0, 1.0}, count.getElements());
      }
test_case.class_method_signature: BitVectorsTest.count()
test_case.full_signature: @Test void count()
test_case.identifier: count
test_case.invocations: count collect of toList assertArrayEquals getElements
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void count()
focal_class.file: singa-mathematics/src/main/java/bio/singa/mathematics/vectors/BitVectors.java
focal_class.identifier: BitVectors
focal_class.class_method_signature: BitVectors.count(List<BitVector> bitVectors)
focal_class.full_signature: public static Vector count(List<BitVector> bitVectors)
focal_class.identifier: count
focal_class.modifiers: public static
focal_class.parameters: (List<BitVector> bitVectors)
focal_class.return: Vector
focal_class.signature: Vector count(List<BitVector> bitVectors)
focal_method.body: public static Vector count(List<BitVector> bitVectors) {
  
          if (bitVectors.stream()
                  .map(BitVector::getDimension)
                  .distinct()
                  .count() != 1) {
              throw new IllegalArgumentException("bit vectors must be of same dimension");
          }
  
          double[] countElements = new double[bitVectors.get(0).getDimension()];
          for (BitVector bitVector : bitVectors) {
              for (int i = 0; i < bitVector.getElements().length; i++) {
                  if (bitVector.getElement(i)) {
                      countElements[i] += 1.0;
                  }
              }
          }
          return new RegularVector(countElements);
      }
focal_method.class_method_signature: BitVectors.count(List<BitVector> bitVectors)
focal_method.full_signature: public static Vector count(List<BitVector> bitVectors)
focal_method.identifier: count
focal_method.invocations: count distinct map stream getDimension get getElements getElement
focal_method.modifiers: public static
focal_method.parameters: (List<BitVector> bitVectors)
focal_method.return: Vector
focal_method.signature: Vector count(List<BitVector> bitVectors)