Replace deprecated calls.

This commit is contained in:
Gilles Sadowski 2022-01-23 03:56:07 +01:00
parent 4844e3aeab
commit e18ac1b03b
3 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -146,7 +146,7 @@ class ChineseRingsClassifier {
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 @@ class ChineseRingsClassifier {
/** 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;

View File

@ -86,7 +86,7 @@ public final class StandAlone implements Callable<Void> {
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;