test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/util/generators/primitives/vector/VectorGeneratorPrimitivesTest.java
test_class.identifier: VectorGeneratorPrimitivesTest
test_case.body: @Test
      public void testGauss() {
          VectorGenerator gen = VectorGeneratorPrimitives.gauss(VectorUtils.of(2., 100.), VectorUtils.of(20., 1.), 10L);
  
          final double[] mean = new double[] {2., 100.};
          final double[] variance = new double[] {20., 1.};
  
          final int N = 50000;
          Vector meanStat = IntStream.range(0, N).mapToObj(i -> gen.get()).reduce(Vector::plus).get().times(1. / N);
          Vector varianceStat = IntStream.range(0, N).mapToObj(i -> gen.get().minus(meanStat))
              .map(v -> v.times(v)).reduce(Vector::plus).get().times(1. / N);
  
          assertArrayEquals(mean, meanStat.asArray(), 0.1);
          assertArrayEquals(variance, varianceStat.asArray(), 0.1);
      }
test_case.class_method_signature: VectorGeneratorPrimitivesTest.testGauss()
test_case.full_signature: @Test public void testGauss()
test_case.identifier: testGauss
test_case.invocations: gauss of of times get reduce mapToObj range get times get reduce map mapToObj range minus get times assertArrayEquals asArray assertArrayEquals asArray
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGauss()
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/util/generators/primitives/vector/VectorGeneratorPrimitives.java
focal_class.identifier: VectorGeneratorPrimitives
focal_class.class_method_signature: VectorGeneratorPrimitives.gauss(Vector means, Vector variances, Long seed)
focal_class.full_signature: public static VectorGenerator gauss(Vector means, Vector variances, Long seed)
focal_class.identifier: gauss
focal_class.modifiers: public static
focal_class.parameters: (Vector means, Vector variances, Long seed)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator gauss(Vector means, Vector variances, Long seed)
focal_class.class_method_signature: VectorGeneratorPrimitives.gauss(Vector means, Vector variances)
focal_class.full_signature: public static VectorGenerator gauss(Vector means, Vector variances)
focal_class.identifier: gauss
focal_class.modifiers: public static
focal_class.parameters: (Vector means, Vector variances)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator gauss(Vector means, Vector variances)
focal_class.class_method_signature: VectorGeneratorPrimitives.ring(double radius, double fromAngle, double toAngle)
focal_class.full_signature: public static VectorGenerator ring(double radius, double fromAngle, double toAngle)
focal_class.identifier: ring
focal_class.modifiers: public static
focal_class.parameters: (double radius, double fromAngle, double toAngle)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator ring(double radius, double fromAngle, double toAngle)
focal_class.class_method_signature: VectorGeneratorPrimitives.ring(double radius, double fromAngle, double toAngle, long seed)
focal_class.full_signature: public static VectorGenerator ring(double radius, double fromAngle, double toAngle, long seed)
focal_class.identifier: ring
focal_class.modifiers: public static
focal_class.parameters: (double radius, double fromAngle, double toAngle, long seed)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator ring(double radius, double fromAngle, double toAngle, long seed)
focal_class.class_method_signature: VectorGeneratorPrimitives.parallelogram(Vector bounds)
focal_class.full_signature: public static VectorGenerator parallelogram(Vector bounds)
focal_class.identifier: parallelogram
focal_class.modifiers: public static
focal_class.parameters: (Vector bounds)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator parallelogram(Vector bounds)
focal_class.class_method_signature: VectorGeneratorPrimitives.parallelogram(Vector bounds, long seed)
focal_class.full_signature: public static VectorGenerator parallelogram(Vector bounds, long seed)
focal_class.identifier: parallelogram
focal_class.modifiers: public static
focal_class.parameters: (Vector bounds, long seed)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator parallelogram(Vector bounds, long seed)
focal_class.class_method_signature: VectorGeneratorPrimitives.circle(double radius)
focal_class.full_signature: public static VectorGenerator circle(double radius)
focal_class.identifier: circle
focal_class.modifiers: public static
focal_class.parameters: (double radius)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator circle(double radius)
focal_class.class_method_signature: VectorGeneratorPrimitives.circle(double radius, long seed)
focal_class.full_signature: public static VectorGenerator circle(double radius, long seed)
focal_class.identifier: circle
focal_class.modifiers: public static
focal_class.parameters: (double radius, long seed)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator circle(double radius, long seed)
focal_class.class_method_signature: VectorGeneratorPrimitives.zero(int size)
focal_class.full_signature: public static VectorGenerator zero(int size)
focal_class.identifier: zero
focal_class.modifiers: public static
focal_class.parameters: (int size)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator zero(int size)
focal_class.class_method_signature: VectorGeneratorPrimitives.constant(Vector v)
focal_class.full_signature: public static VectorGenerator constant(Vector v)
focal_class.identifier: constant
focal_class.modifiers: public static
focal_class.parameters: (Vector v)
focal_class.return: VectorGenerator
focal_class.signature: VectorGenerator constant(Vector v)
focal_method.body: public static VectorGenerator gauss(Vector means, Vector variances, Long seed) {
          A.notEmpty(means.asArray(), "mean.size() != 0");
          A.ensure(means.size() == variances.size(), "mean.size() == variances.size()");
  
          RandomProducer[] producers = new RandomProducer[means.size()];
          for (int i = 0; i < producers.length; i++)
              producers[i] = new GaussRandomProducer(means.get(i), variances.get(i), seed *= 2);
          return RandomProducer.vectorize(producers);
      }
focal_method.class_method_signature: VectorGeneratorPrimitives.gauss(Vector means, Vector variances, Long seed)
focal_method.full_signature: public static VectorGenerator gauss(Vector means, Vector variances, Long seed)
focal_method.identifier: gauss
focal_method.invocations: notEmpty asArray ensure size size size get get vectorize
focal_method.modifiers: public static
focal_method.parameters: (Vector means, Vector variances, Long seed)
focal_method.return: VectorGenerator
focal_method.signature: VectorGenerator gauss(Vector means, Vector variances, Long seed)