@Test public void testRing() { VectorGeneratorPrimitives.ring(1., 0, 2 * Math.PI) .asDataStream().unlabeled().limit(1000) .forEach(v -> assertEquals(v.getLengthSquared(), 1., 1e-7)); VectorGeneratorPrimitives.ring(1., 0, Math.PI / 2) .asDataStream().unlabeled().limit(1000) .forEach(v -> { assertTrue(v.get(0) >= 0.); assertTrue(v.get(1) >= 0.); }); }
public static VectorGenerator ring(double radius, double fromAngle, double toAngle) { return ring(radius, fromAngle, toAngle, System.currentTimeMillis()); }
VectorGeneratorPrimitives { public static VectorGenerator ring(double radius, double fromAngle, double toAngle) { return ring(radius, fromAngle, toAngle, System.currentTimeMillis()); } }
VectorGeneratorPrimitives { public static VectorGenerator ring(double radius, double fromAngle, double toAngle) { return ring(radius, fromAngle, toAngle, System.currentTimeMillis()); }  }
VectorGeneratorPrimitives { public static VectorGenerator ring(double radius, double fromAngle, double toAngle) { return ring(radius, fromAngle, toAngle, System.currentTimeMillis()); }  static VectorGenerator gauss(Vector means, Vector variances, Long seed); static VectorGenerator gauss(Vector means, Vector variances); static VectorGenerator ring(double radius, double fromAngle, double toAngle); static VectorGenerator ring(double radius, double fromAngle, double toAngle, long seed); static VectorGenerator parallelogram(Vector bounds); static VectorGenerator parallelogram(Vector bounds, long seed); static VectorGenerator circle(double radius); static VectorGenerator circle(double radius, long seed); static VectorGenerator zero(int size); static VectorGenerator constant(Vector v); }
VectorGeneratorPrimitives { public static VectorGenerator ring(double radius, double fromAngle, double toAngle) { return ring(radius, fromAngle, toAngle, System.currentTimeMillis()); }  static VectorGenerator gauss(Vector means, Vector variances, Long seed); static VectorGenerator gauss(Vector means, Vector variances); static VectorGenerator ring(double radius, double fromAngle, double toAngle); static VectorGenerator ring(double radius, double fromAngle, double toAngle, long seed); static VectorGenerator parallelogram(Vector bounds); static VectorGenerator parallelogram(Vector bounds, long seed); static VectorGenerator circle(double radius); static VectorGenerator circle(double radius, long seed); static VectorGenerator zero(int size); static VectorGenerator constant(Vector v);  }