summaryrefslogtreecommitdiff
path: root/src/Gudhi_stat/example
diff options
context:
space:
mode:
authorpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-28 12:51:57 +0000
committerpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-28 12:51:57 +0000
commitf07fc696dbb57d162b383f509619b99340f600d2 (patch)
treed2a4ad91d5c490f50e2ae6c42eb571b259d1d1a9 /src/Gudhi_stat/example
parenta70ddca72229b72db355b1bd1c04afc272084e6b (diff)
a few modifications to persisntence heat maps. Removing PSSK, since it is not needed. PSSk is exactluy the same as any other heat map. The difference is the way it is created. Comparision, averaging or scalar products are the same. That is why I have removed PSSK folder, and add a few other ways of creating heat maps in persistence_heat_maps folder.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@1580 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 2f8f2bde0fdbe69b582d0afdbb5bf6e4fe3fff31
Diffstat (limited to 'src/Gudhi_stat/example')
-rw-r--r--src/Gudhi_stat/example/utilities/PSSK/average_pssk.cpp73
-rw-r--r--src/Gudhi_stat/example/utilities/PSSK/compute_distance_of_pssk.cpp107
-rw-r--r--src/Gudhi_stat/example/utilities/PSSK/compute_scalar_product_of_pssk.cpp90
-rw-r--r--src/Gudhi_stat/example/utilities/PSSK/plot_pssk.cpp44
-rwxr-xr-xsrc/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistencebin0 -> 80766 bytes
-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.cpp (renamed from src/Gudhi_stat/example/utilities/PSSK/create_pssk.cpp)0
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/aaa53
-rw-r--r--src/Gudhi_stat/example/utilities/persistence_intervals/aaa_Gnuplot_script216
11 files changed, 494 insertions, 326 deletions
diff --git a/src/Gudhi_stat/example/utilities/PSSK/average_pssk.cpp b/src/Gudhi_stat/example/utilities/PSSK/average_pssk.cpp
deleted file mode 100644
index 08ea60d3..00000000
--- a/src/Gudhi_stat/example/utilities/PSSK/average_pssk.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/>.
- */
-
-
-
-//gudhi include
-#include <gudhi/concretizations/PSSK.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 )
- {
- PSSK* l = new PSSK;
- l->load_from_file( filenames[i] );
- maps.push_back( (Abs_Topological_data_with_averages*)l );
- }
-
- PSSK av;
- av.compute_average( maps );
-
- av.print_to_file( "average.pssk" );
-
- 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/PSSK/compute_distance_of_pssk.cpp b/src/Gudhi_stat/example/utilities/PSSK/compute_distance_of_pssk.cpp
deleted file mode 100644
index 8eacbd70..00000000
--- a/src/Gudhi_stat/example/utilities/PSSK/compute_distance_of_pssk.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/>.
- */
-
-
-
-//gudhi include
-#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 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 )
- {
- PSSK* l = new PSSK;
- 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/PSSK/compute_scalar_product_of_pssk.cpp b/src/Gudhi_stat/example/utilities/PSSK/compute_scalar_product_of_pssk.cpp
deleted file mode 100644
index 048b581c..00000000
--- a/src/Gudhi_stat/example/utilities/PSSK/compute_scalar_product_of_pssk.cpp
+++ /dev/null
@@ -1,90 +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/>.
- */
-
-
-//gudhi include
-#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 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< PSSK* > maps;
- maps.reserve( filenames.size() );
- for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no )
- {
- PSSK* l = new PSSK;
- 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/PSSK/plot_pssk.cpp b/src/Gudhi_stat/example/utilities/PSSK/plot_pssk.cpp
deleted file mode 100644
index 141024a5..00000000
--- a/src/Gudhi_stat/example/utilities/PSSK/plot_pssk.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/>.
- */
-
-
-
-//gudhi include
-#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 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";
- PSSK l;
- l.load_from_file( argv[1] );
- l.plot( argv[1] );
- return 0;
-}
diff --git a/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence
new file mode 100755
index 00000000..08e53590
--- /dev/null
+++ b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence
Binary files differ
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
new file mode 100644
index 00000000..253320ff
--- /dev/null
+++ b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp
@@ -0,0 +1,79 @@
+/* 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
new file mode 100644
index 00000000..d7f4fbdd
--- /dev/null
+++ b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp
@@ -0,0 +1,79 @@
+/* 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
new file mode 100644
index 00000000..eac0d067
--- /dev/null
+++ b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp
@@ -0,0 +1,79 @@
+/* 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/PSSK/create_pssk.cpp b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_pssk.cpp
index ccd884ec..ccd884ec 100644
--- a/src/Gudhi_stat/example/utilities/PSSK/create_pssk.cpp
+++ b/src/Gudhi_stat/example/utilities/persistence_heat_maps/create_pssk.cpp
diff --git a/src/Gudhi_stat/example/utilities/persistence_intervals/aaa b/src/Gudhi_stat/example/utilities/persistence_intervals/aaa
index c0db80ab..5aed2ec0 100644
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/aaa
+++ b/src/Gudhi_stat/example/utilities/persistence_intervals/aaa
@@ -1,2 +1,51 @@
-1 2
-5 6 \ No newline at end of file
+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
index af68b9b9..3ff83e9c 100644
--- a/src/Gudhi_stat/example/utilities/persistence_intervals/aaa_Gnuplot_script
+++ b/src/Gudhi_stat/example/utilities/persistence_intervals/aaa_Gnuplot_script
@@ -1,12 +1,208 @@
-set xrange [0.95 : 6.0505]
-set yrange [0 : 1.01]
+set xrange [0.131016 : 0.844554]
+set yrange [0 : 16.16]
plot '-' using 1:2 notitle with lp
-1 0
-1 1
-2 1
-2 0
-5 0
-5 1
-6 1
-6 0
+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