summaryrefslogtreecommitdiff
path: root/src/Witness_complex/example/witness_complex_from_file.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-01-24 09:34:04 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-01-24 09:34:04 +0000
commitbe37aaeadc31ed10ede53393237d939d4aa47c82 (patch)
tree6b990088ce68cc19b3db1b8789eab831e62dc747 /src/Witness_complex/example/witness_complex_from_file.cpp
parent30a66f9431d059eed620e0535583e914fa5a3c74 (diff)
parentcd9d7681e06f29a25cf5775a384ac2e07e34abe9 (diff)
Merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1989 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 0743b9beb802b839357ecce17e11af5d4ef2a163
Diffstat (limited to 'src/Witness_complex/example/witness_complex_from_file.cpp')
-rw-r--r--src/Witness_complex/example/witness_complex_from_file.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Witness_complex/example/witness_complex_from_file.cpp b/src/Witness_complex/example/witness_complex_from_file.cpp
index bb641b3c..5dd18d0a 100644
--- a/src/Witness_complex/example/witness_complex_from_file.cpp
+++ b/src/Witness_complex/example/witness_complex_from_file.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Siargey Kachanovich
*
- * Copyright (C) 2015 INRIA Sophia Antipolis-Méditerranée (France)
+ * Copyright (C) 2015 INRIA
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -36,7 +36,8 @@
#include <string>
#include <vector>
-typedef std::vector< Vertex_handle > typeVectorVertex;
+typedef Gudhi::Simplex_tree<> Simplex_tree;
+typedef std::vector< Simplex_tree::Vertex_handle > typeVectorVertex;
typedef std::vector< std::vector <double> > Point_Vector;
int main(int argc, char * const argv[]) {
@@ -51,7 +52,7 @@ int main(int argc, char * const argv[]) {
clock_t start, end;
// Construct the Simplex Tree
- Gudhi::Simplex_tree<> simplex_tree;
+ Simplex_tree simplex_tree;
// Read the OFF file (input file name given as parameter) and triangulate points
Gudhi::Points_off_reader<std::vector <double>> off_reader(off_file_name);
@@ -69,7 +70,7 @@ int main(int argc, char * const argv[]) {
std::vector<std::vector< int > > knn;
Point_Vector landmarks;
Gudhi::subsampling::pick_n_random_points(point_vector, 100, std::back_inserter(landmarks));
- Gudhi::witness_complex::construct_closest_landmark_table(point_vector, landmarks, knn);
+ Gudhi::witness_complex::construct_closest_landmark_table<Simplex_tree::Filtration_value>(point_vector, landmarks, knn);
end = clock();
std::cout << "Landmark choice for " << nbL << " landmarks took "
<< static_cast<double>(end - start) / CLOCKS_PER_SEC << " s. \n";