removing redundant initialization

reformatting output
This commit is contained in:
Sven Oesau 2024-11-15 18:40:03 +01:00
parent 5e554b2349
commit b64a868ff0
1 changed files with 4 additions and 12 deletions

View File

@ -171,15 +171,10 @@ int main(const int argc, const char** argv) {
timer.start(); timer.start();
std::size_t num_shapes = ksr.detect_planar_shapes(param); std::size_t num_shapes = ksr.detect_planar_shapes(param);
std::cout << num_shapes << " detected planar shapes" << std::endl; std::cout << num_shapes << " detected planar shapes" << std::endl;
FT after_shape_detection = timer.time(); FT after_shape_detection = timer.time();
ksr.initialize_partition(param);
FT after_init = timer.time();
ksr.partition(parameters.k_intersections); ksr.partition(parameters.k_intersections);
FT after_partition = timer.time(); FT after_partition = timer.time();
@ -222,19 +217,16 @@ int main(const int argc, const char** argv) {
else else
ksr.reconstruct(l, external_nodes, std::back_inserter(vtx), std::back_inserter(polylist)); ksr.reconstruct(l, external_nodes, std::back_inserter(vtx), std::back_inserter(polylist));
if (polylist.size() > 0) { if (polylist.size() > 0) {
non_empty = true; non_empty = true;
CGAL::IO::write_polygon_soup("polylist_" + std::to_string(l) + (parameters.use_ground ? "_g" : "_") + ".off", vtx, polylist); CGAL::IO::write_polygon_soup("polylist_" + std::to_string(l) + (parameters.use_ground ? "_g" : "_") + ".off", vtx, polylist);
} }
} }
std::cout << "Shape detection: " << after_shape_detection << " seconds!" << std::endl; std::cout << "Shape detection and initialization\nof kinetic partition: " << after_shape_detection << " seconds!" << std::endl;
std::cout << "Kinetic partition: " << (after_partition - after_shape_detection) << " seconds!" << std::endl; std::cout << "Kinetic partition: " << (after_partition - after_shape_detection) << " seconds!" << std::endl;
std::cout << " initialization: " << (after_init - after_shape_detection) << " seconds!" << std::endl; std::cout << "Kinetic reconstruction: " << (after_reconstruction - after_partition) << " seconds!" << std::endl;
std::cout << " partition: " << (after_partition - after_init) << " seconds!" << std::endl; std::cout << "Total time: " << time << " seconds!" << std::endl << std::endl;
std::cout << "Kinetic reconstruction: " << (after_reconstruction - after_partition) << " seconds!" << std::endl;
std::cout << "Total time: " << time << " seconds!" << std::endl << std::endl;
return (non_empty) ? EXIT_SUCCESS : EXIT_FAILURE; return (non_empty) ? EXIT_SUCCESS : EXIT_FAILURE;
} }