summaryrefslogtreecommitdiff
path: root/src/Gudhi_stat/example
diff options
context:
space:
mode:
authorpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-10-11 07:43:50 +0000
committerpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-10-11 07:43:50 +0000
commit7a6ebbd6c26306bca806bbc8c08f74a13c63fca6 (patch)
tree63e331cd19aa72f81808c61c44f3f8add99e8bcb /src/Gudhi_stat/example
parent28b6b1eb52920b495a73f4713d9a6ae78a997f6e (diff)
adding answert to Vincent's comments
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@1688 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 3e90519425010bfedae7af946238188fee6cf420
Diffstat (limited to 'src/Gudhi_stat/example')
-rw-r--r--src/Gudhi_stat/example/CMakeLists.txt98
-rw-r--r--src/Gudhi_stat/example/persistence_heat_maps.cpp2
-rw-r--r--src/Gudhi_stat/example/persistence_intervals.cpp2
-rw-r--r--src/Gudhi_stat/example/persistence_landscape.cpp2
-rw-r--r--src/Gudhi_stat/example/persistence_landscape_on_grid.cpp2
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp73
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp107
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp91
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp79
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp79
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp79
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp79
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/create_pssk.cpp77
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp44
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/aaa51
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/aaa_Gnuplot_script208
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp72
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp57
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp69
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp93
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/plot_persistence_intervals.cpp59
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes/average_landscapes.cpp75
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp109
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp92
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes/create_landscapes.cpp56
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes/plot_landscapes.cpp50
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp74
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp107
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp91
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp80
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp55
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_vectors/average_persistence_vectors.cpp75
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp108
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp97
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_vectors/create_persistence_vectors.cpp57
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_vectors/plot_persistence_vectors.cpp51
-rw-r--r--src/Gudhi_stat/example/vector_representation.cpp2
37 files changed, 5 insertions, 2597 deletions
diff --git a/src/Gudhi_stat/example/CMakeLists.txt b/src/Gudhi_stat/example/CMakeLists.txt
index 613e4d26..5ae6cd6a 100644
--- a/src/Gudhi_stat/example/CMakeLists.txt
+++ b/src/Gudhi_stat/example/CMakeLists.txt
@@ -17,103 +17,5 @@ add_executable ( persistence_heat_maps persistence_heat_maps.cpp )
target_link_libraries(persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
-##UTILITIES:
-
-#persitence diagrams
-add_executable ( plot_persistence_intervals utilities/persistence_intervals/plot_persistence_intervals.cpp )
-target_link_libraries( plot_persistence_intervals ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_birth_death_range_in_persistence_diagram utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp )
-target_link_libraries( compute_birth_death_range_in_persistence_diagram ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_number_of_dominant_intervals utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp )
-target_link_libraries( compute_number_of_dominant_intervals ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( plot_histogram_of_intervals_lengths utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp )
-target_link_libraries( plot_histogram_of_intervals_lengths ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( plot_persistence_Betti_numebrs utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp )
-target_link_libraries( plot_persistence_Betti_numebrs ${Boost_SYSTEM_LIBRARY})
-
-#when we have bottleneck and wasserstein distance computations, add suitable programs here.
-
-
-#persitence landscapes
-add_executable ( average_landscapes utilities/persistence_landscapes/average_landscapes.cpp )
-target_link_libraries(average_landscapes ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( create_landscapes utilities/persistence_landscapes/create_landscapes.cpp )
-target_link_libraries(create_landscapes ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( plot_landscapes utilities/persistence_landscapes/plot_landscapes.cpp )
-target_link_libraries(plot_landscapes ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_distance_of_landscapes utilities/persistence_landscapes/compute_distance_of_landscapes.cpp )
-target_link_libraries(compute_distance_of_landscapes ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_scalar_product_of_landscapes utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp )
-target_link_libraries(compute_scalar_product_of_landscapes ${Boost_SYSTEM_LIBRARY})
-
-#persitence landscapes on a grid
-add_executable ( average_landscapes_on_grid utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp )
-target_link_libraries(average_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( create_landscapes_on_grid utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp )
-target_link_libraries(create_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( plot_landscapes_on_grid utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp )
-target_link_libraries(plot_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_distance_of_landscapes_on_grid utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp )
-target_link_libraries(compute_distance_of_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_scalar_product_of_landscapes_on_grid utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp )
-target_link_libraries(compute_scalar_product_of_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
-
-#persitence heat maps
-add_executable ( average_persistence_heat_maps utilities/persistence_heat_maps/average_persistence_heat_maps.cpp )
-target_link_libraries(average_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( create_persistence_heat_maps utilities/persistence_heat_maps/create_persistence_heat_maps.cpp )
-target_link_libraries(create_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( plot_persistence_heat_map utilities/persistence_heat_maps/plot_persistence_heat_map.cpp )
-target_link_libraries(plot_persistence_heat_map ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_distance_of_persistence_heat_maps utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp )
-target_link_libraries(compute_distance_of_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_scalar_product_of_persistence_heat_maps utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp )
-target_link_libraries(compute_scalar_product_of_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( create_pssk utilities/persistence_heat_maps/create_pssk.cpp )
-target_link_libraries(create_pssk ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( create_persistence_heat_maps_weighted_by_distance_from_diagonal utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp )
-target_link_libraries(create_persistence_heat_maps_weighted_by_distance_from_diagonal ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp )
-target_link_libraries(create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( create_persistence_heat_maps_weighted_by_arctan_of_their_persistence utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp )
-target_link_libraries(create_persistence_heat_maps_weighted_by_arctan_of_their_persistence ${Boost_SYSTEM_LIBRARY})
-
-
-#persitence vectors
-add_executable ( average_persistence_vectors utilities/persistence_vectors/average_persistence_vectors.cpp )
-target_link_libraries(average_persistence_vectors ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( create_persistence_vectors utilities/persistence_vectors/create_persistence_vectors.cpp )
-target_link_libraries(create_persistence_vectors ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_distance_of_persistence_vectors utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp )
-target_link_libraries(compute_distance_of_persistence_vectors ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_scalar_product_of_persistence_vectors utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp )
-target_link_libraries(compute_scalar_product_of_persistence_vectors ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( plot_persistence_vectors utilities/persistence_vectors/plot_persistence_vectors.cpp )
-target_link_libraries(plot_persistence_vectors ${Boost_SYSTEM_LIBRARY})
-
diff --git a/src/Gudhi_stat/example/persistence_heat_maps.cpp b/src/Gudhi_stat/example/persistence_heat_maps.cpp
index cd0c4113..e336ab44 100644
--- a/src/Gudhi_stat/example/persistence_heat_maps.cpp
+++ b/src/Gudhi_stat/example/persistence_heat_maps.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Pawel Dlotko
*
- * Copyright (C) 2015 INRIA Sophia-Saclay (France)
+ * Copyright (C) 2015 INRIA (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
diff --git a/src/Gudhi_stat/example/persistence_intervals.cpp b/src/Gudhi_stat/example/persistence_intervals.cpp
index cbd4020d..5357def7 100644
--- a/src/Gudhi_stat/example/persistence_intervals.cpp
+++ b/src/Gudhi_stat/example/persistence_intervals.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Pawel Dlotko
*
- * Copyright (C) 2015 INRIA Sophia-Saclay (France)
+ * Copyright (C) 2015 INRIA (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
diff --git a/src/Gudhi_stat/example/persistence_landscape.cpp b/src/Gudhi_stat/example/persistence_landscape.cpp
index a5b726c7..3204148b 100644
--- a/src/Gudhi_stat/example/persistence_landscape.cpp
+++ b/src/Gudhi_stat/example/persistence_landscape.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Pawel Dlotko
*
- * Copyright (C) 2015 INRIA Sophia-Saclay (France)
+ * Copyright (C) 2015 INRIA (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
diff --git a/src/Gudhi_stat/example/persistence_landscape_on_grid.cpp b/src/Gudhi_stat/example/persistence_landscape_on_grid.cpp
index 2807d76f..e1a0ba5d 100644
--- a/src/Gudhi_stat/example/persistence_landscape_on_grid.cpp
+++ b/src/Gudhi_stat/example/persistence_landscape_on_grid.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Pawel Dlotko
*
- * Copyright (C) 2015 INRIA Sophia-Saclay (France)
+ * Copyright (C) 2015 INRIA (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
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp
deleted file mode 100644
index d90e78e1..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp
+++ /dev/null
@@ -1,73 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_heat_maps.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program computes average persistence landscape of persistence landscapes created based on persistence diagrams provided as an input. Please call this program with the names of files with persistence diagrams \n";
- std::vector< const char* > filenames;
-
- if ( argc == 1 )
- {
- std::cout << "No input files given, the program will now terminate \n";
- return 1;
- }
-
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- std::cout << "Creating persistence landscapes...\n";
- std::vector< Abs_Topological_data_with_averages* > maps;
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- Persistence_heat_maps* l = new Persistence_heat_maps;
- l->load_from_file( filenames[i] );
- maps.push_back( (Abs_Topological_data_with_averages*)l );
- }
-
- Persistence_heat_maps av;
- av.compute_average( maps );
-
- av.print_to_file( "average.mps" );
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- delete maps[i];
- }
-
- std::cout << "Done \n";
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp
deleted file mode 100644
index 10d6f04c..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp
+++ /dev/null
@@ -1,107 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_heat_maps.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute dsitance of persistence landscapes stored in a file (the file needs to be created beforehand). \n";
- std::cout << "The first parameter of a program is an interger p. The program compute L^p distance of the two landscapes. For L^infty distance choose p = -1. \n";
- std::cout << "The remaining parameters of this programs are names of files with persistence landscapes.\n";
-
- if ( argc < 3 )
- {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
- return 1;
- }
-
- int p = atoi( argv[1] );
-
- std::vector< const char* > filenames;
- for ( int i = 2 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
- std::vector< Abs_Topological_data_with_distances* > maps;
- maps.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- Persistence_heat_maps* l = new Persistence_heat_maps;
- l->load_from_file( filenames[file_no] );
- maps.push_back( (Abs_Topological_data_with_distances*)l );
- }
-
- //and now we will compute the scalar product of landscapes.
-
- //first we prepare an array:
- std::vector< std::vector< double > > distance( filenames.size() );
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::vector< double > v( filenames.size() , 0 );
- distance[i] = v;
- }
-
- //and now we can compute the distnaces:
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- for ( size_t j = i ; j != filenames.size() ; ++j )
- {
- distance[i][j] = distance[j][i] = ((Persistence_heat_maps*)maps[i])->distance( maps[j] , p ) ;
- }
- }
-
- //and now output the result to the screen and a file:
- ofstream out;
- out.open( "distance" );
- for ( size_t i = 0 ; i != distance.size() ; ++i )
- {
- for ( size_t j = 0 ; j != distance.size() ; ++j )
- {
- cout << distance[i][j] << " ";
- out << distance[i][j] << " ";
- }
- cout << endl;
- out << endl;
- }
- out.close();
-
- return 0;
-}
-
-
-
-
-
-
-
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp
deleted file mode 100644
index cd529f10..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp
+++ /dev/null
@@ -1,91 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_heat_maps.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute scalar product of persistence landscapes stored in a file (the file needs to be created beforehand). \n";
- std::cout << "The parameters of this programs are names of files with persistence landscapes.\n";
-
- std::vector< const char* > filenames;
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
- std::vector< Persistence_heat_maps* > maps;
- maps.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- Persistence_heat_maps* l = new Persistence_heat_maps;
- l->load_from_file( filenames[file_no] );
- maps.push_back( l );
- }
-
- //and now we will compute the scalar product of landscapes.
-
- //first we prepare an array:
- std::vector< std::vector< double > > scalar_product( filenames.size() );
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::vector< double > v( filenames.size() , 0 );
- scalar_product[i] = v;
- }
-
- //and now we can compute the scalar product:
- for ( size_t i = 0 ; i != maps.size() ; ++i )
- {
- for ( size_t j = i ; j != maps.size() ; ++j )
- {
- scalar_product[i][j] = scalar_product[j][i] = ((Persistence_heat_maps*)maps[i])->compute_scalar_product( maps[j] ) ;
- }
- }
-
- //and now output the result to the screen and a file:
- ofstream out;
- out.open( "scalar_product" );
- for ( size_t i = 0 ; i != scalar_product.size() ; ++i )
- {
- for ( size_t j = 0 ; j != scalar_product.size() ; ++j )
- {
- cout << scalar_product[i][j] << " ";
- out << scalar_product[i][j] << " ";
- }
- cout << endl;
- out << endl;
- }
- out.close();
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp
deleted file mode 100644
index 3d8dc2e8..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp
+++ /dev/null
@@ -1,79 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_heat_maps.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program creates persistence heat map of diagrams provided as an input.\n";
- std::cout << "The first parameter of a program is an integer, a size of a grid.\n";
- std::cout << "The second and third parameters are min and max of the grid. If you want those numbers to be computed based on the data, set them both to -1 \n";
- std::cerr << "The fourth parameter is an integer, the standard deviation of a gaussian kernel expressed in a number of pixels \n";
- std::cout << "The remaining parameters are the names of files with persistence diagrams. \n";
-
- if ( argc < 5 )
- {
- std::cout << "Wrong parameter list, the program will now terminate \n";
- return 1;
- }
-
- size_t size_of_grid = (size_t)atoi( argv[1] );
- double min_ = atof( argv[2] );
- double max_ = atof( argv[3] );
- size_t stdiv = atof( argv[4] );
-
- std::vector< const char* > filenames;
- for ( int i = 5 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
-
-
- std::cout << "Creating persistence heat maps...\n";
- std::vector< std::vector<double> > filter = create_Gaussian_filter(stdiv,1);
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
- Persistence_heat_maps l( filenames[i] , filter, constant_function, false , size_of_grid , min_ , max_ );
-
- std::stringstream ss;
- ss << filenames[i] << ".mps";
- l.print_to_file( ss.str().c_str() );
- }
- std::cout << "Done \n";
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp
deleted file mode 100644
index 253320ff..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp
+++ /dev/null
@@ -1,79 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_heat_maps.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program creates persistence heat map of diagrams provided as an input. The Gaussian kernels are weighted by the arcus tangens of their persistence.\n";
- std::cout << "The first parameter of a program is an integer, a size of a grid.\n";
- std::cout << "The second and third parameters are min and max of the grid. If you want those numbers to be computed based on the data, set them both to -1 \n";
- std::cerr << "The fourth parameter is an integer, the standard deviation of a gaussian kernel expressed in a number of pixels \n";
- std::cout << "The remaining parameters are the names of files with persistence diagrams. \n";
-
- if ( argc < 5 )
- {
- std::cout << "Wrong parameter list, the program will now terminate \n";
- return 1;
- }
-
- size_t size_of_grid = (size_t)atoi( argv[1] );
- double min_ = atof( argv[2] );
- double max_ = atof( argv[3] );
- size_t stdiv = atof( argv[4] );
-
- std::vector< const char* > filenames;
- for ( int i = 5 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
-
-
- std::cout << "Creating persistence heat maps...\n";
- std::vector< std::vector<double> > filter = create_Gaussian_filter(stdiv,1);
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
- Persistence_heat_maps l( filenames[i] , filter, arc_tan_of_persistence_of_point, false , size_of_grid , min_ , max_ );
-
- std::stringstream ss;
- ss << filenames[i] << ".mps";
- l.print_to_file( ss.str().c_str() );
- }
- std::cout << "Done \n";
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp
deleted file mode 100644
index d7f4fbdd..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp
+++ /dev/null
@@ -1,79 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_heat_maps.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program creates persistence heat map of diagrams provided as an input. The Gaussian kernels are weighted by the distance of a center from the diagonal.\n";
- std::cout << "The first parameter of a program is an integer, a size of a grid.\n";
- std::cout << "The second and third parameters are min and max of the grid. If you want those numbers to be computed based on the data, set them both to -1 \n";
- std::cerr << "The fourth parameter is an integer, the standard deviation of a gaussian kernel expressed in a number of pixels \n";
- std::cout << "The remaining parameters are the names of files with persistence diagrams. \n";
-
- if ( argc < 5 )
- {
- std::cout << "Wrong parameter list, the program will now terminate \n";
- return 1;
- }
-
- size_t size_of_grid = (size_t)atoi( argv[1] );
- double min_ = atof( argv[2] );
- double max_ = atof( argv[3] );
- size_t stdiv = atof( argv[4] );
-
- std::vector< const char* > filenames;
- for ( int i = 5 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
-
-
- std::cout << "Creating persistence heat maps...\n";
- std::vector< std::vector<double> > filter = create_Gaussian_filter(stdiv,1);
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
- Persistence_heat_maps l( filenames[i] , filter, distance_from_diagonal, false , size_of_grid , min_ , max_ );
-
- std::stringstream ss;
- ss << filenames[i] << ".mps";
- l.print_to_file( ss.str().c_str() );
- }
- std::cout << "Done \n";
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp
deleted file mode 100644
index eac0d067..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp
+++ /dev/null
@@ -1,79 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_heat_maps.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program creates persistence heat map of diagrams provided as an input. The Gaussian kernels are weighted by the square of distance of a center from the diagonal.\n";
- std::cout << "The first parameter of a program is an integer, a size of a grid.\n";
- std::cout << "The second and third parameters are min and max of the grid. If you want those numbers to be computed based on the data, set them both to -1 \n";
- std::cerr << "The fourth parameter is an integer, the standard deviation of a gaussian kernel expressed in a number of pixels \n";
- std::cout << "The remaining parameters are the names of files with persistence diagrams. \n";
-
- if ( argc < 5 )
- {
- std::cout << "Wrong parameter list, the program will now terminate \n";
- return 1;
- }
-
- size_t size_of_grid = (size_t)atoi( argv[1] );
- double min_ = atof( argv[2] );
- double max_ = atof( argv[3] );
- size_t stdiv = atof( argv[4] );
-
- std::vector< const char* > filenames;
- for ( int i = 5 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
-
-
- std::cout << "Creating persistence heat maps...\n";
- std::vector< std::vector<double> > filter = create_Gaussian_filter(stdiv,1);
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
- Persistence_heat_maps l( filenames[i] , filter, squared_distance_from_diagonal, false , size_of_grid , min_ , max_ );
-
- std::stringstream ss;
- ss << filenames[i] << ".mps";
- l.print_to_file( ss.str().c_str() );
- }
- std::cout << "Done \n";
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_pssk.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_pssk.cpp
deleted file mode 100644
index ccd884ec..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_pssk.cpp
+++ /dev/null
@@ -1,77 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/PSSK.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program creates PSSK of diagrams provided as an input.\n";
- std::cout << "The first parameter of a program is an integer, a size of a grid.\n";
- std::cout << "The second and third parameters are min and max of the grid. If you want those numbers to be computed based on the data, set them both to -1 \n";
- std::cerr << "The fourth parameter is an integer, the standard deviation of a gaussian kernel expressed in a number of pixels \n";
- std::cout << "The remaining parameters are the names of files with persistence diagrams. \n";
-
- if ( argc < 5 )
- {
- std::cout << "Wrong parameter list, the program will now terminate \n";
- return 1;
- }
-
- size_t size_of_grid = (size_t)atoi( argv[1] );
- double min_ = atof( argv[2] );
- double max_ = atof( argv[3] );
- size_t stdiv = atof( argv[4] );
-
- std::vector< const char* > filenames;
- for ( int i = 5 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- std::cout << "Creating persistence heat maps...\n";
- std::vector< std::vector<double> > filter = create_Gaussian_filter(stdiv,1);
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
- PSSK l( filenames[i] , filter , size_of_grid , min_ , max_ );
-
- std::stringstream ss;
- ss << filenames[i] << ".pssk";
- l.print_to_file( ss.str().c_str() );
- }
- std::cout << "Done \n";
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp
deleted file mode 100644
index b85a502b..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp
+++ /dev/null
@@ -1,44 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_heat_maps.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program plot persistence landscape stored in a file (the file needs to be created beforehand). Please call the code with the name of a landsape file \n";
- Persistence_heat_maps l;
- l.load_from_file( argv[1] );
- l.plot( argv[1] );
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_intervals/aaa b/src/Gudhi_stat/example/utilities/persistence_intervals/aaa
deleted file mode 100644
index 5aed2ec0..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/aaa
+++ /dev/null
@@ -1,51 +0,0 @@
-0.254583 0.837489
-0.25491 0.410985
-0.262238 0.405964
-0.233498 0.338685
-0.253282 0.344571
-0.249923 0.339748
-0.179532 0.263873
-0.247402 0.323782
-0.181315 0.249492
-0.160746 0.22547
-0.170367 0.232149
-0.192048 0.253065
-0.27298 0.333994
-0.202383 0.260308
-0.278325 0.329157
-0.176624 0.226215
-0.200184 0.249281
-0.275607 0.323516
-0.178408 0.224032
-0.319435 0.362706
-0.184347 0.226301
-0.19342 0.23356
-0.143554 0.180648
-0.313975 0.34917
-0.260887 0.29465
-0.206395 0.23344
-0.272846 0.298156
-0.222294 0.246925
-0.272951 0.295696
-0.235421 0.257957
-0.277907 0.29913
-0.16591 0.186925
-0.223042 0.243167
-0.435025 0.454885
-0.151992 0.169807
-0.138011 0.155776
-0.218083 0.235837
-0.219364 0.237079
-0.297063 0.313899
-0.282666 0.298727
-0.24199 0.256381
-0.302722 0.316677
-0.160453 0.174076
-0.157689 0.169984
-0.192957 0.204705
-0.153738 0.165306
-0.226448 0.237898
-0.243627 0.252613
-0.210126 0.21907
-0.172082 0.177708
-0.232291 0.234521
diff --git a/src/Gudhi_stat/example/utilities/persistence_intervals/aaa_Gnuplot_script b/src/Gudhi_stat/example/utilities/persistence_intervals/aaa_Gnuplot_script
deleted file mode 100644
index 3ff83e9c..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/aaa_Gnuplot_script
+++ /dev/null
@@ -1,208 +0,0 @@
-set xrange [0.131016 : 0.844554]
-set yrange [0 : 16.16]
-plot '-' using 1:2 notitle with lp
-0.138011 0
-0.138011 1
-0.143554 1
-0.143554 2
-0.151992 2
-0.151992 3
-0.153738 3
-0.153738 4
-0.155776 4
-0.155776 3
-0.157689 3
-0.157689 4
-0.160453 4
-0.160453 5
-0.160746 5
-0.160746 6
-0.165306 6
-0.165306 5
-0.16591 5
-0.16591 6
-0.169807 6
-0.169807 5
-0.169984 5
-0.169984 4
-0.170367 4
-0.170367 5
-0.172082 5
-0.172082 6
-0.174076 6
-0.174076 5
-0.176624 5
-0.176624 6
-0.177708 6
-0.177708 5
-0.178408 5
-0.178408 6
-0.179532 6
-0.179532 7
-0.180648 7
-0.180648 6
-0.181315 6
-0.181315 7
-0.184347 7
-0.184347 8
-0.186925 8
-0.186925 7
-0.192048 7
-0.192048 8
-0.192957 8
-0.192957 9
-0.19342 9
-0.19342 10
-0.200184 10
-0.200184 11
-0.202383 11
-0.202383 12
-0.204705 12
-0.204705 11
-0.206395 11
-0.206395 12
-0.210126 12
-0.210126 13
-0.218083 13
-0.218083 14
-0.21907 14
-0.21907 13
-0.219364 13
-0.219364 14
-0.222294 14
-0.222294 15
-0.223042 15
-0.223042 16
-0.224032 16
-0.224032 15
-0.22547 15
-0.22547 14
-0.226215 14
-0.226215 13
-0.226301 13
-0.226301 12
-0.226448 12
-0.226448 13
-0.232149 13
-0.232149 12
-0.232291 12
-0.232291 13
-0.23344 13
-0.23344 12
-0.233498 12
-0.233498 13
-0.23356 13
-0.23356 12
-0.234521 12
-0.234521 11
-0.235421 11
-0.235421 12
-0.235837 12
-0.235837 11
-0.237079 11
-0.237079 10
-0.237898 10
-0.237898 9
-0.24199 9
-0.24199 10
-0.243167 10
-0.243167 9
-0.243627 9
-0.243627 10
-0.246925 10
-0.246925 9
-0.247402 9
-0.247402 10
-0.249281 10
-0.249281 9
-0.249492 9
-0.249492 8
-0.249923 8
-0.249923 9
-0.252613 9
-0.252613 8
-0.253065 8
-0.253065 7
-0.253282 7
-0.253282 8
-0.254583 8
-0.254583 9
-0.25491 9
-0.25491 10
-0.256381 10
-0.256381 9
-0.257957 9
-0.257957 8
-0.260308 8
-0.260308 7
-0.260887 7
-0.260887 8
-0.262238 8
-0.262238 9
-0.263873 9
-0.263873 8
-0.272846 8
-0.272846 9
-0.272951 9
-0.272951 10
-0.27298 10
-0.27298 11
-0.275607 11
-0.275607 12
-0.277907 12
-0.277907 13
-0.278325 13
-0.278325 14
-0.282666 14
-0.282666 15
-0.29465 15
-0.29465 14
-0.295696 14
-0.295696 13
-0.297063 13
-0.297063 14
-0.298156 14
-0.298156 13
-0.298727 13
-0.298727 12
-0.29913 12
-0.29913 11
-0.302722 11
-0.302722 12
-0.313899 12
-0.313899 11
-0.313975 11
-0.313975 12
-0.316677 12
-0.316677 11
-0.319435 11
-0.319435 12
-0.323516 12
-0.323516 11
-0.323782 11
-0.323782 10
-0.329157 10
-0.329157 9
-0.333994 9
-0.333994 8
-0.338685 8
-0.338685 7
-0.339748 7
-0.339748 6
-0.344571 6
-0.344571 5
-0.34917 5
-0.34917 4
-0.362706 4
-0.362706 3
-0.405964 3
-0.405964 2
-0.410985 2
-0.410985 1
-0.435025 1
-0.435025 2
-0.454885 2
-0.454885 1
-0.837489 1
-0.837489 0
-
diff --git a/src/Gudhi_stat/example/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Gudhi_stat/example/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp
deleted file mode 100644
index dba0984a..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp
+++ /dev/null
@@ -1,72 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/reader_utils.h>
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_intervals.h>
-
-#include <iostream>
-#include <vector>
-#include <limits>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-using namespace std;
-
-
-int main( int argc , char** argv )
-{
- //std::cout << "This program compute minimum birth and the maximum death time for a collection of persistence intervals \n";
- //if ( argc != 2 )
- //{
- // cout << "To run this program, please provide the name of a file with persistence diagram \n";
- // return 1;
- //}
- //Persistence_intervals p( argv[1] );
- //std::pair<double,double> min_max_ = p.min_max();
- //cout << "Birth-death range : min: " << min_max_.first << ", max: " << min_max_.second << endl;
-
- std::vector< const char* > filenames;
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- double min_ = std::numeric_limits<double>::max();
- double max_ = -std::numeric_limits<double>::max();
-
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- std::cout << "Creating diagram based on a file : " << filenames[file_no] << std::endl;
- Persistence_intervals p( filenames[file_no] );
- std::pair<double,double> min_max_ = p.min_max();
- if ( min_max_.first < min_ )min_ = min_max_.first;
- if ( min_max_.second > max_ )max_ = min_max_.second;
- }
- cout << "Birth-death range : min: " << min_ << ", max: " << max_ << endl;
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Gudhi_stat/example/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp
deleted file mode 100644
index 6e6a9c88..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp
+++ /dev/null
@@ -1,57 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/reader_utils.h>
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_intervals.h>
-
-#include <iostream>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-using namespace std;
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute the dominant intervals. A number of intervals to be displayed is a parameter of this program. \n";
- if ( argc != 3 )
- {
- cout << "To run this program, please provide the name of a file with persistence diagram and number of dominant intervals you would like to get \n";
- return 1;
- }
-
- Persistence_intervals p( argv[1] );
- std::vector< std::pair<double,double> > dominant_intervals = p.dominant_intervals( atoi( argv[2] ) );
- cout << "Here are the dominant intervals : " << endl;
- for ( size_t i = 0 ; i != dominant_intervals.size() ; ++i )
- {
- cout << " " << dominant_intervals[i].first<< "," << dominant_intervals[i].second << " "<< endl;
- }
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Gudhi_stat/example/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp
deleted file mode 100644
index dd2f3f99..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp
+++ /dev/null
@@ -1,69 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/reader_utils.h>
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_intervals.h>
-
-#include <iostream>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-using namespace std;
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute a histogram of barcode's length. A number of bins in the histogram is a parameter of this program. \n";
- if ( argc != 3 )
- {
- cout << "To run this program, please provide the name of a file with persistence diagram and number of dominant intervals you would like to get \n";
- return 1;
- }
-
- Persistence_intervals p( argv[1] );
- std::vector< std::pair<double,double> > dominant_intervals = p.dominant_intervals( atoi( argv[2] ) );
- std::vector< size_t > histogram = p.histograms_of_lengths( 10 );
-
- std::stringstream gnuplot_script;
- gnuplot_script << argv[1] << "_Gnuplot_script";
- ofstream out;
- out.open( gnuplot_script.str().c_str() );
-
- out << "set style data histogram" << std::endl;
- out << "set style histogram cluster gap 1" << std::endl;
- out << "set style fill solid border -1" << std::endl;
- out << "plot '-' notitle" << std::endl;
- for ( size_t i = 0 ; i != histogram.size() ; ++i )
- {
- out << histogram[i] << std::endl;
- }
- out << endl;
- std::cout << "To vizualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl;
- out.close();
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp b/src/Gudhi_stat/example/utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp
deleted file mode 100644
index 33ff7bce..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp
+++ /dev/null
@@ -1,93 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/reader_utils.h>
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_intervals.h>
-
-#include <iostream>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-using namespace std;
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute a plot of persistence Betti numbers. The input parameter is a file with persistence intervals. \n";
- if ( argc != 2 )
- {
- cout << "To run this program, please provide the name of a file with persistence diagram and number of dominant intervals you would like to get \n";
- return 1;
- }
-
-
-
- std::stringstream gnuplot_script;
- gnuplot_script << argv[1] << "_Gnuplot_script";
- ofstream out;
- out.open( gnuplot_script.str().c_str() );
-
- Persistence_intervals p( argv[1] );
- std::vector< std::pair< double , size_t > > pbns = p.compute_persistent_betti_numbers();
-
- //set up the ranges so that we see the image well.
- double xRangeBegin = pbns[0].first;
- double xRangeEnd = pbns[ pbns.size()-1 ].first;
- double yRangeBegin = 0;
- double yRangeEnd = 0;
- for ( size_t i = 0 ; i != pbns.size() ; ++i )
- {
- if ( pbns[i].second > yRangeEnd )yRangeEnd = pbns[i].second;
- }
- xRangeBegin -= (xRangeEnd -xRangeBegin)/100.0;
- xRangeEnd += (xRangeEnd -xRangeBegin)/100.0;
- yRangeEnd += yRangeEnd/100;
-
-
- out << "set xrange [" << xRangeBegin << " : " << xRangeEnd << "]" << endl;
- out << "set yrange [" << yRangeBegin << " : " << yRangeEnd << "]" << endl;
- out << "plot '-' using 1:2 notitle with lp " << std::endl;
- double previous_y = 0;
- for ( size_t i = 0 ; i != pbns.size() ; ++i )
- {
- out << pbns[i].first << " " << previous_y << endl;
- out << pbns[i].first << " " << pbns[i].second << std::endl;
- previous_y = pbns[i].second;
- }
- out << endl;
- out.close();
-
- //for ( size_t i = 0 ; i != pbns.size() ; ++i )
- //{
- // cout << pbns[i].first << " " << pbns[i].second << std::endl;
- //}
-
- std::cout << "To vizualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl;
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Gudhi_stat/example/utilities/persistence_intervals/plot_persistence_intervals.cpp
deleted file mode 100644
index c4dd7284..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/plot_persistence_intervals.cpp
+++ /dev/null
@@ -1,59 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/reader_utils.h>
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_intervals.h>
-
-#include <iostream>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-
-double epsilon = 0.0000005;
-
-using namespace std;
-
-
-int main( int argc , char** argv )
-{
- if ( argc != 2 )
- {
- cout << "To run this program, please provide the name of a file with persistence diagram \n";
- return 1;
- }
- Persistence_intervals b( argv[1] );
- b.plot( argv[1] );
- return 0;
-}
-
-
-
-
-
-
-
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes/average_landscapes.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes/average_landscapes.cpp
deleted file mode 100644
index 418244d2..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes/average_landscapes.cpp
+++ /dev/null
@@ -1,75 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program computes average persistence landscape of persistence landscapes created based on persistence diagrams provided as an input (you must create them first).\n";
- std::cout << "Please call this program with the names of files with persistence landscapes. The program will create a persistence landscape which will be their average \n";
- std::vector< const char* > filenames;
-
- if ( argc == 1 )
- {
- std::cout << "No input files given, the program will now terminate \n";
- return 1;
- }
-
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- std::cout << "Creating persistence landscapes...\n";
- std::vector< Abs_Topological_data_with_averages* > lands;
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- Persistence_landscape* l = new Persistence_landscape;
- l->load_landscape_from_file( filenames[i] );
- lands.push_back( (Abs_Topological_data_with_averages*)l );
- }
-
- Persistence_landscape av;
- av.compute_average( lands );
-
- av.print_to_file( "average.land" );
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- delete lands[i];
- }
-
- std::cout << "Done \n";
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp
deleted file mode 100644
index 12a4b3bd..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp
+++ /dev/null
@@ -1,109 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute distance of persistence landscapes stored in a file (the file needs to be created beforehand). \n";
- std::cout << "The first parameter of a program is an interger p. The program compute L^p distance of the given landscapes. For L^infty distance choose p = -1. \n";
- std::cout << "The remaining parameters of this programs are names of files with persistence landscapes.";
-
- if ( argc < 3 )
- {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
- return 1;
- }
-
- int p = atoi( argv[1] );
-
- std::vector< const char* > filenames;
- for ( int i = 2 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
- std::vector< Persistence_landscape > landscaspes;
- landscaspes.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- std::cout << "Loading persistence landscape from a file : " << filenames[file_no] << std::endl;
- Persistence_landscape l;
- l.load_landscape_from_file( filenames[file_no] );
- landscaspes.push_back( l );
- }
-
- //and now we will compute the scalar product of landscapes.
-
- //first we prepare an array:
- std::vector< std::vector< double > > distance( filenames.size() );
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::vector< double > v( filenames.size() , 0 );
- distance[i] = v;
- }
-
- //and now we can compute the distances:
- for ( size_t i = 0 ; i != landscaspes.size() ; ++i )
- {
- for ( size_t j = i ; j != landscaspes.size() ; ++j )
- {
- distance[i][j] = distance[j][i] = compute_discance_of_landscapes( landscaspes[i], landscaspes[j] , p ) ;
-
- }
- }
-
- //and now output the result to the screen and a file:
- ofstream out;
- out.open( "distance" );
- for ( size_t i = 0 ; i != distance.size() ; ++i )
- {
- for ( size_t j = 0 ; j != distance.size() ; ++j )
- {
- cout << distance[i][j] << " ";
- out << distance[i][j] << " ";
- }
- cout << endl;
- out << endl;
- }
- out.close();
-
- return 0;
-}
-
-
-
-
-
-
-
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp
deleted file mode 100644
index ac64a798..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp
+++ /dev/null
@@ -1,92 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute scalar product of persistence landscapes stored in a file (the file needs to be created beforehand). \n";
- std::cout << "The parameters of this programs are names of files with persistence landscapes.\n";
-
- std::vector< const char* > filenames;
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
- std::vector< Persistence_landscape > landscaspes;
- landscaspes.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- std::cout << "Reading persistence landscape from a file : " << filenames[file_no] << std::endl;
- Persistence_landscape l;
- l.load_landscape_from_file( filenames[file_no] );
- landscaspes.push_back( l );
- }
-
- //and now we will compute the scalar product of landscapes.
-
- //first we prepare an array:
- std::vector< std::vector< double > > scalar_product( filenames.size() );
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::vector< double > v( filenames.size() , 0 );
- scalar_product[i] = v;
- }
-
- //and now we can compute the scalar product:
- for ( size_t i = 0 ; i != landscaspes.size() ; ++i )
- {
- for ( size_t j = i ; j != landscaspes.size() ; ++j )
- {
- scalar_product[i][j] = scalar_product[j][i] = compute_inner_product( landscaspes[i], landscaspes[j] ) ;
- }
- }
-
- //and now output the result to the screen and a file:
- ofstream out;
- out.open( "scalar_product" );
- for ( size_t i = 0 ; i != scalar_product.size() ; ++i )
- {
- for ( size_t j = 0 ; j != scalar_product.size() ; ++j )
- {
- cout << scalar_product[i][j] << " ";
- out << scalar_product[i][j] << " ";
- }
- cout << endl;
- out << endl;
- }
- out.close();
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes/create_landscapes.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes/create_landscapes.cpp
deleted file mode 100644
index 5152a033..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes/create_landscapes.cpp
+++ /dev/null
@@ -1,56 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program creates persistence landscapes of diagrams provided as an input. Please call this program with the names of files with persistence diagrams \n";
- std::vector< const char* > filenames;
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- std::cout << "Creating persistence landscapes...\n";
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- Persistence_landscape l( filenames[i] , 1 );
- std::stringstream ss;
- ss << filenames[i] << ".land";
- l.print_to_file( ss.str().c_str() );
- }
- std::cout << "Done \n";
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes/plot_landscapes.cpp
deleted file mode 100644
index 559fc096..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes/plot_landscapes.cpp
+++ /dev/null
@@ -1,50 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program plot persistence landscape stored in a file (the file needs to be created beforehand). Please call the code with the name of a landsape file \n";
- Persistence_landscape l;
- l.load_landscape_from_file( argv[1] );
-
- std::stringstream ss;
- ss << argv[1] << "_gnuplot_script";
- l.plot( ss.str().c_str() );
-
- std::cout << "Done \n";
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp
deleted file mode 100644
index 7c3b8db2..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp
+++ /dev/null
@@ -1,74 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape_on_grid.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program computes average persistence landscape on grid of persistence landscapes on grid created based on persistence diagrams provided as an input. Please call this program with the names of files with persistence diagrams \n";
- std::vector< const char* > filenames;
-
- if ( argc == 1 )
- {
- std::cout << "No input files given, the program will now terminate \n";
- return 1;
- }
-
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- std::cout << "Creating persistence landscapes...\n";
- std::vector< Abs_Topological_data_with_averages* > lands;
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- Persistence_landscape_on_grid* l = new Persistence_landscape_on_grid;
- l->load_landscape_from_file( filenames[i] );
- lands.push_back( (Abs_Topological_data_with_averages*)l );
- }
-
- Persistence_landscape_on_grid av;
- av.compute_average( lands );
-
- av.print_to_file( "average.g_land" );
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- delete lands[i];
- }
-
- std::cout << "Done \n";
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp
deleted file mode 100644
index 20cb52c9..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp
+++ /dev/null
@@ -1,107 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape_on_grid.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute dsitance of persistence landscapes on grid stored in a file (the file needs to be created beforehand). \n";
- std::cout << "The first parameter of a program is an interger p. The program compute L^p distance of the the landscapes on grid. For L^infty distance choose p = -1. \n";
- std::cout << "The remaining parameters of this programs are names of files with persistence landscapes on grid.\n";
-
- if ( argc < 3 )
- {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
- return 1;
- }
-
- int p = atoi( argv[1] );
-
- std::vector< const char* > filenames;
- for ( int i = 2 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
- std::vector< Persistence_landscape_on_grid > landscaspes;
- landscaspes.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- Persistence_landscape_on_grid l;
- l.load_landscape_from_file( filenames[file_no] );
- landscaspes.push_back( l );
- }
-
- //and now we will compute the scalar product of landscapes.
-
- //first we prepare an array:
- std::vector< std::vector< double > > distance( filenames.size() );
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::vector< double > v( filenames.size() , 0 );
- distance[i] = v;
- }
-
- //and now we can compute the scalar product:
- for ( size_t i = 0 ; i != landscaspes.size() ; ++i )
- {
- for ( size_t j = i ; j != landscaspes.size() ; ++j )
- {
- distance[i][j] = distance[j][i] = compute_discance_of_landscapes_on_grid( landscaspes[i], landscaspes[j] , p ) ;
- }
- }
-
- //and now output the result to the screen and a file:
- ofstream out;
- out.open( "distance" );
- for ( size_t i = 0 ; i != distance.size() ; ++i )
- {
- for ( size_t j = 0 ; j != distance.size() ; ++j )
- {
- cout << distance[i][j] << " ";
- out << distance[i][j] << " ";
- }
- cout << endl;
- out << endl;
- }
- out.close();
-
- return 0;
-}
-
-
-
-
-
-
-
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp
deleted file mode 100644
index 056710ff..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp
+++ /dev/null
@@ -1,91 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape_on_grid.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute scalar product of persistence landscapes on grid stored in a file (the file needs to be created beforehand). \n";
- std::cout << "The parameters of this programs are names of files with persistence landscapes on grid.\n";
-
- std::vector< const char* > filenames;
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
- std::vector< Persistence_landscape_on_grid > landscaspes;
- landscaspes.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- Persistence_landscape_on_grid l;
- l.load_landscape_from_file( filenames[file_no] );
- landscaspes.push_back( l );
- }
-
- //and now we will compute the scalar product of landscapes.
-
- //first we prepare an array:
- std::vector< std::vector< double > > scalar_product( filenames.size() );
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::vector< double > v( filenames.size() , 0 );
- scalar_product[i] = v;
- }
-
- //and now we can compute the scalar product:
- for ( size_t i = 0 ; i != landscaspes.size() ; ++i )
- {
- for ( size_t j = i ; j != landscaspes.size() ; ++j )
- {
- scalar_product[i][j] = scalar_product[j][i] = compute_inner_product( landscaspes[i], landscaspes[j] ) ;
- }
- }
-
- //and now output the result to the screen and a file:
- ofstream out;
- out.open( "scalar_product" );
- for ( size_t i = 0 ; i != scalar_product.size() ; ++i )
- {
- for ( size_t j = 0 ; j != scalar_product.size() ; ++j )
- {
- cout << scalar_product[i][j] << " ";
- out << scalar_product[i][j] << " ";
- }
- cout << endl;
- out << endl;
- }
- out.close();
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp
deleted file mode 100644
index 2ac74eb3..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp
+++ /dev/null
@@ -1,80 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape_on_grid.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program creates persistence landscape on grid of diagrams provided as an input.\n";
- std::cout << "The first parameter of a program is an integer, a size of a grid.\n";
- std::cout << "The second and third parameters are min and max of the grid. If you want those numbers to be computed based on the data, set them both to -1 \n";
- std::cout << "The remaining parameters are the names of files with persistence diagrams. \n";
-
- if ( argc < 4 )
- {
- std::cout << "Wrong parameter list, the program will now terminate \n";
- return 1;
- }
-
- size_t size_of_grid = (size_t)atoi( argv[1] );
- double min_ = atof( argv[2] );
- double max_ = atof( argv[3] );
-
- std::vector< const char* > filenames;
- for ( int i = 4 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- std::cout << "Creating persistence landscapes...\n";
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::cout << "Creating persistence landscape on a grid based on a file : " << filenames[i] << std::endl;
- Persistence_landscape_on_grid l;
- if ( (min_ != -1) || (max_ != -1) )
- {
- l = Persistence_landscape_on_grid( filenames[i] , min_ , max_ , size_of_grid );
- }
- else
- {
- //(min_ == -1) && (max_ == -1), in this case the program will find min_ and max_ based on the data.
- l = Persistence_landscape_on_grid( filenames[i] , size_of_grid );
- }
- std::stringstream ss;
- ss << filenames[i] << ".g_land";
- l.print_to_file( ss.str().c_str() );
- }
- std::cout << "Done \n";
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp
deleted file mode 100644
index 54b8367b..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp
+++ /dev/null
@@ -1,55 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Persistence_landscape_on_grid.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program plot persistence landscape on grid stored in a file (the file needs to be created beforehand). Please call the code with the name of a landsape on grid file \n";
- if ( argc == 1 )
- {
- std::cout << "Wrong parameters of a program call, the program will now terminate \n";
- return 1;
- }
- Persistence_landscape_on_grid l;
- l.load_landscape_from_file( argv[1] );
-
- std::stringstream ss;
- ss << argv[1] << "_gnuplot_script";
- l.plot( ss.str().c_str() );
-
- std::cout << "Done \n";
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Gudhi_stat/example/utilities/persistence_vectors/average_persistence_vectors.cpp
deleted file mode 100644
index 1b269e9c..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_vectors/average_persistence_vectors.cpp
+++ /dev/null
@@ -1,75 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Vector_distances_in_diagram.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program computes average persistence vector of persistence vectors created based on persistence diagrams provided as an input. \n";
- std::cout << "Please call this program with the names of files with persistence diagrams \n";
- std::vector< const char* > filenames;
-
- if ( argc == 1 )
- {
- std::cout << "No input files given, the program will now terminate \n";
- return 1;
- }
-
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- std::cout << "Reading persistence vectors...\n";
- std::vector< Abs_Topological_data_with_averages* > lands;
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- Vector_distances_in_diagram< euclidean_distance<double> >* l = new Vector_distances_in_diagram< euclidean_distance<double> >;
- l->load_from_file( filenames[i] );
- lands.push_back( (Abs_Topological_data_with_averages*)l );
- }
-
- Vector_distances_in_diagram< euclidean_distance<double> > av;
- av.compute_average( lands );
-
- av.print_to_file( "average.vect" );
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- delete lands[i];
- }
-
- std::cout << "Done \n";
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Gudhi_stat/example/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp
deleted file mode 100644
index 72026497..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp
+++ /dev/null
@@ -1,108 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Vector_distances_in_diagram.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute distance of persistence vectors stored in a file (the file needs to be created beforehand). \n";
- std::cout << "The first parameter of a program is an interger p. The program compute l^p distance of the vectors. For l^infty distance choose p = -1. \n";
- std::cout << "The remaining parameters of this programs are names of files with persistence vectors.\n";
-
- if ( argc < 3 )
- {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
- return 1;
- }
-
- int p = atoi( argv[1] );
-
- std::vector< const char* > filenames;
- for ( int i = 2 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
- std::vector< Vector_distances_in_diagram< euclidean_distance<double> >* > vectors;
- vectors.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- //cerr << filenames[file_no] << endl;
- Vector_distances_in_diagram< euclidean_distance<double> >* l = new Vector_distances_in_diagram< euclidean_distance<double> >;
- l->load_from_file( filenames[file_no] );
- vectors.push_back( l );
- }
-
- //and now we will compute the scalar product of landscapes.
-
- //first we prepare an array:
- std::vector< std::vector< double > > distance( filenames.size() );
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::vector< double > v( filenames.size() , 0 );
- distance[i] = v;
- }
-
- //and now we can compute the distances:
- for ( size_t i = 0 ; i != vectors.size() ; ++i )
- {
- for ( size_t j = i+1 ; j != vectors.size() ; ++j )
- {
- distance[i][j] = distance[j][i] = ((Vector_distances_in_diagram< euclidean_distance<double> >*)vectors[i])->distance( vectors[j] , p ) ;
- }
- }
-
- //and now output the result to the screen and a file:
- ofstream out;
- out.open( "distance" );
- for ( size_t i = 0 ; i != distance.size() ; ++i )
- {
- for ( size_t j = 0 ; j != distance.size() ; ++j )
- {
- cout << distance[i][j] << " ";
- out << distance[i][j] << " ";
- }
- cout << endl;
- out << endl;
- }
- out.close();
-
- return 0;
-}
-
-
-
-
-
-
-
diff --git a/src/Gudhi_stat/example/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Gudhi_stat/example/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp
deleted file mode 100644
index 16192d52..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp
+++ /dev/null
@@ -1,97 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Vector_distances_in_diagram.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program compute scalar product of persistence vectors stored in a file (the file needs to be created beforehand). \n";
- std::cout << "The parameters of this programs are names of files with persistence vectors.\n";
-
- std::vector< const char* > filenames;
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
- std::vector< Vector_distances_in_diagram< euclidean_distance<double> >* > vectors;
- vectors.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- Vector_distances_in_diagram< euclidean_distance<double> >* l = new Vector_distances_in_diagram< euclidean_distance<double> >;
- l->load_from_file( filenames[file_no] );
- vectors.push_back( l );
- }
-
- //and now we will compute the scalar product of landscapes.
-
- //first we prepare an array:
- std::vector< std::vector< double > > scalar_product( filenames.size() );
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::vector< double > v( filenames.size() , 0 );
- scalar_product[i] = v;
- }
-
- //and now we can compute the scalar product:
- for ( size_t i = 0 ; i != vectors.size() ; ++i )
- {
- for ( size_t j = i ; j != vectors.size() ; ++j )
- {
- scalar_product[i][j] = scalar_product[j][i] = ((Vector_distances_in_diagram< euclidean_distance<double> >*)vectors[i])->compute_scalar_product( vectors[j] ) ;
- }
- }
-
- //and now output the result to the screen and a file:
- ofstream out;
- out.open( "scalar_product" );
- for ( size_t i = 0 ; i != scalar_product.size() ; ++i )
- {
- for ( size_t j = 0 ; j != scalar_product.size() ; ++j )
- {
- cout << scalar_product[i][j] << " ";
- out << scalar_product[i][j] << " ";
- }
- cout << endl;
- out << endl;
- }
- out.close();
-
- //cleaning up
- for ( size_t i = 0 ; i != vectors.size() ; ++i )
- {
- delete vectors[i];
- }
-
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Gudhi_stat/example/utilities/persistence_vectors/create_persistence_vectors.cpp
deleted file mode 100644
index 99015e41..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_vectors/create_persistence_vectors.cpp
+++ /dev/null
@@ -1,57 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Vector_distances_in_diagram.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program creates persistence vectors of diagrams provided as an input. Please call this program with the names of files with persistence diagrams \n";
- std::vector< const char* > filenames;
- for ( int i = 1 ; i < argc ; ++i )
- {
- filenames.push_back( argv[i] );
- }
-
- for ( size_t i = 0 ; i != filenames.size() ; ++i )
- {
- std::cerr << "Creatign persistence vectors based on a file : " << filenames[i] << std::endl;
- Vector_distances_in_diagram< euclidean_distance<double> > l( filenames[i] , -1 );
- std::stringstream ss;
- ss << filenames[i] << ".vect";
- l.print_to_file( ss.str().c_str() );
- }
- std::cout << "Done \n";
- return 0;
-}
-
diff --git a/src/Gudhi_stat/example/utilities/persistence_vectors/plot_persistence_vectors.cpp b/src/Gudhi_stat/example/utilities/persistence_vectors/plot_persistence_vectors.cpp
deleted file mode 100644
index ad6c06e2..00000000
--- a/src/Gudhi_stat/example/utilities/persistence_vectors/plot_persistence_vectors.cpp
+++ /dev/null
@@ -1,51 +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): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-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 <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <gudhi/abstract_classes/Abs_Topological_data.h>
-#include <gudhi/concretizations/Vector_distances_in_diagram.h>
-
-
-
-using namespace Gudhi;
-using namespace Gudhi::Gudhi_stat;
-
-#include <iostream>
-#include <sstream>
-
-
-int main( int argc , char** argv )
-{
- std::cout << "This program create a Gnuplot script to plot persistence vector. Please call this program with the name of file with persistence vector. \n";
- if ( argc != 2 )
- {
- std::cout << "Wrong number of parameters, the program will now terminate. \n";
- return 1;
- }
- Vector_distances_in_diagram< euclidean_distance<double> > l;
- l.load_from_file( argv[1] );
- l.plot( argv[1] );
-
- return 0;
-}
-
diff --git a/src/Gudhi_stat/example/vector_representation.cpp b/src/Gudhi_stat/example/vector_representation.cpp
index 358de1b0..0581baf4 100644
--- a/src/Gudhi_stat/example/vector_representation.cpp
+++ b/src/Gudhi_stat/example/vector_representation.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Pawel Dlotko
*
- * Copyright (C) 2015 INRIA Sophia-Saclay (France)
+ * Copyright (C) 2015 INRIA (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