Skip to content
Permalink
Browse files
Replace deprecated calls.
  • Loading branch information
Gilles Sadowski committed Jan 23, 2022
1 parent 4844e3a commit e18ac1b03b095c3485fd2c86bb1b2843927ff80b
Showing 3 changed files with 4 additions and 4 deletions.
@@ -58,7 +58,7 @@ class ChineseRings {
// Second ring (centered around the first ring).
final Vector3D[] secondRing = new Vector3D[numPointsRing2];

final UniformRandomProvider rng = RandomSource.create(RandomSource.WELL_19937_C);
final UniformRandomProvider rng = RandomSource.WELL_19937_C.create();

// Create two rings lying in xy-plane.
final UnitSphereSampler unit = UnitSphereSampler.of(rng, 2);
@@ -146,7 +146,7 @@ private FeatureInitializer[] makeInitializers() {
0.1 * centre[2].getStandardDeviation()
};

final UniformRandomProvider rng = RandomSource.create(RandomSource.SPLIT_MIX_64);
final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
return new FeatureInitializer[] {
FeatureInitializerFactory.uniform(rng, mean[0] - dev[0], mean[0] + dev[0]),
FeatureInitializerFactory.uniform(rng, mean[1] - dev[1], mean[1] + dev[1]),
@@ -166,7 +166,7 @@ private Iterator<double[]> createRandomIterator(final long numSamples) {
/** Data. */
private final Vector3D[] points = rings.getPoints();
/** RNG. */
private final UniformRandomProvider rng = RandomSource.create(RandomSource.KISS);
private final UniformRandomProvider rng = RandomSource.KISS.create();
/** Number of samples. */
private long n;

@@ -86,7 +86,7 @@ public Void call() throws FileNotFoundException, UnsupportedEncodingException {
new City("i0", 1, 1),
};

final UniformRandomProvider rng = RandomSource.create(RandomSource.KISS);
final UniformRandomProvider rng = RandomSource.KISS.create();
City[] best = null;
int maxCities = 0;
double minDist = Double.POSITIVE_INFINITY;

0 comments on commit e18ac1b

Please sign in to comment.