public static TravelingSalesman of(int stops, double radius) {
		final MSeq<double[]> points = MSeq.ofLength(stops);
		final double delta = 2.0*PI/stops;

		for (int i = 0; i < stops; ++i) {
			final double alpha = delta*i;
			final double x = cos(alpha)*radius + radius;
			final double y = sin(alpha)*radius + radius;
			points.set(i, new double[]{x, y});
		}

		// Shuffling of the created points.
		final Random random = RandomRegistry.getRandom();
		for (int j = points.length() - 1; j > 0; --j) {
			final int i = random.nextInt(j + 1);
			final double[] tmp = points.get(i);
			points.set(i, points.get(j));
			points.set(j, tmp);
		}

		return new TravelingSalesman(points.toISeq());
	}
public static TravelingSalesman of ( int stops , double radius ) { final MSeq < double [ ] > points = MSeq . ofLength ( stops ) ; final double delta = 2.0 * PI / stops ; for ( int i = 0 ; i < stops ; ++ i ) { final double alpha = delta * i ; final double x = cos ( alpha ) * radius + radius ; final double y = sin ( alpha ) * radius + radius ; points . set ( i , new double [ ] { x , y } ) ; } final Random random = RandomRegistry . getRandom ( ) ; for ( int j = points . length ( ) - 1 ; j > 0 ; -- j ) { final int i = random . nextInt ( j + 1 ) ; final double [ ] tmp = points . get ( i ) ; points . set ( i , points . get ( j ) ) ; points . set ( j , tmp ) ; } return new TravelingSalesman ( points . toISeq ( ) ) ; }
of stops. All stops lie on a circle with the given radius.