docs: public static void main(String[] args) throws IOException {
  
  		// check parameter count
  		if (args.length < 2) {
  			System.out.println("KMeansDataGenerator -points <num> -k <num clusters> [-output <output-path>] [-stddev <relative stddev>] [-range <centroid range>] [-seed <seed>]");
  			System.exit(1);
  		}
  
  		// parse parameters
  
  		final ParameterTool params = ParameterTool.fromArgs(args);
  		final int numDataPoints = params.getInt("points");
  		final int k = params.getInt("k");
  		final String outDir = params.get("output", System.getProperty("java.io.tmpdir"));
  		final double stddev = params.getDouble("stddev", RELATIVE_STDDEV);
  		final double range = params.getDouble("range", DEFAULT_VALUE_RANGE);
  		final long firstSeed = params.getLong("seed", DEFAULT_SEED);
  
  		final double absoluteStdDev = stddev * range;
  		final Random random = new Random(firstSeed);
  
  		// the means around which data points are distributed
  		final double[][] means = uniformRandomCenters(random, k, DIMENSIONALITY, range);
  
  		// write the points out
  		BufferedWriter pointsOut = null;
  		try {
  			pointsOut = new BufferedWriter(new FileWriter(new File(outDir + "/" + POINTS_FILE)));
  			StringBuilder buffer = new StringBuilder();
  
  			double[] point = new double[DIMENSIONALITY];
  			int nextCentroid = 0;
  
  			for (int i = 1; i <= numDataPoints; i++) {
  				// generate a point for the current centroid
  				double[] centroid = means[nextCentroid];
  				for (int d = 0; d < DIMENSIONALITY; d++) {
  					point[d] = (random.nextGaussian() * absoluteStdDev) + centroid[d];
  				}
  				writePoint(point, buffer, pointsOut);
  				nextCentroid = (nextCentroid + 1) % k;
  			}
  		}
  		finally {
  			if (pointsOut != null) {
  				pointsOut.close();
  			}
  		}
  
  		// write the uniformly distributed centers to a file
  		BufferedWriter centersOut = null;
  		try {
  			centersOut = new BufferedWriter(new FileWriter(new File(outDir + "/" + CENTERS_FILE)));
  			StringBuilder buffer = new StringBuilder();
  
  			double[][] centers = uniformRandomCenters(random, k, DIMENSIONALITY, range);
  
  			for (int i = 0; i < k; i++) {
  				writeCenter(i + 1, centers[i], buffer, centersOut);
  			}
  		}
  		finally {
  			if (centersOut != null) {
  				centersOut.close();
  			}
  		}
  
  		System.out.println("Wrote " + numDataPoints + " data points to " + outDir + "/" + POINTS_FILE);
  		System.out.println("Wrote " + k + " cluster centers to " + outDir + "/" + CENTERS_FILE);
  	}