From fe381d1ffe037028a9704966ec26d19894f4f5b1 Mon Sep 17 00:00:00 2001 From: mcarrier Date: Mon, 9 Oct 2017 16:48:40 +0000 Subject: git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Nerve_GIC@2771 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: cd87a5b72b67d27b21f765fac822ea69f9496019 --- src/Nerve_GIC/example/CMakeLists.txt | 24 ++++----- src/Nerve_GIC/example/CoordGIC.cpp | 87 ++++++++++++++++++++++++++++++ src/Nerve_GIC/example/FuncGIC.cpp | 87 ++++++++++++++++++++++++++++++ src/Nerve_GIC/example/GIC.cpp | 4 +- src/Nerve_GIC/example/GICvoronoi.cpp | 85 ----------------------------- src/Nerve_GIC/example/MapperDeltaCoord.cpp | 87 ------------------------------ src/Nerve_GIC/example/MapperDeltaFunc.cpp | 87 ------------------------------ src/Nerve_GIC/example/Nerve.cpp | 7 +-- src/Nerve_GIC/example/VoronoiGIC.cpp | 86 +++++++++++++++++++++++++++++ 9 files changed, 276 insertions(+), 278 deletions(-) create mode 100644 src/Nerve_GIC/example/CoordGIC.cpp create mode 100644 src/Nerve_GIC/example/FuncGIC.cpp delete mode 100644 src/Nerve_GIC/example/GICvoronoi.cpp delete mode 100644 src/Nerve_GIC/example/MapperDeltaCoord.cpp delete mode 100644 src/Nerve_GIC/example/MapperDeltaFunc.cpp create mode 100644 src/Nerve_GIC/example/VoronoiGIC.cpp (limited to 'src/Nerve_GIC/example') diff --git a/src/Nerve_GIC/example/CMakeLists.txt b/src/Nerve_GIC/example/CMakeLists.txt index ea504c11..871e46a6 100644 --- a/src/Nerve_GIC/example/CMakeLists.txt +++ b/src/Nerve_GIC/example/CMakeLists.txt @@ -4,24 +4,20 @@ project(Nerve_GIC_examples) add_executable ( Nerve Nerve.cpp ) target_link_libraries(Nerve ${Boost_SYSTEM_LIBRARY}) -add_executable ( GIC GIC.cpp ) -target_link_libraries(GIC ${Boost_SYSTEM_LIBRARY}) +add_executable ( CoordGIC CoordGIC.cpp ) +target_link_libraries(CoordGIC ${Boost_SYSTEM_LIBRARY}) -add_executable ( MapperDeltaCoord MapperDeltaCoord.cpp ) -target_link_libraries(MapperDeltaCoord ${Boost_SYSTEM_LIBRARY}) +add_executable ( FuncGIC FuncGIC.cpp ) +target_link_libraries(FuncGIC ${Boost_SYSTEM_LIBRARY}) -add_executable ( MapperDeltaFunc MapperDeltaFunc.cpp ) -target_link_libraries(MapperDeltaFunc ${Boost_SYSTEM_LIBRARY}) +add_executable ( VoronoiGIC VoronoiGIC.cpp ) +target_link_libraries(VoronoiGIC ${Boost_SYSTEM_LIBRARY}) -add_executable ( GICvoronoi GICvoronoi.cpp ) -target_link_libraries(MapperDeltaFunc ${Boost_SYSTEM_LIBRARY}) - -file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +#[[file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)]] if (TBB_FOUND) target_link_libraries(Nerve ${TBB_LIBRARIES}) - target_link_libraries(GIC ${TBB_LIBRARIES}) - target_link_libraries(MapperDeltaCoord ${TBB_LIBRARIES}) - target_link_libraries(MapperDeltaFunc ${TBB_LIBRARIES}) - target_link_libraries(GICvoronoi ${TBB_LIBRARIES}) + target_link_libraries(CoordGIC ${TBB_LIBRARIES}) + target_link_libraries(FuncGIC ${TBB_LIBRARIES}) + target_link_libraries(VoronoiGIC ${TBB_LIBRARIES}) endif() \ No newline at end of file diff --git a/src/Nerve_GIC/example/CoordGIC.cpp b/src/Nerve_GIC/example/CoordGIC.cpp new file mode 100644 index 00000000..89b0f9a4 --- /dev/null +++ b/src/Nerve_GIC/example/CoordGIC.cpp @@ -0,0 +1,87 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Mathieu Carrière + * + * Copyright (C) 2017 INRIA Saclay (France) + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + +void usage(int nbArgs, char * const progName) { + std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; + std::cerr << "Usage: " << progName << " filename.off coordinate [--v] \n"; + std::cerr << " i.e.: " << progName << " ../../../../data/points/human.off 2 --v \n"; + exit(-1); // ----- >> +} + +int main(int argc, char **argv) { + if ((argc != 3) && (argc != 4)) usage(argc, argv[0]); + + using Point = std::vector; + + std::string off_file_name(argv[1]); + int coord = atoi(argv[2]); + bool verb = 0; if(argc == 4) verb = 1; + + // ----------------------------------------- + // Init of a functional GIC from an OFF file + // ----------------------------------------- + + Gudhi::graph_induced_complex::Graph_induced_complex GIC; + GIC.set_verbose(verb); + + bool check = GIC.read_point_cloud(off_file_name); + + if(!check) std::cout << "Incorrect OFF file." << std::endl; + else{ + + GIC.set_color_from_coordinate(coord); + GIC.set_function_from_coordinate(coord); + + GIC.set_graph_from_automatic_rips(Gudhi::Euclidean_distance()); + + GIC.set_automatic_resolution_for_GIC(); GIC.set_gain(); + GIC.set_cover_from_function(); + + GIC.find_GIC_simplices_with_functional_minimal_cover(); + + GIC.plot_DOT(); + + Gudhi::Simplex_tree<> stree; GIC.create_complex(stree); + + // -------------------------------------------- + // Display information about the functional GIC + // -------------------------------------------- + + if(verb){ + std::cout << "Functional GIC is of dimension " << stree.dimension() << + " - " << stree.num_simplices() << " simplices - " << + stree.num_vertices() << " vertices." << std::endl; + + std::cout << "Iterator on functional GIC simplices" << std::endl; + for (auto f_simplex : stree.filtration_simplex_range()) { + for (auto vertex : stree.simplex_vertex_range(f_simplex)) { + std::cout << vertex << " "; + } + std::cout << std::endl; + } + } + } + + return 0; +} diff --git a/src/Nerve_GIC/example/FuncGIC.cpp b/src/Nerve_GIC/example/FuncGIC.cpp new file mode 100644 index 00000000..56c97b7f --- /dev/null +++ b/src/Nerve_GIC/example/FuncGIC.cpp @@ -0,0 +1,87 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Mathieu Carrière + * + * Copyright (C) 2017 INRIA Saclay (France) + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + +void usage(int nbArgs, char * const progName) { + std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; + std::cerr << "Usage: " << progName << " filename.off function [--v] \n"; + std::cerr << " i.e.: " << progName << " ../../../../data/points/COIL_database/lucky_cat.off ../../../../data/points/COIL_database/lucky_cat_PCA1 --v \n"; + exit(-1); // ----- >> +} + +int main(int argc, char **argv) { + if ((argc != 3) && (argc != 4)) usage(argc, argv[0]); + + using Point = std::vector; + + std::string off_file_name(argv[1]); + std::string func_file_name = argv[2]; + bool verb = 0; if(argc == 4) verb = 1; + + // ----------------------------------------- + // Init of a functional GIC from an OFF file + // ----------------------------------------- + + Gudhi::graph_induced_complex::Graph_induced_complex GIC; + GIC.set_verbose(verb); + + bool check = GIC.read_point_cloud(off_file_name); + + if(!check) std::cout << "Incorrect OFF file." << std::endl; + else{ + + GIC.set_color_from_file(func_file_name); + GIC.set_function_from_file(func_file_name); + + GIC.set_graph_from_automatic_rips(Gudhi::Euclidean_distance()); + + GIC.set_automatic_resolution_for_GIC(); GIC.set_gain(); + GIC.set_cover_from_function(); + + GIC.find_GIC_simplices_with_functional_minimal_cover(); + + GIC.plot_DOT(); + + Gudhi::Simplex_tree<> stree; GIC.create_complex(stree); + + // -------------------------------------------- + // Display information about the functional GIC + // -------------------------------------------- + + if(verb){ + std::cout << "Functional GIC is of dimension " << stree.dimension() << + " - " << stree.num_simplices() << " simplices - " << + stree.num_vertices() << " vertices." << std::endl; + + std::cout << "Iterator on functional GIC simplices" << std::endl; + for (auto f_simplex : stree.filtration_simplex_range()) { + for (auto vertex : stree.simplex_vertex_range(f_simplex)) { + std::cout << vertex << " "; + } + std::cout << std::endl; + } + } + } + + return 0; +} diff --git a/src/Nerve_GIC/example/GIC.cpp b/src/Nerve_GIC/example/GIC.cpp index 6e5c5ca7..b8b5cd05 100644 --- a/src/Nerve_GIC/example/GIC.cpp +++ b/src/Nerve_GIC/example/GIC.cpp @@ -46,7 +46,7 @@ int main(int argc, char **argv) { // ---------------------------------------------------------------------------- Gudhi::graph_induced_complex::Graph_induced_complex GIC; - GIC.set_verbose(verb); GIC.set_mask(); + GIC.set_verbose(verb); bool check = GIC.read_point_cloud(off_file_name); @@ -65,7 +65,7 @@ int main(int argc, char **argv) { GIC.plot_TXT_for_KeplerMapper(); - Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); + Gudhi::Simplex_tree<> stree; GIC.create_complex(stree); // ---------------------------------------------------------------------------- // Display information about the graph induced complex diff --git a/src/Nerve_GIC/example/GICvoronoi.cpp b/src/Nerve_GIC/example/GICvoronoi.cpp deleted file mode 100644 index 2c4f5acf..00000000 --- a/src/Nerve_GIC/example/GICvoronoi.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Mathieu Carrière - * - * Copyright (C) 2017 INRIA Saclay (France) - * - * 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include - -void usage(int nbArgs, char * const progName) { - std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; - std::cerr << "Usage: " << progName << " filename.off N [--v] \n"; - std::cerr << " i.e.: " << progName << " ../../../../data/points/human.off 100 --v \n"; - exit(-1); // ----- >> -} - -int main(int argc, char **argv) { - if ((argc != 3) && (argc != 4)) usage(argc, argv[0]); - - using Point = std::vector; - - std::string off_file_name(argv[1]); - int m = atoi(argv[2]); - bool verb = 0; if(argc == 4) verb = 1; - - // ---------------------------------------------------------------------------- - // Init of a graph induced complex from an OFF file - // ---------------------------------------------------------------------------- - - Gudhi::graph_induced_complex::Graph_induced_complex GIC; - GIC.set_verbose(verb); GIC.set_mask(); - - bool check = GIC.read_point_cloud(off_file_name); - - if(!check) std::cout << "Incorrect OFF file." << std::endl; - else{ - - GIC.set_color_from_coordinate(); - - GIC.set_graph_from_OFF(); - - GIC.set_cover_from_Voronoi(Gudhi::Euclidean_distance(),m); - - GIC.find_GIC_simplices(); - - GIC.plot_OFF(); - - Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); - - // ---------------------------------------------------------------------------- - // Display information about the graph induced complex - // ---------------------------------------------------------------------------- - - if(verb){ - std::cout << "Graph induced complex is of dimension " << stree.dimension() << - " - " << stree.num_simplices() << " simplices - " << - stree.num_vertices() << " vertices." << std::endl; - - std::cout << "Iterator on graph induced complex simplices" << std::endl; - for (auto f_simplex : stree.filtration_simplex_range()) { - for (auto vertex : stree.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; - } - std::cout << std::endl; - } - } - } - - return 0; -} diff --git a/src/Nerve_GIC/example/MapperDeltaCoord.cpp b/src/Nerve_GIC/example/MapperDeltaCoord.cpp deleted file mode 100644 index 382649e8..00000000 --- a/src/Nerve_GIC/example/MapperDeltaCoord.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Mathieu Carrière - * - * Copyright (C) 2017 INRIA Saclay (France) - * - * 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include - -void usage(int nbArgs, char * const progName) { - std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; - std::cerr << "Usage: " << progName << " filename.off coordinate [--v] \n"; - std::cerr << " i.e.: " << progName << " ../../../../data/points/human.off 2 --v \n"; - exit(-1); // ----- >> -} - -int main(int argc, char **argv) { - if ((argc != 3) && (argc != 4)) usage(argc, argv[0]); - - using Point = std::vector; - - std::string off_file_name(argv[1]); - int coord = atoi(argv[2]); - bool verb = 0; if(argc == 4) verb = 1; - - // --------------------------------------- - // Init of a Mapper Delta from an OFF file - // --------------------------------------- - - Gudhi::graph_induced_complex::Graph_induced_complex GIC; - GIC.set_verbose(verb); GIC.set_mask(); GIC.set_subsampling(); - - bool check = GIC.read_point_cloud(off_file_name); - - if(!check) std::cout << "Incorrect OFF file." << std::endl; - else{ - - GIC.set_color_from_coordinate(coord); - GIC.set_function_from_coordinate(coord); - - GIC.set_graph_from_automatic_rips(Gudhi::Euclidean_distance()); - - GIC.set_automatic_resolution_for_GICMAP(); GIC.set_gain(); - GIC.set_cover_from_function(); - - GIC.find_GICMAP_simplices_with_functional_minimal_cover(); - - GIC.plot_DOT_for_neato(); - - Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); - - // ------------------------------------------ - // Display information about the Mapper Delta - // ------------------------------------------ - - if(verb){ - std::cout << "Mapper Delta is of dimension " << stree.dimension() << - " - " << stree.num_simplices() << " simplices - " << - stree.num_vertices() << " vertices." << std::endl; - - std::cout << "Iterator on Mapper Delta simplices" << std::endl; - for (auto f_simplex : stree.filtration_simplex_range()) { - for (auto vertex : stree.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; - } - std::cout << std::endl; - } - } - } - - return 0; -} diff --git a/src/Nerve_GIC/example/MapperDeltaFunc.cpp b/src/Nerve_GIC/example/MapperDeltaFunc.cpp deleted file mode 100644 index 586b733c..00000000 --- a/src/Nerve_GIC/example/MapperDeltaFunc.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Mathieu Carrière - * - * Copyright (C) 2017 INRIA Saclay (France) - * - * 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include - -void usage(int nbArgs, char * const progName) { - std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; - std::cerr << "Usage: " << progName << " filename.off function [--v] \n"; - std::cerr << " i.e.: " << progName << " ../../../../data/points/COIL_database/lucky_cat.off ../../../../data/points/COIL_database/lucky_cat_PCA1 --v \n"; - exit(-1); // ----- >> -} - -int main(int argc, char **argv) { - if ((argc != 3) && (argc != 4)) usage(argc, argv[0]); - - using Point = std::vector; - - std::string off_file_name(argv[1]); - std::string func_file_name = argv[2]; - bool verb = 0; if(argc == 4) verb = 1; - - // --------------------------------------- - // Init of a Mapper Delta from an OFF file - // --------------------------------------- - - Gudhi::graph_induced_complex::Graph_induced_complex GIC; - GIC.set_verbose(verb); GIC.set_mask(); GIC.set_subsampling(); - - bool check = GIC.read_point_cloud(off_file_name); - - if(!check) std::cout << "Incorrect OFF file." << std::endl; - else{ - - GIC.set_color_from_file(func_file_name); - GIC.set_function_from_file(func_file_name); - - GIC.set_graph_from_automatic_rips(Gudhi::Euclidean_distance()); - - GIC.set_automatic_resolution_for_GICMAP(); GIC.set_gain(); - GIC.set_cover_from_function(); - - GIC.find_GICMAP_simplices_with_functional_minimal_cover(); - - GIC.plot_DOT_for_neato(); - - Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); - - // ------------------------------------------ - // Display information about the Mapper Delta - // ------------------------------------------ - - if(verb){ - std::cout << "Mapper Delta is of dimension " << stree.dimension() << - " - " << stree.num_simplices() << " simplices - " << - stree.num_vertices() << " vertices." << std::endl; - - std::cout << "Iterator on Mapper Delta simplices" << std::endl; - for (auto f_simplex : stree.filtration_simplex_range()) { - for (auto vertex : stree.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; - } - std::cout << std::endl; - } - } - } - - return 0; -} diff --git a/src/Nerve_GIC/example/Nerve.cpp b/src/Nerve_GIC/example/Nerve.cpp index e47982c4..e863b48b 100644 --- a/src/Nerve_GIC/example/Nerve.cpp +++ b/src/Nerve_GIC/example/Nerve.cpp @@ -39,13 +39,14 @@ int main(int argc, char **argv) { int resolution = atoi(argv[3]); double gain = atof(argv[4]); bool verb = 0; if(argc == 6) verb = 1; + //int mask = 0; // -------------------------------- // Init of a Nerve from an OFF file // -------------------------------- Gudhi::graph_induced_complex::Graph_induced_complex GIC; - GIC.set_verbose(verb); GIC.set_mask(); + GIC.set_verbose(verb); bool check = GIC.read_point_cloud(off_file_name); @@ -62,9 +63,9 @@ int main(int argc, char **argv) { GIC.find_Nerve_simplices(); - GIC.plot_TXT_for_KeplerMapper(); + GIC.plot_TXT(); - Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); + Gudhi::Simplex_tree<> stree; GIC.create_complex(stree); // ---------------------------------------------------------------------------- // Display information about the graph induced complex diff --git a/src/Nerve_GIC/example/VoronoiGIC.cpp b/src/Nerve_GIC/example/VoronoiGIC.cpp new file mode 100644 index 00000000..f000c263 --- /dev/null +++ b/src/Nerve_GIC/example/VoronoiGIC.cpp @@ -0,0 +1,86 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Mathieu Carrière + * + * Copyright (C) 2017 INRIA Saclay (France) + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + +void usage(int nbArgs, char * const progName) { + std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; + std::cerr << "Usage: " << progName << " filename.off N [--v] \n"; + std::cerr << " i.e.: " << progName << " ../../../../data/points/human.off 100 --v \n"; + exit(-1); // ----- >> +} + +int main(int argc, char **argv) { + if ((argc != 3) && (argc != 4)) usage(argc, argv[0]); + + using Point = std::vector; + + std::string off_file_name(argv[1]); + int m = atoi(argv[2]); + bool verb = 0; if(argc == 4) verb = 1; + //int mask = 0; + + // ---------------------------------------------------------------------------- + // Init of a graph induced complex from an OFF file + // ---------------------------------------------------------------------------- + + Gudhi::graph_induced_complex::Graph_induced_complex GIC; + GIC.set_verbose(verb); + + bool check = GIC.read_point_cloud(off_file_name); + + if(!check) std::cout << "Incorrect OFF file." << std::endl; + else{ + + GIC.set_color_from_coordinate(); + + GIC.set_graph_from_OFF(); + + GIC.set_cover_from_Voronoi(Gudhi::Euclidean_distance(),m); + + GIC.find_GIC_simplices(); + + GIC.plot_OFF(); + + Gudhi::Simplex_tree<> stree; GIC.create_complex(stree); + + // ---------------------------------------------------------------------------- + // Display information about the graph induced complex + // ---------------------------------------------------------------------------- + + if(verb){ + std::cout << "Graph induced complex is of dimension " << stree.dimension() << + " - " << stree.num_simplices() << " simplices - " << + stree.num_vertices() << " vertices." << std::endl; + + std::cout << "Iterator on graph induced complex simplices" << std::endl; + for (auto f_simplex : stree.filtration_simplex_range()) { + for (auto vertex : stree.simplex_vertex_range(f_simplex)) { + std::cout << vertex << " "; + } + std::cout << std::endl; + } + } + } + + return 0; +} -- cgit v1.2.3