MCPcopy Create free account
hub / github.com/MolinDeng/Princeton-algs4 / KdTreeGenerator

Class KdTreeGenerator

LabEnv/05Lab/KdTreeGenerator.java:20–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18import edu.princeton.cs.algs4.StdOut;
19
20public class KdTreeGenerator {
21
22 public static void main(String[] args) {
23 int n = Integer.parseInt(args[0]);
24 for (int i = 0; i < n; i++) {
25 double x = StdRandom.uniform(0.0, 1.0);
26 double y = StdRandom.uniform(0.0, 1.0);
27 StdOut.printf("%8.6f %8.6f\n", x, y);
28 }
29 }
30}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected