diff --git a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/TravellingSalesmanSolver.java b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/TravellingSalesmanSolver.java index 956dc24c8..d7311fc16 100644 --- a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/TravellingSalesmanSolver.java +++ b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/TravellingSalesmanSolver.java @@ -179,7 +179,7 @@ public class TravellingSalesmanSolver { private static Iterator createIterator(final long numSamples, final Set uniqueCities, final UniformRandomProvider random) { - final CollectionSampler sampler = new CollectionSampler(random, uniqueCities); + final CollectionSampler sampler = new CollectionSampler<>(random, uniqueCities); return new Iterator() { /** Number of samples. */