108 typedef typename ConvexHull::Point
Point;
113 hull.computeConvexHull();
114 std::cout <<
"#points=" << hull.nbPoints()
115 <<
" #vertices=" << hull.nbVertices()
116 <<
" #facets=" << hull.nbFacets() << std::endl;
117 double total_time = 0;
118 std::for_each( hull.timings.cbegin(), hull.timings.cend(),
119 [&total_time] (
double t ) { total_time += t; } );
120 std::cout <<
"purge duplicates= " << round(hull.timings[ 0 ]) <<
" ms." << std::endl;
121 std::cout <<
"init simplex = " << round(hull.timings[ 1 ]) <<
" ms." << std::endl;
122 std::cout <<
"quickhull core = " << round(hull.timings[ 2 ]) <<
" ms." << std::endl;
123 std::cout <<
"compute vertices= " << round(hull.timings[ 3 ]) <<
" ms." << std::endl;
124 std::cout <<
"total time = " << round(total_time) <<
" ms." << std::endl;
125 std::cout <<
"Checking hull ... " << std::endl;
126 auto start = std::chrono::steady_clock::now();
127 bool ok = hull.check();
128 auto end = std::chrono::steady_clock::now();
129 std::chrono::duration<double> elapsed_seconds = end-start;
130 std::cout <<
" ... in " << elapsed_seconds.count() <<
"s"
131 <<
" => " << ( ok ?
"OK" :
"ERROR" ) << std::endl;
141 typedef typename ConvexHull::Point
Point;
146 hull.computeConvexHull();
147 std::cout <<
"#points=" << hull.nbPoints()
148 <<
" #vertices=" << hull.nbVertices()
149 <<
" #facets=" << hull.nbFacets() << std::endl;
150 double total_time = 0;
151 std::for_each( hull.timings.cbegin(), hull.timings.cend(),
152 [&total_time] (
double t ) { total_time += t; } );
153 std::cout <<
"purge duplicates= " << round(hull.timings[ 0 ]) <<
" ms." << std::endl;
154 std::cout <<
"init simplex = " << round(hull.timings[ 1 ]) <<
" ms." << std::endl;
155 std::cout <<
"quickhull core = " << round(hull.timings[ 2 ]) <<
" ms." << std::endl;
156 std::cout <<
"compute vertices= " << round(hull.timings[ 3 ]) <<
" ms." << std::endl;
157 std::cout <<
"total time = " << round(total_time) <<
" ms." << std::endl;
158 std::cout <<
"Checking hull ... " << std::endl;
159 auto start = std::chrono::steady_clock::now();
160 bool ok = hull.check();
161 auto end = std::chrono::steady_clock::now();
162 std::chrono::duration<double> elapsed_seconds = end-start;
163 std::cout <<
" ... in " << elapsed_seconds.count() <<
"s"
164 <<
" => " << ( ok ?
"OK" :
"ERROR" ) << std::endl;