This example is part of the k-means tutorial. See Step 1: Generate Random Points
#include <ostream>
#include <random>
};
return os << '(' << p.x << ',' << p.y << ')';
}
std::default_random_engine rng(std::random_device { } ());
std::uniform_real_distribution<double> dist(0.0, 1000.0);
DIA<Point> points =
ctx, 100,
[&](const size_t& ) {
return Point { dist(rng), dist(rng) };
})
.Cache();
points.Print("points");
}
}