21 #include "boost/filesystem.hpp"
25 namespace fs = boost::filesystem;
29 std::vector< fs::path >
30 get_files(fs::path
const &root, std::string
const &ext)
32 std::vector< fs::path > paths;
34 if(fs::exists(root) && fs::is_directory(root))
36 for(
auto const &entry : fs::recursive_directory_iterator(root))
38 if(fs::is_regular_file(entry) && entry.path().extension() == ext)
39 paths.emplace_back(entry.path().filename());
48 template<
typename HalfedgeGraph,
71 size_t nbf = files.size();
72 std::vector< double > _distortion_per_batch(nbf, 0.);
73 for(
size_t i = 0; i < nbf; i++)
75 HalfedgeGraph current_mesh;
80 auto current_pm =
get(boost::vertex_point, current_mesh);
93 _distortion_per_batch[i] =
97 std::ofstream dist_file;
98 dist_file.open(root.string() +
"dist_measures" +
".csv");
99 auto it_dist = _distortion_per_batch.begin();
100 dist_file <<
"DISTORSION"
102 for( ; it_dist != _distortion_per_batch.end(); it_dist++)
104 dist_file << (*it_dist) <<
"\n";