From f3d75e50187c04d7be3f55fe9fbb77fb3ed90888 Mon Sep 17 00:00:00 2001 From: skachano Date: Wed, 8 Apr 2015 16:51:33 +0000 Subject: added separate time for landmarks and complex construction git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@556 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 11f86285979963b9dd0cd65fcc1229bb8f5323b6 --- src/Witness_complex/example/witness_complex_from_file.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Witness_complex/example') diff --git a/src/Witness_complex/example/witness_complex_from_file.cpp b/src/Witness_complex/example/witness_complex_from_file.cpp index be4869ea..35c00003 100644 --- a/src/Witness_complex/example/witness_complex_from_file.cpp +++ b/src/Witness_complex/example/witness_complex_from_file.cpp @@ -103,14 +103,17 @@ int main (int argc, char * const argv[]) Witness_complex<> witnessComplex; std::cout << "Let the carnage begin!\n"; - start = clock(); Point_Vector point_vector; read_points_cust(file_name, point_vector); - std::cout << "Successfully read the points\n"; + //std::cout << "Successfully read the points\n"; witnessComplex.setNbL(nbL); // witnessComplex.witness_complex_from_points(point_vector); std::vector > WL; + start = clock(); witnessComplex.landmark_choice_by_random_points(point_vector, point_vector.size(), WL); + end = clock(); + std::cout << "Landmark choice took " + << (double)(end-start)/CLOCKS_PER_SEC << " s. \n"; // Write the WL matrix in a file mkdir("output", S_IRWXU); const size_t last_slash_idx = file_name.find_last_of("/"); @@ -120,6 +123,7 @@ int main (int argc, char * const argv[]) } std::string out_file = "output/"+file_name+"_"+argv[2]+".wl"; write_wl(out_file,WL); + start = clock(); witnessComplex.witness_complex(WL); // end = clock(); -- cgit v1.2.3