test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/tree/impurity/gini/GiniImpurityMeasureTest.java
test_class.identifier: GiniImpurityMeasureTest
test_case.body: @Test
      public void testAdd() {
          Random rnd = new Random(0);
  
          GiniImpurityMeasure a = new GiniImpurityMeasure(
              new long[]{randCnt(rnd), randCnt(rnd), randCnt(rnd)},
              new long[]{randCnt(rnd), randCnt(rnd), randCnt(rnd)}
          );
  
          GiniImpurityMeasure b = new GiniImpurityMeasure(
              new long[]{randCnt(rnd), randCnt(rnd), randCnt(rnd)},
              new long[]{randCnt(rnd), randCnt(rnd), randCnt(rnd)}
          );
  
          GiniImpurityMeasure c = a.add(b);
  
          assertEquals(a.getLeft()[0] + b.getLeft()[0], c.getLeft()[0]);
          assertEquals(a.getLeft()[1] + b.getLeft()[1], c.getLeft()[1]);
          assertEquals(a.getLeft()[2] + b.getLeft()[2], c.getLeft()[2]);
  
          assertEquals(a.getRight()[0] + b.getRight()[0], c.getRight()[0]);
          assertEquals(a.getRight()[1] + b.getRight()[1], c.getRight()[1]);
          assertEquals(a.getRight()[2] + b.getRight()[2], c.getRight()[2]);
      }
test_case.class_method_signature: GiniImpurityMeasureTest.testAdd()
test_case.full_signature: @Test public void testAdd()
test_case.identifier: testAdd
test_case.invocations: randCnt randCnt randCnt randCnt randCnt randCnt randCnt randCnt randCnt randCnt randCnt randCnt add assertEquals getLeft getLeft getLeft assertEquals getLeft getLeft getLeft assertEquals getLeft getLeft getLeft assertEquals getRight getRight getRight assertEquals getRight getRight getRight assertEquals getRight getRight getRight
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAdd()
focal_class.declarator: serialVersionUID = 5338129703395229970L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 5338129703395229970L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: left
focal_class.modifier: private final
focal_class.original_string: private final long[] left;
focal_class.type: long[]
focal_class.var_name: left
focal_class.declarator: right
focal_class.modifier: private final
focal_class.original_string: private final long[] right;
focal_class.type: long[]
focal_class.var_name: right
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/tree/impurity/gini/GiniImpurityMeasure.java
focal_class.identifier: GiniImpurityMeasure
focal_class.interfaces: implements ImpurityMeasure<GiniImpurityMeasure>
focal_class.class_method_signature: GiniImpurityMeasure.GiniImpurityMeasure(long[] left, long[] right)
focal_class.full_signature:   GiniImpurityMeasure(long[] left, long[] right)
focal_class.identifier: GiniImpurityMeasure
focal_class.parameters: (long[] left, long[] right)
focal_class.signature:  GiniImpurityMeasure(long[] left, long[] right)
focal_class.class_method_signature: GiniImpurityMeasure.impurity()
focal_class.full_signature: @Override public double impurity()
focal_class.identifier: impurity
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double impurity()
focal_class.class_method_signature: GiniImpurityMeasure.add(GiniImpurityMeasure b)
focal_class.full_signature: @Override public GiniImpurityMeasure add(GiniImpurityMeasure b)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (GiniImpurityMeasure b)
focal_class.return: GiniImpurityMeasure
focal_class.signature: GiniImpurityMeasure add(GiniImpurityMeasure b)
focal_class.class_method_signature: GiniImpurityMeasure.subtract(GiniImpurityMeasure b)
focal_class.full_signature: @Override public GiniImpurityMeasure subtract(GiniImpurityMeasure b)
focal_class.identifier: subtract
focal_class.modifiers: @Override public
focal_class.parameters: (GiniImpurityMeasure b)
focal_class.return: GiniImpurityMeasure
focal_class.signature: GiniImpurityMeasure subtract(GiniImpurityMeasure b)
focal_class.class_method_signature: GiniImpurityMeasure.getLeft()
focal_class.full_signature: public long[] getLeft()
focal_class.identifier: getLeft
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long[]
focal_class.signature: long[] getLeft()
focal_class.class_method_signature: GiniImpurityMeasure.getRight()
focal_class.full_signature: public long[] getRight()
focal_class.identifier: getRight
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long[]
focal_class.signature: long[] getRight()
focal_method.body: @Override public GiniImpurityMeasure add(GiniImpurityMeasure b) {
          assert left.length == b.left.length : "Subtracted measure has to have length " + left.length;
          assert left.length == b.right.length : "Subtracted measure has to have length " + left.length;
  
          long[] leftRes = new long[left.length];
          long[] rightRes = new long[left.length];
  
          for (int i = 0; i < left.length; i++) {
              leftRes[i] = left[i] + b.left[i];
              rightRes[i] = right[i] + b.right[i];
          }
  
          return new GiniImpurityMeasure(leftRes, rightRes);
      }
focal_method.class_method_signature: GiniImpurityMeasure.add(GiniImpurityMeasure b)
focal_method.full_signature: @Override public GiniImpurityMeasure add(GiniImpurityMeasure b)
focal_method.identifier: add
focal_method.modifiers: @Override public
focal_method.parameters: (GiniImpurityMeasure b)
focal_method.return: GiniImpurityMeasure
focal_method.signature: GiniImpurityMeasure add(GiniImpurityMeasure b)