diff options
Diffstat (limited to 'src/Witness_complex/example')
-rw-r--r-- | src/Witness_complex/example/witness_complex_from_file.cpp | 7 | ||||
-rw-r--r-- | src/Witness_complex/example/witness_complex_sphere.cpp | 6 |
2 files changed, 8 insertions, 5 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..59dd28e0 100644 --- a/src/Witness_complex/example/witness_complex_from_file.cpp +++ b/src/Witness_complex/example/witness_complex_from_file.cpp @@ -36,8 +36,9 @@ #include <string> #include <vector> -typedef std::vector< Vertex_handle > typeVectorVertex; +typedef std::vector< int > typeVectorVertex; typedef std::vector< std::vector <double> > Point_Vector; +typedef Gudhi::Simplex_tree<> Simplex_tree; int main(int argc, char * const argv[]) { if (argc != 3) { @@ -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"; diff --git a/src/Witness_complex/example/witness_complex_sphere.cpp b/src/Witness_complex/example/witness_complex_sphere.cpp index e6f88274..7ab86cc0 100644 --- a/src/Witness_complex/example/witness_complex_sphere.cpp +++ b/src/Witness_complex/example/witness_complex_sphere.cpp @@ -40,6 +40,8 @@ #include "generators.h" +typedef Gudhi::Simplex_tree<> Simplex_tree; + /** Write a gnuplot readable file. * Data range is a random access range of pairs (arg, value) */ @@ -62,7 +64,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; std::vector< std::pair<int, double> > l_time; @@ -77,7 +79,7 @@ int main(int argc, char * const argv[]) { start = clock(); std::vector<std::vector< int > > knn; 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); // Compute witness complex Gudhi::witness_complex::witness_complex(knn, number_of_landmarks, point_vector[0].size(), simplex_tree); |