33 int meshDimension = 2;
39 for (
unsigned int i = 0; i < 10; ++i) {
40 for (
unsigned int j = i; j < 10; ++j) {
41 inMesh->
createVertex(Eigen::Vector2d(
static_cast<double>(i),
static_cast<double>(j)));
42 outMesh->
createVertex(Eigen::Vector2d(
static_cast<double>(i),
static_cast<double>(j)));
45 double relativeOverlap = 0.3;
46 unsigned int verticesPerPartition = 10;
47 bool projectToInput =
false;
49 auto [averagePartitionRadius, centerCandidates] = impl::createClustering(inMesh, outMesh, relativeOverlap, verticesPerPartition, projectToInput);
50 BOOST_TEST(averagePartitionRadius == 2.2360679774997898);
51 BOOST_TEST(centerCandidates.size() == 19);
55 projectToInput =
true;
56 auto [averagePartitionRadius, centerCandidates] = impl::createClustering(inMesh, outMesh, relativeOverlap, verticesPerPartition, projectToInput);
57 BOOST_TEST(averagePartitionRadius == 2.2360679774997898);
58 BOOST_TEST(centerCandidates.size() == 25);
66 int meshDimension = 3;
72 for (
unsigned int i = 0; i < 10; ++i) {
73 for (
unsigned int j = i; j < 10; ++j) {
74 for (
unsigned int k = i; k < 10; ++k) {
75 inMesh->
createVertex(Eigen::Vector3d(
static_cast<double>(i),
static_cast<double>(j),
static_cast<double>(k)));
76 outMesh->
createVertex(Eigen::Vector3d(
static_cast<double>(i),
static_cast<double>(j),
static_cast<double>(k)));
80 double relativeOverlap = 0.15;
81 unsigned int verticesPerPartition = 10;
82 bool projectToInput =
false;
84 auto [averagePartitionRadius, centerCandidates] = impl::createClustering(inMesh, outMesh, relativeOverlap, verticesPerPartition, projectToInput);
85 BOOST_TEST(averagePartitionRadius == 1.4142135623730951);
86 BOOST_TEST(centerCandidates.size() == 188);
90 projectToInput =
true;
91 auto [averagePartitionRadius, centerCandidates] = impl::createClustering(inMesh, outMesh, relativeOverlap, verticesPerPartition, projectToInput);
92 BOOST_TEST(averagePartitionRadius == 1.4142135623730951);
93 BOOST_TEST(centerCandidates.size() == 222);