summaryrefslogtreecommitdiff
path: root/src/Witness_complex/example
diff options
context:
space:
mode:
authorskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-08 16:51:33 +0000
committerskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-08 16:51:33 +0000
commitf3d75e50187c04d7be3f55fe9fbb77fb3ed90888 (patch)
tree1d8f5ea4ab5ff963525d1a7da769aad5156edfdf /src/Witness_complex/example
parent7e1913f458abc7f526459c775f4b6e0c4a6d9ac0 (diff)
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
Diffstat (limited to 'src/Witness_complex/example')
-rw-r--r--src/Witness_complex/example/witness_complex_from_file.cpp8
1 files changed, 6 insertions, 2 deletions
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<std::vector< int > > 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();