From 5de02a8e89ce7905281a0ef6d40f82ef04d426d6 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 30 May 2017 11:14:43 +0000 Subject: Typo git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2472 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 457b970258b8a99519db664358c19d0dee80d879 --- .../persistence_landscapes/plot_landscapes.cpp | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp new file mode 100644 index 00000000..b79a689d --- /dev/null +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -0,0 +1,47 @@ +/* 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 (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + + + +using namespace Gudhi; +using namespace Gudhi::Persistence_representations; + +#include +#include + + +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; +} -- cgit v1.2.3 From 0654bfbab17fe16edf90445f0a351454b460028f Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 30 May 2017 15:20:29 +0000 Subject: Fix spell checker errors git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2475 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 94422e6f356532b2db4dc5a55cbb851210b3c36d --- CMakeLists.txt | 16 +- src/CMakeLists.txt | 12 +- src/Doxyfile | 4 +- .../concept/Real_valued_topological_data.h | 21 ++- .../concept/Topological_data_with_averages.h | 11 +- .../concept/Topological_data_with_distances.h | 22 ++- .../concept/Topological_data_with_scalar_product.h | 15 +- .../concept/Vectorized_topological_data.h | 15 +- .../doc/Persistence_representations_doc.h | 52 +++--- .../example/persistence_heat_maps.cpp | 4 +- .../example/persistence_intervals.cpp | 4 +- .../example/persistence_landscape.cpp | 4 +- .../example/persistence_landscape_on_grid.cpp | 2 +- .../include/gudhi/PSSK.h | 15 +- .../include/gudhi/Persistence_heat_maps.h | 85 +++++---- .../include/gudhi/Persistence_intervals.h | 106 +++--------- .../gudhi/Persistence_intervals_with_distances.h | 12 +- .../include/gudhi/Persistence_landscape.h | 116 +++++-------- .../include/gudhi/Persistence_landscape_on_grid.h | 192 ++++++--------------- .../include/gudhi/Persistence_vectors.h | 105 ++++------- .../gudhi/common_persistence_representations.h | 28 ++- .../include/gudhi/read_persistence_from_file.h | 104 ++--------- .../compute_distance_of_persistence_heat_maps.cpp | 9 +- ...h_m_weighted_by_arctan_of_their_persistence.cpp | 4 +- ...te_p_h_m_weighted_by_distance_from_diagonal.cpp | 4 +- ...ate_p_h_m_weighted_by_squared_diag_distance.cpp | 2 +- .../create_persistence_heat_maps.cpp | 2 +- .../persistence_heat_maps/create_pssk.cpp | 2 +- .../plot_persistence_heat_map.cpp | 2 +- .../compute_bottleneck_distance.cpp | 2 +- .../plot_histogram_of_intervals_lengths.cpp | 2 +- .../plot_persistence_Betti_numbers.cpp | 7 +- .../compute_distance_of_landscapes.cpp | 2 +- .../persistence_landscapes/plot_landscapes.cpp | 2 +- .../compute_distance_of_landscapes_on_grid.cpp | 6 +- .../plot_landscapes_on_grid.cpp | 2 +- .../compute_distance_of_persistence_vectors.cpp | 3 +- .../create_persistence_vectors.cpp | 3 +- src/cmake/modules/GUDHI_user_version_target.txt | 2 +- src/common/doc/main_page.h | 13 +- src/common/include/gudhi/distance_functions.h | 5 + 41 files changed, 384 insertions(+), 635 deletions(-) (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c772506..30306885 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,7 @@ include_directories(src/Spatial_searching/include/) include_directories(src/Subsampling/include/) include_directories(src/Tangential_complex/include/) include_directories(src/Witness_complex/include/) -include_directories(src/Gudhi_stat/include/) +include_directories(src/Persistence_representations/include/) add_subdirectory(src/common/example) add_subdirectory(src/common/test) @@ -82,13 +82,13 @@ add_subdirectory(src/Bottleneck_distance/test) add_subdirectory(src/Bottleneck_distance/benchmark) add_subdirectory(src/Rips_complex/example) add_subdirectory(src/Rips_complex/test) -add_subdirectory(src/Gudhi_stat/test) -add_subdirectory(src/Gudhi_stat/example) -add_subdirectory(src/Gudhi_stat/utilities/persistence_heat_maps) -add_subdirectory(src/Gudhi_stat/utilities/persistence_intervals) -add_subdirectory(src/Gudhi_stat/utilities/persistence_landscapes) -add_subdirectory(src/Gudhi_stat/utilities/persistence_landscapes_on_grid) -add_subdirectory(src/Gudhi_stat/utilities/persistence_vectors) +add_subdirectory(src/Persistence_representations/test) +add_subdirectory(src/Persistence_representations/example) +add_subdirectory(src/Persistence_representations/utilities/persistence_heat_maps) +add_subdirectory(src/Persistence_representations/utilities/persistence_intervals) +add_subdirectory(src/Persistence_representations/utilities/persistence_landscapes) +add_subdirectory(src/Persistence_representations/utilities/persistence_landscapes_on_grid) +add_subdirectory(src/Persistence_representations/utilities/persistence_vectors) # data points generator add_subdirectory(data/points/generator) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fe4eb677..06e479be 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -52,12 +52,12 @@ add_subdirectory(example/Spatial_searching) add_subdirectory(example/Subsampling) add_subdirectory(example/Tangential_complex) add_subdirectory(example/Bottleneck_distance) -add_subdirectory(example/Gudhi_stat) -add_subdirectory(utilities/Gudhi_stat/persistence_heat_maps) -add_subdirectory(utilities/Gudhi_stat/persistence_intervals) -add_subdirectory(utilities/Gudhi_stat/persistence_landscapes) -add_subdirectory(utilities/Gudhi_stat/persistence_landscapes_on_grid) -add_subdirectory(utilities/Gudhi_stat/persistence_vectors) +add_subdirectory(example/Persistence_representations) +add_subdirectory(utilities/Persistence_representations/persistence_heat_maps) +add_subdirectory(utilities/Persistence_representations/persistence_intervals) +add_subdirectory(utilities/Persistence_representations/persistence_landscapes) +add_subdirectory(utilities/Persistence_representations/persistence_landscapes_on_grid) +add_subdirectory(utilities/Persistence_representations/persistence_vectors) # data points generator add_subdirectory(data/points/generator) diff --git a/src/Doxyfile b/src/Doxyfile index f4df4e84..eb0b3e9e 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -852,7 +852,7 @@ IMAGE_PATH = doc/Skeleton_blocker/ \ doc/Spatial_searching/ \ doc/Tangential_complex/ \ doc/Bottleneck_distance/ \ - doc/Gudhi_stat/ + doc/Persistence_representations/ # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -2116,7 +2116,7 @@ COLLABORATION_GRAPH = NO # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. -GROUP_GRAPHS = YES +GROUP_GRAPHS = NO # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling diff --git a/src/Persistence_representations/concept/Real_valued_topological_data.h b/src/Persistence_representations/concept/Real_valued_topological_data.h index 4d4ee8d3..5a15c769 100644 --- a/src/Persistence_representations/concept/Real_valued_topological_data.h +++ b/src/Persistence_representations/concept/Real_valued_topological_data.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -20,6 +20,14 @@ * along with this program. If not, see . */ +#ifndef CONCEPT_REAL_VALUED_TOPOLOGICAL_DATA_H_ +#define CONCEPT_REAL_VALUED_TOPOLOGICAL_DATA_H_ + +namespace Gudhi { + +namespace Persistence_representations { + + /** \brief The concept Real_valued_topological_data describes the requirements * for a type to implement a container that allows computations of its projections to R. */ @@ -27,12 +35,19 @@ class Real_valued_topological_data { public: /** - * Typically there are various ways data can be projected to R. This function give us the number of functions for vectorization provided by a given class. + * Typically there are various ways data can be projected to R. This function gives us the number of functions for + * vectorization provided by a given class. **/ size_t number_of_projections_to_R(); /** - * This is a function to compute the projection from this container to reals. The parameter of a function have to be between 0 and the value returned by number_of_projections_to_R(). + * This is a function to compute the projection from this container to reals. The parameter of a function have to + * be between 0 and the value returned by number_of_projections_to_R(). **/ double project_to_R( size_t number_of_projection ); }; +} // namespace Persistence_representations + +} // namespace Gudhi + +#endif // CONCEPT_REAL_VALUED_TOPOLOGICAL_DATA_H_ diff --git a/src/Persistence_representations/concept/Topological_data_with_averages.h b/src/Persistence_representations/concept/Topological_data_with_averages.h index aeeb94f0..0501c306 100644 --- a/src/Persistence_representations/concept/Topological_data_with_averages.h +++ b/src/Persistence_representations/concept/Topological_data_with_averages.h @@ -5,7 +5,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -21,7 +21,12 @@ * along with this program. If not, see . */ +#ifndef CONCEPT_TOPOLOGICAL_DATA_WITH_AVERAGES_H_ +#define CONCEPT_TOPOLOGICAL_DATA_WITH_AVERAGES_H_ +namespace Gudhi { + +namespace Persistence_representations { /** \brief The concept Topological_data_with_averages describes the requirements * for a type to implement a container that allows computations of averages. @@ -33,4 +38,8 @@ public: void compute_average( const std::vector< Topological_data_with_averages* >& to_average ); }; +} // namespace Persistence_representations + +} // namespace Gudhi +#endif // CONCEPT_TOPOLOGICAL_DATA_WITH_AVERAGES_H_ diff --git a/src/Persistence_representations/concept/Topological_data_with_distances.h b/src/Persistence_representations/concept/Topological_data_with_distances.h index 1318b9d1..2e6de729 100644 --- a/src/Persistence_representations/concept/Topological_data_with_distances.h +++ b/src/Persistence_representations/concept/Topological_data_with_distances.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -20,11 +20,22 @@ * along with this program. If not, see . */ +#ifndef CONCEPT_TOPOLOGICAL_DATA_WITH_DISTANCES_H_ +#define CONCEPT_TOPOLOGICAL_DATA_WITH_DISTANCES_H_ + +namespace Gudhi { + +namespace Persistence_representations { + + /** \brief The concept Topological_data_with_distances describes the requirements - * for a type to implement a container that allows computations of distance to another contained of that type. + * for a type to implement a container that allows computations of distance to another contained of that type. + * \details * The second parameter of the distance function allow to declare power of a distance. The exact meaning of that * number will be different for different distances. A few examples are given below: - * In case of p-Wasserstein distance, the power is equal to p. power = std::limit::max() for bottleneck distance. + * In case of p-Wasserstein distance, the power is equal to p. power = std::limit::max() for bottleneck + * distance. + * * In case of L^p landscape distance, the power is equal to p. s */ class Topological_data_with_distances @@ -33,3 +44,8 @@ public: double distance( const Topological_data_with_distances& second , double power = 1); }; +} // namespace Persistence_representations + +} // namespace Gudhi + +#endif // CONCEPT_TOPOLOGICAL_DATA_WITH_DISTANCES_H_ diff --git a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h index f32271c7..203a1d91 100644 --- a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h +++ b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -20,6 +20,13 @@ * along with this program. If not, see . */ +#ifndef CONCEPT_TOPOLOGICAL_DATA_WITH_SCALAR_PRODUCT_H_ +#define CONCEPT_TOPOLOGICAL_DATA_WITH_SCALAR_PRODUCT_H_ + +namespace Gudhi { + +namespace Persistence_representations { + /** \brief The concept Topological_data_with_scalar_product describes the requirements * for a type to implement a container that allows computations of scalar products. @@ -29,3 +36,9 @@ class Topological_data_with_scalar_product public: double compute_scalar_product( const Topological_data_with_scalar_product& second ); }; + +} // namespace Persistence_representations + +} // namespace Gudhi + +#endif // CONCEPT_TOPOLOGICAL_DATA_WITH_SCALAR_PRODUCT_H_ diff --git a/src/Persistence_representations/concept/Vectorized_topological_data.h b/src/Persistence_representations/concept/Vectorized_topological_data.h index 2dd966fd..8d4105a2 100644 --- a/src/Persistence_representations/concept/Vectorized_topological_data.h +++ b/src/Persistence_representations/concept/Vectorized_topological_data.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -20,6 +20,12 @@ * along with this program. If not, see . */ +#ifndef CONCEPT_VECTORIZED_TOPOLOGICAL_DATA_H_ +#define CONCEPT_VECTORIZED_TOPOLOGICAL_DATA_H_ + +namespace Gudhi { + +namespace Persistence_representations { /** \brief The concept Vectorized_topological_data describes the requirements * for a type to implement a container that allows vectorization. @@ -28,7 +34,7 @@ class Vectorized_topological_data { public: /** - * There are various ways data can be verctorized. This function give us the number of functions for vectorization provided by a given class. + * There are various ways data can be vectorized. This function give us the number of functions for vectorization provided by a given class. **/ size_t number_of_vectorize_functions(); /** @@ -37,3 +43,8 @@ public: std::vector vectorize( int number_of_function ); }; +} // namespace Persistence_representations + +} // namespace Gudhi + +#endif // CONCEPT_VECTORIZED_TOPOLOGICAL_DATA_H_ diff --git a/src/Persistence_representations/doc/Persistence_representations_doc.h b/src/Persistence_representations/doc/Persistence_representations_doc.h index 215616a0..bc11d2c4 100644 --- a/src/Persistence_representations/doc/Persistence_representations_doc.h +++ b/src/Persistence_representations/doc/Persistence_representations_doc.h @@ -28,12 +28,12 @@ namespace Gudhi { namespace Persistence_representations { -/** \defgroup Persistence_representations Persistence_representations +/** \defgroup Persistence_representations Persistence representations * * \author Pawel Dlotko * * @{ - *\section idea Idea + *\section Persistence_representations_idea Idea *In order to perform most of the statistical tests and machine learning algorithms on a data one need to be able to perform only a very limited number of operations on them. Let us fix a representation of * data of a type A. To perform most of the statistical and machine learning operations one need to be able to compute average of objects of type A (so that the averaged object is also of a type A), to @@ -71,24 +71,24 @@ namespace Persistence_representations { *\li Persistence diagrams / barcodes (allow computation of distances, vectorizations and real value characteristics). * * - *Note that at the while functionalities like averaging, distances and scalar products are fixed, there is no canonical way of vectorizing and computing real valued characteristics of objects. Therefore the + * Note that at the while functionalities like averaging, distances and scalar products are fixed, there is no canonical way of vectorizing and computing real valued characteristics of objects. Therefore the * vectorizations and computation of real value characteristics procedures are quite likely to evolve in the furthering versions of the library. * - *The main aim of this implementation is to be able to implement various statistical methods, both on the level of C++ and on the level of python. The methods will operate on the functionalities offered + * The main aim of this implementation is to be able to implement various statistical methods, both on the level of C++ and on the level of python. The methods will operate on the functionalities offered * by concepts. That means that the statistical and ML methods will be able to operate on any representation that implement the required concept (including the ones that are not in the library at the moment). * That gives provides a framework, that is very easy to extend, for topological statistics. * - *Below we are discussing the representations which are currently implemented in Persistence\_representations package: + * Below we are discussing the representations which are currently implemented in Persistence\_representations package: * - *\section sec_persistence_landscapes Persistence Landscapes - * Reference manual: \ref Gudhi::Persistence_representations::Persistence_landscape - *Persistence landscapes were originally proposed by Bubenik in \cite bubenik_landscapes_2015. Efficient algorithms to compute them rigorously were proposed by Bubenik and Dlotko in \cite bubenik_dlotko_landscapes_2016. The idea of + * \section sec_persistence_landscapes Persistence Landscapes + * Reference manual: \ref Gudhi::Persistence_representations::Persistence_landscape
+ * Persistence landscapes were originally proposed by Bubenik in \cite bubenik_landscapes_2015. Efficient algorithms to compute them rigorously were proposed by Bubenik and Dlotko in \cite bubenik_dlotko_landscapes_2016. The idea of * persistence landscapes is shortly summarized in below. * - *To begin with, suppose we are given a point \f$(b,d) \in \mathbb{R}^2\f$ in a - *persistence diagram. With this point, we associate a piecewise - *linear function \f$f_{(b,d)} : \mathbb{R} \rightarrow [0,\infty)\f$, which is - *defined as + * To begin with, suppose we are given a point \f$(b,d) \in \mathbb{R}^2\f$ in a + * persistence diagram. With this point, we associate a piecewise + * linear function \f$f_{(b,d)} : \mathbb{R} \rightarrow [0,\infty)\f$, which is + * defined as * * \f[f_{(b,d)}(x) = * \left\{ \begin{array}{ccl} @@ -100,16 +100,16 @@ namespace Persistence_representations { * \end{array} \right. *\f] * - *A persistence landscape of the birth-death - *pairs \f$(b_i , d_i)\f$, where \f$i = 1,\ldots,m\f$, which constitute the given - *persistence diagram is the sequence of functions \f$\lambda_k : \mathbb{R} \rightarrow [0,\infty)\f$ for \f$k \in \mathbb{N}\f$, where \f$\lambda_k(x)\f$ - *denotes the \f$k^{\rm th}\f$ largest value of the numbers \f$f_{(b_i,d_i)}(x)\f$, - *for \f$i = 1, \ldots, m\f$, and we define \f$\lambda_k(x) = 0\f$ if \f$k > m\f$. - *Equivalently, this sequence of functions can be combined into a single - *function \f$L : \mathbb{N} \times \mathbb{R} \to [0,\infty)\f$ of two - *variables, if we define \f$L(k,t) = \lambda_k(t)\f$. + * A persistence landscape of the birth-death + * pairs \f$(b_i , d_i)\f$, where \f$i = 1,\ldots,m\f$, which constitute the given + * persistence diagram is the sequence of functions \f$\lambda_k : \mathbb{R} \rightarrow [0,\infty)\f$ for \f$k \in \mathbb{N}\f$, where \f$\lambda_k(x)\f$ + * denotes the \f$k^{\rm th}\f$ largest value of the numbers \f$f_{(b_i,d_i)}(x)\f$, + * for \f$i = 1, \ldots, m\f$, and we define \f$\lambda_k(x) = 0\f$ if \f$k > m\f$. + * Equivalently, this sequence of functions can be combined into a single + * function \f$L : \mathbb{N} \times \mathbb{R} \to [0,\infty)\f$ of two + * variables, if we define \f$L(k,t) = \lambda_k(t)\f$. * - *The detailed description of algorithms used to compute persistence landscapes can be found in \cite bubenik_dlotko_landscapes_2016. + * The detailed description of algorithms used to compute persistence landscapes can be found in \cite bubenik_dlotko_landscapes_2016. * Note that this implementation provides exact representation of landscapes. That have many advantages, but also a few drawbacks. For instance, as discussed * in \cite bubenik_dlotko_landscapes_2016, the exact representation of landscape may be of quadratic size with respect to the input persistence diagram. It may therefore happen * that, for very large diagrams, using this representation may be memory--prohibitive. In such a case, there are two possible ways to proceed: @@ -120,13 +120,13 @@ namespace Persistence_representations { * * *\section sec_landscapes_on_grid Persistence Landscapes on a grid - * Reference manual: \ref Gudhi::Persistence_representations::Persistence_landscape_on_grid - *This is an alternative, not--exact, representation of persistence landscapes defined in the Section \ref sec_persistence_landscapes. Unlike in the Section \ref sec_persistence_landscapes we build a + * Reference manual: \ref Gudhi::Persistence_representations::Persistence_landscape_on_grid
+ * This is an alternative, not--exact, representation of persistence landscapes defined in the Section \ref sec_persistence_landscapes. Unlike in the Section \ref sec_persistence_landscapes we build a * representation of persistence landscape by sampling its values on a finite, equally distributed grid of points. * Since, the persistence landscapes that originate from persistence diagrams have slope \f$1\f$ or \f$-1\f$, we have an estimate of a region between the grid points where the landscape cab be located. * That allows to estimate an error make when performing various operations on landscape. Note that for average landscapes the slope is in range \f$[-1,1]\f$ and similar estimate can be used. * - *Due to a lack of rigorous description of the algorithms to deal with this non--rigorous representaion of persistence landscapes in the literature, we are providing a short discussion of them in below. + * Due to a lack of rigorous description of the algorithms to deal with this non--rigorous representation of persistence landscapes in the literature, we are providing a short discussion of them in below. * *Let us assume that we want to compute persistence landscape on a interval \f$[x,y]\f$. Let us assume that we want to use \f$N\f$ grid points for that purpose. * Then we will sample the persistence landscape on points \f$x_1 = x , x_2 = x + \frac{y-x}{N}, \ldots , x_{N} = y\f$. Persistence landscapes are represented as a vector of @@ -153,7 +153,7 @@ namespace Persistence_representations { *Note that the same representation is used in TDA R-package \cite Fasy_Kim_Lecci_Maria_tda. * *\section sec_persistence_heat_maps Persistence heat maps - * Reference manual: \ref Gudhi::Persistence_representations::Persistence heat maps + * Reference manual: \ref Gudhi::Persistence_representations::Persistence_heat_maps
*This is a general class of discrete structures which are based on idea of placing a kernel in the points of persistence diagrams. *This idea appeared in work by many authors over the last 15 years. As far as we know this idea was firstly described in the work of Bologna group in \cite Ferri_Frosini_comparision_sheme_1 and \cite Ferri_Frosini_comparision_sheme_2. *Later it has been described by Colorado State University group in \cite Persistence_Images_2017. The presented paper in the first time provide a discussion of stability of the representation. @@ -177,7 +177,7 @@ namespace Persistence_representations { * * *\section sec_persistence_vectors Persistence vectors - * Reference manual: \ref Gudhi::Persistence_representations::Persistence vectors + * Reference manual: \ref Gudhi::Persistence_representations::Vector_distances_in_diagram
*This is a representation of persistent homology in a form of a vector which was designed for an application in 3d graphic in \cite Carriere_Oudot_Ovsjanikov_top_signatures_3d. Below we provide a short description of this representation. * *Given a persistence diagram \f$D = \{ (b_i,d_i) \}\f$, for every pair of birth--death points \f$(b_1,d_1)\f$ and \f$(b_2,d_2)\f$ we compute the following three distances: diff --git a/src/Persistence_representations/example/persistence_heat_maps.cpp b/src/Persistence_representations/example/persistence_heat_maps.cpp index da87486d..c75e2731 100644 --- a/src/Persistence_representations/example/persistence_heat_maps.cpp +++ b/src/Persistence_representations/example/persistence_heat_maps.cpp @@ -55,7 +55,7 @@ int main( int argc , char** argv ) persistence2.push_back( std::make_pair(3,5) ); persistence2.push_back( std::make_pair(6,10) ); - //over here we define a function we sill put on a top on every birth--death pair in the persistence interval. It can be anything. Over here we will use standarg Gaussian + //over here we define a function we sill put on a top on every birth--death pair in the persistence interval. It can be anything. Over here we will use standard Gaussian std::vector< std::vector > filter = create_Gaussian_filter(5,1); //creating two heat maps. @@ -72,7 +72,7 @@ int main( int argc , char** argv ) Persistence_heat_maps median; median.compute_median( vector_of_maps ); - //to compute L^1 disance between hm1 and hm2: + //to compute L^1 distance between hm1 and hm2: std::cout << "The L^1 distance is : " << hm1.distance( hm2 , 1 ) << std::endl; //to average of hm1 and hm2: diff --git a/src/Persistence_representations/example/persistence_intervals.cpp b/src/Persistence_representations/example/persistence_intervals.cpp index ed5b4e34..947c9627 100644 --- a/src/Persistence_representations/example/persistence_intervals.cpp +++ b/src/Persistence_representations/example/persistence_intervals.cpp @@ -47,7 +47,7 @@ int main( int argc , char** argv ) std::vector dominant_ten_intervals_length = p.length_of_dominant_intervals(10); - std::cout << "Lendth of ten dominant intervals : " < cumulative_histogram = p.cumulative_histogram_of_lengths( 10 ); - std::cout<< "Cumuative histogram : " <. */ -#pragma once -#ifndef PSSK_H -#define PSSK_H +#ifndef PSSK_H_ +#define PSSK_H_ //gudhi include #include @@ -138,7 +137,7 @@ void PSSK::construct( const std::vector< std::pair >& intervals_ std::cerr << "y_grid : " << y_grid << std::endl; } - //x_grid and y_grid gives a center of the kernel. We want to have its lower left cordner. To get this, we need to shift x_grid and y_grid by a grid diameter. + //x_grid and y_grid gives a center of the kernel. We want to have its lower left corner. To get this, we need to shift x_grid and y_grid by a grid diameter. x_grid -= filter.size()/2; y_grid -= filter.size()/2; //note that the numbers x_grid and y_grid may be negative. @@ -174,8 +173,8 @@ void PSSK::construct( const std::vector< std::pair >& intervals_ } }//construct +} //namespace Persistence_representations +} //namespace Gudhi -#endif -}//namespace Gudhi_stat -}//namespace Gudhi +#endif // PSSK_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index 59e58e41..a20702ff 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef Persistence_heat_maps_H -#define Persistence_heat_maps_H +#ifndef PERSISTENCE_HEAT_MAPS_H_ +#define PERSISTENCE_HEAT_MAPS_H_ //standard include #include @@ -69,7 +69,7 @@ std::vector< std::vector > create_Gaussian_filter( size_t pixel_radius , if ( dbg ) { - std::cerr << "Kernel initalize \n"; + std::cerr << "Kernel initialize \n"; std::cerr << "pixel_radius : " << pixel_radius << std::endl; std::cerr << "kernel.size() : " << kernel.size() << std::endl; getchar(); @@ -114,7 +114,7 @@ std::vector< std::vector > create_Gaussian_filter( size_t pixel_radius , /* -* There are various options to scale the poits depending on their location. One can for instance: +* There are various options to scale the points depending on their location. One can for instance: * (1) do nothing (scale all of them with the weight 1), as in the function constant_function * (2) Scale them by the distance to the diagonal. This is implemented in function * (3) Scale them with the square of their distance to diagonal. This is implemented in function @@ -123,8 +123,8 @@ std::vector< std::vector > create_Gaussian_filter( size_t pixel_radius , /** - * This is one of a scaling functions used to weight poits depending on their persistence and/or location in the diagram. - * This particular functiona is a finction which always assign value 1 to a point in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. + * This particular functionality is a function which always assign value 1 to a point in the diagram. **/ class constant_scaling_function { @@ -137,7 +137,7 @@ public: /** - * This is one of a scaling functions used to weight poits depending on their persistence and/or location in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. * The scaling given by this function to a point (b,d) is Euclidean distance of (b,d) from diagonal. **/ class distance_from_diagonal_scaling @@ -151,7 +151,7 @@ public: }; /** - * This is one of a scaling functions used to weight poits depending on their persistence and/or location in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. * The scaling given by this function to a point (b,d) is a square of Euclidean distance of (b,d) from diagonal. **/ class squared_distance_from_diagonal_scaling @@ -164,7 +164,7 @@ public: }; /** - * This is one of a scaling functions used to weight poits depending on their persistence and/or location in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. * The scaling given by this function to a point (b,d) is an arctan of a persistence of a point (i.e. arctan( b-d ). **/ class arc_tan_of_persistence_of_point @@ -177,7 +177,7 @@ public: }; /** - * This is one of a scaling functions used to weight poits depending on their persistence and/or location in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. * This scaling function do not only depend on a point (p,d) in the diagram, but it depends on the whole diagram. * The longest persistence pair get a scaling 1. Any other pair get a scaling belong to [0,1], which is proportional * to the persistence of that pair. @@ -196,14 +196,19 @@ private: /** - * This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product -**/ + * \class Persistence_heat_maps Persistence_heat_maps.h gudhi/Persistence_heat_maps.h + * \brief A class implementing persistence heat maps. + * + * \ingroup Persistence_representations +**/ + +// This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product template class Persistence_heat_maps { public: /** - * The default constructor. A scaling function from the diagonal is set up to a constant function. The image is not erased below the diagonal. The gaussian have diameter 5. + * The default constructor. A scaling function from the diagonal is set up to a constant function. The image is not erased below the diagonal. The Gaussian have diameter 5. **/ Persistence_heat_maps() { @@ -217,7 +222,7 @@ public: /** * Construction that takes at the input the following parameters: * (1) A vector of pairs of doubles (representing persistence intervals). All other parameters are optional. They are: - * (2) a Gausian filter generated by create_Gaussian_filter filter (the default value of this vaiable is a Gaussian filter of a radius 5), + * (2) a Gaussian filter generated by create_Gaussian_filter filter (the default value of this variable is a Gaussian filter of a radius 5), * (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will be erased by default). * (4) a number of pixels in each direction (set to 1000 by default). * (5) a min x and y value of points that are to be taken into account. By default it is set to std::numeric_limits::max(), in which case the program compute the values based on the data, @@ -226,12 +231,12 @@ public: Persistence_heat_maps( const std::vector< std::pair< double,double > > & interval , std::vector< std::vector > filter = create_Gaussian_filter(5,1) , bool erase_below_diagonal = false , size_t number_of_pixels = 1000 , double min_ = std::numeric_limits::max() , double max_ = std::numeric_limits::max() ); /** - * Construction that takes at the input a name of a file with persistence intervals, a filter (radius 5 by default), a scaling function (constant by default), a boolean value which determines if the area of image below diagonal should, or should not be erased (should by default). The next parameter is the number of pixels in each direction (set to 1000 by default). and min and max values of images (both set to std::numeric_limits::max() by defaulet. If this is the case, the program will pick the right values based on the data). + * Construction that takes at the input a name of a file with persistence intervals, a filter (radius 5 by default), a scaling function (constant by default), a boolean value which determines if the area of image below diagonal should, or should not be erased (should by default). The next parameter is the number of pixels in each direction (set to 1000 by default) and min and max values of images (both set to std::numeric_limits::max() by default. If this is the case, the program will pick the right values based on the data). **/ /** * Construction that takes at the input the following parameters: - * (1) A a name of a file with persistence intervals. The file shold be readable by the function read_persistence_intervals_in_one_dimension_from_file. All other parameters are optional. They are: - * (2) a Gausian filter generated by create_Gaussian_filter filter (the default value of this vaiable is a Gaussian filter of a radius 5), + * (1) A name of a file with persistence intervals. The file should be readable by the function read_persistence_intervals_in_one_dimension_from_file. All other parameters are optional. They are: + * (2) a Gaussian filter generated by create_Gaussian_filter filter (the default value of this variable is a Gaussian filter of a radius 5), * (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will be erased by default). * (4) a number of pixels in each direction (set to 1000 by default). * (5) a min x and y value of points that are to be taken into account. By default it is set to std::numeric_limits::max(), in which case the program compute the values based on the data, @@ -259,14 +264,14 @@ public: //put to file subroutine /** - * The function outputs the perssitence image to a text file. The format as follow: + * The function outputs the persistence image to a text file. The format as follow: * In the first line, the values min and max of the image are stored * In the next lines, we have the persistence images in a form of a bitmap image. **/ void print_to_file( const char* filename )const; /** - * A function that load a heat map from file to the current object (and arase qhatever was stored in the current object before). + * A function that load a heat map from file to the current object (and erase whatever was stored in the current object before). **/ void load_from_file( const char* filename ); @@ -347,7 +352,7 @@ public: /** - * A function to generate a gnuplot script to vizualize the persistent image. + * A function to generate a gnuplot script to visualize the persistent image. **/ void plot( const char* filename )const; @@ -474,7 +479,7 @@ public: //Implementations of functions for various concepts. /** - * This function produce a vector of doubles based on a persisence heat map. It is required in a concept Vectorized_topological_data + * This function produce a vector of doubles based on a persistence heat map. It is required in a concept Vectorized_topological_data */ std::vector vectorize( int number_of_function )const; /** @@ -486,9 +491,9 @@ public: } /** - * This function is required by the Real_valued_topological_data concept. It returns various projections od the persistence heat map to a real line. - * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it - * will be most likelly changed in the next versions. + * This function is required by the Real_valued_topological_data concept. It returns various projections on the persistence heat map to a real line. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it + * will be most likely changed in the next versions. **/ double project_to_R( int number_of_function )const; /** @@ -515,7 +520,7 @@ public: /** * A function to compute scalar product of persistence heat maps. - * The parameter of this functionis a const reference to an object of a class Persistence_heat_maps. + * The parameter of this function is a const reference to an object of a class Persistence_heat_maps. * This function is required in Topological_data_with_scalar_product concept. **/ double compute_scalar_product( const Persistence_heat_maps& second_ )const; @@ -559,7 +564,6 @@ protected: } //data - //double (*scalling_function_with_respect_to_distance_from_diagonal)( const std::pair< double , double >& point_in_diagram ); Scalling_of_kernels f; bool erase_below_diagonal; double min_; @@ -583,7 +587,7 @@ void Persistence_heat_maps::construct( const std::vector< s if ( min_ == max_ ) { - if (dbg)std::cerr << "min and max parameters will be etermined based on intervals \n"; + if (dbg)std::cerr << "min and max parameters will be determined based on intervals \n"; //in this case, we want the program to set up the min_ and max_ values by itself. min_ = std::numeric_limits::max(); max_ = -std::numeric_limits::max(); @@ -636,7 +640,7 @@ void Persistence_heat_maps::construct( const std::vector< s std::cerr << "y_grid : " << y_grid << std::endl; } - //x_grid and y_grid gives a center of the kernel. We want to have its lower left cordner. To get this, we need to shift x_grid and y_grid by a grid diameter. + //x_grid and y_grid gives a center of the kernel. We want to have its lower left corner. To get this, we need to shift x_grid and y_grid by a grid diameter. x_grid -= filter.size()/2; y_grid -= filter.size()/2; //note that the numbers x_grid and y_grid may be negative. @@ -711,11 +715,6 @@ Persistence_heat_maps::Persistence_heat_maps( const char* f { intervals_ = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); } - //std::cerr << "intervals_.size() : " << intervals_.size() << std::endl; - //for ( size_t i = 0 ; i != intervals_.size() ; ++i ) - //{ - // std::cerr << intervals_[i].first << " " << intervals_[i].second << std::endl; - //} this->construct( intervals_ , filter, erase_below_diagonal , number_of_pixels , min_ , max_ ); this->set_up_parameters_for_basic_classes(); } @@ -956,11 +955,11 @@ double Persistence_heat_maps::distance( const Persistence_h //first we need to check if (*this) and second are defined on the same domain and have the same dimensions: if ( !this->check_if_the_same(second) ) { - std::cerr << "The persistence images are of noncompatible sizes. We cannot therefore compute distance between them. The program will now terminate"; - throw "The persistence images are of noncompatible sizes. We cannot therefore compute distance between them. The program will now terminate"; + std::cerr << "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; + throw "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; } - //if we are here, we know that the two persistence iomages are defined on the same domain, so we can start computing their distances: + //if we are here, we know that the two persistence images are defined on the same domain, so we can start computing their distances: double distance = 0; if ( power < std::numeric_limits::max() ) @@ -1016,11 +1015,11 @@ double Persistence_heat_maps::compute_scalar_product( const //first we need to check if (*this) and second are defined on the same domain and have the same dimensions: if ( !this->check_if_the_same(second) ) { - std::cerr << "The persistence images are of noncompatible sizes. We cannot therefore compute distance between them. The program will now terminate"; - throw "The persistence images are of noncompatible sizes. We cannot therefore compute distance between them. The program will now terminate"; + std::cerr << "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; + throw "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; } - //if we are here, we know that the two persistence iomages are defined on the same domain, so we can start computing their scalar product: + //if we are here, we know that the two persistence images are defined on the same domain, so we can start computing their scalar product: double scalar_prod = 0; for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) { @@ -1035,8 +1034,8 @@ double Persistence_heat_maps::compute_scalar_product( const -}//namespace Gudhi_stat -}//namespace Gudhi +} // namespace Persistence_representations +} // namespace Gudhi -#endif +#endif // PERSISTENCE_HEAT_MAPS_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index 792c0a28..40c24670 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef Persistence_intervals_H_ -#define Persistence_intervals_H_ +#ifndef PERSISTENCE_INTERVALS_H_ +#define PERSISTENCE_INTERVALS_H_ //gudhi include #include @@ -48,14 +48,14 @@ class Persistence_intervals { public: /** - * This is a constructor of a class Persistence_intervals from a text file. Each line of the input file is supposed to contain two numbers of a type doube (or convertable to double) + * This is a constructor of a class Persistence_intervals from a text file. Each line of the input file is supposed to contain two numbers of a type double (or convertible to double) * representing the birth and the death of the persistence interval. If the pairs are not sorted so that birth <= death, then the constructor will sort then that way. - * * The second parameter of a constructor is a dimension of intervals to be read from a file. If your file contains only birt-death pairs, use the default value. + * * The second parameter of a constructor is a dimension of intervals to be read from a file. If your file contains only birth-death pairs, use the default value. **/ Persistence_intervals( const char* filename , unsigned dimension = std::numeric_limits::max() ); /** - * This is a constructor of a class Persistence_intervals from a vector of pairs. Each pair is assumed to represent a persistence interval. We assume that the first elemnets of pairs + * This is a constructor of a class Persistence_intervals from a vector of pairs. Each pair is assumed to represent a persistence interval. We assume that the first elements of pairs * are smaller or equal the second elements of pairs. **/ Persistence_intervals( const std::vector< std::pair< double,double > >& intervals ); @@ -102,15 +102,15 @@ public: std::vector< std::pair > dominant_intervals( size_t where_to_cut = 100 )const; /** - * Procedure to compute a histogram of interva's length. A histogram is a block plot. The number of blocks is determined by the first parameter of the function (set by default to 10). + * Procedure to compute a histogram of interval's length. A histogram is a block plot. The number of blocks is determined by the first parameter of the function (set by default to 10). * For the sake of argument let us assume that the length of the longest interval is 1 and the number of bins is 10. In this case the i-th block correspond to a range between i-1/10 and i10. * The vale of a block supported at the interval is the number of persistence intervals of a length between x_0 and x_1. **/ std::vector< size_t > histogram_of_lengths( size_t number_of_bins = 10 )const; /** - * Based on a histogram of intervals lengts computed by the function histogram_of_lengths H the procedure below computes the cumulative histogram. The i-th position of the resulting histogram - * is the sume of values of H for the positions from 0 to i. + * Based on a histogram of intervals lengths computed by the function histogram_of_lengths H the procedure below computes the cumulative histogram. The i-th position of the resulting histogram + * is the sum of values of H for the positions from 0 to i. **/ std::vector< size_t > cumulative_histogram_of_lengths( size_t number_of_bins = 10 )const; @@ -127,13 +127,13 @@ public: std::vector< double > cumulative_characteristic_function_of_diagram( double x_min , double x_max , size_t number_of_bins = 10 )const; /** - * Compute the funtion of persistence Betti numbers. The returned value is a vector of pair. First element of each pair is a place where persistence Betti numbers change. + * Compute the function of persistence Betti numbers. The returned value is a vector of pair. First element of each pair is a place where persistence Betti numbers change. * Second element of each pair is the value of Persistence Betti numbers at that point. **/ std::vector< std::pair< double , size_t > > compute_persistent_betti_numbers()const; /** - *This is a non optimal procedure that compute vector of distances from each point of diagram to its k-th nearest neighbor (k is a parameted of the program). The resulting vector is by default truncated to 10 + *This is a non optimal procedure that compute vector of distances from each point of diagram to its k-th nearest neighbor (k is a parameter of the program). The resulting vector is by default truncated to 10 *elements (this value can be changed by using the second parameter of the program). The points are returned in order from the ones which are farthest away from their k-th nearest neighbors. **/ std::vector< double > k_n_n( size_t k , size_t where_to_cut = 10 )const; @@ -188,12 +188,9 @@ public: std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" << nameStr << "' in gnuplot to visualize." << std::endl; } - - - /** - * Retun numbr of points in the diagram. + * Return number of points in the diagram. **/ size_t size()const{return this->intervals.size();} @@ -207,25 +204,12 @@ public: } - - - - - - - - - - - - - //Implementations of functions for various concepts. /** - * This is a simple function projectig the persistence intervals to a real number. The function we use here is a sum of squared lendgths of intervals. It can be naturally interpreted as + * This is a simple function projecting the persistence intervals to a real number. The function we use here is a sum of squared lengths of intervals. It can be naturally interpreted as * sum of step function, where the step hight it equal to the length of the interval. - * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it - * will be most likelly changed in the next versions. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it + * will be most likely changed in the next versions. **/ double project_to_R( int number_of_function )const; /** @@ -237,14 +221,14 @@ public: } /** - * Return a familly of vectors obtained from the persistence diagram. The i-th vector consist of the lenfth of i dominant persistence intervals. + * Return a family of vectors obtained from the persistence diagram. The i-th vector consist of the length of i dominant persistence intervals. **/ std::vector vectorize( int number_of_function )const { return this->length_of_dominant_intervals( number_of_function ); } /** - * This function return the number of functions that allows vectorization of a persisence diagram. It is required in a concept Vectorized_topological_data. + * This function return the number of functions that allows vectorization of a persistence diagram. It is required in a concept Vectorized_topological_data. **/ size_t number_of_vectorize_functions()const { @@ -252,19 +236,7 @@ public: } //end of implementation of functions needed for concepts. - //end of implementation of functions needed for concepts. - - - - - - - - - - - - + //For visualization use output from vectorize and build histograms. std::vector< std::pair< double,double > > output_for_visualization() @@ -289,37 +261,6 @@ protected: Persistence_intervals::Persistence_intervals( const char* filename , unsigned dimension ) { - //bool dbg = false; - //ifstream in; - //in.open( filename ); - - //if ( !in.good() ) - //{ - // throw("File with the persistence diagram do not exist, the program will now terminate.\n"); - //} - - //while ( true ) - //{ - // double first; - // double second; - // in >> first >> second; - - // if ( first > second ) - // { - // double buf = first; - // first = second; - // second = buf; - // } - - // if ( in.eof() )break; - // this->intervals.push_back( std::make_pair( first,second ) ); - // if ( dbg ) - // { - // std::cerr << "Adding interval [ " << first << " , " << second << " ]\n"; - // getchar(); - // } - //} - //in.close(); if ( dimension == std::numeric_limits::max() ) { this->intervals = read_persistence_intervals_in_one_dimension_from_file( filename ); @@ -490,7 +431,6 @@ std::vector< double > Persistence_intervals::characteristic_function_of_diagram( { result[pos] += ( (x_max - x_min)/(double)number_of_bins ) * ( this->intervals[i].second - this->intervals[i].first ); } - //cerr << "x_max : " << x_max << " x_min : " << x_min << " , number_of_bins : " << number_of_bins << " this->intervals[i].second : " << this->intervals[i].second << " this->intervals[i].first : " << this->intervals[i].first << endl; if ( dbg ) { std::cerr << "Result at this stage \n"; @@ -499,7 +439,6 @@ std::vector< double > Persistence_intervals::characteristic_function_of_diagram( std::cerr << result[aa] << " "; } std::cerr << std::endl; - //getchar(); } } return result; @@ -599,8 +538,7 @@ std::vector< double > Persistence_intervals::k_n_n( size_t k , size_t where_to_c { distancesFromI.push_back( compute_euclidean_distance( this->intervals[i] , this->intervals[j] ) ); } - //distances.push_back( distancesFromI ); - //also add a distance from this guy to daigonal: + //also add a distance from this guy to diagonal: double distanceToDiagonal = compute_euclidean_distance( this->intervals[i] , std::make_pair( 0.5*(this->intervals[i].first + this->intervals[i].second) , 0.5*(this->intervals[i].first + this->intervals[i].second) ) ); distances_from_diagonal[i] = distanceToDiagonal; @@ -694,7 +632,7 @@ double Persistence_intervals::project_to_R( int number_of_function )const } -}//namespace gudhi stat -}//namespace gudhi +} // namespace Persistence_representations +} // namespace gudhi -#endif +#endif // PERSISTENCE_INTERVALS_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h index 7ef711e9..0da58399 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef Persistence_intervals_WITH_DISTANCES_H_ -#define Persistence_intervals_WITH_DISTANCES_H_ +#ifndef PERSISTENCE_INTERVALS_WITH_DISTANCES_H_ +#define PERSISTENCE_INTERVALS_WITH_DISTANCES_H_ #include @@ -59,7 +59,7 @@ public: }; -}//namespace gudhi stat -}//namespace gudhi +} // namespace Persistence_representations +} // namespace gudhi -#endif +#endif // PERSISTENCE_INTERVALS_WITH_DISTANCES_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape.h b/src/Persistence_representations/include/gudhi/Persistence_landscape.h index 9a177b60..642bba84 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -21,8 +21,8 @@ */ -#ifndef Persistence_landscapes_H -#define Persistence_landscapes_H +#ifndef PERSISTENCE_LANDSCAPE_H_ +#define PERSISTENCE_LANDSCAPE_H_ //standard include #include @@ -48,7 +48,7 @@ namespace Persistence_representations -//predeclaration +// pre declaration class Persistence_landscape; template < typename operation > Persistence_landscape operation_on_pair_of_landscapes( const Persistence_landscape& land1 , const Persistence_landscape& land2 ); @@ -56,12 +56,25 @@ Persistence_landscape operation_on_pair_of_landscapes( const Persistence_landsca /** - * A clas implementing persistence landascpes data structures. For theroretical desciritpion, please consult a paper ''Statistical topological data analysis using persistence landscapes'' by Peter Bubenik. - * For details of algorithms, please consult ''A persistence landscapes toolbox for topological statistics'' by Peter Bubenik and Pawel Dlotko. - * Persistence landscapes allow vertorization, computations of distances, computations of projections to Real, computations of averages and scalar products. Therefore they implement suitable interfaces. - * It implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product - * Note that at the moment, due to roundoff errors during the construction of persistence landscapes, elements which are different by 0.000005 are considered the same. If the scale in your persistence diagrams - * is comparable to this value, please rescale them before use this code. + * \class Persistence_landscape Persistence_landscape.h gudhi/Persistence_landscape.h + * \brief A class implementing persistence landscapes data structures. + * + * \ingroup Persistence_representations + * + * \details + * For theoretical description, please consult Statistical topological data analysis using persistence + * landscapes\cite bubenik_landscapes_2015 , and for details of algorithms, + * A persistence landscapes toolbox for topological statistics\cite bubenik_dlotko_landscapes_2016. + * + * Persistence landscapes allow vectorization, computations of distances, computations of projections to Real, + * computations of averages and scalar products. Therefore they implement suitable interfaces. + * It implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, + * Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product + * + * Note that at the moment, due to rounding errors during the construction of persistence landscapes, elements which + * are different by 0.000005 are considered the same. If the scale in your persistence diagrams is comparable to this + * value, please rescale them before use this code. + * **/ class Persistence_landscape { @@ -169,7 +182,7 @@ public: } /** - * An operator * that allows multipilication of a landscape by a real number. + * An operator * that allows multiplication of a landscape by a real number. **/ friend Persistence_landscape operator*( const Persistence_landscape& first , double con ) { @@ -177,7 +190,7 @@ public: } /** - * An operator * that allows multipilication of a landscape by a real number (order of parameters swapped). + * An operator * that allows multiplication of a landscape by a real number (order of parameters swapped). **/ friend Persistence_landscape operator*( double con , const Persistence_landscape& first ) { @@ -297,7 +310,6 @@ public: *\private Computations of \f$L^{\infty}\f$ distance between two landscapes. **/ friend double compute_max_norm_distance_of_landscapes( const Persistence_landscape& first, const Persistence_landscape& second ); - //friend double compute_max_norm_distance_of_landscapes( const Persistence_landscape& first, const Persistence_landscape& second , unsigned& nrOfLand , double&x , double& y1, double& y2 ); /** @@ -308,7 +320,7 @@ public: /** - * Function to compute absolute value of a PL function. The representation of persistence landscapes allow to store general PL-function. When computing distance betwen two landscapes, we compute difference between + * Function to compute absolute value of a PL function. The representation of persistence landscapes allow to store general PL-function. When computing distance between two landscapes, we compute difference between * them. In this case, a general PL-function with negative value can appear as a result. Then in order to compute distance, we need to take its absolute value. This is the purpose of this procedure. **/ Persistence_landscape abs(); @@ -319,7 +331,7 @@ public: size_t size()const{return this->land.size(); } /** - * Computate maximal value of lambda-level landscape. + * Compute maximal value of lambda-level landscape. **/ double find_max( unsigned lambda )const; @@ -328,27 +340,13 @@ public: **/ friend double compute_inner_product( const Persistence_landscape& l1 , const Persistence_landscape& l2 ); - - - - - - - - - - - - - - //Implementations of functions for various concepts. /** * The number of projections to R is defined to the number of nonzero landscape functions. I-th projection is an integral of i-th landscape function over whole R. * This function is required by the Real_valued_topological_data concept. - * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it - * will be most likelly changed in the next versions. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it + * will be most likely changed in the next versions. **/ double project_to_R( int number_of_function )const { @@ -382,7 +380,7 @@ public: return v; } /** - * This function return the number of functions that allows vectorization of persistence laandscape. It is required in a concept Vectorized_topological_data. + * This function return the number of functions that allows vectorization of persistence landscape. It is required in a concept Vectorized_topological_data. **/ size_t number_of_vectorize_functions()const { @@ -404,8 +402,8 @@ public: { nextLevelMerge[i] = to_average[i]; } - bool is_this_first_level = true;//in the loop, we will create dynamically a unmber of intermediate complexes. We have to clean that up, but we cannot erase the initial andscapes we have - //to average. In this case, we simply check if the nextLevelMerge are the input landscapes or the ones created in that loop by usig this extra variable. + bool is_this_first_level = true;//in the loop, we will create dynamically a number of intermediate complexes. We have to clean that up, but we cannot erase the initial landscapes we have + //to average. In this case, we simply check if the nextLevelMerge are the input landscapes or the ones created in that loop by using this extra variable. while ( nextLevelMerge.size() != 1 ) { @@ -446,7 +444,7 @@ public: /** * A function to compute distance between persistence landscape. - * The parameter of this functionis a Persistence_landscape. + * The parameter of this function is a Persistence_landscape. * This function is required in Topological_data_with_distances concept. * For max norm distance, set power to std::numeric_limits::max() **/ @@ -465,7 +463,7 @@ public: /** * A function to compute scalar product of persistence landscapes. - * The parameter of this functionis a Persistence_landscape. + * The parameter of this function is a Persistence_landscape. * This function is required in Topological_data_with_scalar_product concept. **/ double compute_scalar_product( const Persistence_landscape& second )const @@ -473,25 +471,6 @@ public: return compute_inner_product( (*this) , second ); } //end of implementation of functions needed for concepts. - - - // - // This procedure returns x-range of a given level persistence landscape. If a default value is used, the x-range - //of 0th level landscape is given (and this range contains the ranges of all other landscapes). - // - //std::pair< double , double > get_x_range( size_t level = 0 )const - //{ - // std::pair< double , double > result; - // if ( level < this->land.size() ) - // { - // result = std::make_pair( this->land[level][1].first , this->land[level][ this->land[level].size() - 2 ].first ); - // } - // else - // { - // result = std::make_pair( 0,0 ); - // } - // return result; - //} /** * This procedure returns y-range of a given level persistence landscape. If a default value is used, the y-range @@ -582,7 +561,6 @@ bool Persistence_landscape::operator == ( const Persistence_landscape& rhs )con { if ( !( almost_equal(this->land[level][i].first , rhs.land[level][i].first) && almost_equal(this->land[level][i].second , rhs.land[level][i].second) ) ) { - //std::cerr<< this->land[level][i].first << " , " << rhs.land[level][i].first << " and " << this->land[level][i].second << " , " << rhs.land[level][i].second << std::endl; if (operatorEqualDbg)std::cerr << "this->land[level][i] : " << this->land[level][i].first << " " << this->land[level][i].second << "\n"; if (operatorEqualDbg)std::cerr << "rhs.land[level][i] : " << rhs.land[level][i].first << " " << rhs.land[level][i].second << "\n"; if (operatorEqualDbg)std::cerr << "3\n"; @@ -768,7 +746,7 @@ double Persistence_landscape::compute_integral_of_landscape()const { for ( size_t nr = 2 ; nr != this->land[i].size()-1 ; ++nr ) { - //it suffices to compute every planar integral and then sum them ap for each lambda_n + //it suffices to compute every planar integral and then sum them up for each lambda_n result += 0.5*( this->land[i][nr].first - this->land[i][nr-1].first )*(this->land[i][nr].second + this->land[i][nr-1].second); } } @@ -780,7 +758,7 @@ double Persistence_landscape::compute_integral_of_a_level_of_a_landscape( size_t double result = 0; if ( level >= this->land.size() ) { - //this landscape function is constantly equal 0, so is the intergral. + //this landscape function is constantly equal 0, so is the integral. return result; } //also negative landscapes are assumed to be zero. @@ -788,7 +766,7 @@ double Persistence_landscape::compute_integral_of_a_level_of_a_landscape( size_t for ( size_t nr = 2 ; nr != this->land[ level ].size()-1 ; ++nr ) { - //it suffices to compute every planar integral and then sum them ap for each lambda_n + //it suffices to compute every planar integral and then sum them up for each lambda_n result += 0.5*( this->land[ level ][nr].first - this->land[ level ][nr-1].first )*(this->land[ level ][nr].second + this->land[ level ][nr-1].second); } @@ -826,7 +804,6 @@ double Persistence_landscape::compute_integral_of_landscape( double p )const std::cout << "result : " << result << std::endl; } } - //if (compute_integral_of_landscapeDbg) std::cin.ignore(); } return result; } @@ -953,7 +930,7 @@ Persistence_landscape Persistence_landscape::abs() for ( size_t i = 1 ; i != this->land[level].size() ; ++i ) { if ( AbsDbg ){std::cout << "this->land[" << level << "][" << i << "] : " << this->land[level][i].first << " " << this->land[level][i].second << std::endl;} - //if a line segment between this->land[level][i-1] and this->land[level][i] crosses the x-axis, then we have to add one landscape point t oresult + //if a line segment between this->land[level][i-1] and this->land[level][i] crosses the x-axis, then we have to add one landscape point t o result if ( (this->land[level][i-1].second)*(this->land[level][i].second) < 0 ) { double zero = find_zero_of_a_line_segment_between_those_two_points( this->land[level][i-1] , this->land[level][i] ); @@ -1025,7 +1002,7 @@ void Persistence_landscape::load_landscape_from_file( const char* filename ) this->land.clear(); - //this constructor reads persistence landscape form a file. This file have to be created by this software beforehead + //this constructor reads persistence landscape form a file. This file have to be created by this software before head std::ifstream in; in.open( filename ); if ( !in.good() ) @@ -1049,7 +1026,7 @@ void Persistence_landscape::load_landscape_from_file( const char* filename ) lineSS >> beginn; lineSS >> endd; landscapeAtThisLevel.push_back( std::make_pair( beginn , endd ) ); - if (dbg){std::cerr << "Reading a pont : " << beginn << " , " << endd << std::endl;} + if (dbg){std::cerr << "Reading a point : " << beginn << " , " << endd << std::endl;} } else { @@ -1117,7 +1094,6 @@ Persistence_landscape operation_on_pair_of_landscapes ( const Persistence_landsc std::cerr << "land2.land[" << i << "].size() : " << land2.land[i].size() << std::endl; std::cout << "land1.land[i][p].first : " << land1.land[i][p].first << "\n"; std::cout << "land2.land[i][q].first : " << land2.land[i][q].first << "\n"; - //getchar(); } if ( land1.land[i][p].first < land2.land[i][q].first ) @@ -1126,7 +1102,6 @@ Persistence_landscape operation_on_pair_of_landscapes ( const Persistence_landsc { std::cout << "first \n"; std::cout << " function_value(land2.land[i][q-1],land2.land[i][q],land1.land[i][p].first) : "<< function_value(land2.land[i][q-1],land2.land[i][q],land1.land[i][p].first) << "\n"; - //std::cout << "oper( " << land1.land[i][p].second <<"," << function_value(land2.land[i][q-1],land2.land[i][q],land1.land[i][p].first) << " : " << oper( land1.land[i][p].second , function_value(land2.land[i][q-1],land2.land[i][q],land1.land[i][p].first) ) << "\n"; } lambda_n.push_back( std::make_pair( @@ -1242,7 +1217,7 @@ double compute_maximal_distance_non_symmetric( const Persistence_landscape& pl1, } int p2Count = 0; - for ( size_t i = 1 ; i != pl1.land[level].size()-1 ; ++i ) //w tym przypadku nie rozwarzam punktow w nieskocznosci + for ( size_t i = 1 ; i != pl1.land[level].size()-1 ; ++i ) // In this case, I consider points at the infinity { while ( true ) { @@ -1488,11 +1463,8 @@ void Persistence_landscape::plot( const char* filename, double xRangeBegin , do std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" << nameStr << "' in gnuplot to visualize." << std::endl; } +} // namespace Persistence_representations +} // namespace gudhi - -}//namespace gudhi stat -}//namespace gudhi - - -#endif +#endif // PERSISTENCE_LANDSCAPE_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h index 5703163a..d663b543 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -21,8 +21,8 @@ * along with this program. If not, see . **/ -#ifndef Persistence_landscape_on_grid_H_ -#define Persistence_landscape_on_grid_H_ +#ifndef PERSISTENCE_LANDSCAPE_ON_GRID_H_ +#define PERSISTENCE_LANDSCAPE_ON_GRID_H_ //standard include @@ -50,16 +50,25 @@ namespace Gudhi namespace Persistence_representations { -//predeclaration +// pre declaration class Persistence_landscape_on_grid; template < typename operation > Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid( const Persistence_landscape_on_grid& land1 , const Persistence_landscape_on_grid& land2 ); /** - * A clas implementing persistence landascpes by approximating them on a collection of grid points. * Persistence landscapes on grid allow vertorization, computations of distances, computations - * of projections to Real, computations of averages and scalar products. Therefore they implement suitable interfaces. - * It implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product - * Note that at the moment, due to roundoff errors during the construction of persistence landscapes on a grid, elements which are different by 0.000005 are considered the same. If the scale in your persistence diagrams + * \class Persistence_landscape_on_grid Persistence_landscape_on_grid.h gudhi/Persistence_landscape_on_grid.h + * \brief A class implementing persistence landscapes by approximating them on a collection of grid points. + * + * \ingroup Persistence_representations + * + * \details + * Persistence landscapes on grid allows vectorization, computations of distances, computations of projections to Real, + * computations of averages and scalar products. Therefore they implement suitable interfaces. + * It implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, + * Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product + * + * Note that at the moment, due to rounding errors during the construction of persistence landscapes on a grid, + * elements which are different by 0.000005 are considered the same. If the scale in your persistence diagrams * is comparable to this value, please rescale them before use this code. **/ @@ -89,14 +98,14 @@ public: /** * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameters of this procedure are: ranges of grid, resoltion of a grid + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameters of this procedure are: ranges of grid, resolution of a grid * number of landscape functions to be created and the dimension of intervals that are need to be read from a file (in case of Gudhi format files). **/ Persistence_landscape_on_grid(const char* filename , double grid_min_, double grid_max_ , size_t number_of_points_ , unsigned number_of_levels_of_landscape , unsigned short dimension_ = std::numeric_limits::max() ); /** * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameters of this procedure are: ranges of grid, resoltion of a grid + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameters of this procedure are: ranges of grid, resolution of a grid * and the dimension of intervals that are need to be read from a file (in case of Gudhi format files). **/ Persistence_landscape_on_grid(const char* filename , double grid_min_, double grid_max_ , size_t number_of_points_ , unsigned short dimension_ = std::numeric_limits::max() ); @@ -104,16 +113,16 @@ public: /** * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameter is the resoution of a grid and the number of landscape - * functions to be created. The remaning parameters are calculated based on data. + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameter is the resolution of a grid and the number of landscape + * functions to be created. The remaining parameters are calculated based on data. **/ Persistence_landscape_on_grid(const char* filename , size_t number_of_points , unsigned number_of_levels_of_landscape , unsigned short dimension = std::numeric_limits::max() ); /** * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameter is the resoution of a grid. The last parameter is the dimension + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameter is the resolution of a grid. The last parameter is the dimension * of a persistence to read from the file. If your file contains only persistence pair in a single dimension, please set it up to std::numeric_limits::max(). - * The remaning parameters are calculated based on data. + * The remaining parameters are calculated based on data. **/ Persistence_landscape_on_grid(const char* filename , size_t number_of_points , unsigned short dimension = std::numeric_limits::max() ); @@ -258,7 +267,7 @@ public: if ( dbg ) { std::cerr << "Increasing result by : " << value_to_add << std::endl; - std::cerr << "restult : " << result << std::endl; + std::cerr << "result : " << result << std::endl; getchar(); } previous_x = current_x; @@ -311,9 +320,9 @@ public: std::cerr << "This is a procedure compute_value_at_a_given_point \n"; std::cerr << "level : " << level << std::endl; std::cerr << "x : " << x << std::endl; - std::cerr << "psoition : " << position << std::endl; + std::cerr << "position : " << position << std::endl; } - //check if we are not exacly in the grid point: + //check if we are not exactly in the grid point: if ( almost_equal( position*dx+ this->grid_min , x) ) { if ( this->values_of_landscapes[position].size() < level ) @@ -389,7 +398,7 @@ public: } /** - * An operator * that allows multipilication of a landscape by a real number. + * An operator * that allows multiplication of a landscape by a real number. **/ friend Persistence_landscape_on_grid operator*( const Persistence_landscape_on_grid& first , double con ) { @@ -397,7 +406,7 @@ public: } /** - * An operator * that allows multipilication of a landscape by a real number (order of parameters swapped). + * An operator * that allows multiplication of a landscape by a real number (order of parameters swapped). **/ friend Persistence_landscape_on_grid operator*( double con , const Persistence_landscape_on_grid& first ) { @@ -413,7 +422,7 @@ public: } /** - * Operator +=. The second parameter is persistnece landwscape. + * Operator +=. The second parameter is persistence landscape. **/ Persistence_landscape_on_grid operator += ( const Persistence_landscape_on_grid& rhs ) { @@ -422,7 +431,7 @@ public: } /** - * Operator -=. The second parameter is persistnece landwscape. + * Operator -=. The second parameter is persistence landscape. **/ Persistence_landscape_on_grid operator -= ( const Persistence_landscape_on_grid& rhs ) { @@ -458,7 +467,7 @@ public: bool dbg = true; if ( this->values_of_landscapes.size() != rhs.values_of_landscapes.size() ) { - if (dbg) std::cerr << "values_of_landscapes of incompatable sizes\n"; + if (dbg) std::cerr << "values_of_landscapes of incompatible sizes\n"; return false; } if ( !almost_equal( this->grid_min , rhs.grid_min ) ) @@ -546,28 +555,6 @@ public: std::pair< double , double > get_x_range( size_t level = 0 )const { return std::make_pair( this->grid_min , this->grid_max ); - //std::pair< double , double > result; - //if ( level < this->land.size() ) - //{ - // double dx = (this->grid_max - this->grid_min)/(double)this->values_of_landscapes.size(); - // size_t first_nonzero = 0; - // while ( (first_nonzero != this->values_of_landscapes.size()) && (this->values_of_landscapes[level][first_nonzero] == 0) )++first_nonzero; - // - // if ( first_nonzero == 0 ) - // { - // return std::make_pair( 0,0 );//this landscape is empty. - // } - // - // size_t last_nonzero = 0; - // while ( (last_nonzero != 0) && (this->values_of_landscapes[level][last_nonzero] == 0) )--last_nonzero; - // - // result = std::make_pair( this->grid_min +first_nonzero*dx , this->grid_max - last_nonzero*dx ); - //} - //else - //{ - // result = std::make_pair( 0,0 ); - //} - //return result; } /** @@ -577,16 +564,6 @@ public: std::pair< double , double > get_y_range( size_t level = 0 )const { return this->compute_minimum_maximum(); - //std::pair< double , double > result; - //if ( level < this->land.size() ) - //{ - // result = this->compute_minimum_maximum() - //} - //else - //{ - // result = std::make_pair( 0,0 ); - //} - //return result; } /** @@ -629,13 +606,11 @@ public: * Computations of \f$L^{\infty}\f$ distance between two landscapes. **/ friend double compute_max_norm_distance_of_landscapes( const Persistence_landscape_on_grid& first, const Persistence_landscape_on_grid& second ); - //friend double compute_max_norm_distance_of_landscapes( const Persistence_landscape_on_grid& first, const Persistence_landscape_on_grid& second , unsigned& nrOfLand , double&x , double& y1, double& y2 ); - /** - * Function to compute absolute value of a PL function. The representation of persistence landscapes allow to store general PL-function. When computing distance betwen two landscapes, we compute difference between + * Function to compute absolute value of a PL function. The representation of persistence landscapes allow to store general PL-function. When computing distance between two landscapes, we compute difference between * them. In this case, a general PL-function with negative value can appear as a result. Then in order to compute distance, we need to take its absolute value. This is the purpose of this procedure. **/ void abs() @@ -655,7 +630,7 @@ public: size_t size()const{return this->number_of_nonzero_levels(); } /** - * Computate maximal value of lambda-level landscape. + * Compute maximal value of lambda-level landscape. **/ double find_max( unsigned lambda )const { @@ -742,14 +717,14 @@ public: } //now, to compute the inner product in this interval we need to compute the integral of (ax+b)(cx+d) = acx^2 + (ad+bc)x + bd in the interval from previous_x to current_x: - //The integal is ac/3*x^3 + (ac+bd)/2*x^2 + bd*x + //The integral is ac/3*x^3 + (ac+bd)/2*x^2 + bd*x double added_value = (a*c/3*current_x*current_x*current_x + (a*d+b*c)/2*current_x*current_x + b*d*current_x)- (a*c/3*previous_x*previous_x*previous_x + (a*d+b*c)/2*previous_x*previous_x + b*d*previous_x); if ( dbg ) { - std::cerr << "Value of the integral on the left end ie : " << previous_x << " is : " << a*c/3*previous_x*previous_x*previous_x + (a*d+b*c)/2*previous_x*previous_x + b*d*previous_x << std::endl; + std::cerr << "Value of the integral on the left end i.e. : " << previous_x << " is : " << a*c/3*previous_x*previous_x*previous_x + (a*d+b*c)/2*previous_x*previous_x + b*d*previous_x << std::endl; std::cerr << "Value of the integral on the right end i.e. : " << current_x << " is " << a*c/3*current_x*current_x*current_x + (a*d+b*c)/2*current_x*current_x + b*d*current_x << std::endl; } @@ -775,7 +750,7 @@ public: /** * Computations of \f$L^{p}\f$ distance between two landscapes on a grid. p is the parameter of the procedure. * FIXME: Note that, due to the grid representation, the method below may give non--accurate results in case when the landscape P and Q the difference of which we want to compute - * are interxsecting. This is a consequence of a general way they are computed. In the future, an integral of absolute value of a difference of P and Q will be given as a separated + * are intersecting. This is a consequence of a general way they are computed. In the future, an integral of absolute value of a difference of P and Q will be given as a separated * function to fix that inaccuracy. **/ friend double compute_distance_of_landscapes_on_grid( const Persistence_landscape_on_grid& first, const Persistence_landscape_on_grid& second , double p ) @@ -819,7 +794,7 @@ public: else { result = lan.compute_integral_of_landscape(); - if (dbg){std::cerr << "integral, wihtout power : " << result << std::endl;getchar();} + if (dbg){std::cerr << "integral, without power : " << result << std::endl;getchar();} } //(\int_{- \infty}^{+\infty}| first-second |^p)^(1/p) return pow( result , 1/(double)p ); @@ -830,45 +805,14 @@ public: return lan.compute_maximum(); } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //Functions that are needed for that class to implement the concept. /** * The number of projections to R is defined to the number of nonzero landscape functions. I-th projection is an integral of i-th landscape function over whole R. * This function is required by the Real_valued_topological_data concept. - * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it - * will be most likelly changed in the next versions. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it + * will be most likely changed in the next versions. **/ double project_to_R( int number_of_function )const { @@ -884,8 +828,6 @@ public: } - - /** * This function produce a vector of doubles based on a landscape. It is required in a concept Vectorized_topological_data */ @@ -909,16 +851,13 @@ public: } /** - * This function return the number of functions that allows vectorization of persistence laandscape. It is required in a concept Vectorized_topological_data. + * This function return the number of functions that allows vectorization of persistence landscape. It is required in a concept Vectorized_topological_data. **/ size_t number_of_vectorize_functions()const { return number_of_functions_for_vectorization; } - - - /** * A function to compute averaged persistence landscape on a grid, based on vector of persistence landscapes on grid. @@ -932,7 +871,7 @@ public: this->values_of_landscapes .clear(); this->grid_min = this->grid_max = 0; - //if there is nothing to averate, then the average is a zero landscape. + //if there is nothing to average, then the average is a zero landscape. if ( to_average.size() == 0 )return; //now we need to check if the grids in all objects of to_average are the same: @@ -968,7 +907,7 @@ public: std::cerr << "We are considering the point : " << grid_point << " of the grid. In this point, there are at most : " << maximal_size_of_vector << " nonzero landscape functions \n"; } - //and compute an arythmetic average: + //and compute an arithmetic average: for ( size_t land_no = 0 ; land_no != to_average.size() ; ++land_no ) { //summing: @@ -989,7 +928,7 @@ public: /** * A function to compute distance between persistence landscape on a grid. - * The parameter of this functionis a Persistence_landscape_on_grid. + * The parameter of this function is a Persistence_landscape_on_grid. * This function is required in Topological_data_with_distances concept. * For max norm distance, set power to std::numeric_limits::max() **/ @@ -1007,7 +946,7 @@ public: /** * A function to compute scalar product of persistence landscape on a grid. - * The parameter of this functionis a Persistence_landscape_on_grid. + * The parameter of this function is a Persistence_landscape_on_grid. * This function is required in Topological_data_with_scalar_product concept. **/ double compute_scalar_product( const Persistence_landscape_on_grid& second ) @@ -1016,28 +955,9 @@ public: } //end of implementation of functions needed for concepts. - - - - - - - - - - - - - - - - - - - /** - * A function that returns values of landsapes. It can be used for vizualization + * A function that returns values of landscapes. It can be used for visualization **/ std::vector< std::vector< double > > output_for_visualization()const { @@ -1046,7 +966,7 @@ public: /** * function used to create a gnuplot script for visualization of landscapes. Over here we need to specify which landscapes do we want to plot. - * In addition, the user may specify the range (min and max) where landscape is plot. The fefault values for min and max are std::numeric_limits::max(). If the procedure detect those + * In addition, the user may specify the range (min and max) where landscape is plot. The default values for min and max are std::numeric_limits::max(). If the procedure detect those * values, it will determine the range so that the whole landscape is supported there. If at least one min or max value is different from std::numeric_limits::max(), then the values * provided by the user will be used. **/ @@ -1123,7 +1043,7 @@ void Persistence_landscape_on_grid::set_up_values_of_landscapes( const std::vect if ( grid_max_ <= grid_min_ ) { - throw "Wrong parameters of grid_min and grid_max given to the procedure. THe grid have negative, or zero size. The program will now terminate.\n"; + throw "Wrong parameters of grid_min and grid_max given to the procedure. The grid have negative, or zero size. The program will now terminate.\n"; } double dx = ( grid_max_ - grid_min_ )/(double)(number_of_points_); @@ -1174,7 +1094,7 @@ void Persistence_landscape_on_grid::set_up_values_of_landscapes( const std::vect if ( this->values_of_landscapes[i].size() == number_of_levels-1 ) { //this->values_of_landscapes[i].size() == number_of_levels - //in this case we need to create the heep. + //in this case we need to create the heap. std::make_heap (this->values_of_landscapes[i].begin(),this->values_of_landscapes[i].end()); } } @@ -1212,7 +1132,7 @@ void Persistence_landscape_on_grid::set_up_values_of_landscapes( const std::vect if ( this->values_of_landscapes[i].size() == number_of_levels-1 ) { //this->values_of_landscapes[i].size() == number_of_levels - //in this case we need to create the heep. + //in this case we need to create the heap. std::make_heap (this->values_of_landscapes[i].begin(),this->values_of_landscapes[i].end()); } } @@ -1225,7 +1145,7 @@ void Persistence_landscape_on_grid::set_up_values_of_landscapes( const std::vect if ( dbg ) { - std::cerr << "AAdding landscape value (going down) for a point : " << i << " equal : " << landscape_value << std::endl; + std::cerr << "Adding landscape value (going down) for a point : " << i << " equal : " << landscape_value << std::endl; } } landscape_value -= dx; @@ -1235,11 +1155,10 @@ void Persistence_landscape_on_grid::set_up_values_of_landscapes( const std::vect if ( number_of_levels != std::numeric_limits< unsigned >::max() ) { //in this case, vectors are used as heaps. And, since we want to have the smallest element at the top of - //each heap, we store mminus distances. To get if right at the end, we need to multiply each value + //each heap, we store minus distances. To get if right at the end, we need to multiply each value //in the heap by -1 to get real vector of distances. for ( size_t pt = 0 ; pt != this->values_of_landscapes.size() ; ++pt ) { - //std::cerr << this->values_of_landscapes[pt].size() <values_of_landscapes[pt].size() ; ++j ) { this->values_of_landscapes[pt][j] *= -1; @@ -1362,7 +1281,6 @@ void Persistence_landscape_on_grid::load_landscape_from_file( const char* filena //read a line of a file and convert it to a vector. std::vector< double > vv; std::getline(in, line); - //std::cerr << "Reading line : " << line << std::endl;getchar(); std::istringstream stream(line); while (stream >> number) { @@ -1485,7 +1403,7 @@ Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid ( const Pe result.grid_min = land1.grid_min; result.grid_max = land1.grid_max; - //now we perorm the operations: + //now we perform the operations: for ( size_t grid_point = 0 ; grid_point != land1.values_of_landscapes.size() ; ++grid_point ) { result.values_of_landscapes[grid_point] = std::vector< double >( std::max( land1.values_of_landscapes[grid_point].size() , land2.values_of_landscapes[grid_point].size() ) ); @@ -1555,9 +1473,7 @@ double compute_max_norm_distance_of_landscapes( const Persistence_landscape_on_g return result; } - - -}//namespace Gudhi_stat +}//namespace Persistence_representations }//namespace Gudhi -#endif +#endif // PERSISTENCE_LANDSCAPE_ON_GRID_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index 7fde3413..616ec50f 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -21,8 +21,8 @@ */ -#ifndef Vector_distances_in_diagram_H -#define Vector_distances_in_diagram_H +#ifndef PERSISTENCE_VECTORS_H_ +#define PERSISTENCE_VECTORS_H_ #include #include @@ -42,32 +42,6 @@ namespace Gudhi namespace Persistence_representations { -/* -template -struct Euclidean_distance -{ - double operator() ( const std::pair< T,T >& f , const std::pair& s ) - { - return sqrt( (f.first-s.first)*(f.first-s.first) + (f.second-s.second)*(f.second-s.second) ); - } - double operator() ( const std::vector< T >& f , const std::vector < T >& s ) - { - if ( f.size() != s.size() ) - { - std::cerr << "Not compatible points dimensions in the procedure to compute Euclidean distance. The program will now terminate. \n"; - std::cout << f.size() << " , " << s.size() << std::endl; - throw "Not compatible points dimensions in the procedure to compute Euclidean distance. The program will now terminate. \n"; - } - double result = 0; - for ( size_t i = 0 ; i != f.size() ; ++i ) - { - result += ( f[i]-s[i] )*( f[i]-s[i] ); - } - return sqrt( result ); - } -}; -* */ - template struct Maximum_distance { @@ -79,16 +53,21 @@ struct Maximum_distance - /** -* This is an implementation of idea presented in the paper 'Stable Topological Signatures for Points on 3D Shapes' by -* M. Carriere, S. Y. Oudot and M. Ovsjanikov published in Computer Graphics Forum (proc. SGP 2015). -* The parameter of the class is the class that computes distance used to construct the vectors. The typical function is -* either Eucludean of maximum (Manhattan) distance. -* This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product -* -**/ - + * \class Vector_distances_in_diagram Vector_distances_in_diagram.h gudhi/Vector_distances_in_diagram.h + * \brief A class implementing persistence vectors. + * + * \ingroup Persistence_representations + * + * \details + * This is an implementation of idea presented in the paper Stable Topological Signatures for Points on 3D + * Shapes \cite Carriere_Oudot_Ovsjanikov_top_signatures_3d .
+ * The parameter of the class is the class that computes distance used to construct the vectors. The typical function + * is either Euclidean of maximum (Manhattan) distance. + * + * This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, + * Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product + **/ template class Vector_distances_in_diagram { @@ -99,12 +78,12 @@ public: Vector_distances_in_diagram(){}; /** - * The constructor that takes as an input a multiset of persistence intervals (given as vector of birth-death pairs). The second parameter is the desiered length of the output vectors. + * The constructor that takes as an input a multiset of persistence intervals (given as vector of birth-death pairs). The second parameter is the desired length of the output vectors. **/ Vector_distances_in_diagram( const std::vector< std::pair< double , double > >& intervals , size_t where_to_cut ); /** - * The constructor taking as an input a file with birth-death pairs. The second parameter is the desiered length of the output vectors. + * The constructor taking as an input a file with birth-death pairs. The second parameter is the desired length of the output vectors. **/ Vector_distances_in_diagram( const char* filename , size_t where_to_cut , unsigned dimension = std::numeric_limits::max() ); @@ -155,7 +134,7 @@ public: void load_from_file( const char* filename ); /** - * Comparision operators: + * Comparison operators: **/ bool operator == ( const Vector_distances_in_diagram& second )const { @@ -172,14 +151,11 @@ public: return !( *this == second ); } - - - - //Implementations of functions for various concepts. + //Implementations of functions for various concepts. /** * Compute projection to real numbers of persistence vector. This function is required by the Real_valued_topological_data concept - * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it - * will be most likelly changed in the next versions. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it + * will be most likely changed in the next versions. **/ double project_to_R( int number_of_function )const; /** @@ -195,7 +171,7 @@ public: **/ std::vector vectorize( int number_of_function )const; /** - * This function return the number of functions that allows vectorization of a persisence vector. It is required in a concept Vectorized_topological_data. + * This function return the number of functions that allows vectorization of a persistence vector. It is required in a concept Vectorized_topological_data. **/ size_t number_of_vectorize_functions()const { @@ -220,22 +196,6 @@ public: //end of implementation of functions needed for concepts. - - - - - - - - - - - - - - - - /** * For visualization use output from vectorize and build histograms. **/ @@ -246,7 +206,7 @@ public: /** - * Create a gnuplot script to vizualize the data structure. + * Create a gnuplot script to visualize the data structure. **/ void plot( const char* filename )const { @@ -264,7 +224,7 @@ public: } out <sorted_vector_of_distances[0] , 0); } - //arythmetic operations: + //arithmetic operations: template < typename Operation_type > friend Vector_distances_in_diagram operation_on_pair_of_vectors( const Vector_distances_in_diagram& first , const Vector_distances_in_diagram& second , Operation_type opertion ) { @@ -511,7 +471,6 @@ void Vector_distances_in_diagram::compute_sorted_vector_of_distances_via_heap double value = f( this->intervals[i] , std::make_pair( 0.5*(this->intervals[i].first+this->intervals[i].second) , 0.5*(this->intervals[i].first+this->intervals[i].second) ) ); if ( -value < heap.front() ) { - //std::cerr << "Replacing : " << heap.front() << " with : " << -value <::distance( const Vector_distances_in_diagr } else { - //nax morm + // max norm if ( result < fabs( this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i] ) )result = fabs( this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i] ); } if ( dbg ) @@ -767,12 +726,8 @@ double Vector_distances_in_diagram::compute_scalar_product( const Vector_dist return result; } - - - - -}//namespace Gudhi_stat +}//namespace Persistence_representations }//namespace Gudhi -#endif // Vector_distances_in_diagram_H +#endif // PERSISTENCE_VECTORS_H_ diff --git a/src/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h index f223079a..f571ca4f 100644 --- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h +++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -20,15 +20,15 @@ * along with this program. If not, see . */ -#ifndef common_gudhi_stat_H -#define common_gudhi_stat_H +#ifndef COMMON_PERSISTENCE_REPRESENTATIONS_H_ +#define COMMON_PERSISTENCE_REPRESENTATIONS_H_ namespace Gudhi { namespace Persistence_representations { - //this file contain an implementation of some common procedures used in Gudhi_stat. + //this file contain an implementation of some common procedures used in Persistence_representations. //double epsi = std::numeric_limits::epsilon(); double epsi = 0.000005; @@ -38,8 +38,8 @@ double epsi = 0.000005; /** - * A procedure used to compare doubles. Typically gien two doubles A and B, comparing A == B is not good idea. In this case, we use the procedure almostEqual with the epsi defined at - * the top of the file. Setting up the epsi give the user a tolerance on what should be consider equal. + * A procedure used to compare doubles. Typically given two doubles A and B, comparing A == B is not good idea. In this case, we use the procedure almostEqual with the epsi defined at + * the top of the file. Setting up the epsi gives the user a tolerance on what should be consider equal. **/ inline bool almost_equal( double a , double b ) { @@ -78,7 +78,7 @@ std::pair compute_parameters_of_a_line( std::pair //landscapes /** - * This procedure given two points which lies on the opposide sides of x axis, compute x for which the line connecting those two points crosses x axis. + * This procedure given two points which lies on the opposite sides of x axis, compute x for which the line connecting those two points crosses x axis. **/ double find_zero_of_a_line_segment_between_those_two_points ( std::pair p1, std::pair p2 ) { @@ -86,7 +86,7 @@ double find_zero_of_a_line_segment_between_those_two_points ( std::pair 0 ) { std::ostringstream errMessage; - errMessage <<"In function find_zero_of_a_line_segment_between_those_two_points the agguments are: (" << p1.first << "," << p1.second << ") and (" << p2.first << "," << p2.second << "). There is no zero in line between those two points. Program terminated."; + errMessage <<"In function find_zero_of_a_line_segment_between_those_two_points the arguments are: (" << p1.first << "," << p1.second << ") and (" << p2.first << "," << p2.second << "). There is no zero in line between those two points. Program terminated."; std::string errMessageStr = errMessage.str(); const char* err = errMessageStr.c_str(); throw(err); @@ -94,8 +94,6 @@ double find_zero_of_a_line_segment_between_those_two_points ( std::pair f, std::pair s ) @@ -135,7 +133,7 @@ bool compare_points_sorting( std::pair f, std::pair p1, std::pair p2 , double x ) { @@ -148,7 +146,7 @@ double function_value ( std::pair p1, std::pair p2 -}//namespace Gudhi_stat -}//namespace Gudhi +} // namespace Persistence_representations +} // namespace Gudhi -#endif +#endif // COMMON_PERSISTENCE_REPRESENTATIONS_H_ diff --git a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h index 058c77a4..a4884314 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2017 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 @@ -21,8 +21,8 @@ */ -#ifndef Read_Persitence_From_File_H -#define Read_Persitence_From_File_H +#ifndef READ_PERSISTENCE_FROM_FILE_H_ +#define READ_PERSISTENCE_FROM_FILE_H_ #include #include @@ -36,86 +36,6 @@ namespace Gudhi { namespace Persistence_representations { - - - -/** - * This procedure reads names of files which are stored in a file. -**/ -std::vector< std::string > readFileNames( const char* filenameWithFilenames ) -{ - bool dbg = false; - - std::ifstream in(filenameWithFilenames); - if ( !in.good() ) - { - std::cerr << "The file : " << filenameWithFilenames << " do not exist. The program will now terminate \n"; - throw "The file from which you are trying to read do not exist. The program will now terminate \n"; - } - - std::vector< std::string > result; - std::string line; - while (!in.eof()) - { - getline(in,line); - line.erase( std::remove_if( line.begin(), line.end(), ::isspace) , line.end() ); - - if (dbg){std::cerr << "line : " << line << std::endl;} - - if ( (line.length() == 0) || (line[0] == '#') ) - { - //in this case we have a file name. First we should remove all the white spaces. - if ( dbg ){std::cerr << "This is a line with comment, it will be ignored n";} - } - else - { - result.push_back( line ); - if (dbg){std::cerr << "Line after removing white spaces : " << line << std::endl;} - } - } - in.close(); - - return result; -}//readFileNames - - - -std::vector< std::vector< double > > read_numbers_from_file_line_by_line( const char* filename ) -{ - bool dbg = false; - std::ifstream in(filename); - if ( !in.good() ) - { - std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; - throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; - } - - std::vector< std::vector< double > > result; - double number; - - - std::string line; - while ( in.good() ) - { - std::getline(in,line); - std::stringstream ss(line); - - if ( dbg )std::cerr << "\n Reading line : " << line << std::endl; - - std::vector< double > this_line; - while ( ss.good() ) - { - ss >> number; - this_line.push_back( number ); - if ( dbg )std::cerr << number << " "; - } - if ( this_line.size() && in.good() ) result.push_back( this_line ); - } - in.close(); - - return result; -}//read_numbers_from_file_line_by_line - /** * Universal procedure to read files with persistence. It ignores the lines starting from # (treat them as comments). @@ -123,7 +43,7 @@ std::vector< std::vector< double > > read_numbers_from_file_line_by_line( const * that each other line in the file, which is not a comment, have the same number of numerical entries (2, 3 or 4). * If there are two numerical entries per line, then the function assume that they are birth/death coordinates. * If there are three numerical entries per line, then the function assume that they are: dimension and birth/death coordinates. - * If there are four numerical entries per line, then the function assume that they are: thc characteristic of a filed over which + * If there are four numerical entries per line, then the function assume that they are: the characteristic of a filed over which * persistence was computed, dimension and birth/death coordinates. * The 'inf' string can appear only as a last element of a line. * The procedure returns vector of persistence pairs. @@ -162,7 +82,7 @@ std::vector > read_persistence_intervals_in_one_dimensi if ( line_copy.find("inf") != std::string::npos ) { size_t np = line_copy.find("inf"); - //replace symbols 'inf' in line_copy with whilespaces: + //replace symbols 'inf' in line_copy with white spaces: line_copy[np] = ' '; line_copy[np+1] = ' '; line_copy[np+2] = ' '; @@ -194,7 +114,7 @@ std::vector > read_persistence_intervals_in_one_dimensi { std::cerr << "This line: " << line << " contains infinite interval. \n"; } - //first we substitute inf by whitespaces: + //first we substitute inf by white spaces: size_t np = line.find("inf"); line[np] = ' '; line[np+1] = ' '; @@ -288,13 +208,9 @@ std::vector > read_persistence_intervals_in_one_dimensi if ( dbg )std::cerr << "End of reading \n"; return barcode; -}//read_persistence_intervals_in_one_dimension_from_file +} // read_persistence_intervals_in_one_dimension_from_file -}//namespace Gudhi_stat -}//namespace Gudhi +} // namespace Persistence_representations +} // namespace Gudhi - - - -#endif - +#endif // READ_PERSISTENCE_FROM_FILE_H_ diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index d3e6f322..27a7836f 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -34,8 +34,8 @@ using namespace Gudhi::Persistence_representations; int main( int argc , char** argv ) { - std::cout << "This program compute dsitance of persistence heat maps 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 heat maps. For L^infty distance choose p = -1. \n"; + std::cout << "This program compute distance of persistence heat maps stored in a file (the file needs to be created beforehand). \n"; + std::cout << "The first parameter of a program is an integer p. The program compute L^p distance of the two heat maps. For L^infty distance choose p = -1. \n"; std::cout << "The remaining parameters of this programs are names of files with persistence heat maps.\n"; if ( argc < 3 ) @@ -76,7 +76,7 @@ int main( int argc , char** argv ) distance[i] = v; } - //and now we can compute the distnaces: + //and now we can compute the distances: for ( size_t i = 0 ; i != filenames.size() ; ++i ) { for ( size_t j = i ; j != filenames.size() ; ++j ) @@ -106,6 +106,3 @@ int main( int argc , char** argv ) - - - diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp index aa887c9c..f755e9a6 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp @@ -36,10 +36,10 @@ using namespace Gudhi::Persistence_representations; 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 << "This program creates persistence heat map of diagrams provided as an input. The Gaussian kernels are weighted by the arc tangential 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::cerr << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number of pixels \n"; std::cout << "The fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp index aa13d786..732b3768 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp @@ -38,7 +38,7 @@ 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::cerr << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number of pixels \n"; std::cout << "The fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; @@ -62,8 +62,6 @@ int main( int argc , char** argv ) dimension = (unsigned)dim; } - //std::cout << "Parameters of the program : size_of_grid : " << size_of_grid << ", min_ : " << min_ << ", max_ : " << max_ << ", stdiv: " << stdiv << ", dim : " << dim << std::endl; - std::vector< const char* > filenames; for ( int i = 6 ; i != argc ; ++i ) { diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index 46258329..58406d08 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -38,7 +38,7 @@ 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::cerr << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number of pixels \n"; std::cout << "The fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index cac81495..90b50b0b 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -39,7 +39,7 @@ 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::cerr << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number of pixels \n"; std::cout << "The fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp index 6aab42f7..6a07bf19 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -37,7 +37,7 @@ 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::cerr << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number of pixels \n"; std::cout << "The fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index 5a4776ff..7aedfbb1 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -34,7 +34,7 @@ using namespace Gudhi::Persistence_representations; 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"; + 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 landscape file \n"; Persistence_heat_maps l; l.load_from_file( argv[1] ); l.plot( argv[1] ); diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp index 19e49bbb..fe4e709f 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -34,7 +34,7 @@ using namespace Gudhi::Persistence_representations; int main( int argc , char** argv ) { - std::cout << "This program compute the bottleneck distance of persistence diarams stored in a files. \n"; + std::cout << "This program compute the bottleneck distance of persistence diagrams stored in a files. \n"; std::cout << "The first parameter of the program is the dimension of persistence to be used to construct persistence landscapes. If your file contains "; std::cout << "the information about dimension of persistence pairs, please provide here the dimension of persistence pairs you want to use. If your input files consist only "; std::cout << "of birth-death pairs, please set this first parameter to -1 \n"; diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index b2cbac70..6e2598fa 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -71,7 +71,7 @@ int main( int argc , char** argv ) out << histogram[i] << std::endl; } out << std::endl; - std::cout << "To vizualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; + std::cout << "To visualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; out.close(); return 0; } diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp index e20f85c0..5b36e0ce 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp @@ -89,12 +89,7 @@ int main( int argc , char** argv ) out << std::endl; out.close(); - //for ( size_t i = 0 ; i != pbns.size() ; ++i ) - //{ - // std::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; + std::cout << "To visualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index 85954cb2..ef969ed0 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -34,7 +34,7 @@ using namespace Gudhi::Persistence_representations; 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 first parameter of a program is an integer 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 ) diff --git a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp index b79a689d..670f0364 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -33,7 +33,7 @@ using namespace Gudhi::Persistence_representations; 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"; + 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 landscape file \n"; Persistence_landscape l; l.load_landscape_from_file( argv[1] ); diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index 4ecbd548..3065b52c 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -33,8 +33,8 @@ using namespace Gudhi::Persistence_representations; 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 << "This program compute distance 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 integer p. The program compute L^p distance of 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 ) @@ -106,5 +106,3 @@ int main( int argc , char** argv ) - - diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index 700b2f1f..b4fa3046 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -33,7 +33,7 @@ using namespace Gudhi::Persistence_representations; 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"; + 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 landscape on grid file \n"; if ( argc == 1 ) { std::cout << "Wrong parameters of a program call, the program will now terminate \n"; diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index 39e24cd7..5c0d3328 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -34,7 +34,7 @@ using namespace Gudhi::Persistence_representations; 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 first parameter of a program is an integer 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 ) @@ -60,7 +60,6 @@ int main( int argc , char** argv ) 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 > l; l.load_from_file( filenames[file_no] ); vectors.push_back( l ); diff --git a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp index 634bcb13..d7a22e58 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -52,8 +52,7 @@ int main( int argc , char** argv ) for ( size_t i = 0 ; i != filenames.size() ; ++i ) { - std::cerr << "Creatign persistence vectors based on a file : " << filenames[i] << std::endl; - //std::vector< std::pair< double , double > > persistence_pairs = read_gudhi_persistence_file_in_one_dimension( filenames[i] , size_t dimension = 0 ) + std::cerr << "Creating persistence vectors based on a file : " << filenames[i] << std::endl; Vector_distances_in_diagram< Euclidean_distance > l( filenames[i] , dimension ); std::stringstream ss; ss << filenames[i] << ".vect"; diff --git a/src/cmake/modules/GUDHI_user_version_target.txt b/src/cmake/modules/GUDHI_user_version_target.txt index 8b7cf0e2..3172f6b1 100644 --- a/src/cmake/modules/GUDHI_user_version_target.txt +++ b/src/cmake/modules/GUDHI_user_version_target.txt @@ -47,7 +47,7 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.11) add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/src/GudhUI ${GUDHI_USER_VERSION_DIR}/GudhUI) - set(GUDHI_MODULES "common;Alpha_complex;Bitmap_cubical_complex;Bottleneck_distance;Contraction;Gudhi_stat;Hasse_complex;Persistent_cohomology;Rips_complex;Simplex_tree;Skeleton_blocker;Spatial_searching;Subsampling;Tangential_complex;Witness_complex") + set(GUDHI_MODULES "common;Alpha_complex;Bitmap_cubical_complex;Bottleneck_distance;Contraction;Hasse_complex;Persistence_representations;Persistent_cohomology;Rips_complex;Simplex_tree;Skeleton_blocker;Spatial_searching;Subsampling;Tangential_complex;Witness_complex") set(GUDHI_DIRECTORIES "doc;example;concept;utilities") set(GUDHI_INCLUDE_DIRECTORIES "include/gudhi;include/gudhi_patches") diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index d1cb691c..6986a6b5 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -212,19 +212,20 @@ - \subsection Gudhi_stat_sublibrary Gudhi statistical sublibrary - \image html "average_landscape.png" "Gudhi statistical sublibrary" + \subsection PersistenceRepresentationsToolbox Persistence representations + \image html "average_landscape.png" "Persistence representations" diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index f6e2ab5a..f683136b 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -48,6 +48,11 @@ class Euclidean_distance { } return std::sqrt(dist); } + template< typename T > + T operator() ( const std::pair< T,T >& f , const std::pair< T,T >& s ) + { + return sqrt( (f.first-s.first)*(f.first-s.first) + (f.second-s.second)*(f.second-s.second) ); + } }; } // namespace Gudhi -- cgit v1.2.3 From 9d1a526de85694b5f075bb88dbd7097a40abf10a Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 30 May 2017 15:52:00 +0000 Subject: clang format all sources git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2477 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 326d664483d6700f82be824f79a0bf5c082b4945 --- .../concept/Real_valued_topological_data.h | 30 +- .../concept/Topological_data_with_averages.h | 13 +- .../concept/Topological_data_with_distances.h | 12 +- .../concept/Topological_data_with_scalar_product.h | 12 +- .../concept/Vectorized_topological_data.h | 27 +- .../doc/Persistence_representations_doc.h | 204 +- .../example/persistence_heat_maps.cpp | 99 +- .../example/persistence_intervals.cpp | 138 +- .../example/persistence_landscape.cpp | 115 +- .../example/persistence_landscape_on_grid.cpp | 107 +- .../example/persistence_vectors.cpp | 79 +- .../include/gudhi/PSSK.h | 257 +- .../include/gudhi/Persistence_heat_maps.h | 1688 ++++++------- .../include/gudhi/Persistence_intervals.h | 1013 ++++---- .../gudhi/Persistence_intervals_with_distances.h | 58 +- .../include/gudhi/Persistence_landscape.h | 2457 +++++++++--------- .../include/gudhi/Persistence_landscape_on_grid.h | 2596 ++++++++++---------- .../include/gudhi/Persistence_vectors.h | 1176 ++++----- .../gudhi/common_persistence_representations.h | 157 +- .../include/gudhi/read_persistence_from_file.h | 311 ++- .../test/persistence_heat_maps_test.cpp | 582 +++-- .../test/persistence_intervals_test.cpp | 545 ++-- .../persistence_intervals_with_distances_test.cpp | 49 +- .../test/persistence_lanscapes_on_grid_test.cpp | 580 ++--- .../test/persistence_lanscapes_test.cpp | 610 +++-- .../test/read_persistence_from_file_test.cpp | 131 +- .../test/vector_representation_test.cpp | 681 +++-- .../average_persistence_heat_maps.cpp | 74 +- .../compute_distance_of_persistence_heat_maps.cpp | 127 +- ...ute_scalar_product_of_persistence_heat_maps.cpp | 101 +- ...h_m_weighted_by_arctan_of_their_persistence.cpp | 142 +- ...te_p_h_m_weighted_by_distance_from_diagonal.cpp | 101 +- ...ate_p_h_m_weighted_by_squared_diag_distance.cpp | 97 +- .../create_persistence_heat_maps.cpp | 97 +- .../persistence_heat_maps/create_pssk.cpp | 96 +- .../plot_persistence_heat_map.cpp | 18 +- ...te_birth_death_range_in_persistence_diagram.cpp | 67 +- .../compute_bottleneck_distance.cpp | 143 +- .../compute_number_of_dominant_intervals.cpp | 50 +- .../plot_histogram_of_intervals_lengths.cpp | 81 +- .../plot_persistence_Betti_numbers.cpp | 116 +- .../plot_persistence_intervals.cpp | 55 +- .../persistence_landscapes/average_landscapes.cpp | 76 +- .../compute_distance_of_landscapes.cpp | 128 +- .../compute_scalar_product_of_landscapes.cpp | 102 +- .../persistence_landscapes/create_landscapes.cpp | 56 +- .../persistence_landscapes/plot_landscapes.cpp | 27 +- .../average_landscapes_on_grid.cpp | 72 +- .../compute_distance_of_landscapes_on_grid.cpp | 125 +- ...ompute_scalar_product_of_landscapes_on_grid.cpp | 101 +- .../create_landscapes_on_grid.cpp | 100 +- .../plot_landscapes_on_grid.cpp | 36 +- .../average_persistence_vectors.cpp | 74 +- .../compute_distance_of_persistence_vectors.cpp | 125 +- ...mpute_scalar_product_of_persistence_vectors.cpp | 98 +- .../create_persistence_vectors.cpp | 62 +- .../plot_persistence_vectors.cpp | 29 +- 57 files changed, 7594 insertions(+), 8709 deletions(-) (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/src/Persistence_representations/concept/Real_valued_topological_data.h b/src/Persistence_representations/concept/Real_valued_topological_data.h index 5a15c769..e60f28ac 100644 --- a/src/Persistence_representations/concept/Real_valued_topological_data.h +++ b/src/Persistence_representations/concept/Real_valued_topological_data.h @@ -27,23 +27,21 @@ namespace Gudhi { namespace Persistence_representations { - -/** \brief The concept Real_valued_topological_data describes the requirements - * for a type to implement a container that allows computations of its projections to R. +/** \brief The concept Real_valued_topological_data describes the requirements + * for a type to implement a container that allows computations of its projections to R. */ -class Real_valued_topological_data -{ -public: - /** - * Typically there are various ways data can be projected to R. This function gives us the number of functions for - * vectorization provided by a given class. - **/ - size_t number_of_projections_to_R(); - /** - * This is a function to compute the projection from this container to reals. The parameter of a function have to - * be between 0 and the value returned by number_of_projections_to_R(). - **/ - double project_to_R( size_t number_of_projection ); +class Real_valued_topological_data { + public: + /** +* Typically there are various ways data can be projected to R. This function gives us the number of functions for +* vectorization provided by a given class. + **/ + size_t number_of_projections_to_R(); + /** +* This is a function to compute the projection from this container to reals. The parameter of a function have to +* be between 0 and the value returned by number_of_projections_to_R(). +**/ + double project_to_R(size_t number_of_projection); }; } // namespace Persistence_representations diff --git a/src/Persistence_representations/concept/Topological_data_with_averages.h b/src/Persistence_representations/concept/Topological_data_with_averages.h index 0501c306..2b6d46c4 100644 --- a/src/Persistence_representations/concept/Topological_data_with_averages.h +++ b/src/Persistence_representations/concept/Topological_data_with_averages.h @@ -28,14 +28,13 @@ namespace Gudhi { namespace Persistence_representations { -/** \brief The concept Topological_data_with_averages describes the requirements - * for a type to implement a container that allows computations of averages. - * Note that the average object after being computed is stored in *this. +/** \brief The concept Topological_data_with_averages describes the requirements + * for a type to implement a container that allows computations of averages. + * Note that the average object after being computed is stored in *this. */ -class Topological_data_with_averages -{ -public: - void compute_average( const std::vector< Topological_data_with_averages* >& to_average ); +class Topological_data_with_averages { + public: + void compute_average(const std::vector& to_average); }; } // namespace Persistence_representations diff --git a/src/Persistence_representations/concept/Topological_data_with_distances.h b/src/Persistence_representations/concept/Topological_data_with_distances.h index 2e6de729..c2078403 100644 --- a/src/Persistence_representations/concept/Topological_data_with_distances.h +++ b/src/Persistence_representations/concept/Topological_data_with_distances.h @@ -27,21 +27,19 @@ namespace Gudhi { namespace Persistence_representations { - -/** \brief The concept Topological_data_with_distances describes the requirements +/** \brief The concept Topological_data_with_distances describes the requirements * for a type to implement a container that allows computations of distance to another contained of that type. * \details - * The second parameter of the distance function allow to declare power of a distance. The exact meaning of that + * The second parameter of the distance function allow to declare power of a distance. The exact meaning of that * number will be different for different distances. A few examples are given below: * In case of p-Wasserstein distance, the power is equal to p. power = std::limit::max() for bottleneck * distance. * * In case of L^p landscape distance, the power is equal to p. s */ -class Topological_data_with_distances -{ -public: - double distance( const Topological_data_with_distances& second , double power = 1); +class Topological_data_with_distances { + public: + double distance(const Topological_data_with_distances& second, double power = 1); }; } // namespace Persistence_representations diff --git a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h index 203a1d91..a0677fb2 100644 --- a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h +++ b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h @@ -27,14 +27,12 @@ namespace Gudhi { namespace Persistence_representations { - -/** \brief The concept Topological_data_with_scalar_product describes the requirements - * for a type to implement a container that allows computations of scalar products. +/** \brief The concept Topological_data_with_scalar_product describes the requirements + * for a type to implement a container that allows computations of scalar products. */ -class Topological_data_with_scalar_product -{ -public: - double compute_scalar_product( const Topological_data_with_scalar_product& second ); +class Topological_data_with_scalar_product { + public: + double compute_scalar_product(const Topological_data_with_scalar_product& second); }; } // namespace Persistence_representations diff --git a/src/Persistence_representations/concept/Vectorized_topological_data.h b/src/Persistence_representations/concept/Vectorized_topological_data.h index 8d4105a2..0d4591d1 100644 --- a/src/Persistence_representations/concept/Vectorized_topological_data.h +++ b/src/Persistence_representations/concept/Vectorized_topological_data.h @@ -27,20 +27,21 @@ namespace Gudhi { namespace Persistence_representations { -/** \brief The concept Vectorized_topological_data describes the requirements - * for a type to implement a container that allows vectorization. +/** \brief The concept Vectorized_topological_data describes the requirements + * for a type to implement a container that allows vectorization. */ -class Vectorized_topological_data -{ -public: - /** - * There are various ways data can be vectorized. This function give us the number of functions for vectorization provided by a given class. - **/ - size_t number_of_vectorize_functions(); - /** - * This is a function to vectorize given container. The parameter of a function have to be between 0 and the value returned by number_of_vectorize_functions(). - **/ - std::vector vectorize( int number_of_function ); +class Vectorized_topological_data { + public: + /** + * There are various ways data can be vectorized. This function give us the number of functions for vectorization + *provided by a given class. + **/ + size_t number_of_vectorize_functions(); + /** + * This is a function to vectorize given container. The parameter of a function have to be between 0 and the value + *returned by number_of_vectorize_functions(). + **/ + std::vector vectorize(int number_of_function); }; } // namespace Persistence_representations diff --git a/src/Persistence_representations/doc/Persistence_representations_doc.h b/src/Persistence_representations/doc/Persistence_representations_doc.h index bc11d2c4..60b9d6da 100644 --- a/src/Persistence_representations/doc/Persistence_representations_doc.h +++ b/src/Persistence_representations/doc/Persistence_representations_doc.h @@ -20,7 +20,6 @@ * along with this program. If not, see . */ - #ifndef DOC_GUDHI_STAT_H_ #define DOC_GUDHI_STAT_H_ @@ -35,24 +34,34 @@ namespace Persistence_representations { * @{ *\section Persistence_representations_idea Idea - *In order to perform most of the statistical tests and machine learning algorithms on a data one need to be able to perform only a very limited number of operations on them. Let us fix a representation of - * data of a type A. To perform most of the statistical and machine learning operations one need to be able to compute average of objects of type A (so that the averaged object is also of a type A), to - * compute distance between objects of a type A, to vectorize object of a type A and to compute scalar product of a pair objects of a type A. - * - *To put this statement into a context, let us assume we have two collections \f$ c_1,\ldots,c_n\f$ and \f$d_1,...,d_n\f$ of objects of a type A. We want to verify if the average of those two collections + *In order to perform most of the statistical tests and machine learning algorithms on a data one need to be able to + perform only a very limited number of operations on them. Let us fix a representation of + * data of a type A. To perform most of the statistical and machine learning operations one need to be able to compute + average of objects of type A (so that the averaged object is also of a type A), to + * compute distance between objects of a type A, to vectorize object of a type A and to compute scalar product of a pair + objects of a type A. + * + *To put this statement into a context, let us assume we have two collections \f$ c_1,\ldots,c_n\f$ and + \f$d_1,...,d_n\f$ of objects of a type A. We want to verify if the average of those two collections * are different by performing a permutation test. - *First of all, we compute averages of those two collections: C average of \f$ c_1,\ldots,c_n \f$ and D average of \f$d_1,\ldots,d_n\f$. Note that both C and D are of a type A. Then we compute \f$d(C,D)\f$, + *First of all, we compute averages of those two collections: C average of \f$ c_1,\ldots,c_n \f$ and D average of + \f$d_1,\ldots,d_n\f$. Note that both C and D are of a type A. Then we compute \f$d(C,D)\f$, * a distance between C and D. *Later we put the two collections into one bin: *\f[B = \{ c_1,...,c_n,d_1,...,d_n \}\f] - *Then we shuffle B, and we divide the shuffled version of B into two classes: \f$B_1\f$ and \f$B_2\f$ (in this case, of the same cardinality). Then we compute averages \f$\hat{B_1}\f$ and \f$\hat{B_2}\f$ - * of elements in \f$B_1\f$ and \f$B_2\f$. Note that again, \f$\hat{B_1}\f$ and \f$\hat{B_2}\f$ are of a type A. - *Then we compute their distance \f$d(\hat{B_1},\hat{B_2})\f$. The procedure of shuffling and dividing the set \f$B\f$ is repeated \f$N\f$ times (where \f$N\f$ is reasonably large number). - *Then the p-value of a statement that the averages of \f$c_1,...,c_n\f$ and \f$d_1,...,d_n\f$ is approximated by the number of times \f$d(\hat{B_1},\hat{B_2}) > d(C,D)\f$ divided by \f$N\f$. + *Then we shuffle B, and we divide the shuffled version of B into two classes: \f$B_1\f$ and \f$B_2\f$ (in this case, of + the same cardinality). Then we compute averages \f$\hat{B_1}\f$ and \f$\hat{B_2}\f$ + * of elements in \f$B_1\f$ and \f$B_2\f$. Note that again, \f$\hat{B_1}\f$ and \f$\hat{B_2}\f$ are of a type A. + *Then we compute their distance \f$d(\hat{B_1},\hat{B_2})\f$. The procedure of shuffling and dividing the set \f$B\f$ + is repeated \f$N\f$ times (where \f$N\f$ is reasonably large number). + *Then the p-value of a statement that the averages of \f$c_1,...,c_n\f$ and \f$d_1,...,d_n\f$ is approximated by the + number of times \f$d(\hat{B_1},\hat{B_2}) > d(C,D)\f$ divided by \f$N\f$. * - *The permutation test reminded above can be performed for any type A which can be averaged, and which allows for computations of distances. + *The permutation test reminded above can be performed for any type A which can be averaged, and which allows for + computations of distances. * - *The Persistence\_representations contains a collection of various representations of persistent homology that implements various concepts described below: + *The Persistence\_representations contains a collection of various representations of persistent homology that + implements various concepts described below: * *\li Concept of a representation of persistence that allows averaging (so that the average object is of the same type). *\li Concept of representation of persistence that allows computations of distances. @@ -61,28 +70,38 @@ namespace Persistence_representations { *\li Concept of representation of persistence that allows computations of real--valued characteristics of objects. * * - *At the moment an implementation of the following representations of persistence are available (further details of those representations will be discussed later): + *At the moment an implementation of the following representations of persistence are available (further details of + those representations will be discussed later): * - *\li Exact persistence landscapes (allow averaging, computation of distances, scalar products, vectorizations and real value characteristics). - *\li Persistence landscapes on a grid (allow averaging, computation of distances scalar products, vectorizations and real value characteristics). - *\li Persistence heat maps – various representations where one put some weighted or not Gaussian kernel for each point of diagram (allow averaging, computation of distances, scalar products, + *\li Exact persistence landscapes (allow averaging, computation of distances, scalar products, vectorizations and real + value characteristics). + *\li Persistence landscapes on a grid (allow averaging, computation of distances scalar products, vectorizations and + real value characteristics). + *\li Persistence heat maps – various representations where one put some weighted or not Gaussian kernel for each point + of diagram (allow averaging, computation of distances, scalar products, * vectorizations and real value characteristics). - *\li Persistence vectors (allow averaging, computation of distances, scalar products, vectorizations and real value characteristics). + *\li Persistence vectors (allow averaging, computation of distances, scalar products, vectorizations and real value + characteristics). *\li Persistence diagrams / barcodes (allow computation of distances, vectorizations and real value characteristics). * * - * Note that at the while functionalities like averaging, distances and scalar products are fixed, there is no canonical way of vectorizing and computing real valued characteristics of objects. Therefore the - * vectorizations and computation of real value characteristics procedures are quite likely to evolve in the furthering versions of the library. + * Note that at the while functionalities like averaging, distances and scalar products are fixed, there is no canonical + way of vectorizing and computing real valued characteristics of objects. Therefore the + * vectorizations and computation of real value characteristics procedures are quite likely to evolve in the furthering + versions of the library. * - * The main aim of this implementation is to be able to implement various statistical methods, both on the level of C++ and on the level of python. The methods will operate on the functionalities offered - * by concepts. That means that the statistical and ML methods will be able to operate on any representation that implement the required concept (including the ones that are not in the library at the moment). + * The main aim of this implementation is to be able to implement various statistical methods, both on the level of C++ + and on the level of python. The methods will operate on the functionalities offered + * by concepts. That means that the statistical and ML methods will be able to operate on any representation that + implement the required concept (including the ones that are not in the library at the moment). * That gives provides a framework, that is very easy to extend, for topological statistics. * * Below we are discussing the representations which are currently implemented in Persistence\_representations package: * * \section sec_persistence_landscapes Persistence Landscapes * Reference manual: \ref Gudhi::Persistence_representations::Persistence_landscape
- * Persistence landscapes were originally proposed by Bubenik in \cite bubenik_landscapes_2015. Efficient algorithms to compute them rigorously were proposed by Bubenik and Dlotko in \cite bubenik_dlotko_landscapes_2016. The idea of + * Persistence landscapes were originally proposed by Bubenik in \cite bubenik_landscapes_2015. Efficient algorithms to + compute them rigorously were proposed by Bubenik and Dlotko in \cite bubenik_dlotko_landscapes_2016. The idea of * persistence landscapes is shortly summarized in below. * * To begin with, suppose we are given a point \f$(b,d) \in \mathbb{R}^2\f$ in a @@ -102,47 +121,67 @@ namespace Persistence_representations { * * A persistence landscape of the birth-death * pairs \f$(b_i , d_i)\f$, where \f$i = 1,\ldots,m\f$, which constitute the given - * persistence diagram is the sequence of functions \f$\lambda_k : \mathbb{R} \rightarrow [0,\infty)\f$ for \f$k \in \mathbb{N}\f$, where \f$\lambda_k(x)\f$ + * persistence diagram is the sequence of functions \f$\lambda_k : \mathbb{R} \rightarrow [0,\infty)\f$ for \f$k \in + \mathbb{N}\f$, where \f$\lambda_k(x)\f$ * denotes the \f$k^{\rm th}\f$ largest value of the numbers \f$f_{(b_i,d_i)}(x)\f$, * for \f$i = 1, \ldots, m\f$, and we define \f$\lambda_k(x) = 0\f$ if \f$k > m\f$. * Equivalently, this sequence of functions can be combined into a single * function \f$L : \mathbb{N} \times \mathbb{R} \to [0,\infty)\f$ of two * variables, if we define \f$L(k,t) = \lambda_k(t)\f$. * - * The detailed description of algorithms used to compute persistence landscapes can be found in \cite bubenik_dlotko_landscapes_2016. - * Note that this implementation provides exact representation of landscapes. That have many advantages, but also a few drawbacks. For instance, as discussed - * in \cite bubenik_dlotko_landscapes_2016, the exact representation of landscape may be of quadratic size with respect to the input persistence diagram. It may therefore happen - * that, for very large diagrams, using this representation may be memory--prohibitive. In such a case, there are two possible ways to proceed: + * The detailed description of algorithms used to compute persistence landscapes can be found in \cite + bubenik_dlotko_landscapes_2016. + * Note that this implementation provides exact representation of landscapes. That have many advantages, but also a few + drawbacks. For instance, as discussed + * in \cite bubenik_dlotko_landscapes_2016, the exact representation of landscape may be of quadratic size with respect + to the input persistence diagram. It may therefore happen + * that, for very large diagrams, using this representation may be memory--prohibitive. In such a case, there are two + possible ways to proceed: * *\li Use non exact representation on a grid described in the Section \ref sec_landscapes_on_grid. - *\li Compute just a number of initial nonzero landscapes. This option is available from C++ level. - * - * - * - *\section sec_landscapes_on_grid Persistence Landscapes on a grid - * Reference manual: \ref Gudhi::Persistence_representations::Persistence_landscape_on_grid
- * This is an alternative, not--exact, representation of persistence landscapes defined in the Section \ref sec_persistence_landscapes. Unlike in the Section \ref sec_persistence_landscapes we build a - * representation of persistence landscape by sampling its values on a finite, equally distributed grid of points. - * Since, the persistence landscapes that originate from persistence diagrams have slope \f$1\f$ or \f$-1\f$, we have an estimate of a region between the grid points where the landscape cab be located. - * That allows to estimate an error make when performing various operations on landscape. Note that for average landscapes the slope is in range \f$[-1,1]\f$ and similar estimate can be used. + *\li Compute just a number of initial nonzero landscapes. This option is available from C++ level. * - * Due to a lack of rigorous description of the algorithms to deal with this non--rigorous representation of persistence landscapes in the literature, we are providing a short discussion of them in below. * - *Let us assume that we want to compute persistence landscape on a interval \f$[x,y]\f$. Let us assume that we want to use \f$N\f$ grid points for that purpose. - * Then we will sample the persistence landscape on points \f$x_1 = x , x_2 = x + \frac{y-x}{N}, \ldots , x_{N} = y\f$. Persistence landscapes are represented as a vector of - * vectors of real numbers. Assume that i-th vector consist of \f$n_i\f$ numbers sorted from larger to smaller. They represent the values of the functions - \f$\lambda_1,\ldots,\lambda_{n_i}\f$ ,\f$\lambda_{n_i+1}\f$ and the functions with larger indices are then zero functions) on the i-th point of a grid, i.e. \f$x + i \frac{y-x}{N}\f$. * - *When averaging two persistence landscapes represented by a grid we need to make sure that they are defined in a compatible grids. I.e. the intervals \f$[x,y]\f$ on which they are defined are - * the same, and the numbers of grid points \f$N\f$ are the same in both cases. If this is the case, we simply compute point-wise averages of the entries of corresponding - * vectors (In this whole section we assume that if one vector of numbers is shorter than another, we extend the shorter one with zeros so that they have the same length.) - * - *Computations of distances between two persistence landscapes on a grid is not much different than in the rigorous case. In this case, we sum up the distances between the same levels of - * corresponding landscapes. For fixed level, we approximate the landscapes between the corresponding constitutive points of landscapes by linear functions, and compute the \f$L^p\f$ distance between them. - * - *Similarly as in case of distance, when computing the scalar product of two persistence landscapes on a grid, we sum up the scalar products of corresponding levels of landscapes. For each level, - * we assume that the persistence landscape on a grid between two grid points is approximated by linear function. Therefore to compute scalar product of two corresponding levels of landscapes, - * we sum up the integrals of products of line segments for every pair of constitutive grid points. + *\section sec_landscapes_on_grid Persistence Landscapes on a grid + * Reference manual: \ref Gudhi::Persistence_representations::Persistence_landscape_on_grid
+ * This is an alternative, not--exact, representation of persistence landscapes defined in the Section \ref + sec_persistence_landscapes. Unlike in the Section \ref sec_persistence_landscapes we build a + * representation of persistence landscape by sampling its values on a finite, equally distributed grid of points. + * Since, the persistence landscapes that originate from persistence diagrams have slope \f$1\f$ or \f$-1\f$, we have an + estimate of a region between the grid points where the landscape cab be located. + * That allows to estimate an error make when performing various operations on landscape. Note that for average + landscapes the slope is in range \f$[-1,1]\f$ and similar estimate can be used. + * + * Due to a lack of rigorous description of the algorithms to deal with this non--rigorous representation of persistence + landscapes in the literature, we are providing a short discussion of them in below. + * + *Let us assume that we want to compute persistence landscape on a interval \f$[x,y]\f$. Let us assume that we want to + use \f$N\f$ grid points for that purpose. + * Then we will sample the persistence landscape on points \f$x_1 = x , x_2 = x + \frac{y-x}{N}, \ldots , x_{N} = y\f$. + Persistence landscapes are represented as a vector of + * vectors of real numbers. Assume that i-th vector consist of \f$n_i\f$ numbers sorted from larger to smaller. They + represent the values of the functions + \f$\lambda_1,\ldots,\lambda_{n_i}\f$ ,\f$\lambda_{n_i+1}\f$ and the functions with larger indices are then zero + functions) on the i-th point of a grid, i.e. \f$x + i \frac{y-x}{N}\f$. + * + *When averaging two persistence landscapes represented by a grid we need to make sure that they are defined in a + compatible grids. I.e. the intervals \f$[x,y]\f$ on which they are defined are + * the same, and the numbers of grid points \f$N\f$ are the same in both cases. If this is the case, we simply compute + point-wise averages of the entries of corresponding + * vectors (In this whole section we assume that if one vector of numbers is shorter than another, we extend the shorter + one with zeros so that they have the same length.) + * + *Computations of distances between two persistence landscapes on a grid is not much different than in the rigorous + case. In this case, we sum up the distances between the same levels of + * corresponding landscapes. For fixed level, we approximate the landscapes between the corresponding constitutive + points of landscapes by linear functions, and compute the \f$L^p\f$ distance between them. + * + *Similarly as in case of distance, when computing the scalar product of two persistence landscapes on a grid, we sum up + the scalar products of corresponding levels of landscapes. For each level, + * we assume that the persistence landscape on a grid between two grid points is approximated by linear function. + Therefore to compute scalar product of two corresponding levels of landscapes, + * we sum up the integrals of products of line segments for every pair of constitutive grid points. * *Note that for this representation we need to specify a few parameters: * @@ -154,43 +193,62 @@ namespace Persistence_representations { * *\section sec_persistence_heat_maps Persistence heat maps * Reference manual: \ref Gudhi::Persistence_representations::Persistence_heat_maps
- *This is a general class of discrete structures which are based on idea of placing a kernel in the points of persistence diagrams. - *This idea appeared in work by many authors over the last 15 years. As far as we know this idea was firstly described in the work of Bologna group in \cite Ferri_Frosini_comparision_sheme_1 and \cite Ferri_Frosini_comparision_sheme_2. - *Later it has been described by Colorado State University group in \cite Persistence_Images_2017. The presented paper in the first time provide a discussion of stability of the representation. - *Also, the same ideas are used in construction of two recent kernels used for machine learning: \cite Kusano_Fukumizu_Hiraoka_PWGK and \cite Reininghaus_Huber_ALL_PSSK. Both the kernel's construction uses interesting ideas to - *ensure stability of the representation with respect to Wasserstein metric. In the kernel presented in \cite Kusano_Fukumizu_Hiraoka_PWGK, a scaling function is used to multiply the Gaussian kernel in the - *way that the points close to diagonal got low weight and consequently do not have a big influence on the resulting distribution. In \cite Reininghaus_Huber_ALL_PSSK for every point \f$(b,d)\f$ two Gaussian kernels - *are added: first, with a weight 1 in a point \f$(b,d)\f$, and the second, with the weight -1 for a point \f$(b,d)\f$. In both cases, the representations are stable with respect to 1-Wasserstein distance. - * - *In Persistence\_representations package we currently implement a discretization of the distributions described above. The base of this implementation is 2-dimensional array of pixels. Each pixel have assigned a real value which - * is a sum of values of distributions induced by each point of the persistence diagram. At the moment we compute the sum of values on a center of a pixels. It can be easily extended to any other function - * (like for instance sum of integrals of the intermediate distribution on a pixel). + *This is a general class of discrete structures which are based on idea of placing a kernel in the points of + persistence diagrams. + *This idea appeared in work by many authors over the last 15 years. As far as we know this idea was firstly described + in the work of Bologna group in \cite Ferri_Frosini_comparision_sheme_1 and \cite Ferri_Frosini_comparision_sheme_2. + *Later it has been described by Colorado State University group in \cite Persistence_Images_2017. The presented paper + in the first time provide a discussion of stability of the representation. + *Also, the same ideas are used in construction of two recent kernels used for machine learning: \cite + Kusano_Fukumizu_Hiraoka_PWGK and \cite Reininghaus_Huber_ALL_PSSK. Both the kernel's construction uses interesting + ideas to + *ensure stability of the representation with respect to Wasserstein metric. In the kernel presented in \cite + Kusano_Fukumizu_Hiraoka_PWGK, a scaling function is used to multiply the Gaussian kernel in the + *way that the points close to diagonal got low weight and consequently do not have a big influence on the resulting + distribution. In \cite Reininghaus_Huber_ALL_PSSK for every point \f$(b,d)\f$ two Gaussian kernels + *are added: first, with a weight 1 in a point \f$(b,d)\f$, and the second, with the weight -1 for a point \f$(b,d)\f$. + In both cases, the representations are stable with respect to 1-Wasserstein distance. + * + *In Persistence\_representations package we currently implement a discretization of the distributions described above. + The base of this implementation is 2-dimensional array of pixels. Each pixel have assigned a real value which + * is a sum of values of distributions induced by each point of the persistence diagram. At the moment we compute the + sum of values on a center of a pixels. It can be easily extended to any other function + * (like for instance sum of integrals of the intermediate distribution on a pixel). * *The parameters that determine the structure are the following: * *\li A positive integer k determining the size of the kernel we used (we always assume that the kernels are square). - *\li A filter: in practice a square matrix of a size \f$2k+1 \times 2k+1\f$. By default, this is a discretization of N(0,1) kernel. + *\li A filter: in practice a square matrix of a size \f$2k+1 \times 2k+1\f$. By default, this is a discretization of + N(0,1) kernel. *\li The box \f$[x_0,x_1]\times [y_0,y_1]\f$ bounding the domain of the persistence image. - *\li Scaling function. Each Gaussian kernel at point \f$(p,q)\f$ gets multiplied by the value of this function at the point \f$(p,q)\f$. - *\li A boolean value determining if the space below diagonal should be erased or not. To be precise: when points close to diagonal are given then sometimes the kernel have support that reaches the region + *\li Scaling function. Each Gaussian kernel at point \f$(p,q)\f$ gets multiplied by the value of this function at the + point \f$(p,q)\f$. + *\li A boolean value determining if the space below diagonal should be erased or not. To be precise: when points close + to diagonal are given then sometimes the kernel have support that reaches the region *below the diagonal. If the value of this parameter is true, then the values below diagonal can be erased. * * *\section sec_persistence_vectors Persistence vectors * Reference manual: \ref Gudhi::Persistence_representations::Vector_distances_in_diagram
- *This is a representation of persistent homology in a form of a vector which was designed for an application in 3d graphic in \cite Carriere_Oudot_Ovsjanikov_top_signatures_3d. Below we provide a short description of this representation. + *This is a representation of persistent homology in a form of a vector which was designed for an application in 3d + graphic in \cite Carriere_Oudot_Ovsjanikov_top_signatures_3d. Below we provide a short description of this + representation. * - *Given a persistence diagram \f$D = \{ (b_i,d_i) \}\f$, for every pair of birth--death points \f$(b_1,d_1)\f$ and \f$(b_2,d_2)\f$ we compute the following three distances: + *Given a persistence diagram \f$D = \{ (b_i,d_i) \}\f$, for every pair of birth--death points \f$(b_1,d_1)\f$ and + \f$(b_2,d_2)\f$ we compute the following three distances: * *\li \f$d( (b_1,d_1) , (b_2,d_2) )\f$. *\li \f$d( (b_1,d_1) , (\frac{b_1,d_1}{2},\frac{b_1,d_1}{2}) )\f$. *\li \f$d( (b_2,d_2) , (\frac{b_2,d_2}{2},\frac{b_2,d_2}{2}) )\f$. * - *We pick the smallest of those and add it to a vector. The obtained vector of numbers is then sorted in decreasing order. This way we obtain a persistence vector representing the diagram. + *We pick the smallest of those and add it to a vector. The obtained vector of numbers is then sorted in decreasing + order. This way we obtain a persistence vector representing the diagram. * - *Given two persistence vectors, the computation of distances, averages and scalar products is straightforward. Average is simply a coordinate-wise average of a collection of vectors. In this section we - * assume that the vectors are extended by zeros if they are of a different size. To compute distances we compute absolute value of differences between coordinates. A scalar product is a sum of products of - * values at the corresponding positions of two vectors. + *Given two persistence vectors, the computation of distances, averages and scalar products is straightforward. Average + is simply a coordinate-wise average of a collection of vectors. In this section we + * assume that the vectors are extended by zeros if they are of a different size. To compute distances we compute + absolute value of differences between coordinates. A scalar product is a sum of products of + * values at the corresponding positions of two vectors. * * \copyright GNU General Public License v3. */ diff --git a/src/Persistence_representations/example/persistence_heat_maps.cpp b/src/Persistence_representations/example/persistence_heat_maps.cpp index c75e2731..44227823 100644 --- a/src/Persistence_representations/example/persistence_heat_maps.cpp +++ b/src/Persistence_representations/example/persistence_heat_maps.cpp @@ -20,74 +20,63 @@ * along with this program. If not, see . */ - - #include #include #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; - double epsilon = 0.0000005; +int main(int argc, char** argv) { + // create two simple vectors with birth--death pairs: - -int main( int argc , char** argv ) -{ - //create two simple vectors with birth--death pairs: - - std::vector< std::pair< double , double > > persistence1; - std::vector< std::pair< double , double > > persistence2; - - persistence1.push_back( std::make_pair(1,2) ); - persistence1.push_back( std::make_pair(6,8) ); - persistence1.push_back( std::make_pair(0,4) ); - persistence1.push_back( std::make_pair(3,8) ); - - persistence2.push_back( std::make_pair(2,9) ); - persistence2.push_back( std::make_pair(1,6) ); - persistence2.push_back( std::make_pair(3,5) ); - persistence2.push_back( std::make_pair(6,10) ); - - //over here we define a function we sill put on a top on every birth--death pair in the persistence interval. It can be anything. Over here we will use standard Gaussian - std::vector< std::vector > filter = create_Gaussian_filter(5,1); - - //creating two heat maps. - Persistence_heat_maps hm1( persistence1 , filter , false , 20 , 0 , 11 ); - Persistence_heat_maps hm2( persistence2 , filter , false , 20 , 0 , 11 ); - - std::vector*> vector_of_maps; - vector_of_maps.push_back( &hm1 ); - vector_of_maps.push_back( &hm2 ); - - //compute median/mean of a vector of heat maps: - Persistence_heat_maps mean; - mean.compute_mean( vector_of_maps ); - Persistence_heat_maps median; - median.compute_median( vector_of_maps ); - - //to compute L^1 distance between hm1 and hm2: - std::cout << "The L^1 distance is : " << hm1.distance( hm2 , 1 ) << std::endl; - - //to average of hm1 and hm2: - std::vector< Persistence_heat_maps* > to_average; - to_average.push_back( &hm1 ); - to_average.push_back( &hm2 ); - Persistence_heat_maps av; - av.compute_average( to_average ); - - //to compute scalar product of hm1 and hm2: - std::cout << "Scalar product is : " << hm1.compute_scalar_product( hm2 ) << std::endl; - - return 0; -} + std::vector > persistence1; + std::vector > persistence2; + + persistence1.push_back(std::make_pair(1, 2)); + persistence1.push_back(std::make_pair(6, 8)); + persistence1.push_back(std::make_pair(0, 4)); + persistence1.push_back(std::make_pair(3, 8)); + persistence2.push_back(std::make_pair(2, 9)); + persistence2.push_back(std::make_pair(1, 6)); + persistence2.push_back(std::make_pair(3, 5)); + persistence2.push_back(std::make_pair(6, 10)); + // over here we define a function we sill put on a top on every birth--death pair in the persistence interval. It can + // be anything. Over here we will use standard Gaussian + std::vector > filter = create_Gaussian_filter(5, 1); + // creating two heat maps. + Persistence_heat_maps hm1(persistence1, filter, false, 20, 0, 11); + Persistence_heat_maps hm2(persistence2, filter, false, 20, 0, 11); + std::vector*> vector_of_maps; + vector_of_maps.push_back(&hm1); + vector_of_maps.push_back(&hm2); + + // compute median/mean of a vector of heat maps: + Persistence_heat_maps mean; + mean.compute_mean(vector_of_maps); + Persistence_heat_maps median; + median.compute_median(vector_of_maps); + + // to compute L^1 distance between hm1 and hm2: + std::cout << "The L^1 distance is : " << hm1.distance(hm2, 1) << std::endl; + + // to average of hm1 and hm2: + std::vector*> to_average; + to_average.push_back(&hm1); + to_average.push_back(&hm2); + Persistence_heat_maps av; + av.compute_average(to_average); + + // to compute scalar product of hm1 and hm2: + std::cout << "Scalar product is : " << hm1.compute_scalar_product(hm2) << std::endl; + + return 0; +} diff --git a/src/Persistence_representations/example/persistence_intervals.cpp b/src/Persistence_representations/example/persistence_intervals.cpp index 947c9627..69870744 100644 --- a/src/Persistence_representations/example/persistence_intervals.cpp +++ b/src/Persistence_representations/example/persistence_intervals.cpp @@ -20,92 +20,70 @@ * along with this program. If not, see . */ - - #include #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; - -int main( int argc , char** argv ) -{ - if ( argc != 2 ) - { - std::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 min_max_ = p.get_x_range(); - std::cout << "Birth-death range : " << min_max_.first << " " << min_max_.second << std::endl; - - - std::vector dominant_ten_intervals_length = p.length_of_dominant_intervals(10); - std::cout << "Length of ten dominant intervals : " < > ten_dominant_intervals = p.dominant_intervals( 10 ); - std::cout << "Here are the dominant intervals : " < histogram = p.histogram_of_lengths( 10 ); - std::cout << "Here is the histogram of barcode's length : " < cumulative_histogram = p.cumulative_histogram_of_lengths( 10 ); - std::cout<< "Cumulative histogram : " < char_funct_diag = p.characteristic_function_of_diagram( min_max_.first , min_max_.second ); - std::cout << "Characteristic function of diagram : " < cumul_char_funct_diag = p.cumulative_characteristic_function_of_diagram( min_max_.first , min_max_.second ); - std::cout << "Cumulative characteristic function of diagram : " < > pbns = p.compute_persistent_betti_numbers(); - for ( size_t i = 0 ; i != pbns.size() ; ++i ) - { - std::cout << pbns[i].first << " " << pbns[i].second < min_max_ = p.get_x_range(); + std::cout << "Birth-death range : " << min_max_.first << " " << min_max_.second << std::endl; + + std::vector dominant_ten_intervals_length = p.length_of_dominant_intervals(10); + std::cout << "Length of ten dominant intervals : " << std::endl; + for (size_t i = 0; i != dominant_ten_intervals_length.size(); ++i) { + std::cout << dominant_ten_intervals_length[i] << std::endl; + } + + std::vector > ten_dominant_intervals = p.dominant_intervals(10); + std::cout << "Here are the dominant intervals : " << std::endl; + for (size_t i = 0; i != ten_dominant_intervals.size(); ++i) { + std::cout << "( " << ten_dominant_intervals[i].first << "," << ten_dominant_intervals[i].second << std::endl; + } + + std::vector histogram = p.histogram_of_lengths(10); + std::cout << "Here is the histogram of barcode's length : " << std::endl; + for (size_t i = 0; i != histogram.size(); ++i) { + std::cout << histogram[i] << " "; + } + std::cout << std::endl; + + std::vector cumulative_histogram = p.cumulative_histogram_of_lengths(10); + std::cout << "Cumulative histogram : " << std::endl; + for (size_t i = 0; i != cumulative_histogram.size(); ++i) { + std::cout << cumulative_histogram[i] << " "; + } + std::cout << std::endl; + + std::vector char_funct_diag = p.characteristic_function_of_diagram(min_max_.first, min_max_.second); + std::cout << "Characteristic function of diagram : " << std::endl; + for (size_t i = 0; i != char_funct_diag.size(); ++i) { + std::cout << char_funct_diag[i] << " "; + } + std::cout << std::endl; + + std::vector cumul_char_funct_diag = + p.cumulative_characteristic_function_of_diagram(min_max_.first, min_max_.second); + std::cout << "Cumulative characteristic function of diagram : " << std::endl; + for (size_t i = 0; i != cumul_char_funct_diag.size(); ++i) { + std::cout << cumul_char_funct_diag[i] << " "; + } + std::cout << std::endl; + + std::cout << "Persistence Betti numbers \n"; + std::vector > pbns = p.compute_persistent_betti_numbers(); + for (size_t i = 0; i != pbns.size(); ++i) { + std::cout << pbns[i].first << " " << pbns[i].second << std::endl; + } + + return 0; } - - - - - - - diff --git a/src/Persistence_representations/example/persistence_landscape.cpp b/src/Persistence_representations/example/persistence_landscape.cpp index 3ce31918..e080154a 100644 --- a/src/Persistence_representations/example/persistence_landscape.cpp +++ b/src/Persistence_representations/example/persistence_landscape.cpp @@ -20,73 +20,66 @@ * along with this program. If not, see . */ - - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +int main(int argc, char** argv) { + // create two simple vectors with birth--death pairs: -int main( int argc , char** argv ) -{ - //create two simple vectors with birth--death pairs: - - std::vector< std::pair< double , double > > persistence1; - std::vector< std::pair< double , double > > persistence2; - - persistence1.push_back( std::make_pair(1,2) ); - persistence1.push_back( std::make_pair(6,8) ); - persistence1.push_back( std::make_pair(0,4) ); - persistence1.push_back( std::make_pair(3,8) ); - - persistence2.push_back( std::make_pair(2,9) ); - persistence2.push_back( std::make_pair(1,6) ); - persistence2.push_back( std::make_pair(3,5) ); - persistence2.push_back( std::make_pair(6,10) ); - - //create two persistence landscapes based on persistence1 and persistence2: - Persistence_landscape l1( persistence1 ); - Persistence_landscape l2( persistence2 ); - - //This is how to compute integral of landscapes: - std::cout << "Integral of the first landscape : " << l1.compute_integral_of_landscape() << std::endl; - std::cout << "Integral of the second landscape : " << l2.compute_integral_of_landscape() << std::endl; - - //And here how to write landscapes to stream: - std::cout << "l1 : " << l1 << std::endl; - std::cout << "l2 : " << l2 << std::endl; - - //Arithmetic operations on landscapes: - Persistence_landscape sum = l1+l2; - std::cout << "sum : " << sum << std::endl; - - //here are the maxima of the functions: - std::cout << "Maximum of l1 : " << l1.compute_maximum() << std::endl; - std::cout << "Maximum of l2 : " << l2.compute_maximum() << std::endl; - - //here are the norms of landscapes: - std::cout << "L^1 Norm of l1 : " << l1.compute_norm_of_landscape( 1. ) << std::endl; - std::cout << "L^1 Norm of l2 : " << l2.compute_norm_of_landscape( 1. ) << std::endl; - - //here is the average of landscapes: - Persistence_landscape average; - average.compute_average( {&l1,&l2} ); - std::cout << "average : " << average << std::endl; - - //here is the distance of landscapes: - std::cout << "Distance : " << l1.distance( l2 ) << std::endl; - - //here is the scalar product of landscapes: - std::cout << "Scalar product : " << l1.compute_scalar_product( l2 ) << std::endl; - - //here is how to create a file which is suitable for visualization via gnuplot: - average.plot( "average_landscape" ); - - return 0; -} + std::vector > persistence1; + std::vector > persistence2; + + persistence1.push_back(std::make_pair(1, 2)); + persistence1.push_back(std::make_pair(6, 8)); + persistence1.push_back(std::make_pair(0, 4)); + persistence1.push_back(std::make_pair(3, 8)); + + persistence2.push_back(std::make_pair(2, 9)); + persistence2.push_back(std::make_pair(1, 6)); + persistence2.push_back(std::make_pair(3, 5)); + persistence2.push_back(std::make_pair(6, 10)); + + // create two persistence landscapes based on persistence1 and persistence2: + Persistence_landscape l1(persistence1); + Persistence_landscape l2(persistence2); + + // This is how to compute integral of landscapes: + std::cout << "Integral of the first landscape : " << l1.compute_integral_of_landscape() << std::endl; + std::cout << "Integral of the second landscape : " << l2.compute_integral_of_landscape() << std::endl; + // And here how to write landscapes to stream: + std::cout << "l1 : " << l1 << std::endl; + std::cout << "l2 : " << l2 << std::endl; + + // Arithmetic operations on landscapes: + Persistence_landscape sum = l1 + l2; + std::cout << "sum : " << sum << std::endl; + + // here are the maxima of the functions: + std::cout << "Maximum of l1 : " << l1.compute_maximum() << std::endl; + std::cout << "Maximum of l2 : " << l2.compute_maximum() << std::endl; + + // here are the norms of landscapes: + std::cout << "L^1 Norm of l1 : " << l1.compute_norm_of_landscape(1.) << std::endl; + std::cout << "L^1 Norm of l2 : " << l2.compute_norm_of_landscape(1.) << std::endl; + + // here is the average of landscapes: + Persistence_landscape average; + average.compute_average({&l1, &l2}); + std::cout << "average : " << average << std::endl; + + // here is the distance of landscapes: + std::cout << "Distance : " << l1.distance(l2) << std::endl; + + // here is the scalar product of landscapes: + std::cout << "Scalar product : " << l1.compute_scalar_product(l2) << std::endl; + + // here is how to create a file which is suitable for visualization via gnuplot: + average.plot("average_landscape"); + + return 0; +} diff --git a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp index 276b7a44..75461fc6 100644 --- a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp +++ b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp @@ -20,69 +20,62 @@ * along with this program. If not, see . */ - - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +int main(int argc, char** argv) { + // create two simple vectors with birth--death pairs: + + std::vector > persistence1; + std::vector > persistence2; + + persistence1.push_back(std::make_pair(1, 2)); + persistence1.push_back(std::make_pair(6, 8)); + persistence1.push_back(std::make_pair(0, 4)); + persistence1.push_back(std::make_pair(3, 8)); + + persistence2.push_back(std::make_pair(2, 9)); + persistence2.push_back(std::make_pair(1, 6)); + persistence2.push_back(std::make_pair(3, 5)); + persistence2.push_back(std::make_pair(6, 10)); + + // create two persistence landscapes based on persistence1 and persistence2: + Persistence_landscape_on_grid l1(persistence1, 0, 11, 20); + Persistence_landscape_on_grid l2(persistence2, 0, 11, 20); + + // This is how to compute integral of landscapes: + std::cout << "Integral of the first landscape : " << l1.compute_integral_of_landscape() << std::endl; + std::cout << "Integral of the second landscape : " << l2.compute_integral_of_landscape() << std::endl; + + // And here how to write landscapes to stream: + std::cout << "l1 : " << l1 << std::endl; + std::cout << "l2 : " << l2 << std::endl; + + // here are the maxima of the functions: + std::cout << "Maximum of l1 : " << l1.compute_maximum() << std::endl; + std::cout << "Maximum of l2 : " << l2.compute_maximum() << std::endl; + + // here are the norms of landscapes: + std::cout << "L^1 Norm of l1 : " << l1.compute_norm_of_landscape(1.) << std::endl; + std::cout << "L^1 Norm of l2 : " << l2.compute_norm_of_landscape(1.) << std::endl; + + // here is the average of landscapes: + Persistence_landscape_on_grid average; + average.compute_average({&l1, &l2}); + std::cout << "average : " << average << std::endl; + + // here is the distance of landscapes: + std::cout << "Distance : " << l1.distance(l2) << std::endl; + + // here is the scalar product of landscapes: + std::cout << "Scalar product : " << l1.compute_scalar_product(l2) << std::endl; + + // here is how to create a file which is suitable for visualization via gnuplot: + average.plot("average_landscape"); -int main( int argc , char** argv ) -{ - //create two simple vectors with birth--death pairs: - - std::vector< std::pair< double , double > > persistence1; - std::vector< std::pair< double , double > > persistence2; - - persistence1.push_back( std::make_pair(1,2) ); - persistence1.push_back( std::make_pair(6,8) ); - persistence1.push_back( std::make_pair(0,4) ); - persistence1.push_back( std::make_pair(3,8) ); - - persistence2.push_back( std::make_pair(2,9) ); - persistence2.push_back( std::make_pair(1,6) ); - persistence2.push_back( std::make_pair(3,5) ); - persistence2.push_back( std::make_pair(6,10) ); - - //create two persistence landscapes based on persistence1 and persistence2: - Persistence_landscape_on_grid l1( persistence1 , 0 , 11 , 20 ); - Persistence_landscape_on_grid l2( persistence2 , 0 , 11 , 20 ); - - //This is how to compute integral of landscapes: - std::cout << "Integral of the first landscape : " << l1.compute_integral_of_landscape() << std::endl; - std::cout << "Integral of the second landscape : " << l2.compute_integral_of_landscape() << std::endl; - - //And here how to write landscapes to stream: - std::cout << "l1 : " << l1 << std::endl; - std::cout << "l2 : " << l2 << std::endl; - - //here are the maxima of the functions: - std::cout << "Maximum of l1 : " << l1.compute_maximum() << std::endl; - std::cout << "Maximum of l2 : " << l2.compute_maximum() << std::endl; - - //here are the norms of landscapes: - std::cout << "L^1 Norm of l1 : " << l1.compute_norm_of_landscape( 1. ) << std::endl; - std::cout << "L^1 Norm of l2 : " << l2.compute_norm_of_landscape( 1. ) << std::endl; - - //here is the average of landscapes: - Persistence_landscape_on_grid average; - average.compute_average( {&l1,&l2} ); - std::cout << "average : " << average << std::endl; - - //here is the distance of landscapes: - std::cout << "Distance : " << l1.distance( l2 ) << std::endl; - - //here is the scalar product of landscapes: - std::cout << "Scalar product : " << l1.compute_scalar_product( l2 ) << std::endl; - - //here is how to create a file which is suitable for visualization via gnuplot: - average.plot( "average_landscape" ); - - - return 0; + return 0; } diff --git a/src/Persistence_representations/example/persistence_vectors.cpp b/src/Persistence_representations/example/persistence_vectors.cpp index 028d95eb..c41d261b 100644 --- a/src/Persistence_representations/example/persistence_vectors.cpp +++ b/src/Persistence_representations/example/persistence_vectors.cpp @@ -20,12 +20,9 @@ * along with this program. If not, see . */ - - #include #include - #include #include #include @@ -34,47 +31,45 @@ using namespace Gudhi; using namespace Gudhi::Persistence_representations; +int main(int argc, char** argv) { + // create two simple vectors with birth--death pairs: + + std::vector > persistence1; + std::vector > persistence2; + + persistence1.push_back(std::make_pair(1, 2)); + persistence1.push_back(std::make_pair(6, 8)); + persistence1.push_back(std::make_pair(0, 4)); + persistence1.push_back(std::make_pair(3, 8)); + + persistence2.push_back(std::make_pair(2, 9)); + persistence2.push_back(std::make_pair(1, 6)); + persistence2.push_back(std::make_pair(3, 5)); + persistence2.push_back(std::make_pair(6, 10)); + + // create two persistence vectors based on persistence1 and persistence2: + Vector_distances_in_diagram v1 = + Vector_distances_in_diagram(persistence1, std::numeric_limits::max()); + Vector_distances_in_diagram v2 = + Vector_distances_in_diagram(persistence2, std::numeric_limits::max()); + + // writing to a stream: + std::cout << "v1 : " << v1 << std::endl; + std::cout << "v2 : " << v2 << std::endl; + + // averages: + Vector_distances_in_diagram average; + average.compute_average({&v1, &v2}); + std::cout << "Average : " << average << std::endl; + // computations of distances: + std::cout << "l^1 distance : " << v1.distance(v2) << std::endl; + // computations of scalar product: + std::cout << "Scalar product of l1 and l2 : " << v1.compute_scalar_product(v2) << std::endl; -int main( int argc , char** argv ) -{ - //create two simple vectors with birth--death pairs: - - std::vector< std::pair< double , double > > persistence1; - std::vector< std::pair< double , double > > persistence2; - - persistence1.push_back( std::make_pair(1,2) ); - persistence1.push_back( std::make_pair(6,8) ); - persistence1.push_back( std::make_pair(0,4) ); - persistence1.push_back( std::make_pair(3,8) ); - - persistence2.push_back( std::make_pair(2,9) ); - persistence2.push_back( std::make_pair(1,6) ); - persistence2.push_back( std::make_pair(3,5) ); - persistence2.push_back( std::make_pair(6,10) ); - - //create two persistence vectors based on persistence1 and persistence2: - Vector_distances_in_diagram v1 = Vector_distances_in_diagram( persistence1 , std::numeric_limits::max() ); - Vector_distances_in_diagram v2 = Vector_distances_in_diagram( persistence2 , std::numeric_limits::max() ); - - //writing to a stream: - std::cout << "v1 : " << v1 << std::endl; - std::cout << "v2 : " << v2 << std::endl; - - //averages: - Vector_distances_in_diagram average; - average.compute_average( {&v1,&v2} ); - std::cout << "Average : " << average << std::endl; - - //computations of distances: - std::cout << "l^1 distance : " << v1.distance( v2 ) << std::endl; - - //computations of scalar product: - std::cout << "Scalar product of l1 and l2 : " << v1.compute_scalar_product( v2 ) << std::endl; - - //create a file with a gnuplot script: - v1.plot( "plot_of_vector_representation" ); + // create a file with a gnuplot script: + v1.plot("plot_of_vector_representation"); - return 0; + return 0; } diff --git a/src/Persistence_representations/include/gudhi/PSSK.h b/src/Persistence_representations/include/gudhi/PSSK.h index 42baa8ec..ece7e323 100644 --- a/src/Persistence_representations/include/gudhi/PSSK.h +++ b/src/Persistence_representations/include/gudhi/PSSK.h @@ -23,158 +23,141 @@ #ifndef PSSK_H_ #define PSSK_H_ -//gudhi include +// gudhi include #include - -namespace Gudhi -{ -namespace Persistence_representations -{ +namespace Gudhi { +namespace Persistence_representations { /** * This is a version of a representation presented in https://arxiv.org/abs/1412.6821 -* In that paper the authors are using the representation just to compute kernel. Over here, we extend the usability by far. +* In that paper the authors are using the representation just to compute kernel. Over here, we extend the usability by +*far. * Note that the version presented here is not exact, since we are discretizing the kernel. -* The only difference with respect to the original class is the method of creation. We have full (square) image, and for every point (p,q), we add a kernel at (p,q) and the negative kernel +* The only difference with respect to the original class is the method of creation. We have full (square) image, and for +*every point (p,q), we add a kernel at (p,q) and the negative kernel * at (q,p) **/ -class PSSK : public Persistence_heat_maps -{ -public: - PSSK():Persistence_heat_maps(){} - - PSSK(const std::vector< std::pair< double,double > > & interval , std::vector< std::vector > filter = create_Gaussian_filter(5,1) , size_t number_of_pixels = 1000 , double min_ = -1 , double max_ = -1 ) - :Persistence_heat_maps() - { - this->construct( interval , filter , number_of_pixels , min_ , max_ ); - } - - - PSSK( const char* filename , std::vector< std::vector > filter = create_Gaussian_filter(5,1) , size_t number_of_pixels = 1000 , double min_ = -1 , double max_ = -1 , unsigned dimension = std::numeric_limits::max() ): - Persistence_heat_maps() - { - std::vector< std::pair< double , double > > intervals_; - if ( dimension == std::numeric_limits::max() ) - { - intervals_ = read_persistence_intervals_in_one_dimension_from_file( filename ); - } - else - { - intervals_ = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); - } - this->construct( intervals_ , filter , number_of_pixels , min_ , max_ ); - } - -protected: - void construct( const std::vector< std::pair >& intervals_ , - std::vector< std::vector > filter = create_Gaussian_filter(5,1), - size_t number_of_pixels = 1000 , double min_ = -1 , double max_ = -1 ); -}; - -//if min_ == max_, then the program is requested to set up the values itself based on persistence intervals -void PSSK::construct( const std::vector< std::pair >& intervals_ , - std::vector< std::vector > filter, - size_t number_of_pixels , double min_ , double max_ ) -{ - bool dbg = false; - if ( dbg ){std::cerr << "Entering construct procedure \n";getchar();} - - if ( min_ == max_ ) - { - //in this case, we want the program to set up the min_ and max_ values by itself. - min_ = std::numeric_limits::max(); - max_ = -std::numeric_limits::max(); - - - for ( size_t i = 0 ; i != intervals_.size() ; ++i ) - { - if ( intervals_[i].first < min_ )min_ = intervals_[i].first; - if ( intervals_[i].second > max_ )max_ = intervals_[i].second; - } - //now we have the structure filled in, and moreover we know min_ and max_ values of the interval, so we know the range. - - //add some more space: - min_ -= fabs(max_ - min_)/100; - max_ += fabs(max_ - min_)/100; +class PSSK : public Persistence_heat_maps { + public: + PSSK() : Persistence_heat_maps() {} + + PSSK(const std::vector >& interval, + std::vector > filter = create_Gaussian_filter(5, 1), size_t number_of_pixels = 1000, + double min_ = -1, double max_ = -1) + : Persistence_heat_maps() { + this->construct(interval, filter, number_of_pixels, min_, max_); + } + + PSSK(const char* filename, std::vector > filter = create_Gaussian_filter(5, 1), + size_t number_of_pixels = 1000, double min_ = -1, double max_ = -1, + unsigned dimension = std::numeric_limits::max()) + : Persistence_heat_maps() { + std::vector > intervals_; + if (dimension == std::numeric_limits::max()) { + intervals_ = read_persistence_intervals_in_one_dimension_from_file(filename); + } else { + intervals_ = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); } + this->construct(intervals_, filter, number_of_pixels, min_, max_); + } - if ( dbg ) - { - std::cerr << "min_ : " << min_ << std::endl; - std::cerr << "max_ : " << max_ << std::endl; - std::cerr << "number_of_pixels : " << number_of_pixels << std::endl; - getchar(); - } - - this->min_ = min_; - this->max_ = max_; + protected: + void construct(const std::vector >& intervals_, + std::vector > filter = create_Gaussian_filter(5, 1), + size_t number_of_pixels = 1000, double min_ = -1, double max_ = -1); +}; +// if min_ == max_, then the program is requested to set up the values itself based on persistence intervals +void PSSK::construct(const std::vector >& intervals_, + std::vector > filter, size_t number_of_pixels, double min_, double max_) { + bool dbg = false; + if (dbg) { + std::cerr << "Entering construct procedure \n"; + getchar(); + } + + if (min_ == max_) { + // in this case, we want the program to set up the min_ and max_ values by itself. + min_ = std::numeric_limits::max(); + max_ = -std::numeric_limits::max(); + + for (size_t i = 0; i != intervals_.size(); ++i) { + if (intervals_[i].first < min_) min_ = intervals_[i].first; + if (intervals_[i].second > max_) max_ = intervals_[i].second; + } + // now we have the structure filled in, and moreover we know min_ and max_ values of the interval, so we know the + // range. + + // add some more space: + min_ -= fabs(max_ - min_) / 100; + max_ += fabs(max_ - min_) / 100; + } + + if (dbg) { + std::cerr << "min_ : " << min_ << std::endl; + std::cerr << "max_ : " << max_ << std::endl; + std::cerr << "number_of_pixels : " << number_of_pixels << std::endl; + getchar(); + } + + this->min_ = min_; + this->max_ = max_; + + // initialization of the structure heat_map + std::vector > heat_map_; + for (size_t i = 0; i != number_of_pixels; ++i) { + std::vector v(number_of_pixels, 0); + heat_map_.push_back(v); + } + this->heat_map = heat_map_; + + if (dbg) std::cerr << "Done creating of the heat map, now we will fill in the structure \n"; + + for (size_t pt_nr = 0; pt_nr != intervals_.size(); ++pt_nr) { + // compute the value of intervals_[pt_nr] in the grid: + int x_grid = (int)((intervals_[pt_nr].first - this->min_) / (this->max_ - this->min_) * number_of_pixels); + int y_grid = (int)((intervals_[pt_nr].second - this->min_) / (this->max_ - this->min_) * number_of_pixels); + + if (dbg) { + std::cerr << "point : " << intervals_[pt_nr].first << " , " << intervals_[pt_nr].second << std::endl; + std::cerr << "x_grid : " << x_grid << std::endl; + std::cerr << "y_grid : " << y_grid << std::endl; + } + // x_grid and y_grid gives a center of the kernel. We want to have its lower left corner. To get this, we need to + // shift x_grid and y_grid by a grid diameter. + x_grid -= filter.size() / 2; + y_grid -= filter.size() / 2; + // note that the numbers x_grid and y_grid may be negative. + + if (dbg) { + std::cerr << "After shift : \n"; + ; + std::cerr << "x_grid : " << x_grid << std::endl; + std::cerr << "y_grid : " << y_grid << std::endl; + std::cerr << "filter.size() : " << filter.size() << std::endl; + getchar(); + } - //initialization of the structure heat_map - std::vector< std::vector > heat_map_; - for ( size_t i = 0 ; i != number_of_pixels ; ++i ) - { - std::vector v( number_of_pixels , 0 ); - heat_map_.push_back( v ); + for (size_t i = 0; i != filter.size(); ++i) { + for (size_t j = 0; j != filter.size(); ++j) { + // if the point (x_grid+i,y_grid+j) is the correct point in the grid. + if (((x_grid + i) >= 0) && (x_grid + i < this->heat_map.size()) && ((y_grid + j) >= 0) && + (y_grid + j < this->heat_map.size())) { + if (dbg) { + std::cerr << y_grid + j << " " << x_grid + i << std::endl; + } + this->heat_map[y_grid + j][x_grid + i] += filter[i][j]; + this->heat_map[x_grid + i][y_grid + j] += -filter[i][j]; + } + } } - this->heat_map = heat_map_; - - if (dbg)std::cerr << "Done creating of the heat map, now we will fill in the structure \n"; - - for ( size_t pt_nr = 0 ; pt_nr != intervals_.size() ; ++pt_nr ) - { - //compute the value of intervals_[pt_nr] in the grid: - int x_grid = (int)((intervals_[pt_nr].first - this->min_)/( this->max_-this->min_ )*number_of_pixels); - int y_grid = (int)((intervals_[pt_nr].second - this->min_)/( this->max_-this->min_ )*number_of_pixels); - - if ( dbg ) - { - std::cerr << "point : " << intervals_[pt_nr].first << " , " << intervals_[pt_nr].second << std::endl; - std::cerr << "x_grid : " << x_grid << std::endl; - std::cerr << "y_grid : " << y_grid << std::endl; - } - - //x_grid and y_grid gives a center of the kernel. We want to have its lower left corner. To get this, we need to shift x_grid and y_grid by a grid diameter. - x_grid -= filter.size()/2; - y_grid -= filter.size()/2; - //note that the numbers x_grid and y_grid may be negative. - - if ( dbg ) - { - std::cerr << "After shift : \n";; - std::cerr << "x_grid : " << x_grid << std::endl; - std::cerr << "y_grid : " << y_grid << std::endl; - std::cerr << "filter.size() : " << filter.size() << std::endl; - getchar(); - } - - - for ( size_t i = 0 ; i != filter.size() ; ++i ) - { - for ( size_t j = 0 ; j != filter.size() ; ++j ) - { - //if the point (x_grid+i,y_grid+j) is the correct point in the grid. - if ( - ((x_grid+i)>=0) && (x_grid+iheat_map.size()) - && - ((y_grid+j)>=0) && (y_grid+jheat_map.size()) - ) - { - if ( dbg ){std::cerr << y_grid+j << " " << x_grid+i << std::endl;} - this->heat_map[ y_grid+j ][ x_grid+i ] += filter[i][j]; - this->heat_map[ x_grid+i ][ y_grid+j ] += -filter[i][j]; - } - } - } - - } -}//construct - -} //namespace Persistence_representations -} //namespace Gudhi + } +} // construct +} // namespace Persistence_representations +} // namespace Gudhi #endif // PSSK_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index a20702ff..55c94ec6 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -22,8 +22,8 @@ #ifndef PERSISTENCE_HEAT_MAPS_H_ #define PERSISTENCE_HEAT_MAPS_H_ - -//standard include + +// standard include #include #include #include @@ -32,169 +32,146 @@ #include #include -//gudhi include +// gudhi include #include #include - - - -namespace Gudhi -{ -namespace Persistence_representations -{ - +namespace Gudhi { +namespace Persistence_representations { /** - * This is a simple procedure to create n by n (or 2*pixel_radius times 2*pixel_radius cubical approximation of a Gaussian kernel. -**/ -std::vector< std::vector > create_Gaussian_filter( size_t pixel_radius , double sigma ) -{ - bool dbg = false; - //we are computing the kernel mask to 2 standard deviations away from the center. We discretize it in a grid of a size 2*pixel_radius times 2*pixel_radius. - - double r = 0; - double sigma_sqr = sigma * sigma; - - // sum is for normalization - double sum = 0; - - //initialization of a kernel: - std::vector< std::vector > kernel( 2*pixel_radius +1 ); - for ( size_t i = 0 ; i != kernel.size() ; ++i ) - { - std::vector v( 2*pixel_radius +1 , 0 ); - kernel[i] = v; - } - - if ( dbg ) - { - std::cerr << "Kernel initialize \n"; - std::cerr << "pixel_radius : " << pixel_radius << std::endl; - std::cerr << "kernel.size() : " << kernel.size() << std::endl; - getchar(); - } - - for (int x = -pixel_radius; x <= (int)pixel_radius; x++) - { - for(int y = -pixel_radius; y <= (int)pixel_radius; y++) - { - double real_x = 2*sigma*x/pixel_radius; - double real_y = 2*sigma*y/pixel_radius; - r = sqrt(real_x*real_x + real_y*real_y); - kernel[x + pixel_radius][y + pixel_radius] = (exp(-(r*r)/sigma_sqr))/(3.141592 * sigma_sqr); - sum += kernel[x + pixel_radius][y + pixel_radius]; - } - } - - // normalize the kernel - for( size_t i = 0; i != kernel.size() ; ++i) - { - for( size_t j = 0; j != kernel[i].size() ; ++j) - { - kernel[i][j] /= sum; - } - + * This is a simple procedure to create n by n (or 2*pixel_radius times 2*pixel_radius cubical approximation of a + *Gaussian kernel. +**/ +std::vector > create_Gaussian_filter(size_t pixel_radius, double sigma) { + bool dbg = false; + // we are computing the kernel mask to 2 standard deviations away from the center. We discretize it in a grid of a + // size 2*pixel_radius times 2*pixel_radius. + + double r = 0; + double sigma_sqr = sigma * sigma; + + // sum is for normalization + double sum = 0; + + // initialization of a kernel: + std::vector > kernel(2 * pixel_radius + 1); + for (size_t i = 0; i != kernel.size(); ++i) { + std::vector v(2 * pixel_radius + 1, 0); + kernel[i] = v; + } + + if (dbg) { + std::cerr << "Kernel initialize \n"; + std::cerr << "pixel_radius : " << pixel_radius << std::endl; + std::cerr << "kernel.size() : " << kernel.size() << std::endl; + getchar(); + } + + for (int x = -pixel_radius; x <= (int)pixel_radius; x++) { + for (int y = -pixel_radius; y <= (int)pixel_radius; y++) { + double real_x = 2 * sigma * x / pixel_radius; + double real_y = 2 * sigma * y / pixel_radius; + r = sqrt(real_x * real_x + real_y * real_y); + kernel[x + pixel_radius][y + pixel_radius] = (exp(-(r * r) / sigma_sqr)) / (3.141592 * sigma_sqr); + sum += kernel[x + pixel_radius][y + pixel_radius]; } - - if ( dbg ) - { - std::cerr << "Here is the kernel : \n"; - for( size_t i = 0; i != kernel.size() ; ++i) - { - for( size_t j = 0; j != kernel[i].size() ; ++j) - { - std::cerr << kernel[i][j] << " "; - } - std::cerr << std::endl; - } - } - return kernel; -} + } + // normalize the kernel + for (size_t i = 0; i != kernel.size(); ++i) { + for (size_t j = 0; j != kernel[i].size(); ++j) { + kernel[i][j] /= sum; + } + } + + if (dbg) { + std::cerr << "Here is the kernel : \n"; + for (size_t i = 0; i != kernel.size(); ++i) { + for (size_t j = 0; j != kernel[i].size(); ++j) { + std::cerr << kernel[i][j] << " "; + } + std::cerr << std::endl; + } + } + return kernel; +} /* * There are various options to scale the points depending on their location. One can for instance: * (1) do nothing (scale all of them with the weight 1), as in the function constant_function * (2) Scale them by the distance to the diagonal. This is implemented in function * (3) Scale them with the square of their distance to diagonal. This is implemented in function -* (4) Scale them with -*/ - +* (4) Scale them with +*/ /** - * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the + *diagram. * This particular functionality is a function which always assign value 1 to a point in the diagram. -**/ -class constant_scaling_function -{ -public: - double operator()( const std::pair< double , double >& point_in_diagram ) - { - return 1; - } +**/ +class constant_scaling_function { + public: + double operator()(const std::pair& point_in_diagram) { return 1; } }; - /** - * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the + *diagram. * The scaling given by this function to a point (b,d) is Euclidean distance of (b,d) from diagonal. -**/ -class distance_from_diagonal_scaling -{ -public: - double operator()( const std::pair< double , double >& point_in_diagram ) - { - //(point_in_diagram.first+point_in_diagram.second)/2.0 - return sqrt( pow((point_in_diagram.first-(point_in_diagram.first+point_in_diagram.second)/2.0),2) + pow((point_in_diagram.second-(point_in_diagram.first+point_in_diagram.second)/2.0),2) ); - } +**/ +class distance_from_diagonal_scaling { + public: + double operator()(const std::pair& point_in_diagram) { + //(point_in_diagram.first+point_in_diagram.second)/2.0 + return sqrt(pow((point_in_diagram.first - (point_in_diagram.first + point_in_diagram.second) / 2.0), 2) + + pow((point_in_diagram.second - (point_in_diagram.first + point_in_diagram.second) / 2.0), 2)); + } }; /** - * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the + *diagram. * The scaling given by this function to a point (b,d) is a square of Euclidean distance of (b,d) from diagonal. -**/ -class squared_distance_from_diagonal_scaling -{ -public: - double operator()( const std::pair< double , double >& point_in_diagram ) - { - return pow((point_in_diagram.first-(point_in_diagram.first+point_in_diagram.second)/2.0),2) + pow((point_in_diagram.second-(point_in_diagram.first+point_in_diagram.second)/2.0),2); - } +**/ +class squared_distance_from_diagonal_scaling { + public: + double operator()(const std::pair& point_in_diagram) { + return pow((point_in_diagram.first - (point_in_diagram.first + point_in_diagram.second) / 2.0), 2) + + pow((point_in_diagram.second - (point_in_diagram.first + point_in_diagram.second) / 2.0), 2); + } }; /** - * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the + *diagram. * The scaling given by this function to a point (b,d) is an arctan of a persistence of a point (i.e. arctan( b-d ). -**/ -class arc_tan_of_persistence_of_point -{ -public: - double operator()( const std::pair< double , double >& point_in_diagram ) - { - return atan( point_in_diagram.second - point_in_diagram.first ); - } +**/ +class arc_tan_of_persistence_of_point { + public: + double operator()(const std::pair& point_in_diagram) { + return atan(point_in_diagram.second - point_in_diagram.first); + } }; /** - * This is one of a scaling functions used to weight points depending on their persistence and/or location in the diagram. - * This scaling function do not only depend on a point (p,d) in the diagram, but it depends on the whole diagram. - * The longest persistence pair get a scaling 1. Any other pair get a scaling belong to [0,1], which is proportional + * This is one of a scaling functions used to weight points depending on their persistence and/or location in the + *diagram. + * This scaling function do not only depend on a point (p,d) in the diagram, but it depends on the whole diagram. + * The longest persistence pair get a scaling 1. Any other pair get a scaling belong to [0,1], which is proportional * to the persistence of that pair. -**/ -class weight_by_setting_maximal_interval_to_have_length_one -{ -public: - weight_by_setting_maximal_interval_to_have_length_one( double len ):letngth_of_maximal_interval(len){} - double operator()( const std::pair< double , double >& point_in_diagram ) - { - return (point_in_diagram.second-point_in_diagram.first)/this->letngth_of_maximal_interval; - } -private: - double letngth_of_maximal_interval; +**/ +class weight_by_setting_maximal_interval_to_have_length_one { + public: + weight_by_setting_maximal_interval_to_have_length_one(double len) : letngth_of_maximal_interval(len) {} + double operator()(const std::pair& point_in_diagram) { + return (point_in_diagram.second - point_in_diagram.first) / this->letngth_of_maximal_interval; + } + + private: + double letngth_of_maximal_interval; }; - /** * \class Persistence_heat_maps Persistence_heat_maps.h gudhi/Persistence_heat_maps.h * \brief A class implementing persistence heat maps. @@ -202,840 +179,739 @@ private: * \ingroup Persistence_representations **/ -// This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product +// This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, +// Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product template -class Persistence_heat_maps -{ -public: - /** - * The default constructor. A scaling function from the diagonal is set up to a constant function. The image is not erased below the diagonal. The Gaussian have diameter 5. - **/ - Persistence_heat_maps() - { - Scalling_of_kernels f; - this->f = f; - this->erase_below_diagonal = false; - this->min_ = this->max_ = 0; - this->set_up_parameters_for_basic_classes(); - }; - - /** - * Construction that takes at the input the following parameters: - * (1) A vector of pairs of doubles (representing persistence intervals). All other parameters are optional. They are: - * (2) a Gaussian filter generated by create_Gaussian_filter filter (the default value of this variable is a Gaussian filter of a radius 5), - * (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will be erased by default). - * (4) a number of pixels in each direction (set to 1000 by default). - * (5) a min x and y value of points that are to be taken into account. By default it is set to std::numeric_limits::max(), in which case the program compute the values based on the data, - * (6) a max x and y value of points that are to be taken into account. By default it is set to std::numeric_limits::max(), in which case the program compute the values based on the data. - **/ - Persistence_heat_maps( const std::vector< std::pair< double,double > > & interval , std::vector< std::vector > filter = create_Gaussian_filter(5,1) , bool erase_below_diagonal = false , size_t number_of_pixels = 1000 , double min_ = std::numeric_limits::max() , double max_ = std::numeric_limits::max() ); - - /** - * Construction that takes at the input a name of a file with persistence intervals, a filter (radius 5 by default), a scaling function (constant by default), a boolean value which determines if the area of image below diagonal should, or should not be erased (should by default). The next parameter is the number of pixels in each direction (set to 1000 by default) and min and max values of images (both set to std::numeric_limits::max() by default. If this is the case, the program will pick the right values based on the data). - **/ - /** - * Construction that takes at the input the following parameters: - * (1) A name of a file with persistence intervals. The file should be readable by the function read_persistence_intervals_in_one_dimension_from_file. All other parameters are optional. They are: - * (2) a Gaussian filter generated by create_Gaussian_filter filter (the default value of this variable is a Gaussian filter of a radius 5), - * (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will be erased by default). - * (4) a number of pixels in each direction (set to 1000 by default). - * (5) a min x and y value of points that are to be taken into account. By default it is set to std::numeric_limits::max(), in which case the program compute the values based on the data, - * (6) a max x and y value of points that are to be taken into account. By default it is set to std::numeric_limits::max(), in which case the program compute the values based on the data. - **/ - Persistence_heat_maps( const char* filename , std::vector< std::vector > filter = create_Gaussian_filter(5,1), bool erase_below_diagonal = false , size_t number_of_pixels = 1000 , double min_ = std::numeric_limits::max() , double max_ = std::numeric_limits::max() , unsigned dimension = std::numeric_limits::max() ); - - - /** - * Compute a mean value of a collection of heat maps and store it in the current object. Note that all the persistence maps send in a vector to this procedure need to have the same parameters. - * If this is not the case, the program will throw an exception. - **/ - void compute_mean( const std::vector& maps ); - - /** - * Compute a median value of a collection of heat maps and store it in the current object. Note that all the persistence maps send in a vector to this procedure need to have the same parameters. - * If this is not the case, the program will throw an exception. - **/ - void compute_median( const std::vector& maps ); - - /** - * Compute a percentage of active (i.e) values above the cutoff of a collection of heat maps. - **/ - void compute_percentage_of_active( const std::vector& maps , size_t cutoff = 1 ); - - //put to file subroutine - /** - * The function outputs the persistence image to a text file. The format as follow: - * In the first line, the values min and max of the image are stored - * In the next lines, we have the persistence images in a form of a bitmap image. - **/ - void print_to_file( const char* filename )const; - - /** - * A function that load a heat map from file to the current object (and erase whatever was stored in the current object before). - **/ - void load_from_file( const char* filename ); - - - /** - * The procedure checks if min_, max_ and this->heat_maps sizes are the same. - **/ - inline bool check_if_the_same( const Persistence_heat_maps& second )const - { - bool dbg = false; - if ( this->heat_map.size() != second.heat_map.size() ) - { - if ( dbg )std::cerr << "this->heat_map.size() : " << this->heat_map.size() << " \n second.heat_map.size() : " << second.heat_map.size() << std::endl; - return false; - } - if ( this->min_ != second.min_ ) - { - if ( dbg )std::cerr << "this->min_ : " << this->min_ << ", second.min_ : " << second.min_ << std::endl; - return false; - } - if ( this->max_ != second.max_ ) - { - if ( dbg )std::cerr << "this->max_ : " << this->max_ << ", second.max_ : " << second.max_ << std::endl; - return false; - } - //in the other case we may assume that the persistence images are defined on the same domain. - return true; - } - - - /** - * Return minimal range value of persistent image. - **/ - inline double get_min()const{return this->min_;} - - /** - * Return maximal range value of persistent image. - **/ - inline double get_max()const{return this->max_;} - - - /** - * Operator == to check if to persistence heat maps are the same. - **/ - bool operator == ( const Persistence_heat_maps& rhs )const - { - bool dbg = false; - if ( !this->check_if_the_same(rhs) ) - { - if ( dbg )std::cerr << "The domains are not the same \n"; - return false;//in this case, the domains are not the same, so the maps cannot be the same. - } - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - if ( !almost_equal(this->heat_map[i][j] , rhs.heat_map[i][j]) ) - { - if ( dbg ) - { - std::cerr << "this->heat_map[" << i << "][" << j << "] = " << this->heat_map[i][j] << std::endl; - std::cerr << "rhs.heat_map[" << i << "][" << j << "] = " << rhs.heat_map[i][j] << std::endl; - } - return false; - } - } - } - return true; - } - - /** - * Operator != to check if to persistence heat maps are different. - **/ - bool operator != ( const Persistence_heat_maps& rhs )const - { - return !( (*this) == rhs ); - } - - - /** - * A function to generate a gnuplot script to visualize the persistent image. - **/ - void plot( const char* filename )const; - - - template - friend Persistence_heat_maps operation_on_pair_of_heat_maps( const Persistence_heat_maps& first , const Persistence_heat_maps& second , Operation_type operation ) - { - //first check if the heat maps are compatible - if ( !first.check_if_the_same( second ) ) - { - std::cerr << "Sizes of the heat maps are not compatible. The program will now terminate \n"; - throw "Sizes of the heat maps are not compatible. The program will now terminate \n"; - } - Persistence_heat_maps result; - result.min_ = first.min_; - result.max_ = first.max_; - result.heat_map.reserve( first.heat_map.size() ); - for ( size_t i = 0 ; i != first.heat_map.size() ; ++i ) - { - std::vector< double > v; - v.reserve( first.heat_map[i].size() ); - for ( size_t j = 0 ; j != first.heat_map[i].size() ; ++j ) - { - v.push_back( operation( first.heat_map[i][j] , second.heat_map[i][j] ) ); - } - result.heat_map.push_back( v ); - } - return result; - }//operation_on_pair_of_heat_maps - - - /** - * Multiplication of Persistence_heat_maps by scalar (so that all values of the heat map gets multiplied by that scalar). - **/ - Persistence_heat_maps multiply_by_scalar( double scalar )const - { - Persistence_heat_maps result; - result.min_ = this->min_; - result.max_ = this->max_; - result.heat_map.reserve( this->heat_map.size() ); - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - std::vector< double > v; - v.reserve( this->heat_map[i].size() ); - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - v.push_back( this->heat_map[i][j] * scalar ); - } - result.heat_map.push_back( v ); - } - return result; - } - - /** - * This function computes a sum of two objects of a type Persistence_heat_maps. - **/ - friend Persistence_heat_maps operator+( const Persistence_heat_maps& first , const Persistence_heat_maps& second ) - { - return operation_on_pair_of_heat_maps( first , second , std::plus() ); - } - /** - * This function computes a difference of two objects of a type Persistence_heat_maps. - **/ - friend Persistence_heat_maps operator-( const Persistence_heat_maps& first , const Persistence_heat_maps& second ) - { - return operation_on_pair_of_heat_maps( first , second , std::minus() ); - } - /** - * This function computes a product of an object of a type Persistence_heat_maps with real number. - **/ - friend Persistence_heat_maps operator*( double scalar , const Persistence_heat_maps& A ) - { - return A.multiply_by_scalar( scalar ); - } - /** - * This function computes a product of an object of a type Persistence_heat_maps with real number. - **/ - friend Persistence_heat_maps operator*( const Persistence_heat_maps& A , double scalar ) - { - return A.multiply_by_scalar( scalar ); - } - /** - * This function computes a product of an object of a type Persistence_heat_maps with real number. - **/ - Persistence_heat_maps operator*( double scalar ) - { - return this->multiply_by_scalar( scalar ); - } - /** - * += operator for Persistence_heat_maps. - **/ - Persistence_heat_maps operator += ( const Persistence_heat_maps& rhs ) - { - *this = *this + rhs; - return *this; - } - /** - * -= operator for Persistence_heat_maps. - **/ - Persistence_heat_maps operator -= ( const Persistence_heat_maps& rhs ) - { - *this = *this - rhs; - return *this; +class Persistence_heat_maps { + public: + /** + * The default constructor. A scaling function from the diagonal is set up to a constant function. The image is not + *erased below the diagonal. The Gaussian have diameter 5. + **/ + Persistence_heat_maps() { + Scalling_of_kernels f; + this->f = f; + this->erase_below_diagonal = false; + this->min_ = this->max_ = 0; + this->set_up_parameters_for_basic_classes(); + }; + + /** + * Construction that takes at the input the following parameters: + * (1) A vector of pairs of doubles (representing persistence intervals). All other parameters are optional. They are: + * (2) a Gaussian filter generated by create_Gaussian_filter filter (the default value of this variable is a Gaussian + *filter of a radius 5), + * (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will + *be erased by default). + * (4) a number of pixels in each direction (set to 1000 by default). + * (5) a min x and y value of points that are to be taken into account. By default it is set to + *std::numeric_limits::max(), in which case the program compute the values based on the data, + * (6) a max x and y value of points that are to be taken into account. By default it is set to + *std::numeric_limits::max(), in which case the program compute the values based on the data. + **/ + Persistence_heat_maps(const std::vector >& interval, + std::vector > filter = create_Gaussian_filter(5, 1), + bool erase_below_diagonal = false, size_t number_of_pixels = 1000, + double min_ = std::numeric_limits::max(), + double max_ = std::numeric_limits::max()); + + /** + * Construction that takes at the input a name of a file with persistence intervals, a filter (radius 5 by + *default), a scaling function (constant by default), a boolean value which determines if the area of image below + *diagonal should, or should not be erased (should by default). The next parameter is the number of pixels in each + *direction (set to 1000 by default) and min and max values of images (both set to std::numeric_limits::max() + *by default. If this is the case, the program will pick the right values based on the data). + **/ + /** + * Construction that takes at the input the following parameters: + * (1) A name of a file with persistence intervals. The file should be readable by the function + *read_persistence_intervals_in_one_dimension_from_file. All other parameters are optional. They are: + * (2) a Gaussian filter generated by create_Gaussian_filter filter (the default value of this variable is a Gaussian + *filter of a radius 5), + * (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will + *be erased by default). + * (4) a number of pixels in each direction (set to 1000 by default). + * (5) a min x and y value of points that are to be taken into account. By default it is set to + *std::numeric_limits::max(), in which case the program compute the values based on the data, + * (6) a max x and y value of points that are to be taken into account. By default it is set to + *std::numeric_limits::max(), in which case the program compute the values based on the data. + **/ + Persistence_heat_maps(const char* filename, std::vector > filter = create_Gaussian_filter(5, 1), + bool erase_below_diagonal = false, size_t number_of_pixels = 1000, + double min_ = std::numeric_limits::max(), + double max_ = std::numeric_limits::max(), + unsigned dimension = std::numeric_limits::max()); + + /** + * Compute a mean value of a collection of heat maps and store it in the current object. Note that all the persistence + *maps send in a vector to this procedure need to have the same parameters. + * If this is not the case, the program will throw an exception. + **/ + void compute_mean(const std::vector& maps); + + /** + * Compute a median value of a collection of heat maps and store it in the current object. Note that all the + *persistence maps send in a vector to this procedure need to have the same parameters. + * If this is not the case, the program will throw an exception. + **/ + void compute_median(const std::vector& maps); + + /** + * Compute a percentage of active (i.e) values above the cutoff of a collection of heat maps. + **/ + void compute_percentage_of_active(const std::vector& maps, size_t cutoff = 1); + + // put to file subroutine + /** + * The function outputs the persistence image to a text file. The format as follow: + * In the first line, the values min and max of the image are stored + * In the next lines, we have the persistence images in a form of a bitmap image. + **/ + void print_to_file(const char* filename) const; + + /** + * A function that load a heat map from file to the current object (and erase whatever was stored in the current + *object before). + **/ + void load_from_file(const char* filename); + + /** + * The procedure checks if min_, max_ and this->heat_maps sizes are the same. + **/ + inline bool check_if_the_same(const Persistence_heat_maps& second) const { + bool dbg = false; + if (this->heat_map.size() != second.heat_map.size()) { + if (dbg) + std::cerr << "this->heat_map.size() : " << this->heat_map.size() + << " \n second.heat_map.size() : " << second.heat_map.size() << std::endl; + return false; } - /** - * *= operator for Persistence_heat_maps. - **/ - Persistence_heat_maps operator *= ( double x ) - { - *this = *this*x; - return *this; + if (this->min_ != second.min_) { + if (dbg) std::cerr << "this->min_ : " << this->min_ << ", second.min_ : " << second.min_ << std::endl; + return false; } - /** - * /= operator for Persistence_heat_maps. - **/ - Persistence_heat_maps operator /= ( double x ) - { - if ( x == 0 )throw( "In operator /=, division by 0. Program terminated." ); - *this = *this * (1/x); - return *this; + if (this->max_ != second.max_) { + if (dbg) std::cerr << "this->max_ : " << this->max_ << ", second.max_ : " << second.max_ << std::endl; + return false; } - - - //Implementations of functions for various concepts. - - /** - * This function produce a vector of doubles based on a persistence heat map. It is required in a concept Vectorized_topological_data - */ - std::vector vectorize( int number_of_function )const; - /** - * This function return the number of functions that allows vectorization of persistence heat map. It is required in a concept Vectorized_topological_data. - **/ - size_t number_of_vectorize_functions()const - { - return this->number_of_functions_for_vectorization; - } - - /** - * This function is required by the Real_valued_topological_data concept. It returns various projections on the persistence heat map to a real line. - * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it - * will be most likely changed in the next versions. - **/ - double project_to_R( int number_of_function )const; - /** - * The function gives the number of possible projections to R. This function is required by the Real_valued_topological_data concept. - **/ - size_t number_of_projections_to_R()const - { - return this->number_of_functions_for_projections_to_reals; - } - - /** - * A function to compute distance between persistence heat maps. - * The parameter of this function is a const reference to an object of a class Persistence_heat_maps. - * This function is required in Topological_data_with_distances concept. - * For max norm distance, set power to std::numeric_limits::max() - **/ - double distance( const Persistence_heat_maps& second_ , double power = 1)const; - - /** - * A function to compute averaged persistence heat map, based on vector of persistence heat maps. - * This function is required by Topological_data_with_averages concept. - **/ - void compute_average( const std::vector< Persistence_heat_maps* >& to_average ); - - /** - * A function to compute scalar product of persistence heat maps. - * The parameter of this function is a const reference to an object of a class Persistence_heat_maps. - * This function is required in Topological_data_with_scalar_product concept. - **/ - double compute_scalar_product( const Persistence_heat_maps& second_ )const; - - //end of implementation of functions needed for concepts. - - - /** - * The x-range of the persistence heat map. - **/ - std::pair< double , double > get_x_range()const - { - return std::make_pair( this->min_ , this->max_ ); - } - - /** - * The y-range of the persistence heat map. - **/ - std::pair< double , double > get_y_range()const - { - return this->get_x_range(); - } - - - - -protected: - //private methods - std::vector< std::vector > check_and_initialize_maps( const std::vector& maps ); - size_t number_of_functions_for_vectorization; - size_t number_of_functions_for_projections_to_reals; - void construct( const std::vector< std::pair >& intervals_ , - std::vector< std::vector > filter = create_Gaussian_filter(5,1), - - bool erase_below_diagonal = false , size_t number_of_pixels = 1000 , double min_ = std::numeric_limits::max() , double max_ = std::numeric_limits::max() ); - - void set_up_parameters_for_basic_classes() - { - this->number_of_functions_for_vectorization = 1; - this->number_of_functions_for_projections_to_reals = 1; - } - - //data - Scalling_of_kernels f; - bool erase_below_diagonal; - double min_; - double max_; - std::vector< std::vector< double > > heat_map; + // in the other case we may assume that the persistence images are defined on the same domain. + return true; + } + + /** + * Return minimal range value of persistent image. + **/ + inline double get_min() const { return this->min_; } + + /** + * Return maximal range value of persistent image. + **/ + inline double get_max() const { return this->max_; } + + /** + * Operator == to check if to persistence heat maps are the same. + **/ + bool operator==(const Persistence_heat_maps& rhs) const { + bool dbg = false; + if (!this->check_if_the_same(rhs)) { + if (dbg) std::cerr << "The domains are not the same \n"; + return false; // in this case, the domains are not the same, so the maps cannot be the same. + } + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + if (!almost_equal(this->heat_map[i][j], rhs.heat_map[i][j])) { + if (dbg) { + std::cerr << "this->heat_map[" << i << "][" << j << "] = " << this->heat_map[i][j] << std::endl; + std::cerr << "rhs.heat_map[" << i << "][" << j << "] = " << rhs.heat_map[i][j] << std::endl; + } + return false; + } + } + } + return true; + } + + /** + * Operator != to check if to persistence heat maps are different. + **/ + bool operator!=(const Persistence_heat_maps& rhs) const { return !((*this) == rhs); } + + /** + * A function to generate a gnuplot script to visualize the persistent image. + **/ + void plot(const char* filename) const; + + template + friend Persistence_heat_maps operation_on_pair_of_heat_maps(const Persistence_heat_maps& first, + const Persistence_heat_maps& second, + Operation_type operation) { + // first check if the heat maps are compatible + if (!first.check_if_the_same(second)) { + std::cerr << "Sizes of the heat maps are not compatible. The program will now terminate \n"; + throw "Sizes of the heat maps are not compatible. The program will now terminate \n"; + } + Persistence_heat_maps result; + result.min_ = first.min_; + result.max_ = first.max_; + result.heat_map.reserve(first.heat_map.size()); + for (size_t i = 0; i != first.heat_map.size(); ++i) { + std::vector v; + v.reserve(first.heat_map[i].size()); + for (size_t j = 0; j != first.heat_map[i].size(); ++j) { + v.push_back(operation(first.heat_map[i][j], second.heat_map[i][j])); + } + result.heat_map.push_back(v); + } + return result; + } // operation_on_pair_of_heat_maps + + /** + * Multiplication of Persistence_heat_maps by scalar (so that all values of the heat map gets multiplied by that + *scalar). + **/ + Persistence_heat_maps multiply_by_scalar(double scalar) const { + Persistence_heat_maps result; + result.min_ = this->min_; + result.max_ = this->max_; + result.heat_map.reserve(this->heat_map.size()); + for (size_t i = 0; i != this->heat_map.size(); ++i) { + std::vector v; + v.reserve(this->heat_map[i].size()); + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + v.push_back(this->heat_map[i][j] * scalar); + } + result.heat_map.push_back(v); + } + return result; + } + + /** + * This function computes a sum of two objects of a type Persistence_heat_maps. + **/ + friend Persistence_heat_maps operator+(const Persistence_heat_maps& first, const Persistence_heat_maps& second) { + return operation_on_pair_of_heat_maps(first, second, std::plus()); + } + /** +* This function computes a difference of two objects of a type Persistence_heat_maps. +**/ + friend Persistence_heat_maps operator-(const Persistence_heat_maps& first, const Persistence_heat_maps& second) { + return operation_on_pair_of_heat_maps(first, second, std::minus()); + } + /** +* This function computes a product of an object of a type Persistence_heat_maps with real number. +**/ + friend Persistence_heat_maps operator*(double scalar, const Persistence_heat_maps& A) { + return A.multiply_by_scalar(scalar); + } + /** +* This function computes a product of an object of a type Persistence_heat_maps with real number. +**/ + friend Persistence_heat_maps operator*(const Persistence_heat_maps& A, double scalar) { + return A.multiply_by_scalar(scalar); + } + /** +* This function computes a product of an object of a type Persistence_heat_maps with real number. +**/ + Persistence_heat_maps operator*(double scalar) { return this->multiply_by_scalar(scalar); } + /** + * += operator for Persistence_heat_maps. + **/ + Persistence_heat_maps operator+=(const Persistence_heat_maps& rhs) { + *this = *this + rhs; + return *this; + } + /** + * -= operator for Persistence_heat_maps. + **/ + Persistence_heat_maps operator-=(const Persistence_heat_maps& rhs) { + *this = *this - rhs; + return *this; + } + /** + * *= operator for Persistence_heat_maps. + **/ + Persistence_heat_maps operator*=(double x) { + *this = *this * x; + return *this; + } + /** + * /= operator for Persistence_heat_maps. + **/ + Persistence_heat_maps operator/=(double x) { + if (x == 0) throw("In operator /=, division by 0. Program terminated."); + *this = *this * (1 / x); + return *this; + } + + // Implementations of functions for various concepts. + + /** + * This function produce a vector of doubles based on a persistence heat map. It is required in a concept + * Vectorized_topological_data + */ + std::vector vectorize(int number_of_function) const; + /** + * This function return the number of functions that allows vectorization of persistence heat map. It is required + *in a concept Vectorized_topological_data. + **/ + size_t number_of_vectorize_functions() const { return this->number_of_functions_for_vectorization; } + + /** + * This function is required by the Real_valued_topological_data concept. It returns various projections on the + *persistence heat map to a real line. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when + *using it, keep in mind that it + * will be most likely changed in the next versions. + **/ + double project_to_R(int number_of_function) const; + /** + * The function gives the number of possible projections to R. This function is required by the + *Real_valued_topological_data concept. + **/ + size_t number_of_projections_to_R() const { return this->number_of_functions_for_projections_to_reals; } + + /** + * A function to compute distance between persistence heat maps. + * The parameter of this function is a const reference to an object of a class Persistence_heat_maps. + * This function is required in Topological_data_with_distances concept. +* For max norm distance, set power to std::numeric_limits::max() + **/ + double distance(const Persistence_heat_maps& second_, double power = 1) const; + + /** + * A function to compute averaged persistence heat map, based on vector of persistence heat maps. + * This function is required by Topological_data_with_averages concept. + **/ + void compute_average(const std::vector& to_average); + + /** + * A function to compute scalar product of persistence heat maps. + * The parameter of this function is a const reference to an object of a class Persistence_heat_maps. + * This function is required in Topological_data_with_scalar_product concept. + **/ + double compute_scalar_product(const Persistence_heat_maps& second_) const; + + // end of implementation of functions needed for concepts. + + /** + * The x-range of the persistence heat map. + **/ + std::pair get_x_range() const { return std::make_pair(this->min_, this->max_); } + + /** + * The y-range of the persistence heat map. + **/ + std::pair get_y_range() const { return this->get_x_range(); } + + protected: + // private methods + std::vector > check_and_initialize_maps(const std::vector& maps); + size_t number_of_functions_for_vectorization; + size_t number_of_functions_for_projections_to_reals; + void construct(const std::vector >& intervals_, + std::vector > filter = create_Gaussian_filter(5, 1), + + bool erase_below_diagonal = false, size_t number_of_pixels = 1000, + double min_ = std::numeric_limits::max(), double max_ = std::numeric_limits::max()); + + void set_up_parameters_for_basic_classes() { + this->number_of_functions_for_vectorization = 1; + this->number_of_functions_for_projections_to_reals = 1; + } + + // data + Scalling_of_kernels f; + bool erase_below_diagonal; + double min_; + double max_; + std::vector > heat_map; }; - -//if min_ == max_, then the program is requested to set up the values itself based on persistence intervals +// if min_ == max_, then the program is requested to set up the values itself based on persistence intervals template -void Persistence_heat_maps::construct( const std::vector< std::pair >& intervals_ , - std::vector< std::vector > filter, - bool erase_below_diagonal , size_t number_of_pixels , double min_ , double max_ ) -{ - bool dbg = false; - if ( dbg )std::cerr << "Entering construct procedure \n"; - Scalling_of_kernels f; - this->f = f; - - if ( dbg )std::cerr << "min and max passed to construct() procedure: " << min_ << " " << max_ << std::endl; - - if ( min_ == max_ ) - { - if (dbg)std::cerr << "min and max parameters will be determined based on intervals \n"; - //in this case, we want the program to set up the min_ and max_ values by itself. - min_ = std::numeric_limits::max(); - max_ = -std::numeric_limits::max(); - - - for ( size_t i = 0 ; i != intervals_.size() ; ++i ) - { - if ( intervals_[i].first < min_ )min_ = intervals_[i].first; - if ( intervals_[i].second > max_ )max_ = intervals_[i].second; - } - //now we have the structure filled in, and moreover we know min_ and max_ values of the interval, so we know the range. - - //add some more space: - min_ -= fabs(max_ - min_)/100; - max_ += fabs(max_ - min_)/100; +void Persistence_heat_maps::construct(const std::vector >& intervals_, + std::vector > filter, + bool erase_below_diagonal, size_t number_of_pixels, + double min_, double max_) { + bool dbg = false; + if (dbg) std::cerr << "Entering construct procedure \n"; + Scalling_of_kernels f; + this->f = f; + + if (dbg) std::cerr << "min and max passed to construct() procedure: " << min_ << " " << max_ << std::endl; + + if (min_ == max_) { + if (dbg) std::cerr << "min and max parameters will be determined based on intervals \n"; + // in this case, we want the program to set up the min_ and max_ values by itself. + min_ = std::numeric_limits::max(); + max_ = -std::numeric_limits::max(); + + for (size_t i = 0; i != intervals_.size(); ++i) { + if (intervals_[i].first < min_) min_ = intervals_[i].first; + if (intervals_[i].second > max_) max_ = intervals_[i].second; + } + // now we have the structure filled in, and moreover we know min_ and max_ values of the interval, so we know the + // range. + + // add some more space: + min_ -= fabs(max_ - min_) / 100; + max_ += fabs(max_ - min_) / 100; + } + + if (dbg) { + std::cerr << "min_ : " << min_ << std::endl; + std::cerr << "max_ : " << max_ << std::endl; + std::cerr << "number_of_pixels : " << number_of_pixels << std::endl; + getchar(); + } + + this->min_ = min_; + this->max_ = max_; + + // initialization of the structure heat_map + std::vector > heat_map_; + for (size_t i = 0; i != number_of_pixels; ++i) { + std::vector v(number_of_pixels, 0); + heat_map_.push_back(v); + } + this->heat_map = heat_map_; + + if (dbg) std::cerr << "Done creating of the heat map, now we will fill in the structure \n"; + + for (size_t pt_nr = 0; pt_nr != intervals_.size(); ++pt_nr) { + // compute the value of intervals_[pt_nr] in the grid: + int x_grid = (int)((intervals_[pt_nr].first - this->min_) / (this->max_ - this->min_) * number_of_pixels); + int y_grid = (int)((intervals_[pt_nr].second - this->min_) / (this->max_ - this->min_) * number_of_pixels); + + if (dbg) { + std::cerr << "point : " << intervals_[pt_nr].first << " , " << intervals_[pt_nr].second << std::endl; + std::cerr << "x_grid : " << x_grid << std::endl; + std::cerr << "y_grid : " << y_grid << std::endl; } - if ( dbg ) - { - std::cerr << "min_ : " << min_ << std::endl; - std::cerr << "max_ : " << max_ << std::endl; - std::cerr << "number_of_pixels : " << number_of_pixels << std::endl; - getchar(); - } - - this->min_ = min_; - this->max_ = max_; - - //initialization of the structure heat_map - std::vector< std::vector > heat_map_; - for ( size_t i = 0 ; i != number_of_pixels ; ++i ) - { - std::vector v( number_of_pixels , 0 ); - heat_map_.push_back( v ); + // x_grid and y_grid gives a center of the kernel. We want to have its lower left corner. To get this, we need to + // shift x_grid and y_grid by a grid diameter. + x_grid -= filter.size() / 2; + y_grid -= filter.size() / 2; + // note that the numbers x_grid and y_grid may be negative. + + if (dbg) { + std::cerr << "After shift : \n"; + ; + std::cerr << "x_grid : " << x_grid << std::endl; + std::cerr << "y_grid : " << y_grid << std::endl; } - this->heat_map = heat_map_; - - if (dbg)std::cerr << "Done creating of the heat map, now we will fill in the structure \n"; - - for ( size_t pt_nr = 0 ; pt_nr != intervals_.size() ; ++pt_nr ) - { - //compute the value of intervals_[pt_nr] in the grid: - int x_grid = (int)((intervals_[pt_nr].first - this->min_)/( this->max_-this->min_ )*number_of_pixels); - int y_grid = (int)((intervals_[pt_nr].second - this->min_)/( this->max_-this->min_ )*number_of_pixels); - - if ( dbg ) - { - std::cerr << "point : " << intervals_[pt_nr].first << " , " << intervals_[pt_nr].second << std::endl; - std::cerr << "x_grid : " << x_grid << std::endl; - std::cerr << "y_grid : " << y_grid << std::endl; - } - - //x_grid and y_grid gives a center of the kernel. We want to have its lower left corner. To get this, we need to shift x_grid and y_grid by a grid diameter. - x_grid -= filter.size()/2; - y_grid -= filter.size()/2; - //note that the numbers x_grid and y_grid may be negative. - - if ( dbg ) - { - std::cerr << "After shift : \n";; - std::cerr << "x_grid : " << x_grid << std::endl; - std::cerr << "y_grid : " << y_grid << std::endl; - } - - double scaling_value = this->f(intervals_[pt_nr]); - - - for ( size_t i = 0 ; i != filter.size() ; ++i ) - { - for ( size_t j = 0 ; j != filter.size() ; ++j ) - { - //if the point (x_grid+i,y_grid+j) is the correct point in the grid. - if ( - ((x_grid+i)>=0) && (x_grid+iheat_map.size()) - && - ((y_grid+j)>=0) && (y_grid+jheat_map.size()) - ) - { - if ( dbg ){std::cerr << y_grid+j << " " << x_grid+i << std::endl;} - this->heat_map[ y_grid+j ][ x_grid+i ] += scaling_value * filter[i][j]; - if ( dbg ) - { - std::cerr << "Position : (" << x_grid+i << "," << y_grid+j << ") got increased by the value : " << filter[i][j] << std::endl; - } - } - } - } - - } - - //now it remains to cut everything below diagonal if the user wants us to. - if ( erase_below_diagonal ) - { - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = i ; j != this->heat_map.size() ; ++j ) - { - this->heat_map[i][j] = 0; - } - } - } -}//construct + + double scaling_value = this->f(intervals_[pt_nr]); + + for (size_t i = 0; i != filter.size(); ++i) { + for (size_t j = 0; j != filter.size(); ++j) { + // if the point (x_grid+i,y_grid+j) is the correct point in the grid. + if (((x_grid + i) >= 0) && (x_grid + i < this->heat_map.size()) && ((y_grid + j) >= 0) && + (y_grid + j < this->heat_map.size())) { + if (dbg) { + std::cerr << y_grid + j << " " << x_grid + i << std::endl; + } + this->heat_map[y_grid + j][x_grid + i] += scaling_value * filter[i][j]; + if (dbg) { + std::cerr << "Position : (" << x_grid + i << "," << y_grid + j + << ") got increased by the value : " << filter[i][j] << std::endl; + } + } + } + } + } + + // now it remains to cut everything below diagonal if the user wants us to. + if (erase_below_diagonal) { + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = i; j != this->heat_map.size(); ++j) { + this->heat_map[i][j] = 0; + } + } + } +} // construct template -Persistence_heat_maps::Persistence_heat_maps( const std::vector< std::pair< double,double > > & interval , - std::vector< std::vector > filter, - bool erase_below_diagonal , size_t number_of_pixels , double min_ , double max_ ) -{ - this->construct( interval , filter , erase_below_diagonal , number_of_pixels , min_ , max_ ); - this->set_up_parameters_for_basic_classes(); +Persistence_heat_maps::Persistence_heat_maps( + const std::vector >& interval, std::vector > filter, + bool erase_below_diagonal, size_t number_of_pixels, double min_, double max_) { + this->construct(interval, filter, erase_below_diagonal, number_of_pixels, min_, max_); + this->set_up_parameters_for_basic_classes(); } - template -Persistence_heat_maps::Persistence_heat_maps( const char* filename , - std::vector< std::vector > filter, - bool erase_below_diagonal , size_t number_of_pixels , double min_ , double max_ , unsigned dimension ) -{ - std::vector< std::pair< double , double > > intervals_; - if ( dimension == std::numeric_limits::max() ) - { - intervals_ = read_persistence_intervals_in_one_dimension_from_file( filename ); - } - else - { - intervals_ = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); - } - this->construct( intervals_ , filter, erase_below_diagonal , number_of_pixels , min_ , max_ ); - this->set_up_parameters_for_basic_classes(); +Persistence_heat_maps::Persistence_heat_maps(const char* filename, + std::vector > filter, + bool erase_below_diagonal, size_t number_of_pixels, + double min_, double max_, unsigned dimension) { + std::vector > intervals_; + if (dimension == std::numeric_limits::max()) { + intervals_ = read_persistence_intervals_in_one_dimension_from_file(filename); + } else { + intervals_ = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); + } + this->construct(intervals_, filter, erase_below_diagonal, number_of_pixels, min_, max_); + this->set_up_parameters_for_basic_classes(); } - template -std::vector< std::vector > Persistence_heat_maps::check_and_initialize_maps( const std::vector& maps ) -{ - //checking if all the heat maps are of the same size: - for ( size_t i = 0 ; i != maps.size() ; ++i ) - { - if ( maps[i]->heat_map.size() != maps[0]->heat_map.size() ) - { - std::cerr << "Sizes of Persistence_heat_maps are not compatible. The program will terminate now \n"; - throw "Sizes of Persistence_heat_maps are not compatible. The program will terminate now \n"; - } - if ( maps[i]->heat_map[0].size() != maps[0]->heat_map[0].size() ) - { - std::cerr << "Sizes of Persistence_heat_maps are not compatible. The program will terminate now \n"; - throw "Sizes of Persistence_heat_maps are not compatible. The program will terminate now \n"; - } - } - std::vector< std::vector > heat_maps( maps[0]->heat_map.size() ); - for ( size_t i = 0 ; i != maps[0]->heat_map.size() ; ++i ) - { - std::vector v( maps[0]->heat_map[0].size() , 0 ); - heat_maps[i] = v; - } - return heat_maps; +std::vector > Persistence_heat_maps::check_and_initialize_maps( + const std::vector& maps) { + // checking if all the heat maps are of the same size: + for (size_t i = 0; i != maps.size(); ++i) { + if (maps[i]->heat_map.size() != maps[0]->heat_map.size()) { + std::cerr << "Sizes of Persistence_heat_maps are not compatible. The program will terminate now \n"; + throw "Sizes of Persistence_heat_maps are not compatible. The program will terminate now \n"; + } + if (maps[i]->heat_map[0].size() != maps[0]->heat_map[0].size()) { + std::cerr << "Sizes of Persistence_heat_maps are not compatible. The program will terminate now \n"; + throw "Sizes of Persistence_heat_maps are not compatible. The program will terminate now \n"; + } + } + std::vector > heat_maps(maps[0]->heat_map.size()); + for (size_t i = 0; i != maps[0]->heat_map.size(); ++i) { + std::vector v(maps[0]->heat_map[0].size(), 0); + heat_maps[i] = v; + } + return heat_maps; } template -void Persistence_heat_maps::compute_median( const std::vector& maps ) -{ - std::vector< std::vector > heat_maps = this->check_and_initialize_maps( maps ); - - std::vector to_compute_median( maps.size() ); - for ( size_t i = 0 ; i != heat_maps.size() ; ++i ) - { - for ( size_t j = 0 ; j != heat_maps[i].size() ; ++j ) - { - for ( size_t map_no = 0 ; map_no != maps.size() ; ++map_no ) - { - to_compute_median[map_no] = maps[map_no]->heat_map[i][j]; - } - std::nth_element(to_compute_median.begin(), to_compute_median.begin() + to_compute_median.size()/2, to_compute_median.end()); - heat_maps[i][j] = to_compute_median[ to_compute_median.size()/2 ]; - } +void Persistence_heat_maps::compute_median(const std::vector& maps) { + std::vector > heat_maps = this->check_and_initialize_maps(maps); + + std::vector to_compute_median(maps.size()); + for (size_t i = 0; i != heat_maps.size(); ++i) { + for (size_t j = 0; j != heat_maps[i].size(); ++j) { + for (size_t map_no = 0; map_no != maps.size(); ++map_no) { + to_compute_median[map_no] = maps[map_no]->heat_map[i][j]; + } + std::nth_element(to_compute_median.begin(), to_compute_median.begin() + to_compute_median.size() / 2, + to_compute_median.end()); + heat_maps[i][j] = to_compute_median[to_compute_median.size() / 2]; } - this->heat_map = heat_maps; - this->min_= maps[0]->min_; - this->max_= maps[0]->max_; + } + this->heat_map = heat_maps; + this->min_ = maps[0]->min_; + this->max_ = maps[0]->max_; } - template -void Persistence_heat_maps::compute_mean( const std::vector& maps ) -{ - std::vector< std::vector > heat_maps = this->check_and_initialize_maps( maps ); - for ( size_t i = 0 ; i != heat_maps.size() ; ++i ) - { - for ( size_t j = 0 ; j != heat_maps[i].size() ; ++j ) - { - double mean = 0; - for ( size_t map_no = 0 ; map_no != maps.size() ; ++map_no ) - { - mean += maps[map_no]->heat_map[i][j]; - } - heat_maps[i][j] = mean/(double)maps.size(); - } +void Persistence_heat_maps::compute_mean(const std::vector& maps) { + std::vector > heat_maps = this->check_and_initialize_maps(maps); + for (size_t i = 0; i != heat_maps.size(); ++i) { + for (size_t j = 0; j != heat_maps[i].size(); ++j) { + double mean = 0; + for (size_t map_no = 0; map_no != maps.size(); ++map_no) { + mean += maps[map_no]->heat_map[i][j]; + } + heat_maps[i][j] = mean / (double)maps.size(); } - this->heat_map = heat_maps; - this->min_ = maps[0]->min_; - this->max_ = maps[0]->max_; + } + this->heat_map = heat_maps; + this->min_ = maps[0]->min_; + this->max_ = maps[0]->max_; } - - template -void Persistence_heat_maps::compute_percentage_of_active( const std::vector& maps , size_t cutoff ) -{ - std::vector< std::vector > heat_maps = this->check_and_initialize_maps( maps ); - - for ( size_t i = 0 ; i != heat_maps.size() ; ++i ) - { - for ( size_t j = 0 ; j != heat_maps[i].size() ; ++j ) - { - size_t number_of_active_levels = 0; - for ( size_t map_no = 0 ; map_no != maps.size() ; ++map_no ) - { - if ( maps[map_no]->heat_map[i][j] ) number_of_active_levels++; - } - if ( number_of_active_levels > cutoff ) - { - heat_maps[i][j] = number_of_active_levels; - } - else - { - heat_maps[i][j] = 0; - } - } +void Persistence_heat_maps::compute_percentage_of_active( + const std::vector& maps, size_t cutoff) { + std::vector > heat_maps = this->check_and_initialize_maps(maps); + + for (size_t i = 0; i != heat_maps.size(); ++i) { + for (size_t j = 0; j != heat_maps[i].size(); ++j) { + size_t number_of_active_levels = 0; + for (size_t map_no = 0; map_no != maps.size(); ++map_no) { + if (maps[map_no]->heat_map[i][j]) number_of_active_levels++; + } + if (number_of_active_levels > cutoff) { + heat_maps[i][j] = number_of_active_levels; + } else { + heat_maps[i][j] = 0; + } } - this->heat_map = heat_maps; - this->min_ = maps[0]->min_; - this->max_ = maps[0]->max_; + } + this->heat_map = heat_maps; + this->min_ = maps[0]->min_; + this->max_ = maps[0]->max_; } - template -void Persistence_heat_maps::plot( const char* filename )const -{ - std::ofstream out; - std::stringstream ss; - ss << filename << "_GnuplotScript"; - - out.open( ss.str().c_str() ); - out << "plot '-' matrix with image" << std::endl; - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - out << this->heat_map[i][j] << " "; - } - out << std::endl; +void Persistence_heat_maps::plot(const char* filename) const { + std::ofstream out; + std::stringstream ss; + ss << filename << "_GnuplotScript"; + + out.open(ss.str().c_str()); + out << "plot '-' matrix with image" << std::endl; + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + out << this->heat_map[i][j] << " "; } - out.close(); - std::cout << "Gnuplot script have been created. Open gnuplot and type load \'" << ss.str().c_str() << "\' to see the picture." << std::endl; + out << std::endl; + } + out.close(); + std::cout << "Gnuplot script have been created. Open gnuplot and type load \'" << ss.str().c_str() + << "\' to see the picture." << std::endl; } - template -void Persistence_heat_maps::print_to_file( const char* filename )const -{ - - std::ofstream out; - out.open( filename ); - - //First we store this->min_ and this->max_ values: - out << this->min_ << " " << this->max_ << std::endl; - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - out << this->heat_map[i][j] << " "; - } - out << std::endl; +void Persistence_heat_maps::print_to_file(const char* filename) const { + std::ofstream out; + out.open(filename); + + // First we store this->min_ and this->max_ values: + out << this->min_ << " " << this->max_ << std::endl; + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + out << this->heat_map[i][j] << " "; } - out.close(); + out << std::endl; + } + out.close(); } template -void Persistence_heat_maps::load_from_file( const char* filename ) -{ - bool dbg = false; - - std::ifstream in; - in.open( filename ); - - //checking if the file exist / if it was open. - if ( !in.good() ) - { - std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; - throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; - } - - //now we read the file one by one. - - - - in >> this->min_ >> this->max_; - if ( dbg ) - { - std::cerr << "Reading the following values of min and max : " << this->min_ << " , " << this->max_ << std::endl; - } - - std::string temp; - std::getline(in, temp); - - while (!in.eof()) - { - std::getline(in, temp); - std::stringstream lineSS; - lineSS << temp; - - std::vector line_of_heat_map; - while ( lineSS.good() ) - { - double point; - - lineSS >> point; - line_of_heat_map.push_back( point ); - if ( dbg ) - { - std::cout << point << " "; - } - } - if ( dbg ) - { - std::cout << std::endl; - getchar(); - } - - if ( in.good() )this->heat_map.push_back( line_of_heat_map ); - } - in.close(); - if ( dbg )std::cout << "Done \n"; +void Persistence_heat_maps::load_from_file(const char* filename) { + bool dbg = false; + + std::ifstream in; + in.open(filename); + + // checking if the file exist / if it was open. + if (!in.good()) { + std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; + throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; + } + + // now we read the file one by one. + + in >> this->min_ >> this->max_; + if (dbg) { + std::cerr << "Reading the following values of min and max : " << this->min_ << " , " << this->max_ << std::endl; + } + + std::string temp; + std::getline(in, temp); + + while (!in.eof()) { + std::getline(in, temp); + std::stringstream lineSS; + lineSS << temp; + + std::vector line_of_heat_map; + while (lineSS.good()) { + double point; + + lineSS >> point; + line_of_heat_map.push_back(point); + if (dbg) { + std::cout << point << " "; + } + } + if (dbg) { + std::cout << std::endl; + getchar(); + } + + if (in.good()) this->heat_map.push_back(line_of_heat_map); + } + in.close(); + if (dbg) std::cout << "Done \n"; } +// Concretizations of virtual methods: +template +std::vector Persistence_heat_maps::vectorize(int number_of_function) const { + // convert this->heat_map into one large vector: + size_t size_of_result = 0; + for (size_t i = 0; i != this->heat_map.size(); ++i) { + size_of_result += this->heat_map[i].size(); + } + + std::vector result; + result.reserve(size_of_result); + + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + result.push_back(this->heat_map[i][j]); + } + } -//Concretizations of virtual methods: -template -std::vector Persistence_heat_maps::vectorize( int number_of_function )const -{ - //convert this->heat_map into one large vector: - size_t size_of_result = 0; - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - size_of_result += this->heat_map[i].size(); - } - - std::vector< double > result; - result.reserve( size_of_result ); - - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - result.push_back( this->heat_map[i][j] ); - } - } - - return result; + return result; } template -double Persistence_heat_maps::distance( const Persistence_heat_maps& second , double power )const -{ - //first we need to check if (*this) and second are defined on the same domain and have the same dimensions: - if ( !this->check_if_the_same(second) ) - { - std::cerr << "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; - throw "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; - } - - //if we are here, we know that the two persistence images are defined on the same domain, so we can start computing their distances: - - double distance = 0; - if ( power < std::numeric_limits::max() ) - { - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - distance += pow( fabs(this->heat_map[i][j] - second.heat_map[i][j]) , power ); - } - } - } - else - { - //in this case, we compute max norm distance - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - if ( distance < fabs(this->heat_map[i][j] - second.heat_map[i][j]) ) - { - distance = fabs(this->heat_map[i][j] - second.heat_map[i][j]); - } - } - } - } - return distance; +double Persistence_heat_maps::distance(const Persistence_heat_maps& second, double power) const { + // first we need to check if (*this) and second are defined on the same domain and have the same dimensions: + if (!this->check_if_the_same(second)) { + std::cerr << "The persistence images are of non compatible sizes. We cannot therefore compute distance between " + "them. The program will now terminate"; + throw "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; + } + + // if we are here, we know that the two persistence images are defined on the same domain, so we can start computing + // their distances: + + double distance = 0; + if (power < std::numeric_limits::max()) { + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + distance += pow(fabs(this->heat_map[i][j] - second.heat_map[i][j]), power); + } + } + } else { + // in this case, we compute max norm distance + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + if (distance < fabs(this->heat_map[i][j] - second.heat_map[i][j])) { + distance = fabs(this->heat_map[i][j] - second.heat_map[i][j]); + } + } + } + } + return distance; } template -double Persistence_heat_maps::project_to_R( int number_of_function )const -{ - double result = 0; - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - result += this->heat_map[i][j]; - } - } - return result; +double Persistence_heat_maps::project_to_R(int number_of_function) const { + double result = 0; + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + result += this->heat_map[i][j]; + } + } + return result; } template -void Persistence_heat_maps::compute_average( const std::vector< Persistence_heat_maps* >& to_average ) -{ - this->compute_mean( to_average ); +void Persistence_heat_maps::compute_average( + const std::vector& to_average) { + this->compute_mean(to_average); } template -double Persistence_heat_maps::compute_scalar_product( const Persistence_heat_maps& second )const -{ - //first we need to check if (*this) and second are defined on the same domain and have the same dimensions: - if ( !this->check_if_the_same(second) ) - { - std::cerr << "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; - throw "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; - } - - //if we are here, we know that the two persistence images are defined on the same domain, so we can start computing their scalar product: - double scalar_prod = 0; - for ( size_t i = 0 ; i != this->heat_map.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->heat_map[i].size() ; ++j ) - { - scalar_prod += this->heat_map[i][j]*second.heat_map[i][j]; - } - } - return scalar_prod; +double Persistence_heat_maps::compute_scalar_product(const Persistence_heat_maps& second) const { + // first we need to check if (*this) and second are defined on the same domain and have the same dimensions: + if (!this->check_if_the_same(second)) { + std::cerr << "The persistence images are of non compatible sizes. We cannot therefore compute distance between " + "them. The program will now terminate"; + throw "The persistence images are of non compatible sizes. We cannot therefore compute distance between them. The program will now terminate"; + } + + // if we are here, we know that the two persistence images are defined on the same domain, so we can start computing + // their scalar product: + double scalar_prod = 0; + for (size_t i = 0; i != this->heat_map.size(); ++i) { + for (size_t j = 0; j != this->heat_map[i].size(); ++j) { + scalar_prod += this->heat_map[i][j] * second.heat_map[i][j]; + } + } + return scalar_prod; } - - - } // namespace Persistence_representations } // namespace Gudhi - #endif // PERSISTENCE_HEAT_MAPS_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index 40c24670..2a1c6283 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -23,10 +23,10 @@ #ifndef PERSISTENCE_INTERVALS_H_ #define PERSISTENCE_INTERVALS_H_ -//gudhi include +// gudhi include #include -//standard include +// standard include #include #include #include @@ -36,601 +36,532 @@ #include #include -namespace Gudhi -{ -namespace Persistence_representations -{ +namespace Gudhi { +namespace Persistence_representations { /** - * This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data -**/ -class Persistence_intervals -{ -public: - /** - * This is a constructor of a class Persistence_intervals from a text file. Each line of the input file is supposed to contain two numbers of a type double (or convertible to double) - * representing the birth and the death of the persistence interval. If the pairs are not sorted so that birth <= death, then the constructor will sort then that way. - * * The second parameter of a constructor is a dimension of intervals to be read from a file. If your file contains only birth-death pairs, use the default value. - **/ - Persistence_intervals( const char* filename , unsigned dimension = std::numeric_limits::max() ); - - /** - * This is a constructor of a class Persistence_intervals from a vector of pairs. Each pair is assumed to represent a persistence interval. We assume that the first elements of pairs - * are smaller or equal the second elements of pairs. - **/ - Persistence_intervals( const std::vector< std::pair< double,double > >& intervals ); - - /** - * This procedure returns x-range of a given persistence diagram. - **/ - std::pair< double , double > get_x_range()const - { - double min_ = std::numeric_limits::max(); - double max_ = -std::numeric_limits::max(); - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - if ( this->intervals[i].first < min_ )min_ = this->intervals[i].first; - if ( this->intervals[i].second > max_ )max_ = this->intervals[i].second; - } - return std::make_pair( min_ , max_ ); - } - - /** - * This procedure returns y-range of a given persistence diagram. - **/ - std::pair< double , double > get_y_range()const - { - double min_ = std::numeric_limits::max(); - double max_ = -std::numeric_limits::max(); - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - if ( this->intervals[i].second < min_ )min_ = this->intervals[i].second; - if ( this->intervals[i].second > max_ )max_ = this->intervals[i].second; - } - return std::make_pair( min_ , max_ ); - } - - /** - * Procedure that compute the vector of lengths of the dominant (i.e. the longest) persistence intervals. The list is truncated at the parameter of the call where_to_cut (set by default to 100). - **/ - std::vector length_of_dominant_intervals( size_t where_to_cut = 100 )const; - - - /** - * Procedure that compute the vector of the dominant (i.e. the longest) persistence intervals. The parameter of the procedure (set by default to 100) is the number of dominant intervals returned by the procedure. - **/ - std::vector< std::pair > dominant_intervals( size_t where_to_cut = 100 )const; - - /** - * Procedure to compute a histogram of interval's length. A histogram is a block plot. The number of blocks is determined by the first parameter of the function (set by default to 10). - * For the sake of argument let us assume that the length of the longest interval is 1 and the number of bins is 10. In this case the i-th block correspond to a range between i-1/10 and i10. - * The vale of a block supported at the interval is the number of persistence intervals of a length between x_0 and x_1. - **/ - std::vector< size_t > histogram_of_lengths( size_t number_of_bins = 10 )const; - - /** - * Based on a histogram of intervals lengths computed by the function histogram_of_lengths H the procedure below computes the cumulative histogram. The i-th position of the resulting histogram - * is the sum of values of H for the positions from 0 to i. - **/ - std::vector< size_t > cumulative_histogram_of_lengths( size_t number_of_bins = 10 )const; - - /** - * In this procedure we assume that each barcode is a characteristic function of a hight equal to its length. The persistence diagram is a sum of such a functions. The procedure below construct a function being a - * sum of the characteristic functions of persistence intervals. The first two parameters are the range in which the function is to be computed and the last parameter is the number of bins in - * the discretization of the interval [_min,_max]. - **/ - std::vector< double > characteristic_function_of_diagram( double x_min , double x_max , size_t number_of_bins = 10 )const; - - /** - * Cumulative version of the function characteristic_function_of_diagram - **/ - std::vector< double > cumulative_characteristic_function_of_diagram( double x_min , double x_max , size_t number_of_bins = 10 )const; - - /** - * Compute the function of persistence Betti numbers. The returned value is a vector of pair. First element of each pair is a place where persistence Betti numbers change. - * Second element of each pair is the value of Persistence Betti numbers at that point. - **/ - std::vector< std::pair< double , size_t > > compute_persistent_betti_numbers()const; - - /** - *This is a non optimal procedure that compute vector of distances from each point of diagram to its k-th nearest neighbor (k is a parameter of the program). The resulting vector is by default truncated to 10 - *elements (this value can be changed by using the second parameter of the program). The points are returned in order from the ones which are farthest away from their k-th nearest neighbors. - **/ - std::vector< double > k_n_n( size_t k , size_t where_to_cut = 10 )const; - - /** - * Operator that send the diagram to a stream. - **/ - friend std::ostream& operator << ( std::ostream& out , const Persistence_intervals& intervals ) - { - for ( size_t i = 0 ; i != intervals.intervals.size() ; ++i ) - { - out << intervals.intervals[i].first << " " << intervals.intervals[i].second << std::endl; - } - return out; + * This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, + *Real_valued_topological_data +**/ +class Persistence_intervals { + public: + /** + * This is a constructor of a class Persistence_intervals from a text file. Each line of the input file is supposed to + *contain two numbers of a type double (or convertible to double) + * representing the birth and the death of the persistence interval. If the pairs are not sorted so that birth <= + *death, then the constructor will sort then that way. + * * The second parameter of a constructor is a dimension of intervals to be read from a file. If your file contains + *only birth-death pairs, use the default value. + **/ + Persistence_intervals(const char* filename, unsigned dimension = std::numeric_limits::max()); + + /** + * This is a constructor of a class Persistence_intervals from a vector of pairs. Each pair is assumed to represent a + *persistence interval. We assume that the first elements of pairs + * are smaller or equal the second elements of pairs. + **/ + Persistence_intervals(const std::vector >& intervals); + + /** + * This procedure returns x-range of a given persistence diagram. + **/ + std::pair get_x_range() const { + double min_ = std::numeric_limits::max(); + double max_ = -std::numeric_limits::max(); + for (size_t i = 0; i != this->intervals.size(); ++i) { + if (this->intervals[i].first < min_) min_ = this->intervals[i].first; + if (this->intervals[i].second > max_) max_ = this->intervals[i].second; } - - /** - * Generating gnuplot script to plot the interval. - **/ - void plot( const char* filename , double min_x = std::numeric_limits::max() , double max_x = std::numeric_limits::max() , double min_y = std::numeric_limits::max() , double max_y = std::numeric_limits::max() ) const - { - //this program create a gnuplot script file that allows to plot persistence diagram. - std::ofstream out; - - std::ostringstream nameSS; - nameSS << filename << "_GnuplotScript"; - std::string nameStr = nameSS.str(); - out.open( nameStr ); - - std::pair min_max_values = this->get_x_range(); - if ( min_x == max_x ) - { - out << "set xrange [" << min_max_values.first - 0.1*(min_max_values.second-min_max_values.first) << " : " << min_max_values.second + 0.1*(min_max_values.second-min_max_values.first) << " ]" << std::endl; - out << "set yrange [" << min_max_values.first - 0.1*(min_max_values.second-min_max_values.first) << " : " << min_max_values.second + 0.1*(min_max_values.second-min_max_values.first) << " ]" << std::endl; - } - else - { - out << "set xrange [" << min_x << " : " << max_x << " ]" << std::endl; - out << "set yrange [" << min_y << " : " << max_y << " ]" << std::endl; - } - out << "plot '-' using 1:2 notitle \"" << filename << "\", \\" << std::endl; - out << " '-' using 1:2 notitle with lp" << std::endl; - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - out << this->intervals[i].first << " " << this->intervals[i].second << std::endl; - } - out << "EOF" << std::endl; - out << min_max_values.first - 0.1*(min_max_values.second-min_max_values.first) << " " << min_max_values.first - 0.1*(min_max_values.second-min_max_values.first) << std::endl; - out << min_max_values.second + 0.1*(min_max_values.second-min_max_values.first) << " " << min_max_values.second + 0.1*(min_max_values.second-min_max_values.first) << std::endl; - - out.close(); - - std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" << nameStr << "' in gnuplot to visualize." << std::endl; - } - - /** - * Return number of points in the diagram. - **/ - size_t size()const{return this->intervals.size();} - - /** - * Return the persistence interval at the given position. Note that intervals are not sorted with respect to their lengths. - **/ - inline std::pair< double,double > operator [](size_t i)const - { - if ( i >= this->intervals.size() )throw("Index out of range! Operator [], one_d_gaussians class\n"); - return this->intervals[i]; + return std::make_pair(min_, max_); + } + + /** + * This procedure returns y-range of a given persistence diagram. + **/ + std::pair get_y_range() const { + double min_ = std::numeric_limits::max(); + double max_ = -std::numeric_limits::max(); + for (size_t i = 0; i != this->intervals.size(); ++i) { + if (this->intervals[i].second < min_) min_ = this->intervals[i].second; + if (this->intervals[i].second > max_) max_ = this->intervals[i].second; } - - - //Implementations of functions for various concepts. - /** - * This is a simple function projecting the persistence intervals to a real number. The function we use here is a sum of squared lengths of intervals. It can be naturally interpreted as - * sum of step function, where the step hight it equal to the length of the interval. - * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it - * will be most likely changed in the next versions. - **/ - double project_to_R( int number_of_function )const; - /** - * The function gives the number of possible projections to R. This function is required by the Real_valued_topological_data concept. - **/ - size_t number_of_projections_to_R()const - { - return this->number_of_functions_for_projections_to_reals; - } - - /** - * Return a family of vectors obtained from the persistence diagram. The i-th vector consist of the length of i dominant persistence intervals. - **/ - std::vector vectorize( int number_of_function )const - { - return this->length_of_dominant_intervals( number_of_function ); + return std::make_pair(min_, max_); + } + + /** + * Procedure that compute the vector of lengths of the dominant (i.e. the longest) persistence intervals. The list is + *truncated at the parameter of the call where_to_cut (set by default to 100). + **/ + std::vector length_of_dominant_intervals(size_t where_to_cut = 100) const; + + /** + * Procedure that compute the vector of the dominant (i.e. the longest) persistence intervals. The parameter of + *the procedure (set by default to 100) is the number of dominant intervals returned by the procedure. + **/ + std::vector > dominant_intervals(size_t where_to_cut = 100) const; + + /** + * Procedure to compute a histogram of interval's length. A histogram is a block plot. The number of blocks is + *determined by the first parameter of the function (set by default to 10). + * For the sake of argument let us assume that the length of the longest interval is 1 and the number of bins is + *10. In this case the i-th block correspond to a range between i-1/10 and i10. + * The vale of a block supported at the interval is the number of persistence intervals of a length between x_0 + *and x_1. + **/ + std::vector histogram_of_lengths(size_t number_of_bins = 10) const; + + /** + * Based on a histogram of intervals lengths computed by the function histogram_of_lengths H the procedure below + *computes the cumulative histogram. The i-th position of the resulting histogram + * is the sum of values of H for the positions from 0 to i. + **/ + std::vector cumulative_histogram_of_lengths(size_t number_of_bins = 10) const; + + /** + * In this procedure we assume that each barcode is a characteristic function of a hight equal to its length. The + *persistence diagram is a sum of such a functions. The procedure below construct a function being a + * sum of the characteristic functions of persistence intervals. The first two parameters are the range in which the + *function is to be computed and the last parameter is the number of bins in + * the discretization of the interval [_min,_max]. + **/ + std::vector characteristic_function_of_diagram(double x_min, double x_max, size_t number_of_bins = 10) const; + + /** + * Cumulative version of the function characteristic_function_of_diagram + **/ + std::vector cumulative_characteristic_function_of_diagram(double x_min, double x_max, + size_t number_of_bins = 10) const; + + /** + * Compute the function of persistence Betti numbers. The returned value is a vector of pair. First element of each + *pair is a place where persistence Betti numbers change. + * Second element of each pair is the value of Persistence Betti numbers at that point. + **/ + std::vector > compute_persistent_betti_numbers() const; + + /** + *This is a non optimal procedure that compute vector of distances from each point of diagram to its k-th nearest + *neighbor (k is a parameter of the program). The resulting vector is by default truncated to 10 + *elements (this value can be changed by using the second parameter of the program). The points are returned in order + *from the ones which are farthest away from their k-th nearest neighbors. + **/ + std::vector k_n_n(size_t k, size_t where_to_cut = 10) const; + + /** +* Operator that send the diagram to a stream. +**/ + friend std::ostream& operator<<(std::ostream& out, const Persistence_intervals& intervals) { + for (size_t i = 0; i != intervals.intervals.size(); ++i) { + out << intervals.intervals[i].first << " " << intervals.intervals[i].second << std::endl; } - /** - * This function return the number of functions that allows vectorization of a persistence diagram. It is required in a concept Vectorized_topological_data. - **/ - size_t number_of_vectorize_functions()const - { - return this->number_of_functions_for_vectorization; - } - - //end of implementation of functions needed for concepts. - - - //For visualization use output from vectorize and build histograms. - std::vector< std::pair< double,double > > output_for_visualization() - { - return this->intervals; - } - -protected: - - void set_up_numbers_of_functions_for_vectorization_and_projections_to_reals() - { - //warning, this function can be only called after filling in the intervals vector. - this->number_of_functions_for_vectorization = this->intervals.size(); - this->number_of_functions_for_projections_to_reals = 1; - } - - std::vector< std::pair< double,double > > intervals; - size_t number_of_functions_for_vectorization; - size_t number_of_functions_for_projections_to_reals; -}; - - -Persistence_intervals::Persistence_intervals( const char* filename , unsigned dimension ) -{ - if ( dimension == std::numeric_limits::max() ) - { - this->intervals = read_persistence_intervals_in_one_dimension_from_file( filename ); + return out; + } + + /** + * Generating gnuplot script to plot the interval. + **/ + void plot(const char* filename, double min_x = std::numeric_limits::max(), + double max_x = std::numeric_limits::max(), double min_y = std::numeric_limits::max(), + double max_y = std::numeric_limits::max()) const { + // this program create a gnuplot script file that allows to plot persistence diagram. + std::ofstream out; + + std::ostringstream nameSS; + nameSS << filename << "_GnuplotScript"; + std::string nameStr = nameSS.str(); + out.open(nameStr); + + std::pair min_max_values = this->get_x_range(); + if (min_x == max_x) { + out << "set xrange [" << min_max_values.first - 0.1 * (min_max_values.second - min_max_values.first) << " : " + << min_max_values.second + 0.1 * (min_max_values.second - min_max_values.first) << " ]" << std::endl; + out << "set yrange [" << min_max_values.first - 0.1 * (min_max_values.second - min_max_values.first) << " : " + << min_max_values.second + 0.1 * (min_max_values.second - min_max_values.first) << " ]" << std::endl; + } else { + out << "set xrange [" << min_x << " : " << max_x << " ]" << std::endl; + out << "set yrange [" << min_y << " : " << max_y << " ]" << std::endl; } - else - { - this->intervals = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); + out << "plot '-' using 1:2 notitle \"" << filename << "\", \\" << std::endl; + out << " '-' using 1:2 notitle with lp" << std::endl; + for (size_t i = 0; i != this->intervals.size(); ++i) { + out << this->intervals[i].first << " " << this->intervals[i].second << std::endl; } - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); -}//Persistence_intervals - + out << "EOF" << std::endl; + out << min_max_values.first - 0.1 * (min_max_values.second - min_max_values.first) << " " + << min_max_values.first - 0.1 * (min_max_values.second - min_max_values.first) << std::endl; + out << min_max_values.second + 0.1 * (min_max_values.second - min_max_values.first) << " " + << min_max_values.second + 0.1 * (min_max_values.second - min_max_values.first) << std::endl; + + out.close(); + + std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" + << nameStr << "' in gnuplot to visualize." << std::endl; + } + + /** +* Return number of points in the diagram. +**/ + size_t size() const { return this->intervals.size(); } + + /** + * Return the persistence interval at the given position. Note that intervals are not sorted with respect to their + *lengths. + **/ + inline std::pair operator[](size_t i) const { + if (i >= this->intervals.size()) throw("Index out of range! Operator [], one_d_gaussians class\n"); + return this->intervals[i]; + } + + // Implementations of functions for various concepts. + /** + * This is a simple function projecting the persistence intervals to a real number. The function we use here is a sum + *of squared lengths of intervals. It can be naturally interpreted as + * sum of step function, where the step hight it equal to the length of the interval. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when + *using it, keep in mind that it + * will be most likely changed in the next versions. + **/ + double project_to_R(int number_of_function) const; + /** + * The function gives the number of possible projections to R. This function is required by the + *Real_valued_topological_data concept. + **/ + size_t number_of_projections_to_R() const { return this->number_of_functions_for_projections_to_reals; } + + /** + * Return a family of vectors obtained from the persistence diagram. The i-th vector consist of the length of i + *dominant persistence intervals. + **/ + std::vector vectorize(int number_of_function) const { + return this->length_of_dominant_intervals(number_of_function); + } + /** + * This function return the number of functions that allows vectorization of a persistence diagram. It is required + *in a concept Vectorized_topological_data. + **/ + size_t number_of_vectorize_functions() const { return this->number_of_functions_for_vectorization; } + + // end of implementation of functions needed for concepts. + + // For visualization use output from vectorize and build histograms. + std::vector > output_for_visualization() { return this->intervals; } + + protected: + void set_up_numbers_of_functions_for_vectorization_and_projections_to_reals() { + // warning, this function can be only called after filling in the intervals vector. + this->number_of_functions_for_vectorization = this->intervals.size(); + this->number_of_functions_for_projections_to_reals = 1; + } + + std::vector > intervals; + size_t number_of_functions_for_vectorization; + size_t number_of_functions_for_projections_to_reals; +}; -Persistence_intervals::Persistence_intervals( const std::vector< std::pair< double , double > >& intervals_ ):intervals(intervals_) -{ - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); +Persistence_intervals::Persistence_intervals(const char* filename, unsigned dimension) { + if (dimension == std::numeric_limits::max()) { + this->intervals = read_persistence_intervals_in_one_dimension_from_file(filename); + } else { + this->intervals = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); + } + this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); +} // Persistence_intervals + +Persistence_intervals::Persistence_intervals(const std::vector >& intervals_) + : intervals(intervals_) { + this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); } +std::vector Persistence_intervals::length_of_dominant_intervals(size_t where_to_cut) const { + std::vector result(this->intervals.size()); + for (size_t i = 0; i != this->intervals.size(); ++i) { + result[i] = this->intervals[i].second - this->intervals[i].first; + } + std::sort(result.begin(), result.end(), std::greater()); -std::vector< double > Persistence_intervals::length_of_dominant_intervals( size_t where_to_cut )const -{ - std::vector< double > result( this->intervals.size() ); - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - result[i] = this->intervals[i].second - this->intervals[i].first; - } - std::sort( result.begin() , result.end() , std::greater() ); + result.resize(std::min(where_to_cut, result.size())); + return result; +} // length_of_dominant_intervals +bool compare(const std::pair& first, const std::pair& second) { + return first.second > second.second; +} - result.resize( std::min(where_to_cut,result.size()) ); - return result; -}//length_of_dominant_intervals +std::vector > Persistence_intervals::dominant_intervals(size_t where_to_cut) const { + bool dbg = false; + std::vector > position_length_vector(this->intervals.size()); + for (size_t i = 0; i != this->intervals.size(); ++i) { + position_length_vector[i] = std::make_pair(i, this->intervals[i].second - this->intervals[i].first); + } + + std::sort(position_length_vector.begin(), position_length_vector.end(), compare); + + std::vector > result; + result.reserve(std::min(where_to_cut, position_length_vector.size())); + + for (size_t i = 0; i != std::min(where_to_cut, position_length_vector.size()); ++i) { + result.push_back(this->intervals[position_length_vector[i].first]); + if (dbg) + std::cerr << "Position : " << position_length_vector[i].first << " length : " << position_length_vector[i].second + << std::endl; + } + + return result; +} // dominant_intervals + +std::vector Persistence_intervals::histogram_of_lengths(size_t number_of_bins) const { + bool dbg = false; + + if (dbg) std::cerr << "this->intervals.size() : " << this->intervals.size() << std::endl; + // first find the length of the longest interval: + double lengthOfLongest = 0; + for (size_t i = 0; i != this->intervals.size(); ++i) { + if ((this->intervals[i].second - this->intervals[i].first) > lengthOfLongest) { + lengthOfLongest = this->intervals[i].second - this->intervals[i].first; + } + } + if (dbg) { + std::cerr << "lengthOfLongest : " << lengthOfLongest << std::endl; + } + // this is a container we will use to store the resulting histogram + std::vector result(number_of_bins + 1, 0); -bool compare( const std::pair< size_t , double >& first , const std::pair< size_t , double >& second ) -{ - return first.second > second.second; -} + // for every persistence interval in our collection. + for (size_t i = 0; i != this->intervals.size(); ++i) { + // compute its length relative to the length of the dominant interval: + double relative_length_of_this_interval = (this->intervals[i].second - this->intervals[i].first) / lengthOfLongest; + // given the relative length (between 0 and 1) compute to which bin should it contribute. + size_t position = (size_t)(relative_length_of_this_interval * number_of_bins); -std::vector< std::pair > Persistence_intervals::dominant_intervals( size_t where_to_cut )const -{ - bool dbg = false; - std::vector< std::pair< size_t , double > > position_length_vector( this->intervals.size() ); - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - position_length_vector[i] = std::make_pair( i , this->intervals[i].second - this->intervals[i].first ); - } - - std::sort( position_length_vector.begin() , position_length_vector.end() , compare ); - - std::vector< std::pair > result; - result.reserve( std::min( where_to_cut , position_length_vector.size() ) ); - - for ( size_t i = 0 ; i != std::min( where_to_cut , position_length_vector.size() ) ; ++i ) - { - result.push_back( this->intervals[ position_length_vector[i].first ] ); - if ( dbg )std::cerr << "Position : " << position_length_vector[i].first << " length : " << position_length_vector[i].second << std::endl; - } - - return result; -}//dominant_intervals - - -std::vector< size_t > Persistence_intervals::histogram_of_lengths( size_t number_of_bins )const -{ - bool dbg = false; - - if ( dbg )std::cerr << "this->intervals.size() : " << this->intervals.size() << std::endl; - //first find the length of the longest interval: - double lengthOfLongest = 0; - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - if ( (this->intervals[i].second - this->intervals[i].first) > lengthOfLongest ) - { - lengthOfLongest = this->intervals[i].second - this->intervals[i].first; - } - } + ++result[position]; - if ( dbg ){std::cerr << "lengthOfLongest : " << lengthOfLongest << std::endl;} - - //this is a container we will use to store the resulting histogram - std::vector< size_t > result( number_of_bins + 1 , 0 ); - - //for every persistence interval in our collection. - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - //compute its length relative to the length of the dominant interval: - double relative_length_of_this_interval = (this->intervals[i].second - this->intervals[i].first)/lengthOfLongest; - - //given the relative length (between 0 and 1) compute to which bin should it contribute. - size_t position = (size_t)(relative_length_of_this_interval*number_of_bins); - - - ++result[position]; - - if ( dbg ) - { - std::cerr << "i : " << i << std::endl; - std::cerr << "Interval : [" << this->intervals[i].first << " , " << this->intervals[i].second << " ] \n"; - std::cerr << "relative_length_of_this_interval : " << relative_length_of_this_interval << std::endl; - std::cerr << "position : " << position << std::endl; - getchar(); - } + if (dbg) { + std::cerr << "i : " << i << std::endl; + std::cerr << "Interval : [" << this->intervals[i].first << " , " << this->intervals[i].second << " ] \n"; + std::cerr << "relative_length_of_this_interval : " << relative_length_of_this_interval << std::endl; + std::cerr << "position : " << position << std::endl; + getchar(); } + } - - if ( dbg ){for ( size_t i = 0 ; i != result.size() ; ++i )std::cerr << result[i] << std::endl;} - return result; + if (dbg) { + for (size_t i = 0; i != result.size(); ++i) std::cerr << result[i] << std::endl; + } + return result; } +std::vector Persistence_intervals::cumulative_histogram_of_lengths(size_t number_of_bins) const { + std::vector histogram = this->histogram_of_lengths(number_of_bins); + std::vector result(histogram.size()); -std::vector< size_t > Persistence_intervals::cumulative_histogram_of_lengths( size_t number_of_bins )const -{ - std::vector< size_t > histogram = this->histogram_of_lengths( number_of_bins ); - std::vector< size_t > result( histogram.size() ); - - size_t sum = 0; - for ( size_t i = 0 ; i != histogram.size() ; ++i ) - { - sum += histogram[i]; - result[i] = sum; - } - return result; + size_t sum = 0; + for (size_t i = 0; i != histogram.size(); ++i) { + sum += histogram[i]; + result[i] = sum; + } + return result; } +std::vector Persistence_intervals::characteristic_function_of_diagram(double x_min, double x_max, + size_t number_of_bins) const { + bool dbg = false; -std::vector< double > Persistence_intervals::characteristic_function_of_diagram( double x_min , double x_max , size_t number_of_bins )const -{ - bool dbg = false; - - std::vector< double > result( number_of_bins ); - std::fill( result.begin() , result.end() , 0 ); - - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - if ( dbg ) - { - std::cerr << "Interval : " << this->intervals[i].first << " , " << this->intervals[i].second << std::endl; - } - - size_t beginIt = 0; - if ( this->intervals[i].first < x_min )beginIt = 0; - if ( this->intervals[i].first >= x_max )beginIt = result.size(); - if ( ( this->intervals[i].first > x_min ) && ( this->intervals[i].first < x_max ) ) - { - beginIt = number_of_bins*(this->intervals[i].first-x_min)/(x_max - x_min); - } - - size_t endIt = 0; - if ( this->intervals[i].second < x_min )endIt = 0; - if ( this->intervals[i].second >= x_max )endIt = result.size(); - if ( ( this->intervals[i].second > x_min ) && ( this->intervals[i].second < x_max ) ) - { - endIt = number_of_bins*( this->intervals[i].second - x_min )/(x_max - x_min); - } - - if ( beginIt > endIt ){beginIt = endIt;} - - if ( dbg ) - { - std::cerr << "beginIt : " << beginIt << std::endl; - std::cerr << "endIt : " << endIt << std::endl; - } + std::vector result(number_of_bins); + std::fill(result.begin(), result.end(), 0); + for (size_t i = 0; i != this->intervals.size(); ++i) { + if (dbg) { + std::cerr << "Interval : " << this->intervals[i].first << " , " << this->intervals[i].second << std::endl; + } - for ( size_t pos = beginIt ; pos != endIt ; ++pos ) - { - result[pos] += ( (x_max - x_min)/(double)number_of_bins ) * ( this->intervals[i].second - this->intervals[i].first ); - } - if ( dbg ) - { - std::cerr << "Result at this stage \n"; - for ( size_t aa = 0 ; aa != result.size() ; ++aa ) - { - std::cerr << result[aa] << " "; - } - std::cerr << std::endl; - } + size_t beginIt = 0; + if (this->intervals[i].first < x_min) beginIt = 0; + if (this->intervals[i].first >= x_max) beginIt = result.size(); + if ((this->intervals[i].first > x_min) && (this->intervals[i].first < x_max)) { + beginIt = number_of_bins * (this->intervals[i].first - x_min) / (x_max - x_min); } - return result; -}//characteristic_function_of_diagram + size_t endIt = 0; + if (this->intervals[i].second < x_min) endIt = 0; + if (this->intervals[i].second >= x_max) endIt = result.size(); + if ((this->intervals[i].second > x_min) && (this->intervals[i].second < x_max)) { + endIt = number_of_bins * (this->intervals[i].second - x_min) / (x_max - x_min); + } + if (beginIt > endIt) { + beginIt = endIt; + } -std::vector< double > Persistence_intervals::cumulative_characteristic_function_of_diagram( double x_min , double x_max , size_t number_of_bins )const -{ - std::vector< double > intsOfBars = this->characteristic_function_of_diagram( x_min , x_max , number_of_bins ); - std::vector< double > result( intsOfBars.size() ); - double sum = 0; - for ( size_t i = 0 ; i != intsOfBars.size() ; ++i ) - { - sum += intsOfBars[i]; - result[i] = sum; + if (dbg) { + std::cerr << "beginIt : " << beginIt << std::endl; + std::cerr << "endIt : " << endIt << std::endl; } - return result; -}//cumulative_characteristic_function_of_diagram + for (size_t pos = beginIt; pos != endIt; ++pos) { + result[pos] += + ((x_max - x_min) / (double)number_of_bins) * (this->intervals[i].second - this->intervals[i].first); + } + if (dbg) { + std::cerr << "Result at this stage \n"; + for (size_t aa = 0; aa != result.size(); ++aa) { + std::cerr << result[aa] << " "; + } + std::cerr << std::endl; + } + } + return result; +} // characteristic_function_of_diagram + +std::vector Persistence_intervals::cumulative_characteristic_function_of_diagram(double x_min, double x_max, + size_t number_of_bins) const { + std::vector intsOfBars = this->characteristic_function_of_diagram(x_min, x_max, number_of_bins); + std::vector result(intsOfBars.size()); + double sum = 0; + for (size_t i = 0; i != intsOfBars.size(); ++i) { + sum += intsOfBars[i]; + result[i] = sum; + } + return result; +} // cumulative_characteristic_function_of_diagram template -bool compare_first_element_of_pair( const std::pair< T , bool >& f, const std::pair< T , bool >& s ) -{ - return (f.first < s.first); +bool compare_first_element_of_pair(const std::pair& f, const std::pair& s) { + return (f.first < s.first); } - -std::vector< std::pair< double , size_t > > Persistence_intervals::compute_persistent_betti_numbers()const -{ - std::vector< std::pair< double , bool > > places_where_pbs_change( 2*this->intervals.size() ); - - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - places_where_pbs_change[2*i] = std::make_pair( this->intervals[i].first , true ); - places_where_pbs_change[2*i+1] = std::make_pair( this->intervals[i].second , false ); +std::vector > Persistence_intervals::compute_persistent_betti_numbers() const { + std::vector > places_where_pbs_change(2 * this->intervals.size()); + + for (size_t i = 0; i != this->intervals.size(); ++i) { + places_where_pbs_change[2 * i] = std::make_pair(this->intervals[i].first, true); + places_where_pbs_change[2 * i + 1] = std::make_pair(this->intervals[i].second, false); + } + + std::sort(places_where_pbs_change.begin(), places_where_pbs_change.end(), compare_first_element_of_pair); + size_t pbn = 0; + std::vector > pbns(places_where_pbs_change.size()); + for (size_t i = 0; i != places_where_pbs_change.size(); ++i) { + if (places_where_pbs_change[i].second == true) { + ++pbn; + } else { + --pbn; } - - std::sort( places_where_pbs_change.begin() , places_where_pbs_change.end() , compare_first_element_of_pair ); - size_t pbn = 0; - std::vector< std::pair< double , size_t > > pbns( places_where_pbs_change.size() ); - for ( size_t i = 0 ; i != places_where_pbs_change.size() ; ++i ) - { - if ( places_where_pbs_change[i].second == true ) - { - ++pbn; - } - else - { - --pbn; - } - pbns[i] = std::make_pair( places_where_pbs_change[i].first , pbn ); - } - return pbns; + pbns[i] = std::make_pair(places_where_pbs_change[i].first, pbn); + } + return pbns; } - - - - - -inline double compute_euclidean_distance( const std::pair< double,double > & f , const std::pair< double,double > & s ) -{ - return sqrt( (f.first-s.first)*(f.first-s.first) + (f.second-s.second)*(f.second-s.second) ); +inline double compute_euclidean_distance(const std::pair& f, const std::pair& s) { + return sqrt((f.first - s.first) * (f.first - s.first) + (f.second - s.second) * (f.second - s.second)); } - -std::vector< double > Persistence_intervals::k_n_n( size_t k , size_t where_to_cut )const -{ - bool dbg = false; - if ( dbg ) - { - std::cerr << "Here are the intervals : \n"; - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - std::cerr << "[ " << this->intervals[i].first << " , " << this->intervals[i].second << "] \n"; - } - getchar(); +std::vector Persistence_intervals::k_n_n(size_t k, size_t where_to_cut) const { + bool dbg = false; + if (dbg) { + std::cerr << "Here are the intervals : \n"; + for (size_t i = 0; i != this->intervals.size(); ++i) { + std::cerr << "[ " << this->intervals[i].first << " , " << this->intervals[i].second << "] \n"; } - - std::vector< double > result; - //compute all to all distance between point in the diagram. Also, consider points in the diagonal with the infinite multiplicity. - std::vector< std::vector< double > > distances( this->intervals.size() ); - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - std::vector aa(this->intervals.size()); - std::fill( aa.begin() , aa.end() , 0 ); - distances[i] = aa; + getchar(); + } + + std::vector result; + // compute all to all distance between point in the diagram. Also, consider points in the diagonal with the infinite + // multiplicity. + std::vector > distances(this->intervals.size()); + for (size_t i = 0; i != this->intervals.size(); ++i) { + std::vector aa(this->intervals.size()); + std::fill(aa.begin(), aa.end(), 0); + distances[i] = aa; + } + std::vector distances_from_diagonal(this->intervals.size()); + std::fill(distances_from_diagonal.begin(), distances_from_diagonal.end(), 0); + + for (size_t i = 0; i != this->intervals.size(); ++i) { + std::vector distancesFromI; + for (size_t j = i + 1; j != this->intervals.size(); ++j) { + distancesFromI.push_back(compute_euclidean_distance(this->intervals[i], this->intervals[j])); + } + // also add a distance from this guy to diagonal: + double distanceToDiagonal = compute_euclidean_distance( + this->intervals[i], std::make_pair(0.5 * (this->intervals[i].first + this->intervals[i].second), + 0.5 * (this->intervals[i].first + this->intervals[i].second))); + distances_from_diagonal[i] = distanceToDiagonal; + + if (dbg) { + std::cerr << "Here are the distances form the point : [" << this->intervals[i].first << " , " + << this->intervals[i].second << "] in the diagram \n"; + for (size_t aa = 0; aa != distancesFromI.size(); ++aa) { + std::cerr << "To : " << i + aa << " : " << distancesFromI[aa] << " "; + } + std::cerr << std::endl; + getchar(); } - std::vector< double > distances_from_diagonal( this->intervals.size() ); - std::fill( distances_from_diagonal.begin() , distances_from_diagonal.end() , 0 ); - - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - std::vector< double > distancesFromI; - for ( size_t j = i+1 ; j != this->intervals.size() ; ++j ) - { - distancesFromI.push_back( compute_euclidean_distance( this->intervals[i] , this->intervals[j] ) ); - } - //also add a distance from this guy to diagonal: - double distanceToDiagonal = compute_euclidean_distance( this->intervals[i] , std::make_pair( 0.5*(this->intervals[i].first + this->intervals[i].second) , 0.5*(this->intervals[i].first + this->intervals[i].second) ) ); - distances_from_diagonal[i] = distanceToDiagonal; - - if ( dbg ) - { - std::cerr << "Here are the distances form the point : [" << this->intervals[i].first << " , " << this->intervals[i].second << "] in the diagram \n"; - for ( size_t aa = 0 ; aa != distancesFromI.size() ; ++aa ) - { - std::cerr << "To : " << i+aa << " : " << distancesFromI[aa] << " "; - } - std::cerr << std::endl; - getchar(); - } - //filling in the distances matrix: - for ( size_t j = i+1 ; j != this->intervals.size() ; ++j ) - { - distances[i][j] = distancesFromI[j-i-1]; - distances[j][i] = distancesFromI[j-i-1]; - } + // filling in the distances matrix: + for (size_t j = i + 1; j != this->intervals.size(); ++j) { + distances[i][j] = distancesFromI[j - i - 1]; + distances[j][i] = distancesFromI[j - i - 1]; } - if ( dbg ) - { - std::cerr << "Here is the distance matrix : \n"; - for ( size_t i = 0 ; i != distances.size() ; ++i ) - { - for ( size_t j = 0 ; j != distances.size() ; ++j ) - { - std::cerr << distances[i][j] << " "; - } - std::cerr << std::endl; - } - std::cerr << std::endl << std::endl << "And here are the distances to the diagonal : " << std::endl; - for ( size_t i = 0 ; i != distances_from_diagonal. size() ; ++i ) - { - std::cerr << distances_from_diagonal[i] << " "; - } - std::cerr << std::endl << std::endl; - getchar(); + } + if (dbg) { + std::cerr << "Here is the distance matrix : \n"; + for (size_t i = 0; i != distances.size(); ++i) { + for (size_t j = 0; j != distances.size(); ++j) { + std::cerr << distances[i][j] << " "; + } + std::cerr << std::endl; } - - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - std::vector< double > distancesFromI = distances[i]; - distancesFromI.push_back( distances_from_diagonal[i] ); - - //sort it: - std::sort( distancesFromI.begin() , distancesFromI.end() , std::greater() ); - - if ( k > distancesFromI.size() ) - { - if ( dbg ) - { - std::cerr << "There are not enough neighbors in your set. We set the result to plus infty \n"; - } - result.push_back( std::numeric_limits::max() ); - } - else - { - if ( distances_from_diagonal[i] > distancesFromI[k] ) - { - if ( dbg ) - { - std::cerr << "The k-th n.n. is on a diagonal. Therefore we set up a distance to diagonal \n"; - } - result.push_back( distances_from_diagonal[i] ); - } - else - { - result.push_back( distancesFromI[k] ); - } + std::cerr << std::endl << std::endl << "And here are the distances to the diagonal : " << std::endl; + for (size_t i = 0; i != distances_from_diagonal.size(); ++i) { + std::cerr << distances_from_diagonal[i] << " "; + } + std::cerr << std::endl << std::endl; + getchar(); + } + + for (size_t i = 0; i != this->intervals.size(); ++i) { + std::vector distancesFromI = distances[i]; + distancesFromI.push_back(distances_from_diagonal[i]); + + // sort it: + std::sort(distancesFromI.begin(), distancesFromI.end(), std::greater()); + + if (k > distancesFromI.size()) { + if (dbg) { + std::cerr << "There are not enough neighbors in your set. We set the result to plus infty \n"; + } + result.push_back(std::numeric_limits::max()); + } else { + if (distances_from_diagonal[i] > distancesFromI[k]) { + if (dbg) { + std::cerr << "The k-th n.n. is on a diagonal. Therefore we set up a distance to diagonal \n"; } + result.push_back(distances_from_diagonal[i]); + } else { + result.push_back(distancesFromI[k]); + } } - std::sort( result.begin() , result.end() , std::greater() ); - result.resize( std::min( result.size() , where_to_cut ) ); + } + std::sort(result.begin(), result.end(), std::greater()); + result.resize(std::min(result.size(), where_to_cut)); - return result; + return result; } +double Persistence_intervals::project_to_R(int number_of_function) const { + double result = 0; -double Persistence_intervals::project_to_R( int number_of_function )const -{ - double result = 0; - - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - result += ( this->intervals[i].second - this->intervals[i].first )*( this->intervals[i].second - this->intervals[i].first ); - } - - return result; -} + for (size_t i = 0; i != this->intervals.size(); ++i) { + result += + (this->intervals[i].second - this->intervals[i].first) * (this->intervals[i].second - this->intervals[i].first); + } + return result; +} } // namespace Persistence_representations } // namespace gudhi diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h index 0da58399..f7664e8d 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h @@ -23,42 +23,38 @@ #ifndef PERSISTENCE_INTERVALS_WITH_DISTANCES_H_ #define PERSISTENCE_INTERVALS_WITH_DISTANCES_H_ - #include #include -namespace Gudhi -{ -namespace Persistence_representations -{ - -class Persistence_intervals_with_distances : public Persistence_intervals -{ -public: - using Persistence_intervals::Persistence_intervals; - - /** - *Computations of distance from the current persistnce diagram to the persistence diagram given as a parameter of this function. - *The last but one parameter, power, is here in case we would like to compute p=th Wasserstein distance. At the moment, this method only implement Bottleneck distance, - * which is infinity Wasserstein distance. Therefore any power which is not the default std::numeric_limits< double >::max() will be ignored and an - * exception will be thrown. - * The last parameter, tolerance, it is an additiv error of the approimation, set by default to zero. - **/ - double distance( const Persistence_intervals_with_distances& second , double power = std::numeric_limits< double >::max() , double tolerance = 0) const - { - if ( power >= std::numeric_limits< double >::max() ) - { - return Gudhi::persistence_diagram::bottleneck_distance(this->intervals, second.intervals, tolerance); - } - else - { - std::cerr << "At the moment Gudhi do not support Wasserstein distances. We only support Bottleneck distance." << std::endl; - throw "At the moment Gudhi do not support Wasserstein distances. We only support Bottleneck distance."; - } - } +namespace Gudhi { +namespace Persistence_representations { + +class Persistence_intervals_with_distances : public Persistence_intervals { + public: + using Persistence_intervals::Persistence_intervals; + + /** + *Computations of distance from the current persistnce diagram to the persistence diagram given as a parameter of this + *function. + *The last but one parameter, power, is here in case we would like to compute p=th Wasserstein distance. At the + *moment, this method only implement Bottleneck distance, + * which is infinity Wasserstein distance. Therefore any power which is not the default std::numeric_limits< double + *>::max() will be ignored and an + * exception will be thrown. + * The last parameter, tolerance, it is an additiv error of the approimation, set by default to zero. + **/ + double distance(const Persistence_intervals_with_distances& second, double power = std::numeric_limits::max(), + double tolerance = 0) const { + if (power >= std::numeric_limits::max()) { + return Gudhi::persistence_diagram::bottleneck_distance(this->intervals, second.intervals, tolerance); + } else { + std::cerr << "At the moment Gudhi do not support Wasserstein distances. We only support Bottleneck distance." + << std::endl; + throw "At the moment Gudhi do not support Wasserstein distances. We only support Bottleneck distance."; + } + } }; - } // namespace Persistence_representations } // namespace gudhi diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape.h b/src/Persistence_representations/include/gudhi/Persistence_landscape.h index 642bba84..01d44fec 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape.h @@ -20,11 +20,10 @@ * along with this program. If not, see . */ - #ifndef PERSISTENCE_LANDSCAPE_H_ #define PERSISTENCE_LANDSCAPE_H_ -//standard include +// standard include #include #include #include @@ -33,27 +32,18 @@ #include #include - -//gudhi include +// gudhi include #include #include - - - -namespace Gudhi -{ -namespace Persistence_representations -{ - - +namespace Gudhi { +namespace Persistence_representations { // pre declaration class Persistence_landscape; -template < typename operation > -Persistence_landscape operation_on_pair_of_landscapes( const Persistence_landscape& land1 , const Persistence_landscape& land2 ); - - +template +Persistence_landscape operation_on_pair_of_landscapes(const Persistence_landscape& land1, + const Persistence_landscape& land2); /** * \class Persistence_landscape Persistence_landscape.h gudhi/Persistence_landscape.h @@ -76,1395 +66,1256 @@ Persistence_landscape operation_on_pair_of_landscapes( const Persistence_landsca * value, please rescale them before use this code. * **/ -class Persistence_landscape -{ -public: - /** - * Default constructor. - **/ - Persistence_landscape() - { - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); - } - - /** - * Constructor that takes as an input a vector of birth-death pairs. - **/ - Persistence_landscape( const std::vector< std::pair< double , double > >& p ); - - /** - * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. - **/ - Persistence_landscape(const char* filename , size_t dimension = std::numeric_limits::max() ); - - - - /** - * This procedure loads a landscape from file. It erase all the data that was previously stored in this landscape. - **/ - void load_landscape_from_file( const char* filename ); - - - /** - * The procedure stores a landscape to a file. The file can be later used by a procedure load_landscape_from_file. - **/ - void print_to_file( const char* filename )const; - - - - /** - * This function compute integral of the landscape (defined formally as sum of integrals on R of all landscape functions) - **/ - double compute_integral_of_landscape()const; - - - /** - * This function compute integral of the 'level'-level of a landscape. - **/ - double compute_integral_of_a_level_of_a_landscape( size_t level )const; - - - /** - * This function compute integral of the landscape p-th power of a landscape (defined formally as sum of integrals on R of p-th powers of all landscape functions) - **/ - double compute_integral_of_landscape( double p )const;//this function compute integral of p-th power of landscape. - - - /** - * A function that computes the value of a landscape at a given point. The parameters of the function are: unsigned level and double x. - * The procedure will compute the value of the level-landscape at the point x. - **/ - double compute_value_at_a_given_point( unsigned level , double x )const; - - /** - * Writing landscape into a stream. A i-th level landscape starts with a string "lambda_i". Then the discontinuity points of the landscapes follows. - * Shall those points be joined with lines, we will obtain the i-th landscape function. - **/ - friend std::ostream& operator<<(std::ostream& out, Persistence_landscape& land ); - - template < typename operation > - friend Persistence_landscape operation_on_pair_of_landscapes( const Persistence_landscape& land1 , const Persistence_landscape& land2 ); - - - - - /** - *\private A function that compute sum of two landscapes. - **/ - friend Persistence_landscape add_two_landscapes ( const Persistence_landscape& land1 , const Persistence_landscape& land2 ) - { - return operation_on_pair_of_landscapes< std::plus >(land1,land2); +class Persistence_landscape { + public: + /** + * Default constructor. + **/ + Persistence_landscape() { this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); } + + /** + * Constructor that takes as an input a vector of birth-death pairs. + **/ + Persistence_landscape(const std::vector >& p); + + /** + * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the + *input file is the following: in each line we put birth-death pair. Last line is assumed + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. + **/ + Persistence_landscape(const char* filename, size_t dimension = std::numeric_limits::max()); + + /** + * This procedure loads a landscape from file. It erase all the data that was previously stored in this landscape. + **/ + void load_landscape_from_file(const char* filename); + + /** + * The procedure stores a landscape to a file. The file can be later used by a procedure load_landscape_from_file. + **/ + void print_to_file(const char* filename) const; + + /** + * This function compute integral of the landscape (defined formally as sum of integrals on R of all landscape + *functions) + **/ + double compute_integral_of_landscape() const; + + /** + * This function compute integral of the 'level'-level of a landscape. + **/ + double compute_integral_of_a_level_of_a_landscape(size_t level) const; + + /** + * This function compute integral of the landscape p-th power of a landscape (defined formally as sum of integrals + *on R of p-th powers of all landscape functions) + **/ + double compute_integral_of_landscape(double p) const; // this function compute integral of p-th power of landscape. + + /** + * A function that computes the value of a landscape at a given point. The parameters of the function are: unsigned + *level and double x. + * The procedure will compute the value of the level-landscape at the point x. + **/ + double compute_value_at_a_given_point(unsigned level, double x) const; + + /** + * Writing landscape into a stream. A i-th level landscape starts with a string "lambda_i". Then the discontinuity + *points of the landscapes follows. + * Shall those points be joined with lines, we will obtain the i-th landscape function. + **/ + friend std::ostream& operator<<(std::ostream& out, Persistence_landscape& land); + + template + friend Persistence_landscape operation_on_pair_of_landscapes(const Persistence_landscape& land1, + const Persistence_landscape& land2); + + /** + *\private A function that compute sum of two landscapes. + **/ + friend Persistence_landscape add_two_landscapes(const Persistence_landscape& land1, + const Persistence_landscape& land2) { + return operation_on_pair_of_landscapes >(land1, land2); + } + + /** + *\private A function that compute difference of two landscapes. + **/ + friend Persistence_landscape subtract_two_landscapes(const Persistence_landscape& land1, + const Persistence_landscape& land2) { + return operation_on_pair_of_landscapes >(land1, land2); + } + + /** + * An operator +, that compute sum of two landscapes. + **/ + friend Persistence_landscape operator+(const Persistence_landscape& first, const Persistence_landscape& second) { + return add_two_landscapes(first, second); + } + + /** + * An operator -, that compute difference of two landscapes. + **/ + friend Persistence_landscape operator-(const Persistence_landscape& first, const Persistence_landscape& second) { + return subtract_two_landscapes(first, second); + } + + /** + * An operator * that allows multiplication of a landscape by a real number. + **/ + friend Persistence_landscape operator*(const Persistence_landscape& first, double con) { + return first.multiply_lanscape_by_real_number_not_overwrite(con); + } + + /** + * An operator * that allows multiplication of a landscape by a real number (order of parameters swapped). + **/ + friend Persistence_landscape operator*(double con, const Persistence_landscape& first) { + return first.multiply_lanscape_by_real_number_not_overwrite(con); + } + + /** + * Operator +=. The second parameter is persistence landscape. + **/ + Persistence_landscape operator+=(const Persistence_landscape& rhs) { + *this = *this + rhs; + return *this; + } + + /** + * Operator -=. The second parameter is a persistence landscape. + **/ + Persistence_landscape operator-=(const Persistence_landscape& rhs) { + *this = *this - rhs; + return *this; + } + + /** + * Operator *=. The second parameter is a real number by which the y values of all landscape functions are multiplied. + *The x-values remain unchanged. + **/ + Persistence_landscape operator*=(double x) { + *this = *this * x; + return *this; + } + + /** + * Operator /=. The second parameter is a real number. + **/ + Persistence_landscape operator/=(double x) { + if (x == 0) throw("In operator /=, division by 0. Program terminated."); + *this = *this * (1 / x); + return *this; + } + + /** + * An operator to compare two persistence landscapes. + **/ + bool operator==(const Persistence_landscape& rhs) const; + + /** + * An operator to compare two persistence landscapes. + **/ + bool operator!=(const Persistence_landscape& rhs) const { return !((*this) == rhs); } + + /** + * Computations of maximum (y) value of landscape. + **/ + double compute_maximum() const { + double maxValue = 0; + if (this->land.size()) { + maxValue = -std::numeric_limits::max(); + for (size_t i = 0; i != this->land[0].size(); ++i) { + if (this->land[0][i].second > maxValue) maxValue = this->land[0][i].second; + } } - - /** - *\private A function that compute difference of two landscapes. - **/ - friend Persistence_landscape subtract_two_landscapes ( const Persistence_landscape& land1 , const Persistence_landscape& land2 ) - { - return operation_on_pair_of_landscapes< std::minus >(land1,land2); + return maxValue; + } + + /** + *\private Computations of minimum (y) value of landscape. + **/ + double compute_minimum() const { + double minValue = 0; + if (this->land.size()) { + minValue = std::numeric_limits::max(); + for (size_t i = 0; i != this->land[0].size(); ++i) { + if (this->land[0][i].second < minValue) minValue = this->land[0][i].second; + } } - - /** - * An operator +, that compute sum of two landscapes. - **/ - friend Persistence_landscape operator+( const Persistence_landscape& first , const Persistence_landscape& second ) - { - return add_two_landscapes( first,second ); + return minValue; + } + + /** + *\private Computations of a \f$L^i\f$ norm of landscape, where i is the input parameter. + **/ + double compute_norm_of_landscape(double i) { + Persistence_landscape l; + if (i < std::numeric_limits::max()) { + return compute_distance_of_landscapes(*this, l, i); + } else { + return compute_max_norm_distance_of_landscapes(*this, l); } - - /** - * An operator -, that compute difference of two landscapes. - **/ - friend Persistence_landscape operator-( const Persistence_landscape& first , const Persistence_landscape& second ) - { - return subtract_two_landscapes( first,second ); + } + + /** + * An operator to compute the value of a landscape in the level 'level' at the argument 'x'. + **/ + double operator()(unsigned level, double x) const { return this->compute_value_at_a_given_point(level, x); } + + /** + *\private Computations of \f$L^{\infty}\f$ distance between two landscapes. + **/ + friend double compute_max_norm_distance_of_landscapes(const Persistence_landscape& first, + const Persistence_landscape& second); + + /** + *\private Computations of \f$L^{p}\f$ distance between two landscapes. p is the parameter of the procedure. + **/ + friend double compute_distance_of_landscapes(const Persistence_landscape& first, const Persistence_landscape& second, + double p); + + /** + * Function to compute absolute value of a PL function. The representation of persistence landscapes allow to store + *general PL-function. When computing distance between two landscapes, we compute difference between + * them. In this case, a general PL-function with negative value can appear as a result. Then in order to compute + *distance, we need to take its absolute value. This is the purpose of this procedure. + **/ + Persistence_landscape abs(); + + /** + * Computes the number of landscape functions. + **/ + size_t size() const { return this->land.size(); } + + /** + * Compute maximal value of lambda-level landscape. + **/ + double find_max(unsigned lambda) const; + + /** + *\private Function to compute inner (scalar) product of two landscapes. + **/ + friend double compute_inner_product(const Persistence_landscape& l1, const Persistence_landscape& l2); + + // Implementations of functions for various concepts. + + /** + * The number of projections to R is defined to the number of nonzero landscape functions. I-th projection is an + *integral of i-th landscape function over whole R. + * This function is required by the Real_valued_topological_data concept. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when + *using it, keep in mind that it + * will be most likely changed in the next versions. + **/ + double project_to_R(int number_of_function) const { + return this->compute_integral_of_a_level_of_a_landscape((size_t)number_of_function); + } + + /** + * The function gives the number of possible projections to R. This function is required by the + *Real_valued_topological_data concept. + **/ + size_t number_of_projections_to_R() const { return this->number_of_functions_for_projections_to_reals; } + + /** + * This function produce a vector of doubles based on a landscape. It is required in a concept + * Vectorized_topological_data + */ + std::vector vectorize(int number_of_function) const { + // TODO, think of something smarter over here + std::vector v; + if ((size_t)number_of_function > this->land.size()) { + return v; } - - /** - * An operator * that allows multiplication of a landscape by a real number. - **/ - friend Persistence_landscape operator*( const Persistence_landscape& first , double con ) - { - return first.multiply_lanscape_by_real_number_not_overwrite(con); + v.reserve(this->land[number_of_function].size()); + for (size_t i = 0; i != this->land[number_of_function].size(); ++i) { + v.push_back(this->land[number_of_function][i].second); } + return v; + } + /** + * This function return the number of functions that allows vectorization of persistence landscape. It is required in + *a concept Vectorized_topological_data. + **/ + size_t number_of_vectorize_functions() const { return this->number_of_functions_for_vectorization; } + + /** + * A function to compute averaged persistence landscape, based on vector of persistence landscapes. + * This function is required by Topological_data_with_averages concept. + **/ + void compute_average(const std::vector& to_average) { + bool dbg = false; - /** - * An operator * that allows multiplication of a landscape by a real number (order of parameters swapped). - **/ - friend Persistence_landscape operator*( double con , const Persistence_landscape& first ) - { - return first.multiply_lanscape_by_real_number_not_overwrite(con); + if (dbg) { + std::cerr << "to_average.size() : " << to_average.size() << std::endl; } - /** - * Operator +=. The second parameter is persistence landscape. - **/ - Persistence_landscape operator += ( const Persistence_landscape& rhs ) - { - *this = *this + rhs; - return *this; + std::vector nextLevelMerge(to_average.size()); + for (size_t i = 0; i != to_average.size(); ++i) { + nextLevelMerge[i] = to_average[i]; } - - /** - * Operator -=. The second parameter is a persistence landscape. - **/ - Persistence_landscape operator -= ( const Persistence_landscape& rhs ) - { - *this = *this - rhs; - return *this; + bool is_this_first_level = true; // in the loop, we will create dynamically a number of intermediate complexes. We + // have to clean that up, but we cannot erase the initial landscapes we have + // to average. In this case, we simply check if the nextLevelMerge are the input landscapes or the ones created in + // that loop by using this extra variable. + + while (nextLevelMerge.size() != 1) { + if (dbg) { + std::cerr << "nextLevelMerge.size() : " << nextLevelMerge.size() << std::endl; + } + std::vector nextNextLevelMerge; + nextNextLevelMerge.reserve(to_average.size()); + for (size_t i = 0; i < nextLevelMerge.size(); i = i + 2) { + if (dbg) { + std::cerr << "i : " << i << std::endl; + } + Persistence_landscape* l = new Persistence_landscape; + if (i + 1 != nextLevelMerge.size()) { + (*l) = (*nextLevelMerge[i]) + (*nextLevelMerge[i + 1]); + } else { + (*l) = *nextLevelMerge[i]; + } + nextNextLevelMerge.push_back(l); + } + if (dbg) { + std::cerr << "After this iteration \n"; + getchar(); + } + + if (!is_this_first_level) { + // deallocate the memory if the vector nextLevelMerge do not consist of the initial landscapes + for (size_t i = 0; i != nextLevelMerge.size(); ++i) { + delete nextLevelMerge[i]; + } + } + is_this_first_level = false; + nextLevelMerge.swap(nextNextLevelMerge); } - - - /** - * Operator *=. The second parameter is a real number by which the y values of all landscape functions are multiplied. The x-values remain unchanged. - **/ - Persistence_landscape operator *= ( double x ) - { - *this = *this*x; - return *this; + (*this) = (*nextLevelMerge[0]); + (*this) *= 1 / ((double)to_average.size()); + } + + /** + * A function to compute distance between persistence landscape. + * The parameter of this function is a Persistence_landscape. + * This function is required in Topological_data_with_distances concept. + * For max norm distance, set power to std::numeric_limits::max() + **/ + double distance(const Persistence_landscape& second, double power = 1) const { + if (power < std::numeric_limits::max()) { + return compute_distance_of_landscapes(*this, second, power); + } else { + return compute_max_norm_distance_of_landscapes(*this, second); } - - /** - * Operator /=. The second parameter is a real number. - **/ - Persistence_landscape operator /= ( double x ) - { - if ( x == 0 )throw( "In operator /=, division by 0. Program terminated." ); - *this = *this * (1/x); - return *this; + } + + /** + * A function to compute scalar product of persistence landscapes. + * The parameter of this function is a Persistence_landscape. + * This function is required in Topological_data_with_scalar_product concept. + **/ + double compute_scalar_product(const Persistence_landscape& second) const { + return compute_inner_product((*this), second); + } + // end of implementation of functions needed for concepts. + + /** + * This procedure returns y-range of a given level persistence landscape. If a default value is used, the y-range + * of 0th level landscape is given (and this range contains the ranges of all other landscapes). + **/ + std::pair get_y_range(size_t level = 0) const { + std::pair result; + if (level < this->land.size()) { + double maxx = this->compute_maximum(); + double minn = this->compute_minimum(); + result = std::make_pair(minn, maxx); + } else { + result = std::make_pair(0, 0); } + return result; + } + + // a function used to create a gnuplot script for visualization of landscapes + void plot(const char* filename, double xRangeBegin = std::numeric_limits::max(), + double xRangeEnd = std::numeric_limits::max(), + double yRangeBegin = std::numeric_limits::max(), + double yRangeEnd = std::numeric_limits::max(), int from = std::numeric_limits::max(), + int to = std::numeric_limits::max()); + + protected: + std::vector > > land; + size_t number_of_functions_for_vectorization; + size_t number_of_functions_for_projections_to_reals; + + void construct_persistence_landscape_from_barcode(const std::vector >& p); + Persistence_landscape multiply_lanscape_by_real_number_not_overwrite(double x) const; + void multiply_lanscape_by_real_number_overwrite(double x); + friend double compute_maximal_distance_non_symmetric(const Persistence_landscape& pl1, + const Persistence_landscape& pl2); + + void set_up_numbers_of_functions_for_vectorization_and_projections_to_reals() { + // warning, this function can be only called after filling in the intervals vector. + this->number_of_functions_for_vectorization = this->land.size(); + this->number_of_functions_for_projections_to_reals = this->land.size(); + } +}; - /** - * An operator to compare two persistence landscapes. - **/ - bool operator == ( const Persistence_landscape& rhs )const; - - - /** - * An operator to compare two persistence landscapes. - **/ - bool operator != ( const Persistence_landscape& rhs )const - { - return !((*this) == rhs); - } - +Persistence_landscape::Persistence_landscape(const char* filename, size_t dimension) { + std::vector > barcode; + if (dimension < std::numeric_limits::max()) { + barcode = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); + } else { + barcode = read_persistence_intervals_in_one_dimension_from_file(filename); + } + this->construct_persistence_landscape_from_barcode(barcode); + this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); +} - /** - * Computations of maximum (y) value of landscape. - **/ - double compute_maximum()const - { - double maxValue = 0; - if ( this->land.size() ) - { - maxValue = -std::numeric_limits::max(); - for ( size_t i = 0 ; i != this->land[0].size() ; ++i ) - { - if ( this->land[0][i].second > maxValue )maxValue = this->land[0][i].second; - } - } - return maxValue; - } - - - /** - *\private Computations of minimum (y) value of landscape. - **/ - double compute_minimum()const - { - double minValue = 0; - if ( this->land.size() ) - { - minValue = std::numeric_limits::max(); - for ( size_t i = 0 ; i != this->land[0].size() ; ++i ) - { - if ( this->land[0][i].second < minValue )minValue = this->land[0][i].second; - } - } - return minValue; +bool operatorEqualDbg = false; +bool Persistence_landscape::operator==(const Persistence_landscape& rhs) const { + if (this->land.size() != rhs.land.size()) { + if (operatorEqualDbg) std::cerr << "1\n"; + return false; + } + for (size_t level = 0; level != this->land.size(); ++level) { + if (this->land[level].size() != rhs.land[level].size()) { + if (operatorEqualDbg) std::cerr << "this->land[level].size() : " << this->land[level].size() << "\n"; + if (operatorEqualDbg) std::cerr << "rhs.land[level].size() : " << rhs.land[level].size() << "\n"; + if (operatorEqualDbg) std::cerr << "2\n"; + return false; } - - /** - *\private Computations of a \f$L^i\f$ norm of landscape, where i is the input parameter. - **/ - double compute_norm_of_landscape( double i ) - { - Persistence_landscape l; - if ( i < std::numeric_limits< double >::max() ) - { - return compute_distance_of_landscapes(*this,l,i); - } - else - { - return compute_max_norm_distance_of_landscapes(*this,l); - } + for (size_t i = 0; i != this->land[level].size(); ++i) { + if (!(almost_equal(this->land[level][i].first, rhs.land[level][i].first) && + almost_equal(this->land[level][i].second, rhs.land[level][i].second))) { + if (operatorEqualDbg) + std::cerr << "this->land[level][i] : " << this->land[level][i].first << " " << this->land[level][i].second + << "\n"; + if (operatorEqualDbg) + std::cerr << "rhs.land[level][i] : " << rhs.land[level][i].first << " " << rhs.land[level][i].second << "\n"; + if (operatorEqualDbg) std::cerr << "3\n"; + return false; + } } + } + return true; +} - /** - * An operator to compute the value of a landscape in the level 'level' at the argument 'x'. - **/ - double operator()(unsigned level,double x)const{return this->compute_value_at_a_given_point(level,x);} - - /** - *\private Computations of \f$L^{\infty}\f$ distance between two landscapes. - **/ - friend double compute_max_norm_distance_of_landscapes( const Persistence_landscape& first, const Persistence_landscape& second ); - - - /** - *\private Computations of \f$L^{p}\f$ distance between two landscapes. p is the parameter of the procedure. - **/ - friend double compute_distance_of_landscapes( const Persistence_landscape& first, const Persistence_landscape& second , double p ); - - - - /** - * Function to compute absolute value of a PL function. The representation of persistence landscapes allow to store general PL-function. When computing distance between two landscapes, we compute difference between - * them. In this case, a general PL-function with negative value can appear as a result. Then in order to compute distance, we need to take its absolute value. This is the purpose of this procedure. - **/ - Persistence_landscape abs(); - - /** - * Computes the number of landscape functions. - **/ - size_t size()const{return this->land.size(); } +Persistence_landscape::Persistence_landscape(const std::vector >& p) { + this->construct_persistence_landscape_from_barcode(p); + this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); +} - /** - * Compute maximal value of lambda-level landscape. - **/ - double find_max( unsigned lambda )const; +void Persistence_landscape::construct_persistence_landscape_from_barcode( + const std::vector >& p) { + bool dbg = false; + if (dbg) { + std::cerr << "Persistence_landscape::Persistence_landscape( const std::vector< std::pair< double , double > >& p )" + << std::endl; + } + + // this is a general algorithm to construct persistence landscapes. + std::vector > bars; + bars.insert(bars.begin(), p.begin(), p.end()); + std::sort(bars.begin(), bars.end(), compare_points_sorting); + + if (dbg) { + std::cerr << "Bars : \n"; + for (size_t i = 0; i != bars.size(); ++i) { + std::cerr << bars[i].first << " " << bars[i].second << "\n"; + } + getchar(); + } + + std::vector > characteristicPoints(p.size()); + for (size_t i = 0; i != bars.size(); ++i) { + characteristicPoints[i] = + std::make_pair((bars[i].first + bars[i].second) / 2.0, (bars[i].second - bars[i].first) / 2.0); + } + std::vector > > Persistence_landscape; + while (!characteristicPoints.empty()) { + if (dbg) { + for (size_t i = 0; i != characteristicPoints.size(); ++i) { + std::cout << "(" << characteristicPoints[i].first << " " << characteristicPoints[i].second << ")\n"; + } + std::cin.ignore(); + } - /** - *\private Function to compute inner (scalar) product of two landscapes. - **/ - friend double compute_inner_product( const Persistence_landscape& l1 , const Persistence_landscape& l2 ); + std::vector > lambda_n; + lambda_n.push_back(std::make_pair(-std::numeric_limits::max(), 0)); + lambda_n.push_back(std::make_pair(minus_length(characteristicPoints[0]), 0)); + lambda_n.push_back(characteristicPoints[0]); - //Implementations of functions for various concepts. + if (dbg) { + std::cerr << "1 Adding to lambda_n : (" << -std::numeric_limits::max() << " " << 0 << ") , (" + << minus_length(characteristicPoints[0]) << " " << 0 << ") , (" << characteristicPoints[0].first << " " + << characteristicPoints[0].second << ") \n"; + } - /** - * The number of projections to R is defined to the number of nonzero landscape functions. I-th projection is an integral of i-th landscape function over whole R. - * This function is required by the Real_valued_topological_data concept. - * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it - * will be most likely changed in the next versions. - **/ - double project_to_R( int number_of_function )const - { - return this->compute_integral_of_a_level_of_a_landscape( (size_t)number_of_function ); - } - - /** - * The function gives the number of possible projections to R. This function is required by the Real_valued_topological_data concept. - **/ - size_t number_of_projections_to_R()const - { - return this->number_of_functions_for_projections_to_reals; - } - - /** - * This function produce a vector of doubles based on a landscape. It is required in a concept Vectorized_topological_data - */ - std::vector vectorize( int number_of_function )const - { - //TODO, think of something smarter over here - std::vector v; - if ( (size_t)number_of_function > this->land.size() ) - { - return v; - } - v.reserve( this->land[number_of_function].size() ); - for ( size_t i = 0 ; i != this->land[number_of_function].size() ; ++i ) - { - v.push_back( this->land[number_of_function][i].second ); - } - return v; - } - /** - * This function return the number of functions that allows vectorization of persistence landscape. It is required in a concept Vectorized_topological_data. - **/ - size_t number_of_vectorize_functions()const - { - return this->number_of_functions_for_vectorization; - } - - /** - * A function to compute averaged persistence landscape, based on vector of persistence landscapes. - * This function is required by Topological_data_with_averages concept. - **/ - void compute_average( const std::vector< Persistence_landscape* >& to_average ) - { - bool dbg = false; - - if ( dbg ){std::cerr << "to_average.size() : " << to_average.size() << std::endl;} - - std::vector< Persistence_landscape* > nextLevelMerge( to_average.size() ); - for ( size_t i = 0 ; i != to_average.size() ; ++i ) - { - nextLevelMerge[i] = to_average[i]; - } - bool is_this_first_level = true;//in the loop, we will create dynamically a number of intermediate complexes. We have to clean that up, but we cannot erase the initial landscapes we have - //to average. In this case, we simply check if the nextLevelMerge are the input landscapes or the ones created in that loop by using this extra variable. - - while ( nextLevelMerge.size() != 1 ) - { - if ( dbg ){std::cerr << "nextLevelMerge.size() : " << nextLevelMerge.size() << std::endl;} - std::vector< Persistence_landscape* > nextNextLevelMerge; - nextNextLevelMerge.reserve( to_average.size() ); - for ( size_t i = 0 ; i < nextLevelMerge.size() ; i=i+2 ) - { - if ( dbg ){std::cerr << "i : " << i << std::endl;} - Persistence_landscape* l = new Persistence_landscape; - if ( i+1 != nextLevelMerge.size() ) - { - (*l) = (*nextLevelMerge[i])+(*nextLevelMerge[i+1]); - } - else - { - (*l) = *nextLevelMerge[i]; - } - nextNextLevelMerge.push_back( l ); + size_t i = 1; + std::vector > newCharacteristicPoints; + while (i < characteristicPoints.size()) { + size_t p = 1; + if ((minus_length(characteristicPoints[i]) >= minus_length(lambda_n[lambda_n.size() - 1])) && + (birth_plus_deaths(characteristicPoints[i]) > birth_plus_deaths(lambda_n[lambda_n.size() - 1]))) { + if (minus_length(characteristicPoints[i]) < birth_plus_deaths(lambda_n[lambda_n.size() - 1])) { + std::pair point = std::make_pair( + (minus_length(characteristicPoints[i]) + birth_plus_deaths(lambda_n[lambda_n.size() - 1])) / 2, + (birth_plus_deaths(lambda_n[lambda_n.size() - 1]) - minus_length(characteristicPoints[i])) / 2); + lambda_n.push_back(point); + if (dbg) { + std::cerr << "2 Adding to lambda_n : (" << point.first << " " << point.second << ")\n"; + } + + if (dbg) { + std::cerr << "characteristicPoints[i+p] : " << characteristicPoints[i + p].first << " " + << characteristicPoints[i + p].second << "\n"; + std::cerr << "point : " << point.first << " " << point.second << "\n"; + getchar(); + } + + while ((i + p < characteristicPoints.size()) && + (almost_equal(minus_length(point), minus_length(characteristicPoints[i + p]))) && + (birth_plus_deaths(point) <= birth_plus_deaths(characteristicPoints[i + p]))) { + newCharacteristicPoints.push_back(characteristicPoints[i + p]); + if (dbg) { + std::cerr << "3.5 Adding to newCharacteristicPoints : (" << characteristicPoints[i + p].first << " " + << characteristicPoints[i + p].second << ")\n"; + getchar(); + } + ++p; + } + + newCharacteristicPoints.push_back(point); + if (dbg) { + std::cerr << "4 Adding to newCharacteristicPoints : (" << point.first << " " << point.second << ")\n"; + } + + while ((i + p < characteristicPoints.size()) && + (minus_length(point) <= minus_length(characteristicPoints[i + p])) && + (birth_plus_deaths(point) >= birth_plus_deaths(characteristicPoints[i + p]))) { + newCharacteristicPoints.push_back(characteristicPoints[i + p]); + if (dbg) { + std::cerr << "characteristicPoints[i+p] : " << characteristicPoints[i + p].first << " " + << characteristicPoints[i + p].second << "\n"; + std::cerr << "point : " << point.first << " " << point.second << "\n"; + std::cerr << "characteristicPoints[i+p] birth and death : " << minus_length(characteristicPoints[i + p]) + << " , " << birth_plus_deaths(characteristicPoints[i + p]) << "\n"; + std::cerr << "point birth and death : " << minus_length(point) << " , " << birth_plus_deaths(point) + << "\n"; + + std::cerr << "3 Adding to newCharacteristicPoints : (" << characteristicPoints[i + p].first << " " + << characteristicPoints[i + p].second << ")\n"; + getchar(); } - if ( dbg ){std::cerr << "After this iteration \n";getchar();} - - if ( !is_this_first_level ) - { - //deallocate the memory if the vector nextLevelMerge do not consist of the initial landscapes - for ( size_t i = 0 ; i != nextLevelMerge.size() ; ++i ) - { - delete nextLevelMerge[i]; - } - } - is_this_first_level = false; - nextLevelMerge.swap(nextNextLevelMerge); + ++p; + } + + } else { + lambda_n.push_back(std::make_pair(birth_plus_deaths(lambda_n[lambda_n.size() - 1]), 0)); + lambda_n.push_back(std::make_pair(minus_length(characteristicPoints[i]), 0)); + if (dbg) { + std::cerr << "5 Adding to lambda_n : (" << birth_plus_deaths(lambda_n[lambda_n.size() - 1]) << " " << 0 + << ")\n"; + std::cerr << "5 Adding to lambda_n : (" << minus_length(characteristicPoints[i]) << " " << 0 << ")\n"; + } } - (*this) = (*nextLevelMerge[0]); - (*this) *= 1/( (double)to_average.size() ); - } - - - /** - * A function to compute distance between persistence landscape. - * The parameter of this function is a Persistence_landscape. - * This function is required in Topological_data_with_distances concept. - * For max norm distance, set power to std::numeric_limits::max() - **/ - double distance( const Persistence_landscape& second , double power = 1 )const - { - if ( power < std::numeric_limits::max() ) - { - return compute_distance_of_landscapes( *this , second , power ); - } - else - { - return compute_max_norm_distance_of_landscapes( *this , second ); - } - } - - - /** - * A function to compute scalar product of persistence landscapes. - * The parameter of this function is a Persistence_landscape. - * This function is required in Topological_data_with_scalar_product concept. - **/ - double compute_scalar_product( const Persistence_landscape& second )const - { - return compute_inner_product( (*this) , second ); - } - //end of implementation of functions needed for concepts. - - /** - * This procedure returns y-range of a given level persistence landscape. If a default value is used, the y-range - * of 0th level landscape is given (and this range contains the ranges of all other landscapes). - **/ - std::pair< double , double > get_y_range( size_t level = 0 )const - { - std::pair< double , double > result; - if ( level < this->land.size() ) - { - double maxx = this->compute_maximum(); - double minn = this->compute_minimum(); - result = std::make_pair( minn , maxx ); - } - else - { - result = std::make_pair( 0,0 ); - } - return result; - } - - - - //a function used to create a gnuplot script for visualization of landscapes - void plot( const char* filename, double xRangeBegin = std::numeric_limits::max() , double xRangeEnd = std::numeric_limits::max() , - double yRangeBegin = std::numeric_limits::max() , double yRangeEnd = std::numeric_limits::max(), - int from = std::numeric_limits::max(), int to = std::numeric_limits::max() ); - - -protected: - std::vector< std::vector< std::pair > > land; - size_t number_of_functions_for_vectorization; - size_t number_of_functions_for_projections_to_reals; - - void construct_persistence_landscape_from_barcode( const std::vector< std::pair< double , double > > & p ); - Persistence_landscape multiply_lanscape_by_real_number_not_overwrite( double x )const; - void multiply_lanscape_by_real_number_overwrite( double x ); - friend double compute_maximal_distance_non_symmetric( const Persistence_landscape& pl1, const Persistence_landscape& pl2 ); - - void set_up_numbers_of_functions_for_vectorization_and_projections_to_reals() - { - //warning, this function can be only called after filling in the intervals vector. - this->number_of_functions_for_vectorization = this->land.size(); - this->number_of_functions_for_projections_to_reals = this->land.size(); - } -}; - - - - - - - -Persistence_landscape::Persistence_landscape(const char* filename , size_t dimension) -{ - std::vector< std::pair< double , double > > barcode; - if ( dimension < std::numeric_limits::max() ) - { - barcode = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); - } - else - { - barcode = read_persistence_intervals_in_one_dimension_from_file( filename ); - } - this->construct_persistence_landscape_from_barcode( barcode ); - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); -} - - -bool operatorEqualDbg = false; -bool Persistence_landscape::operator == ( const Persistence_landscape& rhs )const -{ - if ( this->land.size() != rhs.land.size() ) - { - if (operatorEqualDbg)std::cerr << "1\n"; - return false; - } - for ( size_t level = 0 ; level != this->land.size() ; ++level ) - { - if ( this->land[level].size() != rhs.land[level].size() ) - { - if (operatorEqualDbg)std::cerr << "this->land[level].size() : " << this->land[level].size() << "\n"; - if (operatorEqualDbg)std::cerr << "rhs.land[level].size() : " << rhs.land[level].size() << "\n"; - if (operatorEqualDbg)std::cerr << "2\n"; - return false; + lambda_n.push_back(characteristicPoints[i]); + if (dbg) { + std::cerr << "6 Adding to lambda_n : (" << characteristicPoints[i].first << " " + << characteristicPoints[i].second << ")\n"; } - for ( size_t i = 0 ; i != this->land[level].size() ; ++i ) - { - if ( !( almost_equal(this->land[level][i].first , rhs.land[level][i].first) && almost_equal(this->land[level][i].second , rhs.land[level][i].second) ) ) - { - if (operatorEqualDbg)std::cerr << "this->land[level][i] : " << this->land[level][i].first << " " << this->land[level][i].second << "\n"; - if (operatorEqualDbg)std::cerr << "rhs.land[level][i] : " << rhs.land[level][i].first << " " << rhs.land[level][i].second << "\n"; - if (operatorEqualDbg)std::cerr << "3\n"; - return false; - } + } else { + newCharacteristicPoints.push_back(characteristicPoints[i]); + if (dbg) { + std::cerr << "7 Adding to newCharacteristicPoints : (" << characteristicPoints[i].first << " " + << characteristicPoints[i].second << ")\n"; } + } + i = i + p; } - return true; -} - - + lambda_n.push_back(std::make_pair(birth_plus_deaths(lambda_n[lambda_n.size() - 1]), 0)); + lambda_n.push_back(std::make_pair(std::numeric_limits::max(), 0)); + characteristicPoints = newCharacteristicPoints; -Persistence_landscape::Persistence_landscape( const std::vector< std::pair< double , double > > & p ) -{ - this->construct_persistence_landscape_from_barcode( p ); - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); + lambda_n.erase(std::unique(lambda_n.begin(), lambda_n.end()), lambda_n.end()); + this->land.push_back(lambda_n); + } } - -void Persistence_landscape::construct_persistence_landscape_from_barcode( const std::vector< std::pair< double , double > > & p ) -{ - bool dbg = false; - if ( dbg ){std::cerr << "Persistence_landscape::Persistence_landscape( const std::vector< std::pair< double , double > >& p )" << std::endl;} - - //this is a general algorithm to construct persistence landscapes. - std::vector< std::pair > bars; - bars.insert( bars.begin() , p.begin() , p.end() ); - std::sort( bars.begin() , bars.end() , compare_points_sorting ); - - if (dbg) - { - std::cerr << "Bars : \n"; - for ( size_t i = 0 ; i != bars.size() ; ++i ) - { - std::cerr << bars[i].first << " " << bars[i].second << "\n"; - } - getchar(); - } - - std::vector< std::pair > characteristicPoints(p.size()); - for ( size_t i = 0 ; i != bars.size() ; ++i ) - { - characteristicPoints[i] = std::make_pair((bars[i].first+bars[i].second)/2.0 , (bars[i].second - bars[i].first)/2.0); - } - std::vector< std::vector< std::pair > > Persistence_landscape; - while ( !characteristicPoints.empty() ) - { - if(dbg) - { - for ( size_t i = 0 ; i != characteristicPoints.size() ; ++i ) - { - std::cout << "(" << characteristicPoints[i].first << " " << characteristicPoints[i].second << ")\n"; - } - std::cin.ignore(); - } - - std::vector< std::pair > lambda_n; - lambda_n.push_back( std::make_pair( -std::numeric_limits::max() , 0 ) ); - lambda_n.push_back( std::make_pair(minus_length(characteristicPoints[0]),0) ); - lambda_n.push_back( characteristicPoints[0] ); - - if (dbg) - { - std::cerr << "1 Adding to lambda_n : (" << -std::numeric_limits::max() << " " << 0 << ") , (" << minus_length(characteristicPoints[0]) << " " << 0 << ") , (" << characteristicPoints[0].first << " " << characteristicPoints[0].second << ") \n"; - } - - size_t i = 1; - std::vector< std::pair > newCharacteristicPoints; - while ( i < characteristicPoints.size() ) - { - size_t p = 1; - if ( (minus_length(characteristicPoints[i]) >= minus_length(lambda_n[lambda_n.size()-1])) && (birth_plus_deaths(characteristicPoints[i]) > birth_plus_deaths(lambda_n[lambda_n.size()-1])) ) - { - if ( minus_length(characteristicPoints[i]) < birth_plus_deaths(lambda_n[lambda_n.size()-1]) ) - { - std::pair point = std::make_pair( (minus_length(characteristicPoints[i])+birth_plus_deaths(lambda_n[lambda_n.size()-1]))/2 , (birth_plus_deaths(lambda_n[lambda_n.size()-1])-minus_length(characteristicPoints[i]))/2 ); - lambda_n.push_back( point ); - if (dbg) - { - std::cerr << "2 Adding to lambda_n : (" << point.first << " " << point.second << ")\n"; - } - - - if ( dbg ) - { - std::cerr << "characteristicPoints[i+p] : " << characteristicPoints[i+p].first << " " << characteristicPoints[i+p].second << "\n"; - std::cerr << "point : " << point.first << " " << point.second << "\n"; - getchar(); - } - - while ( (i+p < characteristicPoints.size() ) && ( almost_equal(minus_length(point),minus_length(characteristicPoints[i+p])) ) && ( birth_plus_deaths(point) <= birth_plus_deaths(characteristicPoints[i+p]) ) ) - { - newCharacteristicPoints.push_back( characteristicPoints[i+p] ); - if (dbg) - { - std::cerr << "3.5 Adding to newCharacteristicPoints : (" << characteristicPoints[i+p].first << " " << characteristicPoints[i+p].second << ")\n"; - getchar(); - } - ++p; - } - - - newCharacteristicPoints.push_back( point ); - if (dbg) - { - std::cerr << "4 Adding to newCharacteristicPoints : (" << point.first << " " << point.second << ")\n"; - } - - - while ( (i+p < characteristicPoints.size() ) && ( minus_length(point) <= minus_length(characteristicPoints[i+p]) ) && (birth_plus_deaths(point)>=birth_plus_deaths(characteristicPoints[i+p])) ) - { - newCharacteristicPoints.push_back( characteristicPoints[i+p] ); - if (dbg) - { - std::cerr << "characteristicPoints[i+p] : " << characteristicPoints[i+p].first << " " << characteristicPoints[i+p].second << "\n"; - std::cerr << "point : " << point.first << " " << point.second << "\n"; - std::cerr << "characteristicPoints[i+p] birth and death : " << minus_length(characteristicPoints[i+p]) << " , " << birth_plus_deaths(characteristicPoints[i+p]) << "\n"; - std::cerr << "point birth and death : " << minus_length(point) << " , " << birth_plus_deaths(point) << "\n"; - - std::cerr << "3 Adding to newCharacteristicPoints : (" << characteristicPoints[i+p].first << " " << characteristicPoints[i+p].second << ")\n"; - getchar(); - } - ++p; - } - - } - else - { - lambda_n.push_back( std::make_pair( birth_plus_deaths(lambda_n[lambda_n.size()-1]) , 0 ) ); - lambda_n.push_back( std::make_pair( minus_length(characteristicPoints[i]) , 0 ) ); - if (dbg) - { - std::cerr << "5 Adding to lambda_n : (" << birth_plus_deaths(lambda_n[lambda_n.size()-1]) << " " << 0 << ")\n"; - std::cerr << "5 Adding to lambda_n : (" << minus_length(characteristicPoints[i]) << " " << 0 << ")\n"; - } - } - lambda_n.push_back( characteristicPoints[i] ); - if (dbg) - { - std::cerr << "6 Adding to lambda_n : (" << characteristicPoints[i].first << " " << characteristicPoints[i].second << ")\n"; - } - } - else - { - newCharacteristicPoints.push_back( characteristicPoints[i] ); - if (dbg) - { - std::cerr << "7 Adding to newCharacteristicPoints : (" << characteristicPoints[i].first << " " << characteristicPoints[i].second << ")\n"; - } - } - i = i+p; - } - lambda_n.push_back( std::make_pair(birth_plus_deaths(lambda_n[lambda_n.size()-1]),0) ); - lambda_n.push_back( std::make_pair( std::numeric_limits::max() , 0 ) ); - - characteristicPoints = newCharacteristicPoints; - - lambda_n.erase(std::unique(lambda_n.begin(), lambda_n.end()), lambda_n.end()); - this->land.push_back( lambda_n ); - } +// this function find maximum of lambda_n +double Persistence_landscape::find_max(unsigned lambda) const { + if (this->land.size() < lambda) return 0; + double maximum = -std::numeric_limits::max(); + for (size_t i = 0; i != this->land[lambda].size(); ++i) { + if (this->land[lambda][i].second > maximum) maximum = this->land[lambda][i].second; + } + return maximum; } - - -//this function find maximum of lambda_n -double Persistence_landscape::find_max( unsigned lambda )const -{ - if ( this->land.size() < lambda )return 0; - double maximum = -std::numeric_limits::max(); - for ( size_t i = 0 ; i != this->land[lambda].size() ; ++i ) - { - if ( this->land[lambda][i].second > maximum )maximum = this->land[lambda][i].second; +double Persistence_landscape::compute_integral_of_landscape() const { + double result = 0; + for (size_t i = 0; i != this->land.size(); ++i) { + for (size_t nr = 2; nr != this->land[i].size() - 1; ++nr) { + // it suffices to compute every planar integral and then sum them up for each lambda_n + result += 0.5 * (this->land[i][nr].first - this->land[i][nr - 1].first) * + (this->land[i][nr].second + this->land[i][nr - 1].second); } - return maximum; + } + return result; } - -double Persistence_landscape::compute_integral_of_landscape()const -{ - double result = 0; - for ( size_t i = 0 ; i != this->land.size() ; ++i ) - { - for ( size_t nr = 2 ; nr != this->land[i].size()-1 ; ++nr ) - { - //it suffices to compute every planar integral and then sum them up for each lambda_n - result += 0.5*( this->land[i][nr].first - this->land[i][nr-1].first )*(this->land[i][nr].second + this->land[i][nr-1].second); - } - } +double Persistence_landscape::compute_integral_of_a_level_of_a_landscape(size_t level) const { + double result = 0; + if (level >= this->land.size()) { + // this landscape function is constantly equal 0, so is the integral. return result; -} + } + // also negative landscapes are assumed to be zero. + if (level < 0) return 0; -double Persistence_landscape::compute_integral_of_a_level_of_a_landscape( size_t level )const -{ - double result = 0; - if ( level >= this->land.size() ) - { - //this landscape function is constantly equal 0, so is the integral. - return result; - } - //also negative landscapes are assumed to be zero. - if ( level < 0 )return 0; - - for ( size_t nr = 2 ; nr != this->land[ level ].size()-1 ; ++nr ) - { - //it suffices to compute every planar integral and then sum them up for each lambda_n - result += 0.5*( this->land[ level ][nr].first - this->land[ level ][nr-1].first )*(this->land[ level ][nr].second + this->land[ level ][nr-1].second); - } + for (size_t nr = 2; nr != this->land[level].size() - 1; ++nr) { + // it suffices to compute every planar integral and then sum them up for each lambda_n + result += 0.5 * (this->land[level][nr].first - this->land[level][nr - 1].first) * + (this->land[level][nr].second + this->land[level][nr - 1].second); + } - return result; + return result; } - -double Persistence_landscape::compute_integral_of_landscape( double p )const -{ - bool dbg = false; - double result = 0; - for ( size_t i = 0 ; i != this->land.size() ; ++i ) - { - for ( size_t nr = 2 ; nr != this->land[i].size()-1 ; ++nr ) - { - if (dbg)std::cout << "nr : " << nr << "\n"; - //In this interval, the landscape has a form f(x) = ax+b. We want to compute integral of (ax+b)^p = 1/a * (ax+b)^{p+1}/(p+1) - std::pair coef = compute_parameters_of_a_line( this->land[i][nr] , this->land[i][nr-1] ); - double a = coef.first; - double b = coef.second; - - if (dbg)std::cout << "(" << this->land[i][nr].first << "," << this->land[i][nr].second << ") , " << this->land[i][nr-1].first << "," << this->land[i][nr].second << ")" << std::endl; - if ( this->land[i][nr].first == this->land[i][nr-1].first )continue; - if ( a != 0 ) - { - result += 1/(a*(p+1)) * ( pow((a*this->land[i][nr].first+b),p+1) - pow((a*this->land[i][nr-1].first+b),p+1)); - } - else - { - result += ( this->land[i][nr].first - this->land[i][nr-1].first )*( pow(this->land[i][nr].second,p) ); - } - if ( dbg ) - { - std::cout << "a : " <land.size(); ++i) { + for (size_t nr = 2; nr != this->land[i].size() - 1; ++nr) { + if (dbg) std::cout << "nr : " << nr << "\n"; + // In this interval, the landscape has a form f(x) = ax+b. We want to compute integral of (ax+b)^p = 1/a * + // (ax+b)^{p+1}/(p+1) + std::pair coef = compute_parameters_of_a_line(this->land[i][nr], this->land[i][nr - 1]); + double a = coef.first; + double b = coef.second; + + if (dbg) + std::cout << "(" << this->land[i][nr].first << "," << this->land[i][nr].second << ") , " + << this->land[i][nr - 1].first << "," << this->land[i][nr].second << ")" << std::endl; + if (this->land[i][nr].first == this->land[i][nr - 1].first) continue; + if (a != 0) { + result += 1 / (a * (p + 1)) * + (pow((a * this->land[i][nr].first + b), p + 1) - pow((a * this->land[i][nr - 1].first + b), p + 1)); + } else { + result += (this->land[i][nr].first - this->land[i][nr - 1].first) * (pow(this->land[i][nr].second, p)); + } + if (dbg) { + std::cout << "a : " << a << " , b : " << b << std::endl; + std::cout << "result : " << result << std::endl; + } } - return result; + } + return result; } - -//this is O(log(n)) algorithm, where n is number of points in this->land. -double Persistence_landscape::compute_value_at_a_given_point( unsigned level , double x )const -{ - bool compute_value_at_a_given_pointDbg = false; - //in such a case lambda_level = 0. - if ( level > this->land.size() ) return 0; - - //we know that the points in this->land[level] are ordered according to x coordinate. Therefore, we can find the point by using bisection: - unsigned coordBegin = 1; - unsigned coordEnd = this->land[level].size()-2; - - if ( compute_value_at_a_given_pointDbg ) - { - std::cerr << "Here \n"; - std::cerr << "x : " << x << "\n"; - std::cerr << "this->land[level][coordBegin].first : " << this->land[level][coordBegin].first << "\n"; - std::cerr << "this->land[level][coordEnd].first : " << this->land[level][coordEnd].first << "\n"; +// this is O(log(n)) algorithm, where n is number of points in this->land. +double Persistence_landscape::compute_value_at_a_given_point(unsigned level, double x) const { + bool compute_value_at_a_given_pointDbg = false; + // in such a case lambda_level = 0. + if (level > this->land.size()) return 0; + + // we know that the points in this->land[level] are ordered according to x coordinate. Therefore, we can find the + // point by using bisection: + unsigned coordBegin = 1; + unsigned coordEnd = this->land[level].size() - 2; + + if (compute_value_at_a_given_pointDbg) { + std::cerr << "Here \n"; + std::cerr << "x : " << x << "\n"; + std::cerr << "this->land[level][coordBegin].first : " << this->land[level][coordBegin].first << "\n"; + std::cerr << "this->land[level][coordEnd].first : " << this->land[level][coordEnd].first << "\n"; + } + + // in this case x is outside the support of the landscape, therefore the value of the landscape is 0. + if (x <= this->land[level][coordBegin].first) return 0; + if (x >= this->land[level][coordEnd].first) return 0; + + if (compute_value_at_a_given_pointDbg) std::cerr << "Entering to the while loop \n"; + + while (coordBegin + 1 != coordEnd) { + if (compute_value_at_a_given_pointDbg) { + std::cerr << "coordBegin : " << coordBegin << "\n"; + std::cerr << "coordEnd : " << coordEnd << "\n"; + std::cerr << "this->land[level][coordBegin].first : " << this->land[level][coordBegin].first << "\n"; + std::cerr << "this->land[level][coordEnd].first : " << this->land[level][coordEnd].first << "\n"; } - //in this case x is outside the support of the landscape, therefore the value of the landscape is 0. - if ( x <= this->land[level][coordBegin].first )return 0; - if ( x >= this->land[level][coordEnd].first )return 0; - - if (compute_value_at_a_given_pointDbg)std::cerr << "Entering to the while loop \n"; - - while ( coordBegin+1 != coordEnd ) - { - if (compute_value_at_a_given_pointDbg) - { - std::cerr << "coordBegin : " << coordBegin << "\n"; - std::cerr << "coordEnd : " << coordEnd << "\n"; - std::cerr << "this->land[level][coordBegin].first : " << this->land[level][coordBegin].first << "\n"; - std::cerr << "this->land[level][coordEnd].first : " << this->land[level][coordEnd].first << "\n"; - } - + unsigned newCord = (unsigned)floor((coordEnd + coordBegin) / 2.0); - unsigned newCord = (unsigned)floor((coordEnd+coordBegin)/2.0); - - if (compute_value_at_a_given_pointDbg) - { - std::cerr << "newCord : " << newCord << "\n"; - std::cerr << "this->land[level][newCord].first : " << this->land[level][newCord].first << "\n"; - std::cin.ignore(); - } - - if ( this->land[level][newCord].first <= x ) - { - coordBegin = newCord; - if ( this->land[level][newCord].first == x )return this->land[level][newCord].second; - } - else - { - coordEnd = newCord; - } + if (compute_value_at_a_given_pointDbg) { + std::cerr << "newCord : " << newCord << "\n"; + std::cerr << "this->land[level][newCord].first : " << this->land[level][newCord].first << "\n"; + std::cin.ignore(); } - if (compute_value_at_a_given_pointDbg) - { - std::cout << "x : " << x << " is between : " << this->land[level][coordBegin].first << " a " << this->land[level][coordEnd].first << "\n"; - std::cout << "the y coords are : " << this->land[level][coordBegin].second << " a " << this->land[level][coordEnd].second << "\n"; - std::cerr << "coordBegin : " << coordBegin << "\n"; - std::cerr << "coordEnd : " << coordEnd << "\n"; - std::cin.ignore(); + if (this->land[level][newCord].first <= x) { + coordBegin = newCord; + if (this->land[level][newCord].first == x) return this->land[level][newCord].second; + } else { + coordEnd = newCord; } - return function_value( this->land[level][coordBegin] , this->land[level][coordEnd] , x ); + } + + if (compute_value_at_a_given_pointDbg) { + std::cout << "x : " << x << " is between : " << this->land[level][coordBegin].first << " a " + << this->land[level][coordEnd].first << "\n"; + std::cout << "the y coords are : " << this->land[level][coordBegin].second << " a " + << this->land[level][coordEnd].second << "\n"; + std::cerr << "coordBegin : " << coordBegin << "\n"; + std::cerr << "coordEnd : " << coordEnd << "\n"; + std::cin.ignore(); + } + return function_value(this->land[level][coordBegin], this->land[level][coordEnd], x); } -std::ostream& operator<<(std::ostream& out, Persistence_landscape& land ) -{ - for ( size_t level = 0 ; level != land.land.size() ; ++level ) - { - out << "Lambda_" << level << ":" << std::endl; - for ( size_t i = 0 ; i != land.land[level].size() ; ++i ) - { - if ( land.land[level][i].first == -std::numeric_limits::max() ) - { - out << "-inf"; - } - else - { - if ( land.land[level][i].first == std::numeric_limits::max() ) - { - out << "+inf"; - } - else - { - out << land.land[level][i].first; - } - } - out << " , " << land.land[level][i].second << std::endl; +std::ostream& operator<<(std::ostream& out, Persistence_landscape& land) { + for (size_t level = 0; level != land.land.size(); ++level) { + out << "Lambda_" << level << ":" << std::endl; + for (size_t i = 0; i != land.land[level].size(); ++i) { + if (land.land[level][i].first == -std::numeric_limits::max()) { + out << "-inf"; + } else { + if (land.land[level][i].first == std::numeric_limits::max()) { + out << "+inf"; + } else { + out << land.land[level][i].first; } + } + out << " , " << land.land[level][i].second << std::endl; } - return out; + } + return out; } - - - -void Persistence_landscape::multiply_lanscape_by_real_number_overwrite( double x ) -{ - for ( size_t dim = 0 ; dim != this->land.size() ; ++dim ) - { - for ( size_t i = 0 ; i != this->land[dim].size() ; ++i ) - { - this->land[dim][i].second *= x; - } +void Persistence_landscape::multiply_lanscape_by_real_number_overwrite(double x) { + for (size_t dim = 0; dim != this->land.size(); ++dim) { + for (size_t i = 0; i != this->land[dim].size(); ++i) { + this->land[dim][i].second *= x; } + } } bool AbsDbg = false; -Persistence_landscape Persistence_landscape::abs() -{ - Persistence_landscape result; - for ( size_t level = 0 ; level != this->land.size() ; ++level ) - { - if ( AbsDbg ){ std::cout << "level: " << level << std::endl; } - std::vector< std::pair > lambda_n; - lambda_n.push_back( std::make_pair( -std::numeric_limits::max() , 0 ) ); - for ( size_t i = 1 ; i != this->land[level].size() ; ++i ) - { - if ( AbsDbg ){std::cout << "this->land[" << level << "][" << i << "] : " << this->land[level][i].first << " " << this->land[level][i].second << std::endl;} - //if a line segment between this->land[level][i-1] and this->land[level][i] crosses the x-axis, then we have to add one landscape point t o result - if ( (this->land[level][i-1].second)*(this->land[level][i].second) < 0 ) - { - double zero = find_zero_of_a_line_segment_between_those_two_points( this->land[level][i-1] , this->land[level][i] ); - - lambda_n.push_back( std::make_pair(zero , 0) ); - lambda_n.push_back( std::make_pair(this->land[level][i].first , fabs(this->land[level][i].second)) ); - if ( AbsDbg ) - { - std::cout << "Adding pair : (" << zero << ",0)" << std::endl; - std::cout << "In the same step adding pair : (" << this->land[level][i].first << "," << fabs(this->land[level][i].second) << ") " << std::endl; - std::cin.ignore(); - } - } - else - { - lambda_n.push_back( std::make_pair(this->land[level][i].first , fabs(this->land[level][i].second)) ); - if ( AbsDbg ) - { - std::cout << "Adding pair : (" << this->land[level][i].first << "," << fabs(this->land[level][i].second) << ") " << std::endl; - std::cin.ignore(); - } - } +Persistence_landscape Persistence_landscape::abs() { + Persistence_landscape result; + for (size_t level = 0; level != this->land.size(); ++level) { + if (AbsDbg) { + std::cout << "level: " << level << std::endl; + } + std::vector > lambda_n; + lambda_n.push_back(std::make_pair(-std::numeric_limits::max(), 0)); + for (size_t i = 1; i != this->land[level].size(); ++i) { + if (AbsDbg) { + std::cout << "this->land[" << level << "][" << i << "] : " << this->land[level][i].first << " " + << this->land[level][i].second << std::endl; + } + // if a line segment between this->land[level][i-1] and this->land[level][i] crosses the x-axis, then we have to + // add one landscape point t o result + if ((this->land[level][i - 1].second) * (this->land[level][i].second) < 0) { + double zero = + find_zero_of_a_line_segment_between_those_two_points(this->land[level][i - 1], this->land[level][i]); + + lambda_n.push_back(std::make_pair(zero, 0)); + lambda_n.push_back(std::make_pair(this->land[level][i].first, fabs(this->land[level][i].second))); + if (AbsDbg) { + std::cout << "Adding pair : (" << zero << ",0)" << std::endl; + std::cout << "In the same step adding pair : (" << this->land[level][i].first << "," + << fabs(this->land[level][i].second) << ") " << std::endl; + std::cin.ignore(); + } + } else { + lambda_n.push_back(std::make_pair(this->land[level][i].first, fabs(this->land[level][i].second))); + if (AbsDbg) { + std::cout << "Adding pair : (" << this->land[level][i].first << "," << fabs(this->land[level][i].second) + << ") " << std::endl; + std::cin.ignore(); } - result.land.push_back( lambda_n ); + } } - return result; + result.land.push_back(lambda_n); + } + return result; } - -Persistence_landscape Persistence_landscape::multiply_lanscape_by_real_number_not_overwrite( double x )const -{ - std::vector< std::vector< std::pair > > result(this->land.size()); - for ( size_t dim = 0 ; dim != this->land.size() ; ++dim ) - { - std::vector< std::pair > lambda_dim( this->land[dim].size() ); - for ( size_t i = 0 ; i != this->land[dim].size() ; ++i ) - { - lambda_dim[i] = std::make_pair( this->land[dim][i].first , x*this->land[dim][i].second ); - } - result[dim] = lambda_dim; +Persistence_landscape Persistence_landscape::multiply_lanscape_by_real_number_not_overwrite(double x) const { + std::vector > > result(this->land.size()); + for (size_t dim = 0; dim != this->land.size(); ++dim) { + std::vector > lambda_dim(this->land[dim].size()); + for (size_t i = 0; i != this->land[dim].size(); ++i) { + lambda_dim[i] = std::make_pair(this->land[dim][i].first, x * this->land[dim][i].second); } - Persistence_landscape res; - //CHANGE - //res.land = result; - res.land.swap(result); - return res; -}//multiply_lanscape_by_real_number_overwrite - - -void Persistence_landscape::print_to_file( const char* filename )const -{ - std::ofstream write; - write.open(filename); - for ( size_t dim = 0 ; dim != this->land.size() ; ++dim ) - { - write << "#lambda_" << dim << std::endl; - for ( size_t i = 1 ; i != this->land[dim].size()-1 ; ++i ) - { - write << this->land[dim][i].first << " " << this->land[dim][i].second << std::endl; - } + result[dim] = lambda_dim; + } + Persistence_landscape res; + // CHANGE + // res.land = result; + res.land.swap(result); + return res; +} // multiply_lanscape_by_real_number_overwrite + +void Persistence_landscape::print_to_file(const char* filename) const { + std::ofstream write; + write.open(filename); + for (size_t dim = 0; dim != this->land.size(); ++dim) { + write << "#lambda_" << dim << std::endl; + for (size_t i = 1; i != this->land[dim].size() - 1; ++i) { + write << this->land[dim][i].first << " " << this->land[dim][i].second << std::endl; } - write.close(); + } + write.close(); } -void Persistence_landscape::load_landscape_from_file( const char* filename ) -{ - bool dbg = false; - //removing the current content of the persistence landscape. - this->land.clear(); - - - //this constructor reads persistence landscape form a file. This file have to be created by this software before head - std::ifstream in; - in.open( filename ); - if ( !in.good() ) - { - std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; - throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; - } - - std::string line; - std::vector< std::pair > landscapeAtThisLevel; - - bool isThisAFirsLine = true; - while ( !in.eof() ) - { - getline(in,line); - if ( !(line.length() == 0 || line[0] == '#') ) - { - std::stringstream lineSS; - lineSS << line; - double beginn, endd; - lineSS >> beginn; - lineSS >> endd; - landscapeAtThisLevel.push_back( std::make_pair( beginn , endd ) ); - if (dbg){std::cerr << "Reading a point : " << beginn << " , " << endd << std::endl;} - } - else - { - if (dbg) - { - std::cout << "IGNORE LINE\n"; - getchar(); - } - if ( !isThisAFirsLine ) - { - landscapeAtThisLevel.push_back( std::make_pair( std::numeric_limits::max() , 0 ) ); - this->land.push_back(landscapeAtThisLevel); - std::vector< std::pair > newLevelOdLandscape; - landscapeAtThisLevel.swap(newLevelOdLandscape); - } - landscapeAtThisLevel.push_back( std::make_pair( -std::numeric_limits::max() , 0 ) ); - isThisAFirsLine = false; - } - } - if ( landscapeAtThisLevel.size() > 1 ) - { - //seems that the last line of the file is not finished with the newline sign. We need to put what we have in landscapeAtThisLevel to the constructed landscape. - landscapeAtThisLevel.push_back( std::make_pair( std::numeric_limits::max() , 0 ) ); +void Persistence_landscape::load_landscape_from_file(const char* filename) { + bool dbg = false; + // removing the current content of the persistence landscape. + this->land.clear(); + + // this constructor reads persistence landscape form a file. This file have to be created by this software before head + std::ifstream in; + in.open(filename); + if (!in.good()) { + std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; + throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; + } + + std::string line; + std::vector > landscapeAtThisLevel; + + bool isThisAFirsLine = true; + while (!in.eof()) { + getline(in, line); + if (!(line.length() == 0 || line[0] == '#')) { + std::stringstream lineSS; + lineSS << line; + double beginn, endd; + lineSS >> beginn; + lineSS >> endd; + landscapeAtThisLevel.push_back(std::make_pair(beginn, endd)); + if (dbg) { + std::cerr << "Reading a point : " << beginn << " , " << endd << std::endl; + } + } else { + if (dbg) { + std::cout << "IGNORE LINE\n"; + getchar(); + } + if (!isThisAFirsLine) { + landscapeAtThisLevel.push_back(std::make_pair(std::numeric_limits::max(), 0)); this->land.push_back(landscapeAtThisLevel); + std::vector > newLevelOdLandscape; + landscapeAtThisLevel.swap(newLevelOdLandscape); + } + landscapeAtThisLevel.push_back(std::make_pair(-std::numeric_limits::max(), 0)); + isThisAFirsLine = false; } - - in.close(); + } + if (landscapeAtThisLevel.size() > 1) { + // seems that the last line of the file is not finished with the newline sign. We need to put what we have in + // landscapeAtThisLevel to the constructed landscape. + landscapeAtThisLevel.push_back(std::make_pair(std::numeric_limits::max(), 0)); + this->land.push_back(landscapeAtThisLevel); + } + + in.close(); } - -template < typename T > -Persistence_landscape operation_on_pair_of_landscapes ( const Persistence_landscape& land1 , const Persistence_landscape& land2 ) -{ - bool operation_on_pair_of_landscapesDBG = false; - if ( operation_on_pair_of_landscapesDBG ){std::cout << "operation_on_pair_of_landscapes\n";std::cin.ignore();} - Persistence_landscape result; - std::vector< std::vector< std::pair > > land( std::max( land1.land.size() , land2.land.size() ) ); - result.land = land; - T oper; - - if ( operation_on_pair_of_landscapesDBG ) - { - for ( size_t i = 0 ; i != std::min( land1.land.size() , land2.land.size() ) ; ++i ) - { - std::cerr << "land1.land[" << i << "].size() : " << land1.land[i].size() << std::endl; - std::cerr << "land2.land[" << i << "].size() : " << land2.land[i].size() << std::endl; - } - getchar(); - } - - for ( size_t i = 0 ; i != std::min( land1.land.size() , land2.land.size() ) ; ++i ) - { - std::vector< std::pair > lambda_n; - size_t p = 0; - size_t q = 0; - while ( (p+1 < land1.land[i].size()) && (q+1 < land2.land[i].size()) ) - { - if ( operation_on_pair_of_landscapesDBG ) - { - std::cerr << "p : " << p << "\n"; - std::cerr << "q : " << q << "\n"; - std::cerr << "land1.land.size() : " << land1.land.size() << std::endl; - std::cerr << "land2.land.size() : " << land2.land.size() << std::endl; - std::cerr << "land1.land[" << i << "].size() : " << land1.land[i].size() << std::endl; - std::cerr << "land2.land[" << i << "].size() : " << land2.land[i].size() << std::endl; - std::cout << "land1.land[i][p].first : " << land1.land[i][p].first << "\n"; - std::cout << "land2.land[i][q].first : " << land2.land[i][q].first << "\n"; - } - - if ( land1.land[i][p].first < land2.land[i][q].first ) - { - if ( operation_on_pair_of_landscapesDBG ) - { - std::cout << "first \n"; - std::cout << " function_value(land2.land[i][q-1],land2.land[i][q],land1.land[i][p].first) : "<< function_value(land2.land[i][q-1],land2.land[i][q],land1.land[i][p].first) << "\n"; - } - lambda_n.push_back( - std::make_pair( - land1.land[i][p].first , - oper( (double)land1.land[i][p].second , function_value(land2.land[i][q-1],land2.land[i][q],land1.land[i][p].first) ) - ) - ); - ++p; - continue; - } - if ( land1.land[i][p].first > land2.land[i][q].first ) - { - if ( operation_on_pair_of_landscapesDBG ) - { - std::cout << "Second \n"; - std::cout << "function_value("<< land1.land[i][p-1].first << " " << land1.land[i][p-1].second <<" ,"<< land1.land[i][p].first << " " << land1.land[i][p].second <<", " << land2.land[i][q].first<<" ) : " << function_value( land1.land[i][p-1] , land1.land[i][p-1] ,land2.land[i][q].first ) << "\n"; - std::cout << "oper( " << function_value( land1.land[i][p] , land1.land[i][p-1] ,land2.land[i][q].first ) <<"," << land2.land[i][q].second <<" : " << oper( land2.land[i][q].second , function_value( land1.land[i][p] , land1.land[i][p-1] ,land2.land[i][q].first ) ) << "\n"; - } - lambda_n.push_back( std::make_pair( land2.land[i][q].first , oper( function_value( land1.land[i][p] , land1.land[i][p-1] ,land2.land[i][q].first ) , land2.land[i][q].second ) ) ); - ++q; - continue; - } - if ( land1.land[i][p].first == land2.land[i][q].first ) - { - if (operation_on_pair_of_landscapesDBG)std::cout << "Third \n"; - lambda_n.push_back( std::make_pair( land2.land[i][q].first , oper( land1.land[i][p].second , land2.land[i][q].second ) ) ); - ++p;++q; - } - if (operation_on_pair_of_landscapesDBG){std::cout << "Next iteration \n";} - } - while ( (p+1 < land1.land[i].size())&&(q+1 >= land2.land[i].size()) ) - { - if (operation_on_pair_of_landscapesDBG) - { - std::cout << "New point : " << land1.land[i][p].first << " oper(land1.land[i][p].second,0) : " << oper(land1.land[i][p].second,0) << std::endl; - } - lambda_n.push_back( std::make_pair(land1.land[i][p].first , oper(land1.land[i][p].second,0) ) ); - ++p; +template +Persistence_landscape operation_on_pair_of_landscapes(const Persistence_landscape& land1, + const Persistence_landscape& land2) { + bool operation_on_pair_of_landscapesDBG = false; + if (operation_on_pair_of_landscapesDBG) { + std::cout << "operation_on_pair_of_landscapes\n"; + std::cin.ignore(); + } + Persistence_landscape result; + std::vector > > land(std::max(land1.land.size(), land2.land.size())); + result.land = land; + T oper; + + if (operation_on_pair_of_landscapesDBG) { + for (size_t i = 0; i != std::min(land1.land.size(), land2.land.size()); ++i) { + std::cerr << "land1.land[" << i << "].size() : " << land1.land[i].size() << std::endl; + std::cerr << "land2.land[" << i << "].size() : " << land2.land[i].size() << std::endl; + } + getchar(); + } + + for (size_t i = 0; i != std::min(land1.land.size(), land2.land.size()); ++i) { + std::vector > lambda_n; + size_t p = 0; + size_t q = 0; + while ((p + 1 < land1.land[i].size()) && (q + 1 < land2.land[i].size())) { + if (operation_on_pair_of_landscapesDBG) { + std::cerr << "p : " << p << "\n"; + std::cerr << "q : " << q << "\n"; + std::cerr << "land1.land.size() : " << land1.land.size() << std::endl; + std::cerr << "land2.land.size() : " << land2.land.size() << std::endl; + std::cerr << "land1.land[" << i << "].size() : " << land1.land[i].size() << std::endl; + std::cerr << "land2.land[" << i << "].size() : " << land2.land[i].size() << std::endl; + std::cout << "land1.land[i][p].first : " << land1.land[i][p].first << "\n"; + std::cout << "land2.land[i][q].first : " << land2.land[i][q].first << "\n"; + } + + if (land1.land[i][p].first < land2.land[i][q].first) { + if (operation_on_pair_of_landscapesDBG) { + std::cout << "first \n"; + std::cout << " function_value(land2.land[i][q-1],land2.land[i][q],land1.land[i][p].first) : " + << function_value(land2.land[i][q - 1], land2.land[i][q], land1.land[i][p].first) << "\n"; } - while ( (p+1 >= land1.land[i].size())&&(q+1 < land2.land[i].size()) ) - { - if (operation_on_pair_of_landscapesDBG) - { - std::cout << "New point : " << land2.land[i][q].first << " oper(0,land2.land[i][q].second) : " << oper(0,land2.land[i][q].second) << std::endl; - } - lambda_n.push_back( std::make_pair(land2.land[i][q].first , oper(0,land2.land[i][q].second) ) ); - ++q; + lambda_n.push_back( + std::make_pair(land1.land[i][p].first, + oper((double)land1.land[i][p].second, + function_value(land2.land[i][q - 1], land2.land[i][q], land1.land[i][p].first)))); + ++p; + continue; + } + if (land1.land[i][p].first > land2.land[i][q].first) { + if (operation_on_pair_of_landscapesDBG) { + std::cout << "Second \n"; + std::cout << "function_value(" << land1.land[i][p - 1].first << " " << land1.land[i][p - 1].second << " ," + << land1.land[i][p].first << " " << land1.land[i][p].second << ", " << land2.land[i][q].first + << " ) : " << function_value(land1.land[i][p - 1], land1.land[i][p - 1], land2.land[i][q].first) + << "\n"; + std::cout << "oper( " << function_value(land1.land[i][p], land1.land[i][p - 1], land2.land[i][q].first) << "," + << land2.land[i][q].second << " : " + << oper(land2.land[i][q].second, + function_value(land1.land[i][p], land1.land[i][p - 1], land2.land[i][q].first)) + << "\n"; } - lambda_n.push_back( std::make_pair( std::numeric_limits::max() , 0 ) ); - //CHANGE - //result.land[i] = lambda_n; - result.land[i].swap(lambda_n); + lambda_n.push_back(std::make_pair( + land2.land[i][q].first, oper(function_value(land1.land[i][p], land1.land[i][p - 1], land2.land[i][q].first), + land2.land[i][q].second))); + ++q; + continue; + } + if (land1.land[i][p].first == land2.land[i][q].first) { + if (operation_on_pair_of_landscapesDBG) std::cout << "Third \n"; + lambda_n.push_back( + std::make_pair(land2.land[i][q].first, oper(land1.land[i][p].second, land2.land[i][q].second))); + ++p; + ++q; + } + if (operation_on_pair_of_landscapesDBG) { + std::cout << "Next iteration \n"; + } } - if ( land1.land.size() > std::min( land1.land.size() , land2.land.size() ) ) - { - if (operation_on_pair_of_landscapesDBG){std::cout << "land1.land.size() > std::min( land1.land.size() , land2.land.size() )" << std::endl;} - for ( size_t i = std::min( land1.land.size() , land2.land.size() ) ; i != std::max( land1.land.size() , land2.land.size() ) ; ++i ) - { - std::vector< std::pair > lambda_n( land1.land[i] ); - for ( size_t nr = 0 ; nr != land1.land[i].size() ; ++nr ) - { - lambda_n[nr] = std::make_pair( land1.land[i][nr].first , oper( land1.land[i][nr].second , 0 ) ); - } - //CHANGE - //result.land[i] = lambda_n; - result.land[i].swap(lambda_n); - } + while ((p + 1 < land1.land[i].size()) && (q + 1 >= land2.land[i].size())) { + if (operation_on_pair_of_landscapesDBG) { + std::cout << "New point : " << land1.land[i][p].first + << " oper(land1.land[i][p].second,0) : " << oper(land1.land[i][p].second, 0) << std::endl; + } + lambda_n.push_back(std::make_pair(land1.land[i][p].first, oper(land1.land[i][p].second, 0))); + ++p; } - if ( land2.land.size() > std::min( land1.land.size() , land2.land.size() ) ) - { - if (operation_on_pair_of_landscapesDBG){std::cout << "( land2.land.size() > std::min( land1.land.size() , land2.land.size() ) ) " << std::endl;} - for ( size_t i = std::min( land1.land.size() , land2.land.size() ) ; i != std::max( land1.land.size() , land2.land.size() ) ; ++i ) - { - std::vector< std::pair > lambda_n( land2.land[i] ); - for ( size_t nr = 0 ; nr != land2.land[i].size() ; ++nr ) - { - lambda_n[nr] = std::make_pair( land2.land[i][nr].first , oper( 0 , land2.land[i][nr].second ) ); - } - //CHANGE - //result.land[i] = lambda_n; - result.land[i].swap(lambda_n); - } + while ((p + 1 >= land1.land[i].size()) && (q + 1 < land2.land[i].size())) { + if (operation_on_pair_of_landscapesDBG) { + std::cout << "New point : " << land2.land[i][q].first + << " oper(0,land2.land[i][q].second) : " << oper(0, land2.land[i][q].second) << std::endl; + } + lambda_n.push_back(std::make_pair(land2.land[i][q].first, oper(0, land2.land[i][q].second))); + ++q; + } + lambda_n.push_back(std::make_pair(std::numeric_limits::max(), 0)); + // CHANGE + // result.land[i] = lambda_n; + result.land[i].swap(lambda_n); + } + if (land1.land.size() > std::min(land1.land.size(), land2.land.size())) { + if (operation_on_pair_of_landscapesDBG) { + std::cout << "land1.land.size() > std::min( land1.land.size() , land2.land.size() )" << std::endl; + } + for (size_t i = std::min(land1.land.size(), land2.land.size()); i != std::max(land1.land.size(), land2.land.size()); + ++i) { + std::vector > lambda_n(land1.land[i]); + for (size_t nr = 0; nr != land1.land[i].size(); ++nr) { + lambda_n[nr] = std::make_pair(land1.land[i][nr].first, oper(land1.land[i][nr].second, 0)); + } + // CHANGE + // result.land[i] = lambda_n; + result.land[i].swap(lambda_n); + } + } + if (land2.land.size() > std::min(land1.land.size(), land2.land.size())) { + if (operation_on_pair_of_landscapesDBG) { + std::cout << "( land2.land.size() > std::min( land1.land.size() , land2.land.size() ) ) " << std::endl; + } + for (size_t i = std::min(land1.land.size(), land2.land.size()); i != std::max(land1.land.size(), land2.land.size()); + ++i) { + std::vector > lambda_n(land2.land[i]); + for (size_t nr = 0; nr != land2.land[i].size(); ++nr) { + lambda_n[nr] = std::make_pair(land2.land[i][nr].first, oper(0, land2.land[i][nr].second)); + } + // CHANGE + // result.land[i] = lambda_n; + result.land[i].swap(lambda_n); + } + } + if (operation_on_pair_of_landscapesDBG) { + std::cout << "operation_on_pair_of_landscapes END\n"; + std::cin.ignore(); + } + return result; +} // operation_on_pair_of_landscapes + +double compute_maximal_distance_non_symmetric(const Persistence_landscape& pl1, const Persistence_landscape& pl2) { + bool dbg = false; + if (dbg) std::cerr << " compute_maximal_distance_non_symmetric \n"; + // this distance is not symmetric. It compute ONLY distance between inflection points of pl1 and pl2. + double maxDist = 0; + size_t minimalNumberOfLevels = std::min(pl1.land.size(), pl2.land.size()); + for (size_t level = 0; level != minimalNumberOfLevels; ++level) { + if (dbg) { + std::cerr << "Level : " << level << std::endl; + std::cerr << "PL1 : \n"; + for (size_t i = 0; i != pl1.land[level].size(); ++i) { + std::cerr << "(" << pl1.land[level][i].first << "," << pl1.land[level][i].second << ") \n"; + } + std::cerr << "PL2 : \n"; + for (size_t i = 0; i != pl2.land[level].size(); ++i) { + std::cerr << "(" << pl2.land[level][i].first << "," << pl2.land[level][i].second << ") \n"; + } + std::cin.ignore(); } - if ( operation_on_pair_of_landscapesDBG ){std::cout << "operation_on_pair_of_landscapes END\n";std::cin.ignore();} - return result; -}//operation_on_pair_of_landscapes - - -double compute_maximal_distance_non_symmetric( const Persistence_landscape& pl1, const Persistence_landscape& pl2 ) -{ - bool dbg = false; - if (dbg)std::cerr << " compute_maximal_distance_non_symmetric \n"; - //this distance is not symmetric. It compute ONLY distance between inflection points of pl1 and pl2. - double maxDist = 0; - size_t minimalNumberOfLevels = std::min( pl1.land.size() , pl2.land.size() ); - for ( size_t level = 0 ; level != minimalNumberOfLevels ; ++ level ) + int p2Count = 0; + for (size_t i = 1; i != pl1.land[level].size() - 1; ++i) // In this case, I consider points at the infinity { - if (dbg) - { - std::cerr << "Level : " << level << std::endl; - std::cerr << "PL1 : \n"; - for ( size_t i = 0 ; i != pl1.land[level].size() ; ++i ) - { - std::cerr << "(" <=pl2.land[level][p2Count].first) && (pl1.land[level][i].first<=pl2.land[level][p2Count+1].first) )break; - p2Count++; - } - double val = fabs( function_value( pl2.land[level][p2Count] , pl2.land[level][p2Count+1] , pl1.land[level][i].first ) - pl1.land[level][i].second); - if ( maxDist <= val )maxDist = val; - - if (dbg) - { - std::cerr << pl1.land[level][i].first <<"in [" << pl2.land[level][p2Count].first << "," << pl2.land[level][p2Count+1].first <<"] \n"; - std::cerr << "pl1[level][i].second : " << pl1.land[level][i].second << std::endl; - std::cerr << "function_value( pl2[level][p2Count] , pl2[level][p2Count+1] , pl1[level][i].first ) : " << function_value( pl2.land[level][p2Count] , pl2.land[level][p2Count+1] , pl1.land[level][i].first ) << std::endl; - std::cerr << "val : " << val << std::endl; - std::cin.ignore(); - } - } + while (true) { + if ((pl1.land[level][i].first >= pl2.land[level][p2Count].first) && + (pl1.land[level][i].first <= pl2.land[level][p2Count + 1].first)) + break; + p2Count++; + } + double val = + fabs(function_value(pl2.land[level][p2Count], pl2.land[level][p2Count + 1], pl1.land[level][i].first) - + pl1.land[level][i].second); + if (maxDist <= val) maxDist = val; + + if (dbg) { + std::cerr << pl1.land[level][i].first << "in [" << pl2.land[level][p2Count].first << "," + << pl2.land[level][p2Count + 1].first << "] \n"; + std::cerr << "pl1[level][i].second : " << pl1.land[level][i].second << std::endl; + std::cerr << "function_value( pl2[level][p2Count] , pl2[level][p2Count+1] , pl1[level][i].first ) : " + << function_value(pl2.land[level][p2Count], pl2.land[level][p2Count + 1], pl1.land[level][i].first) + << std::endl; + std::cerr << "val : " << val << std::endl; + std::cin.ignore(); + } } + } - if (dbg)std::cerr << "minimalNumberOfLevels : " << minimalNumberOfLevels << std::endl; + if (dbg) std::cerr << "minimalNumberOfLevels : " << minimalNumberOfLevels << std::endl; - if ( minimalNumberOfLevels < pl1.land.size() ) - { - for ( size_t level = minimalNumberOfLevels ; level != pl1.land.size() ; ++ level ) - { - for ( size_t i = 0 ; i != pl1.land[level].size() ; ++i ) - { - if (dbg)std::cerr << "pl1[level][i].second : " << pl1.land[level][i].second << std::endl; - if ( maxDist < pl1.land[level][i].second )maxDist = pl1.land[level][i].second; - } - } + if (minimalNumberOfLevels < pl1.land.size()) { + for (size_t level = minimalNumberOfLevels; level != pl1.land.size(); ++level) { + for (size_t i = 0; i != pl1.land[level].size(); ++i) { + if (dbg) std::cerr << "pl1[level][i].second : " << pl1.land[level][i].second << std::endl; + if (maxDist < pl1.land[level][i].second) maxDist = pl1.land[level][i].second; + } } - return maxDist; + } + return maxDist; } - - - -double compute_distance_of_landscapes( const Persistence_landscape& first, const Persistence_landscape& second , double p ) -{ - bool dbg = false; - //This is what we want to compute: (\int_{- \infty}^{+\infty}| first-second |^p)^(1/p). We will do it one step at a time: - - //first-second : - Persistence_landscape lan = first-second; - - //| first-second |: - lan = lan.abs(); - - if ( dbg ){std::cerr << "Abs of difference ; " << lan << std::endl;getchar();} - - if ( p < std::numeric_limits::max() ) - { - //\int_{- \infty}^{+\infty}| first-second |^p - double result; - if ( p != 1 ) - { - if ( dbg )std::cerr << "Power != 1, compute integral to the power p\n"; - result = lan.compute_integral_of_landscape( (double)p ); - } - else - { - if ( dbg )std::cerr << "Power = 1, compute integral \n"; - result = lan.compute_integral_of_landscape(); - } - //(\int_{- \infty}^{+\infty}| first-second |^p)^(1/p) - return pow( result , 1/(double)p ); - } - else - { - //p == infty - if ( dbg )std::cerr << "Power = infty, compute maximum \n"; - return lan.compute_maximum(); - } +double compute_distance_of_landscapes(const Persistence_landscape& first, const Persistence_landscape& second, + double p) { + bool dbg = false; + // This is what we want to compute: (\int_{- \infty}^{+\infty}| first-second |^p)^(1/p). We will do it one step at a + // time: + + // first-second : + Persistence_landscape lan = first - second; + + //| first-second |: + lan = lan.abs(); + + if (dbg) { + std::cerr << "Abs of difference ; " << lan << std::endl; + getchar(); + } + + if (p < std::numeric_limits::max()) { + //\int_{- \infty}^{+\infty}| first-second |^p + double result; + if (p != 1) { + if (dbg) std::cerr << "Power != 1, compute integral to the power p\n"; + result = lan.compute_integral_of_landscape((double)p); + } else { + if (dbg) std::cerr << "Power = 1, compute integral \n"; + result = lan.compute_integral_of_landscape(); + } + //(\int_{- \infty}^{+\infty}| first-second |^p)^(1/p) + return pow(result, 1 / (double)p); + } else { + // p == infty + if (dbg) std::cerr << "Power = infty, compute maximum \n"; + return lan.compute_maximum(); + } } -double compute_max_norm_distance_of_landscapes( const Persistence_landscape& first, const Persistence_landscape& second ) -{ - return std::max( compute_maximal_distance_non_symmetric(first,second) , compute_maximal_distance_non_symmetric(second,first) ); +double compute_max_norm_distance_of_landscapes(const Persistence_landscape& first, + const Persistence_landscape& second) { + return std::max(compute_maximal_distance_non_symmetric(first, second), + compute_maximal_distance_non_symmetric(second, first)); } - -bool comparePairsForMerging( std::pair< double , unsigned > first , std::pair< double , unsigned > second ) -{ - return (first.first < second.first); +bool comparePairsForMerging(std::pair first, std::pair second) { + return (first.first < second.first); } +double compute_inner_product(const Persistence_landscape& l1, const Persistence_landscape& l2) { + bool dbg = false; + double result = 0; + for (size_t level = 0; level != std::min(l1.size(), l2.size()); ++level) { + if (dbg) { + std::cerr << "Computing inner product for a level : " << level << std::endl; + getchar(); + } + if (l1.land[level].size() * l2.land[level].size() == 0) continue; + + // endpoints of the interval on which we will compute the inner product of two locally linear functions: + double x1 = -std::numeric_limits::max(); + double x2; + if (l1.land[level][1].first < l2.land[level][1].first) { + x2 = l1.land[level][1].first; + } else { + x2 = l2.land[level][1].first; + } - -double compute_inner_product( const Persistence_landscape& l1 , const Persistence_landscape& l2 ) -{ - bool dbg = false; - double result = 0; - - for ( size_t level = 0 ; level != std::min( l1.size() , l2.size() ) ; ++level ) - { - if ( dbg ){std::cerr << "Computing inner product for a level : " << level << std::endl;getchar();} - if ( l1.land[level].size() * l2.land[level].size() == 0 )continue; - - //endpoints of the interval on which we will compute the inner product of two locally linear functions: - double x1 = -std::numeric_limits::max(); - double x2; - if ( l1.land[level][1].first < l2.land[level][1].first ) - { - x2 = l1.land[level][1].first; + // iterators for the landscapes l1 and l2 + size_t l1It = 0; + size_t l2It = 0; + + while ((l1It < l1.land[level].size() - 1) && (l2It < l2.land[level].size() - 1)) { + // compute the value of a inner product on a interval [x1,x2] + + double a, b, c, d; + + if (l1.land[level][l1It + 1].first != l1.land[level][l1It].first) { + a = (l1.land[level][l1It + 1].second - l1.land[level][l1It].second) / + (l1.land[level][l1It + 1].first - l1.land[level][l1It].first); + } else { + a = 0; + } + b = l1.land[level][l1It].second - a * l1.land[level][l1It].first; + if (l2.land[level][l2It + 1].first != l2.land[level][l2It].first) { + c = (l2.land[level][l2It + 1].second - l2.land[level][l2It].second) / + (l2.land[level][l2It + 1].first - l2.land[level][l2It].first); + } else { + c = 0; + } + d = l2.land[level][l2It].second - c * l2.land[level][l2It].first; + + double contributionFromThisPart = (a * c * x2 * x2 * x2 / 3 + (a * d + b * c) * x2 * x2 / 2 + b * d * x2) - + (a * c * x1 * x1 * x1 / 3 + (a * d + b * c) * x1 * x1 / 2 + b * d * x1); + + result += contributionFromThisPart; + + if (dbg) { + std::cerr << "[l1.land[level][l1It].first,l1.land[level][l1It+1].first] : " << l1.land[level][l1It].first + << " , " << l1.land[level][l1It + 1].first << std::endl; + std::cerr << "[l2.land[level][l2It].first,l2.land[level][l2It+1].first] : " << l2.land[level][l2It].first + << " , " << l2.land[level][l2It + 1].first << std::endl; + std::cerr << "a : " << a << ", b : " << b << " , c: " << c << ", d : " << d << std::endl; + std::cerr << "x1 : " << x1 << " , x2 : " << x2 << std::endl; + std::cerr << "contributionFromThisPart : " << contributionFromThisPart << std::endl; + std::cerr << "result : " << result << std::endl; + getchar(); + } + + // we have two intervals in which functions are constant: + //[l1.land[level][l1It].first , l1.land[level][l1It+1].first] + // and + //[l2.land[level][l2It].first , l2.land[level][l2It+1].first] + // We also have an interval [x1,x2]. Since the intervals in the landscapes cover the whole R, then it is clear + // that x2 + // is either l1.land[level][l1It+1].first of l2.land[level][l2It+1].first or both. Lets test it. + if (x2 == l1.land[level][l1It + 1].first) { + if (x2 == l2.land[level][l2It + 1].first) { + // in this case, we increment both: + ++l2It; + if (dbg) { + std::cerr << "Incrementing both \n"; + } + } else { + if (dbg) { + std::cerr << "Incrementing first \n"; + } } - else - { - x2 = l2.land[level][1].first; + ++l1It; + } else { + // in this case we increment l2It + ++l2It; + if (dbg) { + std::cerr << "Incrementing second \n"; } - - //iterators for the landscapes l1 and l2 - size_t l1It = 0; - size_t l2It = 0; - - while ( (l1It < l1.land[level].size()-1) && (l2It < l2.land[level].size()-1) ) - { - //compute the value of a inner product on a interval [x1,x2] - - double a,b,c,d; - - if ( l1.land[level][l1It+1].first != l1.land[level][l1It].first ) - { - a = (l1.land[level][l1It+1].second - l1.land[level][l1It].second)/(l1.land[level][l1It+1].first - l1.land[level][l1It].first); - } - else - { - a = 0; - } - b = l1.land[level][l1It].second - a*l1.land[level][l1It].first; - if ( l2.land[level][l2It+1].first != l2.land[level][l2It].first ) - { - c = (l2.land[level][l2It+1].second - l2.land[level][l2It].second)/(l2.land[level][l2It+1].first - l2.land[level][l2It].first); - } - else - { - c = 0; - } - d = l2.land[level][l2It].second - c*l2.land[level][l2It].first; - - double contributionFromThisPart - = - (a*c*x2*x2*x2/3 + (a*d+b*c)*x2*x2/2 + b*d*x2) - (a*c*x1*x1*x1/3 + (a*d+b*c)*x1*x1/2 + b*d*x1); - - result += contributionFromThisPart; - - if ( dbg ) - { - std::cerr << "[l1.land[level][l1It].first,l1.land[level][l1It+1].first] : " << l1.land[level][l1It].first << " , " << l1.land[level][l1It+1].first << std::endl; - std::cerr << "[l2.land[level][l2It].first,l2.land[level][l2It+1].first] : " << l2.land[level][l2It].first << " , " << l2.land[level][l2It+1].first << std::endl; - std::cerr << "a : " << a << ", b : " << b << " , c: " << c << ", d : " << d << std::endl; - std::cerr << "x1 : " << x1 << " , x2 : " << x2 << std::endl; - std::cerr << "contributionFromThisPart : " << contributionFromThisPart << std::endl; - std::cerr << "result : " << result << std::endl; - getchar(); - } - - //we have two intervals in which functions are constant: - //[l1.land[level][l1It].first , l1.land[level][l1It+1].first] - //and - //[l2.land[level][l2It].first , l2.land[level][l2It+1].first] - //We also have an interval [x1,x2]. Since the intervals in the landscapes cover the whole R, then it is clear that x2 - //is either l1.land[level][l1It+1].first of l2.land[level][l2It+1].first or both. Lets test it. - if ( x2 == l1.land[level][l1It+1].first ) - { - if ( x2 == l2.land[level][l2It+1].first ) - { - //in this case, we increment both: - ++l2It; - if ( dbg ){std::cerr << "Incrementing both \n";} - } - else - { - if ( dbg ){std::cerr << "Incrementing first \n";} - } - ++l1It; - } - else - { - //in this case we increment l2It - ++l2It; - if ( dbg ){std::cerr << "Incrementing second \n";} - } - //Now, we shift x1 and x2: - x1 = x2; - if ( l1.land[level][l1It+1].first < l2.land[level][l2It+1].first ) - { - x2 = l1.land[level][l1It+1].first; - } - else - { - x2 = l2.land[level][l2It+1].first; - } - - } - + } + // Now, we shift x1 and x2: + x1 = x2; + if (l1.land[level][l1It + 1].first < l2.land[level][l2It + 1].first) { + x2 = l1.land[level][l1It + 1].first; + } else { + x2 = l2.land[level][l2It + 1].first; + } } - return result; + } + return result; } - -void Persistence_landscape::plot( const char* filename, double xRangeBegin , double xRangeEnd , double yRangeBegin , double yRangeEnd , int from , int to ) -{ - //this program create a gnuplot script file that allows to plot persistence diagram. - std::ofstream out; - - std::ostringstream nameSS; - nameSS << filename << "_GnuplotScript"; - std::string nameStr = nameSS.str(); - out.open( nameStr ); - - if ( (xRangeBegin != std::numeric_limits::max()) || (xRangeEnd != std::numeric_limits::max()) || (yRangeBegin != std::numeric_limits::max()) || (yRangeEnd != std::numeric_limits::max()) ) - { - out << "set xrange [" << xRangeBegin << " : " << xRangeEnd << "]" << std::endl; - out << "set yrange [" << yRangeBegin << " : " << yRangeEnd << "]" << std::endl; +void Persistence_landscape::plot(const char* filename, double xRangeBegin, double xRangeEnd, double yRangeBegin, + double yRangeEnd, int from, int to) { + // this program create a gnuplot script file that allows to plot persistence diagram. + std::ofstream out; + + std::ostringstream nameSS; + nameSS << filename << "_GnuplotScript"; + std::string nameStr = nameSS.str(); + out.open(nameStr); + + if ((xRangeBegin != std::numeric_limits::max()) || (xRangeEnd != std::numeric_limits::max()) || + (yRangeBegin != std::numeric_limits::max()) || (yRangeEnd != std::numeric_limits::max())) { + out << "set xrange [" << xRangeBegin << " : " << xRangeEnd << "]" << std::endl; + out << "set yrange [" << yRangeBegin << " : " << yRangeEnd << "]" << std::endl; + } + + if (from == std::numeric_limits::max()) { + from = 0; + } + if (to == std::numeric_limits::max()) { + to = this->land.size(); + } + + out << "plot "; + for (size_t lambda = std::min((size_t)from, this->land.size()); lambda != std::min((size_t)to, this->land.size()); + ++lambda) { + // out << " '-' using 1:2 title 'l" << lambda << "' with lp"; + out << " '-' using 1:2 notitle with lp"; + if (lambda + 1 != std::min((size_t)to, this->land.size())) { + out << ", \\"; } + out << std::endl; + } - if ( from == std::numeric_limits::max() ){from = 0;} - if ( to == std::numeric_limits::max() ){to = this->land.size();} - - out << "plot "; - for ( size_t lambda= std::min((size_t)from,this->land.size()) ; lambda != std::min((size_t)to,this->land.size()) ; ++lambda ) - { - //out << " '-' using 1:2 title 'l" << lambda << "' with lp"; - out << " '-' using 1:2 notitle with lp"; - if ( lambda+1 != std::min((size_t)to,this->land.size()) ) - { - out << ", \\"; - } - out << std::endl; + for (size_t lambda = std::min((size_t)from, this->land.size()); lambda != std::min((size_t)to, this->land.size()); + ++lambda) { + for (size_t i = 1; i != this->land[lambda].size() - 1; ++i) { + out << this->land[lambda][i].first << " " << this->land[lambda][i].second << std::endl; } - - for ( size_t lambda= std::min((size_t)from,this->land.size()) ; lambda != std::min((size_t)to,this->land.size()) ; ++lambda ) - { - for ( size_t i = 1 ; i != this->land[lambda].size()-1 ; ++i ) - { - out << this->land[lambda][i].first << " " << this->land[lambda][i].second << std::endl; - } - out << "EOF" << std::endl; - } - std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" << nameStr << "' in gnuplot to visualize." << std::endl; + out << "EOF" << std::endl; + } + std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" + << nameStr << "' in gnuplot to visualize." << std::endl; } } // namespace Persistence_representations } // namespace gudhi - #endif // PERSISTENCE_LANDSCAPE_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h index d663b543..64385846 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h @@ -10,7 +10,7 @@ * 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 @@ -24,8 +24,7 @@ #ifndef PERSISTENCE_LANDSCAPE_ON_GRID_H_ #define PERSISTENCE_LANDSCAPE_ON_GRID_H_ - -//standard include +// standard include #include #include #include @@ -37,23 +36,19 @@ #include #include - -//gudhi include +// gudhi include #include #include - - -namespace Gudhi -{ -namespace Persistence_representations -{ +namespace Gudhi { +namespace Persistence_representations { // pre declaration class Persistence_landscape_on_grid; -template < typename operation > -Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid( const Persistence_landscape_on_grid& land1 , const Persistence_landscape_on_grid& land2 ); +template +Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid(const Persistence_landscape_on_grid& land1, + const Persistence_landscape_on_grid& land2); /** * \class Persistence_landscape_on_grid Persistence_landscape_on_grid.h gudhi/Persistence_landscape_on_grid.h @@ -72,1408 +67,1285 @@ Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid( const Per * is comparable to this value, please rescale them before use this code. **/ -//this class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product -class Persistence_landscape_on_grid -{ -public: - /** - * Default constructor. - **/ - Persistence_landscape_on_grid() - { - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); - this->grid_min = this->grid_max = 0; - } - - /** - * Constructor that takes as an input a vector of birth-death pairs. - **/ - Persistence_landscape_on_grid( const std::vector< std::pair< double , double > >& p , double grid_min_ , double grid_max_ , size_t number_of_points_ ); - - - /** - * Constructor that takes as an input a vector of birth-death pairs, parameters of the grid and number of landscape function to be created. - **/ - Persistence_landscape_on_grid( const std::vector< std::pair< double , double > >& p , double grid_min_ , double grid_max_ , size_t number_of_points_ , unsigned number_of_levels_of_landscape ); - - /** - * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameters of this procedure are: ranges of grid, resolution of a grid - * number of landscape functions to be created and the dimension of intervals that are need to be read from a file (in case of Gudhi format files). - **/ - Persistence_landscape_on_grid(const char* filename , double grid_min_, double grid_max_ , size_t number_of_points_ , unsigned number_of_levels_of_landscape , unsigned short dimension_ = std::numeric_limits::max() ); - - /** - * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameters of this procedure are: ranges of grid, resolution of a grid - * and the dimension of intervals that are need to be read from a file (in case of Gudhi format files). - **/ - Persistence_landscape_on_grid(const char* filename , double grid_min_, double grid_max_ , size_t number_of_points_ , unsigned short dimension_ = std::numeric_limits::max() ); - - - /** - * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameter is the resolution of a grid and the number of landscape - * functions to be created. The remaining parameters are calculated based on data. - **/ - Persistence_landscape_on_grid(const char* filename , size_t number_of_points , unsigned number_of_levels_of_landscape , unsigned short dimension = std::numeric_limits::max() ); - - /** - * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed - * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The additional parameter is the resolution of a grid. The last parameter is the dimension - * of a persistence to read from the file. If your file contains only persistence pair in a single dimension, please set it up to std::numeric_limits::max(). - * The remaining parameters are calculated based on data. - **/ - Persistence_landscape_on_grid(const char* filename , size_t number_of_points , unsigned short dimension = std::numeric_limits::max() ); - - - /** - * This procedure loads a landscape from file. It erase all the data that was previously stored in this landscape. - **/ - void load_landscape_from_file( const char* filename ); - - - /** - * The procedure stores a landscape to a file. The file can be later used by a procedure load_landscape_from_file. - **/ - void print_to_file( const char* filename )const; - - - - /** - * This function compute integral of the landscape (defined formally as sum of integrals on R of all landscape functions) - **/ - double compute_integral_of_landscape()const - { - size_t maximal_level = this->number_of_nonzero_levels(); - double result = 0; - for ( size_t i = 0 ; i != maximal_level ; ++i ) - { - result += this->compute_integral_of_landscape(i); - } - return result; - } - - - /** - * This function compute integral of the 'level'-level of a landscape. - **/ - double compute_integral_of_landscape( size_t level )const - { - bool dbg = false; - double result = 0; - double dx = (this->grid_max - this->grid_min)/(double)(this->values_of_landscapes.size()-1); - - if ( dbg ) - { - std::cerr << "this->grid_max : " << this->grid_max << std::endl; - std::cerr << "this->grid_min : " << this->grid_min << std::endl; - std::cerr << "this->values_of_landscapes.size() : " << this->values_of_landscapes.size() << std::endl; - getchar(); - } - - - double previous_x = this->grid_min-dx; - double previous_y = 0; - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - double current_x = previous_x + dx; - double current_y = 0; - if ( this->values_of_landscapes[i].size() > level )current_y = this->values_of_landscapes[i][level]; - - if ( dbg ) - { - std::cerr << "this->values_of_landscapes[i].size() : " << this->values_of_landscapes[i].size() << " , level : " << level << std::endl; - if ( this->values_of_landscapes[i].size() > level )std::cerr << "this->values_of_landscapes[i][level] : " << this->values_of_landscapes[i][level] << std::endl; - std::cerr << "previous_y : " << previous_y << std::endl; - std::cerr << "current_y : " << current_y << std::endl; - std::cerr << "dx : " << dx << std::endl; - std::cerr << "0.5*dx*( previous_y + current_y ); " << 0.5*dx*( previous_y + current_y ) << std::endl; - } - - result += 0.5*dx*( previous_y + current_y ); - previous_x = current_x; - previous_y = current_y; - } - return result; - } - - /** - * This function compute integral of the landscape p-th power of a landscape (defined formally as sum of integrals on R of p-th powers of all landscape functions) - **/ - double compute_integral_of_landscape( double p )const - { - size_t maximal_level = this->number_of_nonzero_levels(); - double result = 0; - for ( size_t i = 0 ; i != maximal_level ; ++i ) - { - result += this->compute_integral_of_landscape(p,i); - } - return result; - } - - /** - * This function compute integral of the landscape p-th power of a level of a landscape (defined formally as sum of integrals on R of p-th powers of all landscape functions) - **/ - double compute_integral_of_landscape( double p , size_t level )const - { - bool dbg = false; - - double result = 0; - double dx = (this->grid_max - this->grid_min)/(double)(this->values_of_landscapes.size()-1); - double previous_x = this->grid_min; - double previous_y = 0; - if ( this->values_of_landscapes[0].size() > level )previous_y = this->values_of_landscapes[0][level]; - - if ( dbg ) - { - std::cerr << "dx : " << dx << std::endl; - std::cerr << "previous_x : " << previous_x << std::endl; - std::cerr << "previous_y : " << previous_y << std::endl; - std::cerr << "power : " << p << std::endl; - getchar(); - } - - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - double current_x = previous_x + dx; - double current_y = 0; - if ( this->values_of_landscapes[i].size() > level )current_y = this->values_of_landscapes[i][level]; - - if ( dbg )std::cerr << "current_y : " << current_y << std::endl; - - if ( current_y == previous_y )continue; - - std::pair coef = compute_parameters_of_a_line( std::make_pair( previous_x , previous_y ) , std::make_pair( current_x , current_y ) ); - double a = coef.first; - double b = coef.second; - - if ( dbg ) - { - std::cerr << "A line passing through points : (" << previous_x << "," << previous_y << ") and (" << current_x << "," << current_y << ") is : " << a << "x+" << b << std::endl; - } - - //In this interval, the landscape has a form f(x) = ax+b. We want to compute integral of (ax+b)^p = 1/a * (ax+b)^{p+1}/(p+1) - double value_to_add = 0; - if ( a != 0 ) - { - value_to_add = 1/(a*(p+1)) * ( pow((a*current_x+b),p+1) - pow((a*previous_x+b),p+1)); - } - else - { - value_to_add = ( current_x - previous_x )*( pow(b,p) ); - } - result += value_to_add; - if ( dbg ) - { - std::cerr << "Increasing result by : " << value_to_add << std::endl; - std::cerr << "result : " << result << std::endl; - getchar(); - } - previous_x = current_x; - previous_y = current_y; - } - if ( dbg )std::cerr << "The total result is : " << result << std::endl; - return result; - } - - /** - * Writing landscape into a stream. A i-th level landscape starts with a string "lambda_i". Then the discontinuity points of the landscapes follows. - * Shall those points be joined with lines, we will obtain the i-th landscape function. +// this class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, +// Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product +class Persistence_landscape_on_grid { + public: + /** + * Default constructor. + **/ + Persistence_landscape_on_grid() { + this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); + this->grid_min = this->grid_max = 0; + } + + /** + * Constructor that takes as an input a vector of birth-death pairs. + **/ + Persistence_landscape_on_grid(const std::vector >& p, double grid_min_, double grid_max_, + size_t number_of_points_); + + /** + * Constructor that takes as an input a vector of birth-death pairs, parameters of the grid and number of + *landscape function to be created. + **/ + Persistence_landscape_on_grid(const std::vector >& p, double grid_min_, double grid_max_, + size_t number_of_points_, unsigned number_of_levels_of_landscape); + + /** + * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the + *input file is the following: in each line we put birth-death pair. Last line is assumed + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. + *The additional parameters of this procedure are: ranges of grid, resolution of a grid + * number of landscape functions to be created and the dimension of intervals that are need to be read from a file + *(in case of Gudhi format files). + **/ + Persistence_landscape_on_grid(const char* filename, double grid_min_, double grid_max_, size_t number_of_points_, + unsigned number_of_levels_of_landscape, + unsigned short dimension_ = std::numeric_limits::max()); + + /** + * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the + *input file is the following: in each line we put birth-death pair. Last line is assumed + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The + *additional parameters of this procedure are: ranges of grid, resolution of a grid + * and the dimension of intervals that are need to be read from a file (in case of Gudhi format files). + **/ + Persistence_landscape_on_grid(const char* filename, double grid_min_, double grid_max_, size_t number_of_points_, + unsigned short dimension_ = std::numeric_limits::max()); + + /** + * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the + *input file is the following: in each line we put birth-death pair. Last line is assumed + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. + *The additional parameter is the resolution of a grid and the number of landscape + * functions to be created. The remaining parameters are calculated based on data. + **/ + Persistence_landscape_on_grid(const char* filename, size_t number_of_points, unsigned number_of_levels_of_landscape, + unsigned short dimension = std::numeric_limits::max()); + + /** + * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input + *file is the following: in each line we put birth-death pair. Last line is assumed + * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. The + *additional parameter is the resolution of a grid. The last parameter is the dimension + * of a persistence to read from the file. If your file contains only persistence pair in a single dimension, please + *set it up to std::numeric_limits::max(). + * The remaining parameters are calculated based on data. **/ - friend std::ostream& operator<<(std::ostream& out, const Persistence_landscape_on_grid& land ) - { - double dx = (land.grid_max - land.grid_min)/(double)(land.values_of_landscapes.size()-1); - double x = land.grid_min; - for ( size_t i = 0 ; i != land.values_of_landscapes.size() ; ++i ) - { - out << x << " : "; - for ( size_t j = 0 ; j != land.values_of_landscapes[i].size() ; ++j ) - { - out << land.values_of_landscapes[i][j] << " "; - } - out << std::endl; - x += dx; - } - return out; - } - - template < typename oper > - friend Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid( const Persistence_landscape_on_grid& land1 , const Persistence_landscape_on_grid& land2 ); - - - /** - * A function that computes the value of a landscape at a given point. The parameters of the function are: unsigned level and double x. - * The procedure will compute the value of the level-landscape at the point x. - **/ - double compute_value_at_a_given_point( unsigned level , double x )const - { - bool dbg = false; - if ( (x < this->grid_min) || (x > this->grid_max) )return 0; - - //find a position of a vector closest to x: - double dx = (this->grid_max - this->grid_min)/(double)(this->values_of_landscapes.size()-1); - size_t position = size_t((x-this->grid_min)/dx); - - if ( dbg ) - { - std::cerr << "This is a procedure compute_value_at_a_given_point \n"; - std::cerr << "level : " << level << std::endl; - std::cerr << "x : " << x << std::endl; - std::cerr << "position : " << position << std::endl; - } - //check if we are not exactly in the grid point: - if ( almost_equal( position*dx+ this->grid_min , x) ) - { - if ( this->values_of_landscapes[position].size() < level ) - { - return this->values_of_landscapes[position][level]; - } - else - { - return 0; - } - } - //in the other case, approximate with a line: - std::pair line; - if ( (this->values_of_landscapes[position].size() > level) && (this->values_of_landscapes[position+1].size() > level) ) - { - line = compute_parameters_of_a_line( std::make_pair( position*dx+ this->grid_min , this->values_of_landscapes[position][level] ) , std::make_pair( (position+1)*dx+ this->grid_min , this->values_of_landscapes[position+1][level] ) ); - } - else - { - if ( (this->values_of_landscapes[position].size() > level) || (this->values_of_landscapes[position+1].size() > level) ) - { - if ( (this->values_of_landscapes[position].size() > level) ) - { - line = compute_parameters_of_a_line( std::make_pair( position*dx+ this->grid_min , this->values_of_landscapes[position][level] ) , std::make_pair( (position+1)*dx+ this->grid_min , 0 ) ); - } - else - { - //(this->values_of_landscapes[position+1].size() > level) - line = compute_parameters_of_a_line( std::make_pair( position*dx+ this->grid_min , 0 ) , std::make_pair( (position+1)*dx+ this->grid_min , this->values_of_landscapes[position+1][level] ) ); - } - } - else - { - return 0; - } - } - //compute the value of the linear function parametrized by line on a point x: - return line.first*x+line.second; - } - - - public: - /** - *\private A function that compute sum of two landscapes. - **/ - friend Persistence_landscape_on_grid add_two_landscapes ( const Persistence_landscape_on_grid& land1 , const Persistence_landscape_on_grid& land2 ) - { - return operation_on_pair_of_landscapes_on_grid< std::plus >(land1,land2); + Persistence_landscape_on_grid(const char* filename, size_t number_of_points, + unsigned short dimension = std::numeric_limits::max()); + + /** + * This procedure loads a landscape from file. It erase all the data that was previously stored in this landscape. + **/ + void load_landscape_from_file(const char* filename); + + /** + * The procedure stores a landscape to a file. The file can be later used by a procedure load_landscape_from_file. + **/ + void print_to_file(const char* filename) const; + + /** + * This function compute integral of the landscape (defined formally as sum of integrals on R of all landscape + *functions) + **/ + double compute_integral_of_landscape() const { + size_t maximal_level = this->number_of_nonzero_levels(); + double result = 0; + for (size_t i = 0; i != maximal_level; ++i) { + result += this->compute_integral_of_landscape(i); } - - /** - *\private A function that compute difference of two landscapes. - **/ - friend Persistence_landscape_on_grid subtract_two_landscapes ( const Persistence_landscape_on_grid& land1 , const Persistence_landscape_on_grid& land2 ) - { - return operation_on_pair_of_landscapes_on_grid< std::minus >(land1,land2); + return result; + } + + /** + * This function compute integral of the 'level'-level of a landscape. + **/ + double compute_integral_of_landscape(size_t level) const { + bool dbg = false; + double result = 0; + double dx = (this->grid_max - this->grid_min) / (double)(this->values_of_landscapes.size() - 1); + + if (dbg) { + std::cerr << "this->grid_max : " << this->grid_max << std::endl; + std::cerr << "this->grid_min : " << this->grid_min << std::endl; + std::cerr << "this->values_of_landscapes.size() : " << this->values_of_landscapes.size() << std::endl; + getchar(); } - /** - * An operator +, that compute sum of two landscapes. - **/ - friend Persistence_landscape_on_grid operator+( const Persistence_landscape_on_grid& first , const Persistence_landscape_on_grid& second ) - { - return add_two_landscapes( first,second ); + double previous_x = this->grid_min - dx; + double previous_y = 0; + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + double current_x = previous_x + dx; + double current_y = 0; + if (this->values_of_landscapes[i].size() > level) current_y = this->values_of_landscapes[i][level]; + + if (dbg) { + std::cerr << "this->values_of_landscapes[i].size() : " << this->values_of_landscapes[i].size() + << " , level : " << level << std::endl; + if (this->values_of_landscapes[i].size() > level) + std::cerr << "this->values_of_landscapes[i][level] : " << this->values_of_landscapes[i][level] << std::endl; + std::cerr << "previous_y : " << previous_y << std::endl; + std::cerr << "current_y : " << current_y << std::endl; + std::cerr << "dx : " << dx << std::endl; + std::cerr << "0.5*dx*( previous_y + current_y ); " << 0.5 * dx * (previous_y + current_y) << std::endl; + } + + result += 0.5 * dx * (previous_y + current_y); + previous_x = current_x; + previous_y = current_y; } - - /** - * An operator -, that compute difference of two landscapes. - **/ - friend Persistence_landscape_on_grid operator-( const Persistence_landscape_on_grid& first , const Persistence_landscape_on_grid& second ) - { - return subtract_two_landscapes( first,second ); + return result; + } + + /** + * This function compute integral of the landscape p-th power of a landscape (defined formally as sum of integrals on + *R of p-th powers of all landscape functions) + **/ + double compute_integral_of_landscape(double p) const { + size_t maximal_level = this->number_of_nonzero_levels(); + double result = 0; + for (size_t i = 0; i != maximal_level; ++i) { + result += this->compute_integral_of_landscape(p, i); + } + return result; + } + + /** + * This function compute integral of the landscape p-th power of a level of a landscape (defined formally as sum + *of integrals on R of p-th powers of all landscape functions) + **/ + double compute_integral_of_landscape(double p, size_t level) const { + bool dbg = false; + + double result = 0; + double dx = (this->grid_max - this->grid_min) / (double)(this->values_of_landscapes.size() - 1); + double previous_x = this->grid_min; + double previous_y = 0; + if (this->values_of_landscapes[0].size() > level) previous_y = this->values_of_landscapes[0][level]; + + if (dbg) { + std::cerr << "dx : " << dx << std::endl; + std::cerr << "previous_x : " << previous_x << std::endl; + std::cerr << "previous_y : " << previous_y << std::endl; + std::cerr << "power : " << p << std::endl; + getchar(); } - /** - * An operator * that allows multiplication of a landscape by a real number. - **/ - friend Persistence_landscape_on_grid operator*( const Persistence_landscape_on_grid& first , double con ) - { - return first.multiply_lanscape_by_real_number_not_overwrite(con); + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + double current_x = previous_x + dx; + double current_y = 0; + if (this->values_of_landscapes[i].size() > level) current_y = this->values_of_landscapes[i][level]; + + if (dbg) std::cerr << "current_y : " << current_y << std::endl; + + if (current_y == previous_y) continue; + + std::pair coef = + compute_parameters_of_a_line(std::make_pair(previous_x, previous_y), std::make_pair(current_x, current_y)); + double a = coef.first; + double b = coef.second; + + if (dbg) { + std::cerr << "A line passing through points : (" << previous_x << "," << previous_y << ") and (" << current_x + << "," << current_y << ") is : " << a << "x+" << b << std::endl; + } + + // In this interval, the landscape has a form f(x) = ax+b. We want to compute integral of (ax+b)^p = 1/a * + // (ax+b)^{p+1}/(p+1) + double value_to_add = 0; + if (a != 0) { + value_to_add = 1 / (a * (p + 1)) * (pow((a * current_x + b), p + 1) - pow((a * previous_x + b), p + 1)); + } else { + value_to_add = (current_x - previous_x) * (pow(b, p)); + } + result += value_to_add; + if (dbg) { + std::cerr << "Increasing result by : " << value_to_add << std::endl; + std::cerr << "result : " << result << std::endl; + getchar(); + } + previous_x = current_x; + previous_y = current_y; + } + if (dbg) std::cerr << "The total result is : " << result << std::endl; + return result; + } + + /** +* Writing landscape into a stream. A i-th level landscape starts with a string "lambda_i". Then the discontinuity points +*of the landscapes follows. +* Shall those points be joined with lines, we will obtain the i-th landscape function. +**/ + friend std::ostream& operator<<(std::ostream& out, const Persistence_landscape_on_grid& land) { + double dx = (land.grid_max - land.grid_min) / (double)(land.values_of_landscapes.size() - 1); + double x = land.grid_min; + for (size_t i = 0; i != land.values_of_landscapes.size(); ++i) { + out << x << " : "; + for (size_t j = 0; j != land.values_of_landscapes[i].size(); ++j) { + out << land.values_of_landscapes[i][j] << " "; + } + out << std::endl; + x += dx; + } + return out; + } + + template + friend Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid( + const Persistence_landscape_on_grid& land1, const Persistence_landscape_on_grid& land2); + + /** + * A function that computes the value of a landscape at a given point. The parameters of the function are: unsigned + *level and double x. + * The procedure will compute the value of the level-landscape at the point x. + **/ + double compute_value_at_a_given_point(unsigned level, double x) const { + bool dbg = false; + if ((x < this->grid_min) || (x > this->grid_max)) return 0; + + // find a position of a vector closest to x: + double dx = (this->grid_max - this->grid_min) / (double)(this->values_of_landscapes.size() - 1); + size_t position = size_t((x - this->grid_min) / dx); + + if (dbg) { + std::cerr << "This is a procedure compute_value_at_a_given_point \n"; + std::cerr << "level : " << level << std::endl; + std::cerr << "x : " << x << std::endl; + std::cerr << "position : " << position << std::endl; + } + // check if we are not exactly in the grid point: + if (almost_equal(position * dx + this->grid_min, x)) { + if (this->values_of_landscapes[position].size() < level) { + return this->values_of_landscapes[position][level]; + } else { + return 0; + } + } + // in the other case, approximate with a line: + std::pair line; + if ((this->values_of_landscapes[position].size() > level) && + (this->values_of_landscapes[position + 1].size() > level)) { + line = compute_parameters_of_a_line( + std::make_pair(position * dx + this->grid_min, this->values_of_landscapes[position][level]), + std::make_pair((position + 1) * dx + this->grid_min, this->values_of_landscapes[position + 1][level])); + } else { + if ((this->values_of_landscapes[position].size() > level) || + (this->values_of_landscapes[position + 1].size() > level)) { + if ((this->values_of_landscapes[position].size() > level)) { + line = compute_parameters_of_a_line( + std::make_pair(position * dx + this->grid_min, this->values_of_landscapes[position][level]), + std::make_pair((position + 1) * dx + this->grid_min, 0)); + } else { + //(this->values_of_landscapes[position+1].size() > level) + line = compute_parameters_of_a_line( + std::make_pair(position * dx + this->grid_min, 0), + std::make_pair((position + 1) * dx + this->grid_min, this->values_of_landscapes[position + 1][level])); + } + } else { + return 0; + } + } + // compute the value of the linear function parametrized by line on a point x: + return line.first * x + line.second; + } + + public: + /** + *\private A function that compute sum of two landscapes. + **/ + friend Persistence_landscape_on_grid add_two_landscapes(const Persistence_landscape_on_grid& land1, + const Persistence_landscape_on_grid& land2) { + return operation_on_pair_of_landscapes_on_grid >(land1, land2); + } + + /** + *\private A function that compute difference of two landscapes. + **/ + friend Persistence_landscape_on_grid subtract_two_landscapes(const Persistence_landscape_on_grid& land1, + const Persistence_landscape_on_grid& land2) { + return operation_on_pair_of_landscapes_on_grid >(land1, land2); + } + + /** + * An operator +, that compute sum of two landscapes. + **/ + friend Persistence_landscape_on_grid operator+(const Persistence_landscape_on_grid& first, + const Persistence_landscape_on_grid& second) { + return add_two_landscapes(first, second); + } + + /** + * An operator -, that compute difference of two landscapes. + **/ + friend Persistence_landscape_on_grid operator-(const Persistence_landscape_on_grid& first, + const Persistence_landscape_on_grid& second) { + return subtract_two_landscapes(first, second); + } + + /** + * An operator * that allows multiplication of a landscape by a real number. + **/ + friend Persistence_landscape_on_grid operator*(const Persistence_landscape_on_grid& first, double con) { + return first.multiply_lanscape_by_real_number_not_overwrite(con); + } + + /** + * An operator * that allows multiplication of a landscape by a real number (order of parameters swapped). + **/ + friend Persistence_landscape_on_grid operator*(double con, const Persistence_landscape_on_grid& first) { + return first.multiply_lanscape_by_real_number_not_overwrite(con); + } + + friend bool check_if_defined_on_the_same_domain(const Persistence_landscape_on_grid& land1, + const Persistence_landscape_on_grid& land2) { + if (land1.values_of_landscapes.size() != land2.values_of_landscapes.size()) return false; + if (land1.grid_min != land2.grid_min) return false; + if (land1.grid_max != land2.grid_max) return false; + return true; + } + + /** + * Operator +=. The second parameter is persistence landscape. + **/ + Persistence_landscape_on_grid operator+=(const Persistence_landscape_on_grid& rhs) { + *this = *this + rhs; + return *this; + } + + /** + * Operator -=. The second parameter is persistence landscape. + **/ + Persistence_landscape_on_grid operator-=(const Persistence_landscape_on_grid& rhs) { + *this = *this - rhs; + return *this; + } + + /** + * Operator *=. The second parameter is a real number by which the y values of all landscape functions are multiplied. + *The x-values remain unchanged. + **/ + Persistence_landscape_on_grid operator*=(double x) { + *this = *this * x; + return *this; + } + + /** + * Operator /=. The second parameter is a real number. + **/ + Persistence_landscape_on_grid operator/=(double x) { + if (x == 0) throw("In operator /=, division by 0. Program terminated."); + *this = *this * (1 / x); + return *this; + } + + /** + * An operator to compare two persistence landscapes. + **/ + bool operator==(const Persistence_landscape_on_grid& rhs) const { + bool dbg = true; + if (this->values_of_landscapes.size() != rhs.values_of_landscapes.size()) { + if (dbg) std::cerr << "values_of_landscapes of incompatible sizes\n"; + return false; + } + if (!almost_equal(this->grid_min, rhs.grid_min)) { + if (dbg) std::cerr << "grid_min not equal\n"; + return false; } + if (!almost_equal(this->grid_max, rhs.grid_max)) { + if (dbg) std::cerr << "grid_max not equal\n"; + return false; + } + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + for (size_t aa = 0; aa != this->values_of_landscapes[i].size(); ++aa) { + if (!almost_equal(this->values_of_landscapes[i][aa], rhs.values_of_landscapes[i][aa])) { + if (dbg) { + std::cerr << "Problem in the position : " << i << " of values_of_landscapes. \n"; + std::cerr << this->values_of_landscapes[i][aa] << " " << rhs.values_of_landscapes[i][aa] << std::endl; + } + return false; + } + } + } + return true; + } + + /** + * An operator to compare two persistence landscapes. + **/ + bool operator!=(const Persistence_landscape_on_grid& rhs) const { return !((*this) == rhs); } + + /** + * Computations of maximum (y) value of landscape. + **/ + double compute_maximum() const { + // since the function can only be entirely positive or negative, the maximal value will be an extremal value in the + // arrays: + double max_value = -std::numeric_limits::max(); + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + if (this->values_of_landscapes[i].size()) { + if (this->values_of_landscapes[i][0] > max_value) max_value = this->values_of_landscapes[i][0]; + if (this->values_of_landscapes[i][this->values_of_landscapes[i].size() - 1] > max_value) + max_value = this->values_of_landscapes[i][this->values_of_landscapes[i].size() - 1]; + } + } + return max_value; + } + + /** + * Computations of minimum and maximum value of landscape. + **/ + std::pair compute_minimum_maximum() const { + // since the function can only be entirely positive or negative, the maximal value will be an extremal value in the + // arrays: + double max_value = -std::numeric_limits::max(); + double min_value = 0; + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + if (this->values_of_landscapes[i].size()) { + if (this->values_of_landscapes[i][0] > max_value) max_value = this->values_of_landscapes[i][0]; + if (this->values_of_landscapes[i][this->values_of_landscapes[i].size() - 1] > max_value) + max_value = this->values_of_landscapes[i][this->values_of_landscapes[i].size() - 1]; + + if (this->values_of_landscapes[i][0] < min_value) min_value = this->values_of_landscapes[i][0]; + if (this->values_of_landscapes[i][this->values_of_landscapes[i].size() - 1] < min_value) + min_value = this->values_of_landscapes[i][this->values_of_landscapes[i].size() - 1]; + } + } + return std::make_pair(min_value, max_value); + } + + /** + * This procedure returns x-range of a given level persistence landscape. If a default value is used, the x-range + * of 0th level landscape is given (and this range contains the ranges of all other landscapes). + **/ + std::pair get_x_range(size_t level = 0) const { + return std::make_pair(this->grid_min, this->grid_max); + } + + /** + * This procedure returns y-range of a persistence landscape. If a default value is used, the y-range + * of 0th level landscape is given (and this range contains the ranges of all other landscapes). + **/ + std::pair get_y_range(size_t level = 0) const { return this->compute_minimum_maximum(); } + + /** + * This function computes maximal lambda for which lambda-level landscape is nonzero. + **/ + size_t number_of_nonzero_levels() const { + size_t result = 0; + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + if (this->values_of_landscapes[i].size() > result) result = this->values_of_landscapes[i].size(); + } + return result; + } + + /** + * Computations of a \f$L^i\f$ norm of landscape, where i is the input parameter. + **/ + double compute_norm_of_landscape(double i) const { + std::vector > p; + Persistence_landscape_on_grid l(p, this->grid_min, this->grid_max, this->values_of_landscapes.size() - 1); + + if (i < std::numeric_limits::max()) { + return compute_distance_of_landscapes_on_grid(*this, l, i); + } else { + return compute_max_norm_distance_of_landscapes(*this, l); + } + } + + /** + * An operator to compute the value of a landscape in the level 'level' at the argument 'x'. + **/ + double operator()(unsigned level, double x) const { return this->compute_value_at_a_given_point(level, x); } + + /** + * Computations of \f$L^{\infty}\f$ distance between two landscapes. + **/ + friend double compute_max_norm_distance_of_landscapes(const Persistence_landscape_on_grid& first, + const Persistence_landscape_on_grid& second); + + /** + * Function to compute absolute value of a PL function. The representation of persistence landscapes allow to store + *general PL-function. When computing distance between two landscapes, we compute difference between + * them. In this case, a general PL-function with negative value can appear as a result. Then in order to compute + *distance, we need to take its absolute value. This is the purpose of this procedure. + **/ + void abs() { + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + for (size_t j = 0; j != this->values_of_landscapes[i].size(); ++j) { + this->values_of_landscapes[i][j] = std::abs(this->values_of_landscapes[i][j]); + } + } + } + + /** + * Computes the number of landscape functions. + **/ + size_t size() const { return this->number_of_nonzero_levels(); } + + /** + * Compute maximal value of lambda-level landscape. + **/ + double find_max(unsigned lambda) const { + double max_value = -std::numeric_limits::max(); + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + if (this->values_of_landscapes[i].size() > lambda) { + if (this->values_of_landscapes[i][lambda] > max_value) max_value = this->values_of_landscapes[i][lambda]; + } + } + return max_value; + } + + /** + * Function to compute inner (scalar) product of two landscapes. + **/ + friend double compute_inner_product(const Persistence_landscape_on_grid& l1, + const Persistence_landscape_on_grid& l2) { + if (!check_if_defined_on_the_same_domain(l1, l2)) + throw "Landscapes are not defined on the same grid, the program will now terminate"; + size_t maximal_level = l1.number_of_nonzero_levels(); + double result = 0; + for (size_t i = 0; i != maximal_level; ++i) { + result += compute_inner_product(l1, l2, i); + } + return result; + } + + /** + * Function to compute inner (scalar) product of given levels of two landscapes. + **/ + friend double compute_inner_product(const Persistence_landscape_on_grid& l1, const Persistence_landscape_on_grid& l2, + size_t level) { + bool dbg = false; + + if (!check_if_defined_on_the_same_domain(l1, l2)) + throw "Landscapes are not defined on the same grid, the program will now terminate"; + double result = 0; + + double dx = (l1.grid_max - l1.grid_min) / (double)(l1.values_of_landscapes.size() - 1); + + double previous_x = l1.grid_min - dx; + double previous_y_l1 = 0; + double previous_y_l2 = 0; + for (size_t i = 0; i != l1.values_of_landscapes.size(); ++i) { + if (dbg) std::cerr << "i : " << i << std::endl; + + double current_x = previous_x + dx; + double current_y_l1 = 0; + if (l1.values_of_landscapes[i].size() > level) current_y_l1 = l1.values_of_landscapes[i][level]; + + double current_y_l2 = 0; + if (l2.values_of_landscapes[i].size() > level) current_y_l2 = l2.values_of_landscapes[i][level]; + + if (dbg) { + std::cerr << "previous_x : " << previous_x << std::endl; + std::cerr << "previous_y_l1 : " << previous_y_l1 << std::endl; + std::cerr << "current_y_l1 : " << current_y_l1 << std::endl; + std::cerr << "previous_y_l2 : " << previous_y_l2 << std::endl; + std::cerr << "current_y_l2 : " << current_y_l2 << std::endl; + } + + std::pair l1_coords = compute_parameters_of_a_line(std::make_pair(previous_x, previous_y_l1), + std::make_pair(current_x, current_y_l1)); + std::pair l2_coords = compute_parameters_of_a_line(std::make_pair(previous_x, previous_y_l2), + std::make_pair(current_x, current_y_l2)); + + // let us assume that the first line is of a form y = ax+b, and the second one is of a form y = cx + d. Then here + // are a,b,c,d: + double a = l1_coords.first; + double b = l1_coords.second; + + double c = l2_coords.first; + double d = l2_coords.second; + + if (dbg) { + std::cerr << "Here are the formulas for a line: \n"; + std::cerr << "a : " << a << std::endl; + std::cerr << "b : " << b << std::endl; + std::cerr << "c : " << c << std::endl; + std::cerr << "d : " << d << std::endl; + } + + // now, to compute the inner product in this interval we need to compute the integral of (ax+b)(cx+d) = acx^2 + + // (ad+bc)x + bd in the interval from previous_x to current_x: + // The integral is ac/3*x^3 + (ac+bd)/2*x^2 + bd*x + + double added_value = (a * c / 3 * current_x * current_x * current_x + + (a * d + b * c) / 2 * current_x * current_x + b * d * current_x) - + (a * c / 3 * previous_x * previous_x * previous_x + + (a * d + b * c) / 2 * previous_x * previous_x + b * d * previous_x); + + if (dbg) { + std::cerr << "Value of the integral on the left end i.e. : " << previous_x << " is : " + << a * c / 3 * previous_x * previous_x * previous_x + (a * d + b * c) / 2 * previous_x * previous_x + + b * d * previous_x + << std::endl; + std::cerr << "Value of the integral on the right end i.e. : " << current_x << " is " + << a * c / 3 * current_x * current_x * current_x + (a * d + b * c) / 2 * current_x * current_x + + b * d * current_x + << std::endl; + } + + result += added_value; + + if (dbg) { + std::cerr << "added_value : " << added_value << std::endl; + std::cerr << "result : " << result << std::endl; + getchar(); + } + + previous_x = current_x; + previous_y_l1 = current_y_l1; + previous_y_l2 = current_y_l2; + } + return result; + } + + /** + * Computations of \f$L^{p}\f$ distance between two landscapes on a grid. p is the parameter of the procedure. + * FIXME: Note that, due to the grid representation, the method below may give non--accurate results in case when the + *landscape P and Q the difference of which we want to compute + * are intersecting. This is a consequence of a general way they are computed. In the future, an integral of absolute + *value of a difference of P and Q will be given as a separated + * function to fix that inaccuracy. + **/ + friend double compute_distance_of_landscapes_on_grid(const Persistence_landscape_on_grid& first, + const Persistence_landscape_on_grid& second, double p) { + bool dbg = false; + // This is what we want to compute: (\int_{- \infty}^{+\infty}| first-second |^p)^(1/p). We will do it one step at a + // time: + + if (dbg) { + std::cerr << "first : " << first << std::endl; + std::cerr << "second : " << second << std::endl; + getchar(); + } + + // first-second : + Persistence_landscape_on_grid lan = first - second; - /** - * An operator * that allows multiplication of a landscape by a real number (order of parameters swapped). - **/ - friend Persistence_landscape_on_grid operator*( double con , const Persistence_landscape_on_grid& first ) - { - return first.multiply_lanscape_by_real_number_not_overwrite(con); + if (dbg) { + std::cerr << "Difference : " << lan << std::endl; } - friend bool check_if_defined_on_the_same_domain( const Persistence_landscape_on_grid& land1, const Persistence_landscape_on_grid& land2 ) - { - if ( land1.values_of_landscapes.size() != land2.values_of_landscapes.size() )return false; - if ( land1.grid_min != land2.grid_min )return false; - if ( land1.grid_max != land2.grid_max )return false; - return true; - } - - /** - * Operator +=. The second parameter is persistence landscape. - **/ - Persistence_landscape_on_grid operator += ( const Persistence_landscape_on_grid& rhs ) - { - *this = *this + rhs; - return *this; + //| first-second |: + lan.abs(); + + if (dbg) { + std::cerr << "Abs : " << lan << std::endl; } - /** - * Operator -=. The second parameter is persistence landscape. - **/ - Persistence_landscape_on_grid operator -= ( const Persistence_landscape_on_grid& rhs ) - { - *this = *this - rhs; - return *this; + if (p < std::numeric_limits::max()) { + //\int_{- \infty}^{+\infty}| first-second |^p + double result; + if (p != 1) { + if (dbg) { + std::cerr << "p : " << p << std::endl; + getchar(); + } + result = lan.compute_integral_of_landscape((double)p); + if (dbg) { + std::cerr << "integral : " << result << std::endl; + getchar(); + } + } else { + result = lan.compute_integral_of_landscape(); + if (dbg) { + std::cerr << "integral, without power : " << result << std::endl; + getchar(); + } + } + //(\int_{- \infty}^{+\infty}| first-second |^p)^(1/p) + return pow(result, 1 / (double)p); + } else { + // p == infty + return lan.compute_maximum(); + } + } + + // Functions that are needed for that class to implement the concept. + + /** + * The number of projections to R is defined to the number of nonzero landscape functions. I-th projection is an + *integral of i-th landscape function over whole R. + * This function is required by the Real_valued_topological_data concept. + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when + *using it, keep in mind that it + * will be most likely changed in the next versions. + **/ + double project_to_R(int number_of_function) const { + return this->compute_integral_of_landscape((size_t)number_of_function); + } + + /** + * The function gives the number of possible projections to R. This function is required by the + *Real_valued_topological_data concept. + **/ + size_t number_of_projections_to_R() const { return number_of_functions_for_projections_to_reals; } + + /** + * This function produce a vector of doubles based on a landscape. It is required in a concept + * Vectorized_topological_data + */ + std::vector vectorize(int number_of_function) const { + // TODO, think of something smarter over here + if ((number_of_function < 0) || ((size_t)number_of_function >= this->values_of_landscapes.size())) { + throw "Wrong number of function\n"; + } + std::vector v(this->values_of_landscapes.size()); + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + v[i] = 0; + if (this->values_of_landscapes[i].size() > (size_t)number_of_function) { + v[i] = this->values_of_landscapes[i][number_of_function]; + } + } + return v; + } + + /** + * This function return the number of functions that allows vectorization of persistence landscape. It is required in + *a concept Vectorized_topological_data. + **/ + size_t number_of_vectorize_functions() const { return number_of_functions_for_vectorization; } + + /** + * A function to compute averaged persistence landscape on a grid, based on vector of persistence landscapes on grid. + * This function is required by Topological_data_with_averages concept. + **/ + void compute_average(const std::vector& to_average) { + bool dbg = false; + // After execution of this procedure, the average is supposed to be in the current object. To make sure that this is + // the case, we need to do some cleaning first. + this->values_of_landscapes.clear(); + this->grid_min = this->grid_max = 0; + + // if there is nothing to average, then the average is a zero landscape. + if (to_average.size() == 0) return; + + // now we need to check if the grids in all objects of to_average are the same: + for (size_t i = 0; i != to_average.size(); ++i) { + if (!check_if_defined_on_the_same_domain(*(to_average[0]), *(to_average[i]))) + throw "Two grids are not compatible"; } + this->values_of_landscapes = std::vector >((to_average[0])->values_of_landscapes.size()); + this->grid_min = (to_average[0])->grid_min; + this->grid_max = (to_average[0])->grid_max; - /** - * Operator *=. The second parameter is a real number by which the y values of all landscape functions are multiplied. The x-values remain unchanged. - **/ - Persistence_landscape_on_grid operator *= ( double x ) - { - *this = *this*x; - return *this; + if (dbg) { + std::cerr << "Computations of average. The data from the current landscape have been cleared. We are ready to do " + "the computations. \n"; } - /** - * Operator /=. The second parameter is a real number. - **/ - Persistence_landscape_on_grid operator /= ( double x ) - { - if ( x == 0 )throw( "In operator /=, division by 0. Program terminated." ); - *this = *this * (1/x); - return *this; + // for every point in the grid: + for (size_t grid_point = 0; grid_point != (to_average[0])->values_of_landscapes.size(); ++grid_point) { + // set up a vector of the correct size: + size_t maximal_size_of_vector = 0; + for (size_t land_no = 0; land_no != to_average.size(); ++land_no) { + if ((to_average[land_no])->values_of_landscapes[grid_point].size() > maximal_size_of_vector) + maximal_size_of_vector = (to_average[land_no])->values_of_landscapes[grid_point].size(); + } + this->values_of_landscapes[grid_point] = std::vector(maximal_size_of_vector); + + if (dbg) { + std::cerr << "We are considering the point : " << grid_point + << " of the grid. In this point, there are at most : " << maximal_size_of_vector + << " nonzero landscape functions \n"; + } + + // and compute an arithmetic average: + for (size_t land_no = 0; land_no != to_average.size(); ++land_no) { + // summing: + for (size_t i = 0; i != (to_average[land_no])->values_of_landscapes[grid_point].size(); ++i) { + // compute the average in a smarter way. + this->values_of_landscapes[grid_point][i] += (to_average[land_no])->values_of_landscapes[grid_point][i]; + } + } + // normalizing: + for (size_t i = 0; i != this->values_of_landscapes[grid_point].size(); ++i) { + this->values_of_landscapes[grid_point][i] /= (double)to_average.size(); + } + } + } // compute_average + + /** + * A function to compute distance between persistence landscape on a grid. + * The parameter of this function is a Persistence_landscape_on_grid. + * This function is required in Topological_data_with_distances concept. + * For max norm distance, set power to std::numeric_limits::max() + **/ + double distance(const Persistence_landscape_on_grid& second, double power = 1) const { + if (power < std::numeric_limits::max()) { + return compute_distance_of_landscapes_on_grid(*this, second, power); + } else { + return compute_max_norm_distance_of_landscapes(*this, second); } + } + + /** + * A function to compute scalar product of persistence landscape on a grid. + * The parameter of this function is a Persistence_landscape_on_grid. + * This function is required in Topological_data_with_scalar_product concept. + **/ + double compute_scalar_product(const Persistence_landscape_on_grid& second) { + return compute_inner_product((*this), second); + } + + // end of implementation of functions needed for concepts. + + /** + * A function that returns values of landscapes. It can be used for visualization + **/ + std::vector > output_for_visualization() const { return this->values_of_landscapes; } + + /** + * function used to create a gnuplot script for visualization of landscapes. Over here we need to specify which + *landscapes do we want to plot. + * In addition, the user may specify the range (min and max) where landscape is plot. The default values for min and + *max are std::numeric_limits::max(). If the procedure detect those + * values, it will determine the range so that the whole landscape is supported there. If at least one min or max value + *is different from std::numeric_limits::max(), then the values + * provided by the user will be used. + **/ + void plot(const char* filename, size_t from_, size_t to_) const { + this->plot(filename, std::numeric_limits::max(), std::numeric_limits::max(), + std::numeric_limits::max(), std::numeric_limits::max(), from_, to_); + } + + /** + * function used to create a gnuplot script for visualization of landscapes. Over here we can restrict also x and y + *range of the landscape. + **/ + void plot(const char* filename, double min_x = std::numeric_limits::max(), + double max_x = std::numeric_limits::max(), double min_y = std::numeric_limits::max(), + double max_y = std::numeric_limits::max(), size_t from_ = std::numeric_limits::max(), + size_t to_ = std::numeric_limits::max()) const; + + protected: + double grid_min; + double grid_max; + std::vector > values_of_landscapes; + size_t number_of_functions_for_vectorization; + size_t number_of_functions_for_projections_to_reals; + + void set_up_numbers_of_functions_for_vectorization_and_projections_to_reals() { + // warning, this function can be only called after filling in the values_of_landscapes vector. + this->number_of_functions_for_vectorization = this->values_of_landscapes.size(); + this->number_of_functions_for_projections_to_reals = this->values_of_landscapes.size(); + } + void set_up_values_of_landscapes(const std::vector >& p, double grid_min_, double grid_max_, + size_t number_of_points_, + unsigned number_of_levels = std::numeric_limits::max()); + Persistence_landscape_on_grid multiply_lanscape_by_real_number_not_overwrite(double x) const; +}; - /** - * An operator to compare two persistence landscapes. - **/ - bool operator == ( const Persistence_landscape_on_grid& rhs )const - { - bool dbg = true; - if ( this->values_of_landscapes.size() != rhs.values_of_landscapes.size() ) - { - if (dbg) std::cerr << "values_of_landscapes of incompatible sizes\n"; - return false; - } - if ( !almost_equal( this->grid_min , rhs.grid_min ) ) - { - if (dbg) std::cerr << "grid_min not equal\n"; - return false; - } - if ( !almost_equal(this->grid_max,rhs.grid_max ) ) - { - if (dbg) std::cerr << "grid_max not equal\n"; - return false; - } - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - for ( size_t aa = 0 ; aa != this->values_of_landscapes[i].size() ; ++aa ) - { - if ( !almost_equal( this->values_of_landscapes[i][aa] , rhs.values_of_landscapes[i][aa] ) ) - { - if (dbg) - { - std::cerr << "Problem in the position : " << i << " of values_of_landscapes. \n"; - std::cerr << this->values_of_landscapes[i][aa] << " " << rhs.values_of_landscapes[i][aa] << std::endl; - } - return false; - } - } - } - return true; - } - - - /** - * An operator to compare two persistence landscapes. - **/ - bool operator != ( const Persistence_landscape_on_grid& rhs )const - { - return !((*this) == rhs); - } - - - /** - * Computations of maximum (y) value of landscape. - **/ - double compute_maximum()const - { - //since the function can only be entirely positive or negative, the maximal value will be an extremal value in the arrays: - double max_value = -std::numeric_limits::max(); - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - if ( this->values_of_landscapes[i].size() ) - { - if ( this->values_of_landscapes[i][0] > max_value )max_value = this->values_of_landscapes[i][0]; - if ( this->values_of_landscapes[i][ this->values_of_landscapes[i].size()-1 ] > max_value )max_value = this->values_of_landscapes[i][ this->values_of_landscapes[i].size()-1 ]; - } - } - return max_value; +void Persistence_landscape_on_grid::set_up_values_of_landscapes(const std::vector >& p, + double grid_min_, double grid_max_, + size_t number_of_points_, unsigned number_of_levels) { + bool dbg = false; + if (dbg) { + std::cerr << "Here is the procedure : set_up_values_of_landscapes. The parameters are : grid_min_ : " << grid_min_ + << ", grid_max_ : " << grid_max_ << ", number_of_points_ : " << number_of_points_ + << ", number_of_levels: " << number_of_levels << std::endl; + std::cerr << "Here are the intervals at our disposal : \n"; + for (size_t i = 0; i != p.size(); ++i) { + std::cerr << p[i].first << " , " << p[i].second << std::endl; } - - /** - * Computations of minimum and maximum value of landscape. - **/ - std::pair compute_minimum_maximum()const - { - //since the function can only be entirely positive or negative, the maximal value will be an extremal value in the arrays: - double max_value = -std::numeric_limits::max(); - double min_value = 0; - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - if ( this->values_of_landscapes[i].size() ) - { - if ( this->values_of_landscapes[i][0] > max_value )max_value = this->values_of_landscapes[i][0]; - if ( this->values_of_landscapes[i][ this->values_of_landscapes[i].size()-1 ] > max_value )max_value = this->values_of_landscapes[i][ this->values_of_landscapes[i].size()-1 ]; - - if ( this->values_of_landscapes[i][0] < min_value )min_value = this->values_of_landscapes[i][0]; - if ( this->values_of_landscapes[i][ this->values_of_landscapes[i].size()-1 ] < min_value )min_value = this->values_of_landscapes[i][ this->values_of_landscapes[i].size()-1 ]; - } - } - return std::make_pair(min_value , max_value); + } + + if ((grid_min_ == std::numeric_limits::max()) || (grid_max_ == std::numeric_limits::max())) { + // in this case, we need to find grid_min_ and grid_min_ based on the data. + double min = std::numeric_limits::max(); + double max = std::numeric_limits::min(); + for (size_t i = 0; i != p.size(); ++i) { + if (p[i].first < min) min = p[i].first; + if (p[i].second > max) max = p[i].second; } - - /** - * This procedure returns x-range of a given level persistence landscape. If a default value is used, the x-range - * of 0th level landscape is given (and this range contains the ranges of all other landscapes). - **/ - std::pair< double , double > get_x_range( size_t level = 0 )const - { - return std::make_pair( this->grid_min , this->grid_max ); - } - - /** - * This procedure returns y-range of a persistence landscape. If a default value is used, the y-range - * of 0th level landscape is given (and this range contains the ranges of all other landscapes). - **/ - std::pair< double , double > get_y_range( size_t level = 0 )const - { - return this->compute_minimum_maximum(); - } - - /** - * This function computes maximal lambda for which lambda-level landscape is nonzero. - **/ - size_t number_of_nonzero_levels()const - { - size_t result = 0; - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - if ( this->values_of_landscapes[i].size() > result )result = this->values_of_landscapes[i].size(); - } - return result; - } - - /** - * Computations of a \f$L^i\f$ norm of landscape, where i is the input parameter. - **/ - double compute_norm_of_landscape( double i )const - { - std::vector< std::pair< double , double > > p; - Persistence_landscape_on_grid l(p,this->grid_min,this->grid_max,this->values_of_landscapes.size()-1); - - if ( i < std::numeric_limits::max() ) - { - return compute_distance_of_landscapes_on_grid(*this,l,i); - } - else - { - return compute_max_norm_distance_of_landscapes(*this,l); - } + if (grid_min_ == std::numeric_limits::max()) { + grid_min_ = min; + } else { + // in this case grid_max_ == std::numeric_limits::max() + grid_max_ = max; } + } - /** - * An operator to compute the value of a landscape in the level 'level' at the argument 'x'. - **/ - double operator()(unsigned level,double x)const{return this->compute_value_at_a_given_point(level,x);} - - /** - * Computations of \f$L^{\infty}\f$ distance between two landscapes. - **/ - friend double compute_max_norm_distance_of_landscapes( const Persistence_landscape_on_grid& first, const Persistence_landscape_on_grid& second ); - - - - /** - * Function to compute absolute value of a PL function. The representation of persistence landscapes allow to store general PL-function. When computing distance between two landscapes, we compute difference between - * them. In this case, a general PL-function with negative value can appear as a result. Then in order to compute distance, we need to take its absolute value. This is the purpose of this procedure. - **/ - void abs() - { - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->values_of_landscapes[i].size() ; ++j ) - { - this->values_of_landscapes[i][j] = std::abs( this->values_of_landscapes[i][j] ); - } - } - } - - /** - * Computes the number of landscape functions. - **/ - size_t size()const{return this->number_of_nonzero_levels(); } - - /** - * Compute maximal value of lambda-level landscape. - **/ - double find_max( unsigned lambda )const - { - double max_value = -std::numeric_limits::max(); - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - if ( this->values_of_landscapes[i].size() > lambda ) - { - if ( this->values_of_landscapes[i][lambda] > max_value )max_value = this->values_of_landscapes[i][lambda]; - } - } - return max_value; - } - - /** - * Function to compute inner (scalar) product of two landscapes. - **/ - friend double compute_inner_product( const Persistence_landscape_on_grid& l1 , const Persistence_landscape_on_grid& l2 ) - { - if ( !check_if_defined_on_the_same_domain(l1,l2) )throw "Landscapes are not defined on the same grid, the program will now terminate"; - size_t maximal_level = l1.number_of_nonzero_levels(); - double result = 0; - for ( size_t i = 0 ; i != maximal_level ; ++i ) - { - result += compute_inner_product(l1,l2,i); - } - return result; - } - - - - /** - * Function to compute inner (scalar) product of given levels of two landscapes. - **/ - friend double compute_inner_product( const Persistence_landscape_on_grid& l1 , const Persistence_landscape_on_grid& l2 , size_t level ) - { - bool dbg = false; - - if ( !check_if_defined_on_the_same_domain(l1,l2) )throw "Landscapes are not defined on the same grid, the program will now terminate"; - double result = 0; - - double dx = (l1.grid_max - l1.grid_min)/(double)(l1.values_of_landscapes.size()-1); - - double previous_x = l1.grid_min-dx; - double previous_y_l1 = 0; - double previous_y_l2 = 0; - for ( size_t i = 0 ; i != l1.values_of_landscapes.size() ; ++i ) - { - if ( dbg )std::cerr << "i : " << i << std::endl; - - double current_x = previous_x + dx; - double current_y_l1 = 0; - if ( l1.values_of_landscapes[i].size() > level )current_y_l1 = l1.values_of_landscapes[i][level]; - - double current_y_l2 = 0; - if ( l2.values_of_landscapes[i].size() > level )current_y_l2 = l2.values_of_landscapes[i][level]; - - if ( dbg ) - { - std::cerr << "previous_x : " << previous_x << std::endl; - std::cerr << "previous_y_l1 : " << previous_y_l1 << std::endl; - std::cerr << "current_y_l1 : " << current_y_l1 << std::endl; - std::cerr << "previous_y_l2 : " << previous_y_l2 << std::endl; - std::cerr << "current_y_l2 : " << current_y_l2 << std::endl; - } - - std::pair l1_coords = compute_parameters_of_a_line( std::make_pair( previous_x , previous_y_l1 ) , std::make_pair( current_x , current_y_l1 ) ); - std::pair l2_coords = compute_parameters_of_a_line( std::make_pair( previous_x , previous_y_l2 ) , std::make_pair( current_x , current_y_l2 ) ); - - //let us assume that the first line is of a form y = ax+b, and the second one is of a form y = cx + d. Then here are a,b,c,d: - double a = l1_coords.first; - double b = l1_coords.second; - - double c = l2_coords.first; - double d = l2_coords.second; - - if ( dbg ) - { - std::cerr << "Here are the formulas for a line: \n"; - std::cerr << "a : " << a << std::endl; - std::cerr << "b : " << b << std::endl; - std::cerr << "c : " << c << std::endl; - std::cerr << "d : " << d << std::endl; - } - - //now, to compute the inner product in this interval we need to compute the integral of (ax+b)(cx+d) = acx^2 + (ad+bc)x + bd in the interval from previous_x to current_x: - //The integral is ac/3*x^3 + (ac+bd)/2*x^2 + bd*x - - double added_value = (a*c/3*current_x*current_x*current_x + (a*d+b*c)/2*current_x*current_x + b*d*current_x)- - (a*c/3*previous_x*previous_x*previous_x + (a*d+b*c)/2*previous_x*previous_x + b*d*previous_x); - - if ( dbg ) - { - std::cerr << "Value of the integral on the left end i.e. : " << previous_x << " is : " << a*c/3*previous_x*previous_x*previous_x + (a*d+b*c)/2*previous_x*previous_x + b*d*previous_x << std::endl; - std::cerr << "Value of the integral on the right end i.e. : " << current_x << " is " << a*c/3*current_x*current_x*current_x + (a*d+b*c)/2*current_x*current_x + b*d*current_x << std::endl; - } - - result += added_value; - - if ( dbg ) - { - std::cerr << "added_value : " << added_value << std::endl; - std::cerr << "result : " << result << std::endl; - getchar(); - } - - - previous_x = current_x; - previous_y_l1 = current_y_l1; - previous_y_l2 = current_y_l2; - - } - return result; - } - - - /** - * Computations of \f$L^{p}\f$ distance between two landscapes on a grid. p is the parameter of the procedure. - * FIXME: Note that, due to the grid representation, the method below may give non--accurate results in case when the landscape P and Q the difference of which we want to compute - * are intersecting. This is a consequence of a general way they are computed. In the future, an integral of absolute value of a difference of P and Q will be given as a separated - * function to fix that inaccuracy. - **/ - friend double compute_distance_of_landscapes_on_grid( const Persistence_landscape_on_grid& first, const Persistence_landscape_on_grid& second , double p ) - { - bool dbg = false; - //This is what we want to compute: (\int_{- \infty}^{+\infty}| first-second |^p)^(1/p). We will do it one step at a time: - - if ( dbg ) - { - std::cerr << "first : " << first << std::endl; - std::cerr << "second : " << second << std::endl; - getchar(); - } - - //first-second : - Persistence_landscape_on_grid lan = first-second; - - if ( dbg ) - { - std::cerr << "Difference : " << lan << std::endl; - } - - //| first-second |: - lan.abs(); - - if ( dbg ) - { - std::cerr << "Abs : " << lan << std::endl; - } - - if ( p < std::numeric_limits< double >::max() ) - { - //\int_{- \infty}^{+\infty}| first-second |^p - double result; - if ( p != 1 ) - { - if (dbg){std::cerr << "p : " << p << std::endl; getchar();} - result = lan.compute_integral_of_landscape( (double)p ); - if (dbg){std::cerr << "integral : " << result << std::endl;getchar();} - } - else - { - result = lan.compute_integral_of_landscape(); - if (dbg){std::cerr << "integral, without power : " << result << std::endl;getchar();} - } - //(\int_{- \infty}^{+\infty}| first-second |^p)^(1/p) - return pow( result , 1/(double)p ); - } - else - { - //p == infty - return lan.compute_maximum(); - } - } - - //Functions that are needed for that class to implement the concept. - - /** - * The number of projections to R is defined to the number of nonzero landscape functions. I-th projection is an integral of i-th landscape function over whole R. - * This function is required by the Real_valued_topological_data concept. - * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it - * will be most likely changed in the next versions. - **/ - double project_to_R( int number_of_function )const - { - return this->compute_integral_of_landscape( (size_t)number_of_function ); - } - - /** - * The function gives the number of possible projections to R. This function is required by the Real_valued_topological_data concept. - **/ - size_t number_of_projections_to_R()const - { - return number_of_functions_for_projections_to_reals; - } - - - /** - * This function produce a vector of doubles based on a landscape. It is required in a concept Vectorized_topological_data - */ - std::vector vectorize( int number_of_function )const - { - //TODO, think of something smarter over here - if ( ( number_of_function < 0 ) || ( (size_t)number_of_function >= this->values_of_landscapes.size() ) ) - { - throw "Wrong number of function\n"; - } - std::vector v( this->values_of_landscapes.size() ); - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - v[i] = 0; - if ( this->values_of_landscapes[i].size() > (size_t)number_of_function ) - { - v[ i ] = this->values_of_landscapes[i][number_of_function]; - } - } - return v; - } - - /** - * This function return the number of functions that allows vectorization of persistence landscape. It is required in a concept Vectorized_topological_data. - **/ - size_t number_of_vectorize_functions()const - { - return number_of_functions_for_vectorization; - } - - - /** - * A function to compute averaged persistence landscape on a grid, based on vector of persistence landscapes on grid. - * This function is required by Topological_data_with_averages concept. - **/ - void compute_average( const std::vector< Persistence_landscape_on_grid* >& to_average ) - { - - bool dbg = false; - //After execution of this procedure, the average is supposed to be in the current object. To make sure that this is the case, we need to do some cleaning first. - this->values_of_landscapes .clear(); - this->grid_min = this->grid_max = 0; - - //if there is nothing to average, then the average is a zero landscape. - if ( to_average.size() == 0 )return; - - //now we need to check if the grids in all objects of to_average are the same: - for ( size_t i = 0 ; i != to_average.size() ; ++i ) - { - if ( !check_if_defined_on_the_same_domain(*(to_average[0]),*(to_average[i])) )throw "Two grids are not compatible"; - } - - this->values_of_landscapes = std::vector< std::vector >( (to_average[0])->values_of_landscapes.size() ); - this->grid_min = (to_average[0])->grid_min; - this->grid_max = (to_average[0])->grid_max; - - if ( dbg ) - { - std::cerr << "Computations of average. The data from the current landscape have been cleared. We are ready to do the computations. \n"; - } - - //for every point in the grid: - for ( size_t grid_point = 0 ; grid_point != (to_average[0])->values_of_landscapes.size() ; ++grid_point ) - { - - //set up a vector of the correct size: - size_t maximal_size_of_vector = 0; - for ( size_t land_no = 0 ; land_no != to_average.size() ; ++land_no ) - { - if ( (to_average[land_no])->values_of_landscapes[grid_point].size() > maximal_size_of_vector ) - maximal_size_of_vector = (to_average[land_no])->values_of_landscapes[grid_point].size(); - } - this->values_of_landscapes[grid_point] = std::vector( maximal_size_of_vector ); - - if ( dbg ) - { - std::cerr << "We are considering the point : " << grid_point << " of the grid. In this point, there are at most : " << maximal_size_of_vector << " nonzero landscape functions \n"; - } - - //and compute an arithmetic average: - for ( size_t land_no = 0 ; land_no != to_average.size() ; ++land_no ) - { - //summing: - for ( size_t i = 0 ; i != (to_average[land_no])->values_of_landscapes[grid_point].size() ; ++i ) - { - //compute the average in a smarter way. - this->values_of_landscapes[grid_point][i] += (to_average[land_no])->values_of_landscapes[grid_point][i]; - } - } - //normalizing: - for ( size_t i = 0 ; i != this->values_of_landscapes[grid_point].size() ; ++i ) - { - this->values_of_landscapes[grid_point][i] /= (double)to_average.size(); - } - } - }//compute_average - - - /** - * A function to compute distance between persistence landscape on a grid. - * The parameter of this function is a Persistence_landscape_on_grid. - * This function is required in Topological_data_with_distances concept. - * For max norm distance, set power to std::numeric_limits::max() - **/ - double distance( const Persistence_landscape_on_grid& second , double power = 1 )const - { - if ( power < std::numeric_limits::max() ) - { - return compute_distance_of_landscapes_on_grid( *this , second , power ); - } - else - { - return compute_max_norm_distance_of_landscapes( *this , second ); - } - } - - /** - * A function to compute scalar product of persistence landscape on a grid. - * The parameter of this function is a Persistence_landscape_on_grid. - * This function is required in Topological_data_with_scalar_product concept. - **/ - double compute_scalar_product( const Persistence_landscape_on_grid& second ) - { - return compute_inner_product( (*this) , second ); - } - - //end of implementation of functions needed for concepts. - - /** - * A function that returns values of landscapes. It can be used for visualization - **/ - std::vector< std::vector< double > > output_for_visualization()const - { - return this->values_of_landscapes; - } - - /** - * function used to create a gnuplot script for visualization of landscapes. Over here we need to specify which landscapes do we want to plot. - * In addition, the user may specify the range (min and max) where landscape is plot. The default values for min and max are std::numeric_limits::max(). If the procedure detect those - * values, it will determine the range so that the whole landscape is supported there. If at least one min or max value is different from std::numeric_limits::max(), then the values - * provided by the user will be used. - **/ - void plot( const char* filename , size_t from_ , size_t to_ )const - { - this->plot( filename , std::numeric_limits::max() , std::numeric_limits::max(), std::numeric_limits::max() , std::numeric_limits::max() , from_ , to_ ); - } - - /** - * function used to create a gnuplot script for visualization of landscapes. Over here we can restrict also x and y range of the landscape. - **/ - void plot( const char* filename, double min_x = std::numeric_limits::max() , double max_x = std::numeric_limits::max() , double min_y = std::numeric_limits::max() , double max_y = std::numeric_limits::max() , size_t from_ = std::numeric_limits::max(), size_t to_= std::numeric_limits::max() )const; - - -protected: - double grid_min; - double grid_max; - std::vector< std::vector< double > > values_of_landscapes; - size_t number_of_functions_for_vectorization; - size_t number_of_functions_for_projections_to_reals; - - void set_up_numbers_of_functions_for_vectorization_and_projections_to_reals() - { - //warning, this function can be only called after filling in the values_of_landscapes vector. - this->number_of_functions_for_vectorization = this->values_of_landscapes.size(); - this->number_of_functions_for_projections_to_reals = this->values_of_landscapes.size(); - } - void set_up_values_of_landscapes( const std::vector< std::pair< double , double > >& p , double grid_min_ , double grid_max_ , size_t number_of_points_ , unsigned number_of_levels = std::numeric_limits::max() ); - Persistence_landscape_on_grid multiply_lanscape_by_real_number_not_overwrite( double x )const; -}; + // if number_of_levels == std::numeric_limits::max(), then we will have all the nonzero values of landscapes, + // and will store them in a vector + // if number_of_levels != std::numeric_limits::max(), then we will use those vectors as heaps. + this->values_of_landscapes = std::vector >(number_of_points_ + 1); + this->grid_min = grid_min_; + this->grid_max = grid_max_; -void Persistence_landscape_on_grid::set_up_values_of_landscapes( const std::vector< std::pair< double , double > >& p , double grid_min_ , double grid_max_ , size_t number_of_points_, unsigned number_of_levels ) -{ - bool dbg = false; - if ( dbg ) - { - std::cerr << "Here is the procedure : set_up_values_of_landscapes. The parameters are : grid_min_ : " << grid_min_ << ", grid_max_ : " << grid_max_ << ", number_of_points_ : " << number_of_points_ << ", number_of_levels: " << number_of_levels << std::endl; - std::cerr << "Here are the intervals at our disposal : \n"; - for ( size_t i = 0 ; i != p.size() ; ++i ) - { - std::cerr << p[i].first << " , " << p[i].second << std::endl; - } - } - - if ( (grid_min_ == std::numeric_limits::max()) || (grid_max_ == std::numeric_limits::max()) ) - { - //in this case, we need to find grid_min_ and grid_min_ based on the data. - double min = std::numeric_limits::max(); - double max = std::numeric_limits::min(); - for ( size_t i = 0 ; i != p.size() ; ++i ) - { - if ( p[i].first < min )min = p[i].first; - if ( p[i].second > max )max = p[i].second; - } - if ( grid_min_ == std::numeric_limits::max() ) - { - grid_min_ = min; - } - else - { - //in this case grid_max_ == std::numeric_limits::max() - grid_max_ = max; - } - } - - //if number_of_levels == std::numeric_limits::max(), then we will have all the nonzero values of landscapes, and will store them in a vector - //if number_of_levels != std::numeric_limits::max(), then we will use those vectors as heaps. - this->values_of_landscapes = std::vector< std::vector< double > >( number_of_points_+1 ); - - - this->grid_min = grid_min_; - this->grid_max = grid_max_; - - if ( grid_max_ <= grid_min_ ) - { - throw "Wrong parameters of grid_min and grid_max given to the procedure. The grid have negative, or zero size. The program will now terminate.\n"; - } - - double dx = ( grid_max_ - grid_min_ )/(double)(number_of_points_); - //for every interval in the diagram: - for ( size_t int_no = 0 ; int_no != p.size() ; ++int_no ) - { - size_t grid_interval_begin = (p[int_no].first-grid_min_)/dx; - size_t grid_interval_end = (p[int_no].second-grid_min_)/dx; - size_t grid_interval_midpoint = (size_t)(0.5*(grid_interval_begin+grid_interval_end)); - - if ( dbg ) - { - std::cerr << "Considering an interval : " << p[int_no].first << "," << p[int_no].second << std::endl; - - std::cerr << "grid_interval_begin : " << grid_interval_begin << std::endl; - std::cerr << "grid_interval_end : " << grid_interval_end << std::endl; - std::cerr << "grid_interval_midpoint : " << grid_interval_midpoint << std::endl; - } - - double landscape_value = dx; - for ( size_t i = grid_interval_begin+1 ; i < grid_interval_midpoint ; ++i ) - { - if ( dbg ) - { - std::cerr << "Adding landscape value (going up) for a point : " << i << " equal : " << landscape_value << std::endl; - } - if ( number_of_levels != std::numeric_limits::max() ) - { - //we have a heap of no more that number_of_levels values. - //Note that if we are using heaps, we want to know the shortest distance in the heap. - //This is achieved by putting -distance to the heap. - if ( this->values_of_landscapes[i].size() >= number_of_levels ) - { - //in this case, the full heap is build, and we need to check if the landscape_value is not larger than the smallest element in the heap. - if ( -landscape_value < this->values_of_landscapes[i].front() ) - { - //if it is, we remove the largest value in the heap, and move on. - std::pop_heap (this->values_of_landscapes[i].begin(),this->values_of_landscapes[i].end()); - this->values_of_landscapes[i][ this->values_of_landscapes[i].size()-1 ] = -landscape_value; - std::push_heap (this->values_of_landscapes[i].begin(),this->values_of_landscapes[i].end()); - } - } - else - { - - //in this case we are still filling in the array. - this->values_of_landscapes[i].push_back( -landscape_value ); - if ( this->values_of_landscapes[i].size() == number_of_levels-1 ) - { - //this->values_of_landscapes[i].size() == number_of_levels - //in this case we need to create the heap. - std::make_heap (this->values_of_landscapes[i].begin(),this->values_of_landscapes[i].end()); - } - } - } - else - { - //we have vector of all values - this->values_of_landscapes[i].push_back( landscape_value ); - } - landscape_value += dx; - } - for ( size_t i = grid_interval_midpoint ; i <= grid_interval_end ; ++i ) - { - if ( landscape_value > 0 ) - { - if ( number_of_levels != std::numeric_limits< unsigned >::max() ) - { - //we have a heap of no more that number_of_levels values - if ( this->values_of_landscapes[i].size() >= number_of_levels ) - { - //in this case, the full heap is build, and we need to check if the landscape_value is not larger than the smallest element in the heap. - if ( -landscape_value < this->values_of_landscapes[i].front() ) - { - //if it is, we remove the largest value in the heap, and move on. - std::pop_heap (this->values_of_landscapes[i].begin(),this->values_of_landscapes[i].end()); - this->values_of_landscapes[i][ this->values_of_landscapes[i].size()-1 ] = -landscape_value; - std::push_heap (this->values_of_landscapes[i].begin(),this->values_of_landscapes[i].end()); - } - } - else - { - - //in this case we are still filling in the array. - this->values_of_landscapes[i].push_back( -landscape_value ); - if ( this->values_of_landscapes[i].size() == number_of_levels-1 ) - { - //this->values_of_landscapes[i].size() == number_of_levels - //in this case we need to create the heap. - std::make_heap (this->values_of_landscapes[i].begin(),this->values_of_landscapes[i].end()); - } - } - } - else - { - this->values_of_landscapes[i].push_back( landscape_value ); - } - - - if ( dbg ) - { - std::cerr << "Adding landscape value (going down) for a point : " << i << " equal : " << landscape_value << std::endl; - } - } - landscape_value -= dx; - } - } - - if ( number_of_levels != std::numeric_limits< unsigned >::max() ) - { - //in this case, vectors are used as heaps. And, since we want to have the smallest element at the top of - //each heap, we store minus distances. To get if right at the end, we need to multiply each value - //in the heap by -1 to get real vector of distances. - for ( size_t pt = 0 ; pt != this->values_of_landscapes.size() ; ++pt ) - { - for ( size_t j = 0 ; j != this->values_of_landscapes[pt].size() ; ++j ) - { - this->values_of_landscapes[pt][j] *= -1; - } - } - } - - //and now we need to sort the values: - for ( size_t pt = 0 ; pt != this->values_of_landscapes.size() ; ++pt ) - { - std::sort( this->values_of_landscapes[pt].begin() , this->values_of_landscapes[pt].end() , std::greater() ); - } -}//set_up_values_of_landscapes - - - -Persistence_landscape_on_grid::Persistence_landscape_on_grid( const std::vector< std::pair< double , double > >& p , double grid_min_ , double grid_max_ , size_t number_of_points_ ) -{ - this->set_up_values_of_landscapes( p , grid_min_ , grid_max_ , number_of_points_ ); -}//Persistence_landscape_on_grid - - -Persistence_landscape_on_grid::Persistence_landscape_on_grid( const std::vector< std::pair< double , double > >& p , double grid_min_ , double grid_max_ , size_t number_of_points_ , unsigned number_of_levels_of_landscape ) -{ - this->set_up_values_of_landscapes( p , grid_min_ , grid_max_ , number_of_points_ , number_of_levels_of_landscape ); -} + if (grid_max_ <= grid_min_) { + throw "Wrong parameters of grid_min and grid_max given to the procedure. The grid have negative, or zero size. The program will now terminate.\n"; + } + double dx = (grid_max_ - grid_min_) / (double)(number_of_points_); + // for every interval in the diagram: + for (size_t int_no = 0; int_no != p.size(); ++int_no) { + size_t grid_interval_begin = (p[int_no].first - grid_min_) / dx; + size_t grid_interval_end = (p[int_no].second - grid_min_) / dx; + size_t grid_interval_midpoint = (size_t)(0.5 * (grid_interval_begin + grid_interval_end)); -Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename , double grid_min_, double grid_max_ , size_t number_of_points_ , unsigned short dimension ) -{ - std::vector< std::pair< double , double > > p; - if ( dimension == std::numeric_limits::max() ) - { - p = read_persistence_intervals_in_one_dimension_from_file( filename ); + if (dbg) { + std::cerr << "Considering an interval : " << p[int_no].first << "," << p[int_no].second << std::endl; + + std::cerr << "grid_interval_begin : " << grid_interval_begin << std::endl; + std::cerr << "grid_interval_end : " << grid_interval_end << std::endl; + std::cerr << "grid_interval_midpoint : " << grid_interval_midpoint << std::endl; } - else - { - p = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); + + double landscape_value = dx; + for (size_t i = grid_interval_begin + 1; i < grid_interval_midpoint; ++i) { + if (dbg) { + std::cerr << "Adding landscape value (going up) for a point : " << i << " equal : " << landscape_value + << std::endl; + } + if (number_of_levels != std::numeric_limits::max()) { + // we have a heap of no more that number_of_levels values. + // Note that if we are using heaps, we want to know the shortest distance in the heap. + // This is achieved by putting -distance to the heap. + if (this->values_of_landscapes[i].size() >= number_of_levels) { + // in this case, the full heap is build, and we need to check if the landscape_value is not larger than the + // smallest element in the heap. + if (-landscape_value < this->values_of_landscapes[i].front()) { + // if it is, we remove the largest value in the heap, and move on. + std::pop_heap(this->values_of_landscapes[i].begin(), this->values_of_landscapes[i].end()); + this->values_of_landscapes[i][this->values_of_landscapes[i].size() - 1] = -landscape_value; + std::push_heap(this->values_of_landscapes[i].begin(), this->values_of_landscapes[i].end()); + } + } else { + // in this case we are still filling in the array. + this->values_of_landscapes[i].push_back(-landscape_value); + if (this->values_of_landscapes[i].size() == number_of_levels - 1) { + // this->values_of_landscapes[i].size() == number_of_levels + // in this case we need to create the heap. + std::make_heap(this->values_of_landscapes[i].begin(), this->values_of_landscapes[i].end()); + } + } + } else { + // we have vector of all values + this->values_of_landscapes[i].push_back(landscape_value); + } + landscape_value += dx; } - this->set_up_values_of_landscapes( p , grid_min_ , grid_max_ , number_of_points_ ); -} + for (size_t i = grid_interval_midpoint; i <= grid_interval_end; ++i) { + if (landscape_value > 0) { + if (number_of_levels != std::numeric_limits::max()) { + // we have a heap of no more that number_of_levels values + if (this->values_of_landscapes[i].size() >= number_of_levels) { + // in this case, the full heap is build, and we need to check if the landscape_value is not larger than the + // smallest element in the heap. + if (-landscape_value < this->values_of_landscapes[i].front()) { + // if it is, we remove the largest value in the heap, and move on. + std::pop_heap(this->values_of_landscapes[i].begin(), this->values_of_landscapes[i].end()); + this->values_of_landscapes[i][this->values_of_landscapes[i].size() - 1] = -landscape_value; + std::push_heap(this->values_of_landscapes[i].begin(), this->values_of_landscapes[i].end()); + } + } else { + // in this case we are still filling in the array. + this->values_of_landscapes[i].push_back(-landscape_value); + if (this->values_of_landscapes[i].size() == number_of_levels - 1) { + // this->values_of_landscapes[i].size() == number_of_levels + // in this case we need to create the heap. + std::make_heap(this->values_of_landscapes[i].begin(), this->values_of_landscapes[i].end()); + } + } + } else { + this->values_of_landscapes[i].push_back(landscape_value); + } -Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename , double grid_min_, double grid_max_ , size_t number_of_points_, unsigned number_of_levels_of_landscape, unsigned short dimension ) -{ - std::vector< std::pair< double , double > > p; - if ( dimension == std::numeric_limits::max() ) - { - p = read_persistence_intervals_in_one_dimension_from_file( filename ); + if (dbg) { + std::cerr << "Adding landscape value (going down) for a point : " << i << " equal : " << landscape_value + << std::endl; + } + } + landscape_value -= dx; } - else - { - p = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); + } + + if (number_of_levels != std::numeric_limits::max()) { + // in this case, vectors are used as heaps. And, since we want to have the smallest element at the top of + // each heap, we store minus distances. To get if right at the end, we need to multiply each value + // in the heap by -1 to get real vector of distances. + for (size_t pt = 0; pt != this->values_of_landscapes.size(); ++pt) { + for (size_t j = 0; j != this->values_of_landscapes[pt].size(); ++j) { + this->values_of_landscapes[pt][j] *= -1; + } } - this->set_up_values_of_landscapes( p , grid_min_ , grid_max_ , number_of_points_ , number_of_levels_of_landscape ); + } + + // and now we need to sort the values: + for (size_t pt = 0; pt != this->values_of_landscapes.size(); ++pt) { + std::sort(this->values_of_landscapes[pt].begin(), this->values_of_landscapes[pt].end(), std::greater()); + } +} // set_up_values_of_landscapes + +Persistence_landscape_on_grid::Persistence_landscape_on_grid(const std::vector >& p, + double grid_min_, double grid_max_, + size_t number_of_points_) { + this->set_up_values_of_landscapes(p, grid_min_, grid_max_, number_of_points_); +} // Persistence_landscape_on_grid + +Persistence_landscape_on_grid::Persistence_landscape_on_grid(const std::vector >& p, + double grid_min_, double grid_max_, + size_t number_of_points_, + unsigned number_of_levels_of_landscape) { + this->set_up_values_of_landscapes(p, grid_min_, grid_max_, number_of_points_, number_of_levels_of_landscape); } -Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename , size_t number_of_points_ , unsigned short dimension ) -{ - std::vector< std::pair< double , double > > p; - if ( dimension == std::numeric_limits::max() ) - { - p = read_persistence_intervals_in_one_dimension_from_file( filename ); - } - else - { - p = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); - } - double grid_min_ = std::numeric_limits::max(); - double grid_max_ = -std::numeric_limits::max(); - for ( size_t i = 0 ; i != p.size() ; ++i ) - { - if ( p[i].first < grid_min_ )grid_min_ = p[i].first; - if ( p[i].second > grid_max_ )grid_max_ = p[i].second; - } - this->set_up_values_of_landscapes( p , grid_min_ , grid_max_ , number_of_points_ ); +Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename, double grid_min_, double grid_max_, + size_t number_of_points_, unsigned short dimension) { + std::vector > p; + if (dimension == std::numeric_limits::max()) { + p = read_persistence_intervals_in_one_dimension_from_file(filename); + } else { + p = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); + } + this->set_up_values_of_landscapes(p, grid_min_, grid_max_, number_of_points_); } -Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename , size_t number_of_points_ , unsigned number_of_levels_of_landscape , unsigned short dimension ) -{ - std::vector< std::pair< double , double > > p; - if ( dimension == std::numeric_limits::max() ) - { - p = read_persistence_intervals_in_one_dimension_from_file( filename ); - } - else - { - p = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); - } - double grid_min_ = std::numeric_limits::max(); - double grid_max_ = -std::numeric_limits::max(); - for ( size_t i = 0 ; i != p.size() ; ++i ) - { - if ( p[i].first < grid_min_ )grid_min_ = p[i].first; - if ( p[i].second > grid_max_ )grid_max_ = p[i].second; - } - this->set_up_values_of_landscapes( p , grid_min_ , grid_max_ , number_of_points_ , number_of_levels_of_landscape ); +Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename, double grid_min_, double grid_max_, + size_t number_of_points_, + unsigned number_of_levels_of_landscape, + unsigned short dimension) { + std::vector > p; + if (dimension == std::numeric_limits::max()) { + p = read_persistence_intervals_in_one_dimension_from_file(filename); + } else { + p = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); + } + this->set_up_values_of_landscapes(p, grid_min_, grid_max_, number_of_points_, number_of_levels_of_landscape); } +Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename, size_t number_of_points_, + unsigned short dimension) { + std::vector > p; + if (dimension == std::numeric_limits::max()) { + p = read_persistence_intervals_in_one_dimension_from_file(filename); + } else { + p = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); + } + double grid_min_ = std::numeric_limits::max(); + double grid_max_ = -std::numeric_limits::max(); + for (size_t i = 0; i != p.size(); ++i) { + if (p[i].first < grid_min_) grid_min_ = p[i].first; + if (p[i].second > grid_max_) grid_max_ = p[i].second; + } + this->set_up_values_of_landscapes(p, grid_min_, grid_max_, number_of_points_); +} -void Persistence_landscape_on_grid::load_landscape_from_file( const char* filename ) -{ - std::ifstream in; - in.open( filename ); - //check if the file exist. - if ( !in.good() ) - { - std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; - throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; - } - - size_t number_of_points_in_the_grid = 0; - in >> this->grid_min >> this->grid_max >> number_of_points_in_the_grid; - - std::vector< std::vector< double > > v(number_of_points_in_the_grid); - std::string line; - std::getline(in, line); - double number; - for ( size_t i = 0 ; i != number_of_points_in_the_grid ; ++i ) - { - //read a line of a file and convert it to a vector. - std::vector< double > vv; - std::getline(in, line); - std::istringstream stream(line); - while (stream >> number) - { - vv.push_back(number); - } - v[i] = vv; - } - this->values_of_landscapes = v; - in.close(); +Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename, size_t number_of_points_, + unsigned number_of_levels_of_landscape, + unsigned short dimension) { + std::vector > p; + if (dimension == std::numeric_limits::max()) { + p = read_persistence_intervals_in_one_dimension_from_file(filename); + } else { + p = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); + } + double grid_min_ = std::numeric_limits::max(); + double grid_max_ = -std::numeric_limits::max(); + for (size_t i = 0; i != p.size(); ++i) { + if (p[i].first < grid_min_) grid_min_ = p[i].first; + if (p[i].second > grid_max_) grid_max_ = p[i].second; + } + this->set_up_values_of_landscapes(p, grid_min_, grid_max_, number_of_points_, number_of_levels_of_landscape); } -void Persistence_landscape_on_grid::print_to_file( const char* filename )const -{ - std::ofstream out; - out.open( filename ); - - //first we store the parameters of the grid: - out << grid_min << std::endl << grid_max << std::endl << this->values_of_landscapes.size() << std::endl; - - //and now in the following lines, the values of this->values_of_landscapes for the following arguments: - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - for ( size_t j = 0 ; j != this->values_of_landscapes[i].size() ; ++j ) - { - out << this->values_of_landscapes[i][j] << " "; - } - out << std::endl; - } - - out.close(); +void Persistence_landscape_on_grid::load_landscape_from_file(const char* filename) { + std::ifstream in; + in.open(filename); + // check if the file exist. + if (!in.good()) { + std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; + throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; + } + + size_t number_of_points_in_the_grid = 0; + in >> this->grid_min >> this->grid_max >> number_of_points_in_the_grid; + + std::vector > v(number_of_points_in_the_grid); + std::string line; + std::getline(in, line); + double number; + for (size_t i = 0; i != number_of_points_in_the_grid; ++i) { + // read a line of a file and convert it to a vector. + std::vector vv; + std::getline(in, line); + std::istringstream stream(line); + while (stream >> number) { + vv.push_back(number); + } + v[i] = vv; + } + this->values_of_landscapes = v; + in.close(); } -void Persistence_landscape_on_grid::plot( const char* filename, double min_x , double max_x , double min_y , double max_y, size_t from_ , size_t to_ )const -{ - //this program create a gnuplot script file that allows to plot persistence diagram. - std::ofstream out; - - std::ostringstream nameSS; - nameSS << filename << "_GnuplotScript"; - std::string nameStr = nameSS.str(); - out.open( nameStr ); - - if ( min_x == max_x ) - { - std::pair min_max = compute_minimum_maximum(); - out << "set xrange [" << this->grid_min << " : " << this->grid_max << "]" << std::endl; - out << "set yrange [" << min_max.first << " : " << min_max.second << "]" << std::endl; - } - else - { - out << "set xrange [" << min_x << " : " << max_x << "]" << std::endl; - out << "set yrange [" << min_y << " : " << max_y << "]" << std::endl; - } - - size_t number_of_nonzero_levels = this->number_of_nonzero_levels(); - double dx = ( this->grid_max - this->grid_min )/((double)this->values_of_landscapes.size()-1); - - - size_t from = 0; - if ( from_ != std::numeric_limits::max() ) - { - if ( from_ < number_of_nonzero_levels ) - { - from = from_; - } - else - { - return; - } - } - size_t to = number_of_nonzero_levels; - if ( to_ != std::numeric_limits::max() ) - { - if ( to_ < number_of_nonzero_levels ) - { - to = to_; - } - } - - - out << "plot "; - for ( size_t lambda= from ; lambda != to ; ++lambda ) - { - //out << " '-' using 1:2 title 'l" << lambda << "' with lp"; - out << " '-' using 1:2 notitle with lp"; - if ( lambda+1 != to ) - { - out << ", \\"; - } - out << std::endl; +void Persistence_landscape_on_grid::print_to_file(const char* filename) const { + std::ofstream out; + out.open(filename); + + // first we store the parameters of the grid: + out << grid_min << std::endl << grid_max << std::endl << this->values_of_landscapes.size() << std::endl; + + // and now in the following lines, the values of this->values_of_landscapes for the following arguments: + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + for (size_t j = 0; j != this->values_of_landscapes[i].size(); ++j) { + out << this->values_of_landscapes[i][j] << " "; } - - for ( size_t lambda = from ; lambda != to ; ++lambda ) - { - double point = this->grid_min; - for ( size_t i = 0 ; i != this->values_of_landscapes.size() ; ++i ) - { - double value = 0; - if ( this->values_of_landscapes[i].size() > lambda ) - { - value = this->values_of_landscapes[i][lambda]; - } - out << point << " " << value << std::endl; - point += dx; - } - out << "EOF" << std::endl; + out << std::endl; + } + + out.close(); +} + +void Persistence_landscape_on_grid::plot(const char* filename, double min_x, double max_x, double min_y, double max_y, + size_t from_, size_t to_) const { + // this program create a gnuplot script file that allows to plot persistence diagram. + std::ofstream out; + + std::ostringstream nameSS; + nameSS << filename << "_GnuplotScript"; + std::string nameStr = nameSS.str(); + out.open(nameStr); + + if (min_x == max_x) { + std::pair min_max = compute_minimum_maximum(); + out << "set xrange [" << this->grid_min << " : " << this->grid_max << "]" << std::endl; + out << "set yrange [" << min_max.first << " : " << min_max.second << "]" << std::endl; + } else { + out << "set xrange [" << min_x << " : " << max_x << "]" << std::endl; + out << "set yrange [" << min_y << " : " << max_y << "]" << std::endl; + } + + size_t number_of_nonzero_levels = this->number_of_nonzero_levels(); + double dx = (this->grid_max - this->grid_min) / ((double)this->values_of_landscapes.size() - 1); + + size_t from = 0; + if (from_ != std::numeric_limits::max()) { + if (from_ < number_of_nonzero_levels) { + from = from_; + } else { + return; + } + } + size_t to = number_of_nonzero_levels; + if (to_ != std::numeric_limits::max()) { + if (to_ < number_of_nonzero_levels) { + to = to_; + } + } + + out << "plot "; + for (size_t lambda = from; lambda != to; ++lambda) { + // out << " '-' using 1:2 title 'l" << lambda << "' with lp"; + out << " '-' using 1:2 notitle with lp"; + if (lambda + 1 != to) { + out << ", \\"; + } + out << std::endl; + } + + for (size_t lambda = from; lambda != to; ++lambda) { + double point = this->grid_min; + for (size_t i = 0; i != this->values_of_landscapes.size(); ++i) { + double value = 0; + if (this->values_of_landscapes[i].size() > lambda) { + value = this->values_of_landscapes[i][lambda]; + } + out << point << " " << value << std::endl; + point += dx; } - std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" << nameStr << "' in gnuplot to visualize." << std::endl; + out << "EOF" << std::endl; + } + std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" + << nameStr << "' in gnuplot to visualize." << std::endl; } -template < typename T > -Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid ( const Persistence_landscape_on_grid& land1 , const Persistence_landscape_on_grid& land2 ) -{ - //first we need to check if the domains are the same: - if ( !check_if_defined_on_the_same_domain(land1,land2) )throw "Two grids are not compatible"; - - T oper; - Persistence_landscape_on_grid result; - result.values_of_landscapes = std::vector< std::vector< double > >( land1.values_of_landscapes.size() ); - result.grid_min = land1.grid_min; - result.grid_max = land1.grid_max; - - //now we perform the operations: - for ( size_t grid_point = 0 ; grid_point != land1.values_of_landscapes.size() ; ++grid_point ) - { - result.values_of_landscapes[grid_point] = std::vector< double >( std::max( land1.values_of_landscapes[grid_point].size() , land2.values_of_landscapes[grid_point].size() ) ); - for ( size_t lambda = 0 ; lambda != std::max( land1.values_of_landscapes[grid_point].size() , land2.values_of_landscapes[grid_point].size() ) ; ++lambda ) - { - double value1 = 0; - double value2 = 0; - if ( lambda < land1.values_of_landscapes[grid_point].size() )value1 = land1.values_of_landscapes[grid_point][lambda]; - if ( lambda < land2.values_of_landscapes[grid_point].size() )value2 = land2.values_of_landscapes[grid_point][lambda]; - result.values_of_landscapes[grid_point][lambda] = oper( value1 , value2 ); - } - } - - return result; +template +Persistence_landscape_on_grid operation_on_pair_of_landscapes_on_grid(const Persistence_landscape_on_grid& land1, + const Persistence_landscape_on_grid& land2) { + // first we need to check if the domains are the same: + if (!check_if_defined_on_the_same_domain(land1, land2)) throw "Two grids are not compatible"; + + T oper; + Persistence_landscape_on_grid result; + result.values_of_landscapes = std::vector >(land1.values_of_landscapes.size()); + result.grid_min = land1.grid_min; + result.grid_max = land1.grid_max; + + // now we perform the operations: + for (size_t grid_point = 0; grid_point != land1.values_of_landscapes.size(); ++grid_point) { + result.values_of_landscapes[grid_point] = std::vector( + std::max(land1.values_of_landscapes[grid_point].size(), land2.values_of_landscapes[grid_point].size())); + for (size_t lambda = 0; lambda != std::max(land1.values_of_landscapes[grid_point].size(), + land2.values_of_landscapes[grid_point].size()); + ++lambda) { + double value1 = 0; + double value2 = 0; + if (lambda < land1.values_of_landscapes[grid_point].size()) + value1 = land1.values_of_landscapes[grid_point][lambda]; + if (lambda < land2.values_of_landscapes[grid_point].size()) + value2 = land2.values_of_landscapes[grid_point][lambda]; + result.values_of_landscapes[grid_point][lambda] = oper(value1, value2); + } + } + + return result; } -Persistence_landscape_on_grid Persistence_landscape_on_grid::multiply_lanscape_by_real_number_not_overwrite( double x )const -{ - Persistence_landscape_on_grid result; - result.values_of_landscapes = std::vector< std::vector< double > >( this->values_of_landscapes.size() ); - result.grid_min = this->grid_min; - result.grid_max = this->grid_max; - - for ( size_t grid_point = 0 ; grid_point != this->values_of_landscapes.size() ; ++grid_point ) - { - result.values_of_landscapes[grid_point] = std::vector< double >( this->values_of_landscapes[grid_point].size() ); - for ( size_t i = 0 ; i != this->values_of_landscapes[grid_point].size() ; ++i ) - { - result.values_of_landscapes[grid_point][i] = x*this->values_of_landscapes[grid_point][i]; - } - } - - return result; +Persistence_landscape_on_grid Persistence_landscape_on_grid::multiply_lanscape_by_real_number_not_overwrite( + double x) const { + Persistence_landscape_on_grid result; + result.values_of_landscapes = std::vector >(this->values_of_landscapes.size()); + result.grid_min = this->grid_min; + result.grid_max = this->grid_max; + + for (size_t grid_point = 0; grid_point != this->values_of_landscapes.size(); ++grid_point) { + result.values_of_landscapes[grid_point] = std::vector(this->values_of_landscapes[grid_point].size()); + for (size_t i = 0; i != this->values_of_landscapes[grid_point].size(); ++i) { + result.values_of_landscapes[grid_point][i] = x * this->values_of_landscapes[grid_point][i]; + } + } + + return result; } -double compute_max_norm_distance_of_landscapes( const Persistence_landscape_on_grid& first, const Persistence_landscape_on_grid& second ) -{ - double result = 0; - - //first we need to check if first and second is defined on the same domain" - if ( !check_if_defined_on_the_same_domain(first, second) )throw "Two grids are not compatible"; - - for ( size_t i = 0 ; i != first.values_of_landscapes.size() ; ++i ) - { - for ( size_t j = 0 ; j != std::min( first.values_of_landscapes[i].size() , second.values_of_landscapes[i].size() ) ; ++j ) - { - if ( result < abs( first.values_of_landscapes[i][j] - second.values_of_landscapes[i][j] ) ) - { - result = abs( first.values_of_landscapes[i][j] - second.values_of_landscapes[i][j] ); - } - } - if ( first.values_of_landscapes[i].size() == std::min( first.values_of_landscapes[i].size() , second.values_of_landscapes[i].size() ) ) - { - for ( size_t j = first.values_of_landscapes[i].size() ; j != second.values_of_landscapes[i].size() ; ++j ) - { - if ( result < second.values_of_landscapes[i][j] )result = second.values_of_landscapes[i][j]; - } - } - if ( second.values_of_landscapes[i].size() == std::min( first.values_of_landscapes[i].size() , second.values_of_landscapes[i].size() ) ) - { - for ( size_t j = second.values_of_landscapes[i].size() ; j != first.values_of_landscapes[i].size() ; ++j ) - { - if ( result < first.values_of_landscapes[i][j] )result = first.values_of_landscapes[i][j]; - } - } - } - return result; +double compute_max_norm_distance_of_landscapes(const Persistence_landscape_on_grid& first, + const Persistence_landscape_on_grid& second) { + double result = 0; + + // first we need to check if first and second is defined on the same domain" + if (!check_if_defined_on_the_same_domain(first, second)) throw "Two grids are not compatible"; + + for (size_t i = 0; i != first.values_of_landscapes.size(); ++i) { + for (size_t j = 0; j != std::min(first.values_of_landscapes[i].size(), second.values_of_landscapes[i].size()); + ++j) { + if (result < abs(first.values_of_landscapes[i][j] - second.values_of_landscapes[i][j])) { + result = abs(first.values_of_landscapes[i][j] - second.values_of_landscapes[i][j]); + } + } + if (first.values_of_landscapes[i].size() == + std::min(first.values_of_landscapes[i].size(), second.values_of_landscapes[i].size())) { + for (size_t j = first.values_of_landscapes[i].size(); j != second.values_of_landscapes[i].size(); ++j) { + if (result < second.values_of_landscapes[i][j]) result = second.values_of_landscapes[i][j]; + } + } + if (second.values_of_landscapes[i].size() == + std::min(first.values_of_landscapes[i].size(), second.values_of_landscapes[i].size())) { + for (size_t j = second.values_of_landscapes[i].size(); j != first.values_of_landscapes[i].size(); ++j) { + if (result < first.values_of_landscapes[i][j]) result = first.values_of_landscapes[i][j]; + } + } + } + return result; } -}//namespace Persistence_representations -}//namespace Gudhi +} // namespace Persistence_representations +} // namespace Gudhi #endif // PERSISTENCE_LANDSCAPE_ON_GRID_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index 7cfb8e0b..587eb212 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -20,7 +20,6 @@ * along with this program. If not, see . */ - #ifndef PERSISTENCE_VECTORS_H_ #define PERSISTENCE_VECTORS_H_ @@ -31,28 +30,21 @@ #include #include -//gudhi include +// gudhi include #include #include #include - -namespace Gudhi -{ -namespace Persistence_representations -{ +namespace Gudhi { +namespace Persistence_representations { template -struct Maximum_distance -{ - double operator() ( const std::pair< T,T >& f , const std::pair& s ) - { - return std::max( fabs( f.first - s.first ) , fabs( f.second - s.second ) ); - } +struct Maximum_distance { + double operator()(const std::pair& f, const std::pair& s) { + return std::max(fabs(f.first - s.first), fabs(f.second - s.second)); + } }; - - /** * \class Vector_distances_in_diagram Persistence_vectors.h gudhi/Persistence_vectors.h * \brief A class implementing persistence vectors. @@ -69,665 +61,579 @@ struct Maximum_distance * Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product **/ template -class Vector_distances_in_diagram -{ -public: - /** - * The default constructor. - **/ - Vector_distances_in_diagram(){}; - - /** - * The constructor that takes as an input a multiset of persistence intervals (given as vector of birth-death pairs). The second parameter is the desired length of the output vectors. - **/ - Vector_distances_in_diagram( const std::vector< std::pair< double , double > >& intervals , size_t where_to_cut ); - - /** - * The constructor taking as an input a file with birth-death pairs. The second parameter is the desired length of the output vectors. - **/ - Vector_distances_in_diagram( const char* filename , size_t where_to_cut , unsigned dimension = std::numeric_limits::max() ); - - - /** - * Writing to a stream. - **/ - template - friend std::ostream& operator << ( std::ostream& out , const Vector_distances_in_diagram& d ) - { - for ( size_t i = 0 ; i != std::min( d.sorted_vector_of_distances.size() , d.where_to_cut) ; ++i ) - { - out << d.sorted_vector_of_distances[i] << " "; - } - return out; +class Vector_distances_in_diagram { + public: + /** + * The default constructor. + **/ + Vector_distances_in_diagram(){}; + + /** + * The constructor that takes as an input a multiset of persistence intervals (given as vector of birth-death + *pairs). The second parameter is the desired length of the output vectors. + **/ + Vector_distances_in_diagram(const std::vector >& intervals, size_t where_to_cut); + + /** + * The constructor taking as an input a file with birth-death pairs. The second parameter is the desired length of + *the output vectors. + **/ + Vector_distances_in_diagram(const char* filename, size_t where_to_cut, + unsigned dimension = std::numeric_limits::max()); + + /** + * Writing to a stream. + **/ + template + friend std::ostream& operator<<(std::ostream& out, const Vector_distances_in_diagram& d) { + for (size_t i = 0; i != std::min(d.sorted_vector_of_distances.size(), d.where_to_cut); ++i) { + out << d.sorted_vector_of_distances[i] << " "; } - - /** - * This procedure gives the value of a vector on a given position. - **/ - inline double vector_in_position( size_t position )const - { - if ( position >= this->sorted_vector_of_distances.size() )throw("Wrong position in accessing Vector_distances_in_diagram::sorted_vector_of_distances\n"); - return this->sorted_vector_of_distances[position]; + return out; + } + + /** + * This procedure gives the value of a vector on a given position. + **/ + inline double vector_in_position(size_t position) const { + if (position >= this->sorted_vector_of_distances.size()) + throw("Wrong position in accessing Vector_distances_in_diagram::sorted_vector_of_distances\n"); + return this->sorted_vector_of_distances[position]; + } + + /** + * Return a size of a vector. + **/ + inline size_t size() const { return this->sorted_vector_of_distances.size(); } + + /** + * Write a vector to a file. + **/ + void write_to_file(const char* filename) const; + + /** + * Write a vector to a file. + **/ + void print_to_file(const char* filename) const { this->write_to_file(filename); } + + /** + * Loading a vector to a file. + **/ + void load_from_file(const char* filename); + + /** + * Comparison operators: + **/ + bool operator==(const Vector_distances_in_diagram& second) const { + if (this->sorted_vector_of_distances.size() != second.sorted_vector_of_distances.size()) return false; + for (size_t i = 0; i != this->sorted_vector_of_distances.size(); ++i) { + if (!almost_equal(this->sorted_vector_of_distances[i], second.sorted_vector_of_distances[i])) return false; } - - /** - * Return a size of a vector. - **/ - inline size_t size()const{return this->sorted_vector_of_distances.size();} - - /** - * Write a vector to a file. - **/ - void write_to_file( const char* filename )const; - - /** - * Write a vector to a file. - **/ - void print_to_file( const char* filename )const - { - this->write_to_file( filename ); - } - - /** - * Loading a vector to a file. - **/ - void load_from_file( const char* filename ); - - /** - * Comparison operators: - **/ - bool operator == ( const Vector_distances_in_diagram& second )const - { - if ( this->sorted_vector_of_distances.size() != second.sorted_vector_of_distances.size() )return false; - for ( size_t i = 0 ; i != this->sorted_vector_of_distances.size() ; ++i ) - { - if ( !almost_equal(this->sorted_vector_of_distances[i] , second.sorted_vector_of_distances[i]) )return false; - } - return true; - } - - bool operator != ( const Vector_distances_in_diagram& second )const - { - return !( *this == second ); - } - - //Implementations of functions for various concepts. - /** - * Compute projection to real numbers of persistence vector. This function is required by the Real_valued_topological_data concept - * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it - * will be most likely changed in the next versions. - **/ - double project_to_R( int number_of_function )const; - /** - * The function gives the number of possible projections to R. This function is required by the Real_valued_topological_data concept. - **/ - size_t number_of_projections_to_R()const - { - return this->number_of_functions_for_projections_to_reals; - } - - /** - * Compute a vectorization of a persistent vectors. It is required in a concept Vectorized_topological_data. - **/ - std::vector vectorize( int number_of_function )const; - /** - * This function return the number of functions that allows vectorization of a persistence vector. It is required in a concept Vectorized_topological_data. - **/ - size_t number_of_vectorize_functions()const - { - return this->number_of_functions_for_vectorization; - } - - /** - * Compute a average of two persistent vectors. This function is required by Topological_data_with_averages concept. - **/ - void compute_average( const std::vector< Vector_distances_in_diagram* >& to_average ); - - /** - * Compute a distance of two persistent vectors. This function is required in Topological_data_with_distances concept. - * For max norm distance, set power to std::numeric_limits::max() - **/ - double distance( const Vector_distances_in_diagram& second , double power = 1)const; - - /** - * Compute a scalar product of two persistent vectors. This function is required in Topological_data_with_scalar_product concept. - **/ - double compute_scalar_product( const Vector_distances_in_diagram& second )const; - //end of implementation of functions needed for concepts. - - - /** - * For visualization use output from vectorize and build histograms. - **/ - std::vector< double > output_for_visualization()const - { - return this->sorted_vector_of_distances; - } - - - /** - * Create a gnuplot script to visualize the data structure. - **/ - void plot( const char* filename )const - { - std::stringstream gnuplot_script; - gnuplot_script << filename << "_GnuplotScript"; - std::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 != this->sorted_vector_of_distances.size() ; ++i ) - { - out << this->sorted_vector_of_distances[i] << std::endl; - } - out < get_x_range()const - { - return std::make_pair( 0 , this->sorted_vector_of_distances.size() ); - } - - /** - * The y-range of the persistence vector. - **/ - std::pair< double , double > get_y_range()const - { - if ( this->sorted_vector_of_distances.size() == 0 )return std::make_pair(0,0); - return std::make_pair( this->sorted_vector_of_distances[0] , 0); - } - - //arithmetic operations: - template < typename Operation_type > - friend Vector_distances_in_diagram operation_on_pair_of_vectors( const Vector_distances_in_diagram& first , const Vector_distances_in_diagram& second , Operation_type opertion ) - { - Vector_distances_in_diagram result; - //Operation_type operation; - result.sorted_vector_of_distances.reserve(std::max( first.sorted_vector_of_distances.size() , second.sorted_vector_of_distances.size() ) ); - for ( size_t i = 0 ; i != std::min( first.sorted_vector_of_distances.size() , second.sorted_vector_of_distances.size() ) ; ++i ) - { - result.sorted_vector_of_distances.push_back( opertion( first.sorted_vector_of_distances[i] , second.sorted_vector_of_distances[i]) ); - } - if ( first.sorted_vector_of_distances.size() == std::min( first.sorted_vector_of_distances.size() , second.sorted_vector_of_distances.size() ) ) - { - for ( size_t i = std::min( first.sorted_vector_of_distances.size() , second.sorted_vector_of_distances.size() ) ; - i != std::max( first.sorted_vector_of_distances.size() , second.sorted_vector_of_distances.size() ) ; ++i ) - { - result.sorted_vector_of_distances.push_back( opertion(0,second.sorted_vector_of_distances[i]) ); - } - } - else - { - for ( size_t i = std::min( first.sorted_vector_of_distances.size() , second.sorted_vector_of_distances.size() ) ; - i != std::max( first.sorted_vector_of_distances.size() , second.sorted_vector_of_distances.size() ) ; ++i ) - { - result.sorted_vector_of_distances.push_back( opertion(first.sorted_vector_of_distances[i],0) ); - } - } - return result; - }//operation_on_pair_of_vectors - - /** - * This function implements an operation of multiplying Vector_distances_in_diagram by a scalar. - **/ - Vector_distances_in_diagram multiply_by_scalar( double scalar )const - { - Vector_distances_in_diagram result; - result.sorted_vector_of_distances.reserve( this->sorted_vector_of_distances.size() ); - for ( size_t i = 0 ; i != this->sorted_vector_of_distances.size() ; ++i ) - { - result.sorted_vector_of_distances.push_back( scalar * this->sorted_vector_of_distances[i] ); - } - return result; - }//multiply_by_scalar - - - - /** - * This function computes a sum of two objects of a type Vector_distances_in_diagram. - **/ - friend Vector_distances_in_diagram operator+( const Vector_distances_in_diagram& first , const Vector_distances_in_diagram& second ) - { - return operation_on_pair_of_vectors( first , second , std::plus() ); - } - /** - * This function computes a difference of two objects of a type Vector_distances_in_diagram. - **/ - friend Vector_distances_in_diagram operator-( const Vector_distances_in_diagram& first , const Vector_distances_in_diagram& second ) - { - return operation_on_pair_of_vectors( first , second , std::minus() ); - } - /** - * This function computes a product of an object of a type Vector_distances_in_diagram with real number. - **/ - friend Vector_distances_in_diagram operator*( double scalar , const Vector_distances_in_diagram& A ) - { - return A.multiply_by_scalar( scalar ); - } - /** - * This function computes a product of an object of a type Vector_distances_in_diagram with real number. - **/ - friend Vector_distances_in_diagram operator*( const Vector_distances_in_diagram& A , double scalar ) - { - return A.multiply_by_scalar( scalar ); - } - /** - * This function computes a product of an object of a type Vector_distances_in_diagram with real number. - **/ - Vector_distances_in_diagram operator*( double scalar ) - { - return this->multiply_by_scalar( scalar ); - } - /** - * += operator for Vector_distances_in_diagram. - **/ - Vector_distances_in_diagram operator += ( const Vector_distances_in_diagram& rhs ) - { - *this = *this + rhs; - return *this; - } - /** - * -= operator for Vector_distances_in_diagram. - **/ - Vector_distances_in_diagram operator -= ( const Vector_distances_in_diagram& rhs ) - { - *this = *this - rhs; - return *this; + return true; + } + + bool operator!=(const Vector_distances_in_diagram& second) const { return !(*this == second); } + + // Implementations of functions for various concepts. + /** + * Compute projection to real numbers of persistence vector. This function is required by the + *Real_valued_topological_data concept + * At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when + *using it, keep in mind that it + * will be most likely changed in the next versions. + **/ + double project_to_R(int number_of_function) const; + /** + * The function gives the number of possible projections to R. This function is required by the + *Real_valued_topological_data concept. + **/ + size_t number_of_projections_to_R() const { return this->number_of_functions_for_projections_to_reals; } + + /** + * Compute a vectorization of a persistent vectors. It is required in a concept Vectorized_topological_data. + **/ + std::vector vectorize(int number_of_function) const; + /** + * This function return the number of functions that allows vectorization of a persistence vector. It is required + *in a concept Vectorized_topological_data. + **/ + size_t number_of_vectorize_functions() const { return this->number_of_functions_for_vectorization; } + + /** + * Compute a average of two persistent vectors. This function is required by Topological_data_with_averages concept. + **/ + void compute_average(const std::vector& to_average); + + /** + * Compute a distance of two persistent vectors. This function is required in Topological_data_with_distances concept. + * For max norm distance, set power to std::numeric_limits::max() + **/ + double distance(const Vector_distances_in_diagram& second, double power = 1) const; + + /** + * Compute a scalar product of two persistent vectors. This function is required in + *Topological_data_with_scalar_product concept. + **/ + double compute_scalar_product(const Vector_distances_in_diagram& second) const; + // end of implementation of functions needed for concepts. + + /** + * For visualization use output from vectorize and build histograms. + **/ + std::vector output_for_visualization() const { return this->sorted_vector_of_distances; } + + /** + * Create a gnuplot script to visualize the data structure. + **/ + void plot(const char* filename) const { + std::stringstream gnuplot_script; + gnuplot_script << filename << "_GnuplotScript"; + std::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 != this->sorted_vector_of_distances.size(); ++i) { + out << this->sorted_vector_of_distances[i] << std::endl; } - /** - * *= operator for Vector_distances_in_diagram. - **/ - Vector_distances_in_diagram operator *= ( double x ) - { - *this = *this*x; - return *this; + out << std::endl; + out.close(); + std::cout << "To visualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; + } + + /** + * The x-range of the persistence vector. + **/ + std::pair get_x_range() const { return std::make_pair(0, this->sorted_vector_of_distances.size()); } + + /** + * The y-range of the persistence vector. + **/ + std::pair get_y_range() const { + if (this->sorted_vector_of_distances.size() == 0) return std::make_pair(0, 0); + return std::make_pair(this->sorted_vector_of_distances[0], 0); + } + + // arithmetic operations: + template + friend Vector_distances_in_diagram operation_on_pair_of_vectors(const Vector_distances_in_diagram& first, + const Vector_distances_in_diagram& second, + Operation_type opertion) { + Vector_distances_in_diagram result; + // Operation_type operation; + result.sorted_vector_of_distances.reserve( + std::max(first.sorted_vector_of_distances.size(), second.sorted_vector_of_distances.size())); + for (size_t i = 0; i != std::min(first.sorted_vector_of_distances.size(), second.sorted_vector_of_distances.size()); + ++i) { + result.sorted_vector_of_distances.push_back( + opertion(first.sorted_vector_of_distances[i], second.sorted_vector_of_distances[i])); } - /** - * /= operator for Vector_distances_in_diagram. - **/ - Vector_distances_in_diagram operator /= ( double x ) - { - if ( x == 0 )throw( "In operator /=, division by 0. Program terminated." ); - *this = *this * (1/x); - return *this; + if (first.sorted_vector_of_distances.size() == + std::min(first.sorted_vector_of_distances.size(), second.sorted_vector_of_distances.size())) { + for (size_t i = std::min(first.sorted_vector_of_distances.size(), second.sorted_vector_of_distances.size()); + i != std::max(first.sorted_vector_of_distances.size(), second.sorted_vector_of_distances.size()); ++i) { + result.sorted_vector_of_distances.push_back(opertion(0, second.sorted_vector_of_distances[i])); + } + } else { + for (size_t i = std::min(first.sorted_vector_of_distances.size(), second.sorted_vector_of_distances.size()); + i != std::max(first.sorted_vector_of_distances.size(), second.sorted_vector_of_distances.size()); ++i) { + result.sorted_vector_of_distances.push_back(opertion(first.sorted_vector_of_distances[i], 0)); + } } - - -private: - std::vector< std::pair< double , double > > intervals; - std::vector< double > sorted_vector_of_distances; - size_t number_of_functions_for_vectorization; - size_t number_of_functions_for_projections_to_reals; - size_t where_to_cut; - - void compute_sorted_vector_of_distances_via_heap( size_t where_to_cut ); - void compute_sorted_vector_of_distances_via_vector_sorting( size_t where_to_cut ); - - Vector_distances_in_diagram( const std::vector< double >& sorted_vector_of_distances_ ):sorted_vector_of_distances(sorted_vector_of_distances_) - { - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); - } - - void set_up_numbers_of_functions_for_vectorization_and_projections_to_reals() - { - //warning, this function can be only called after filling in the intervals vector. - this->number_of_functions_for_vectorization = this->sorted_vector_of_distances.size(); - this->number_of_functions_for_projections_to_reals = this->sorted_vector_of_distances.size(); - } -}; + return result; + } // operation_on_pair_of_vectors + + /** + * This function implements an operation of multiplying Vector_distances_in_diagram by a scalar. + **/ + Vector_distances_in_diagram multiply_by_scalar(double scalar) const { + Vector_distances_in_diagram result; + result.sorted_vector_of_distances.reserve(this->sorted_vector_of_distances.size()); + for (size_t i = 0; i != this->sorted_vector_of_distances.size(); ++i) { + result.sorted_vector_of_distances.push_back(scalar * this->sorted_vector_of_distances[i]); + } + return result; + } // multiply_by_scalar + + /** + * This function computes a sum of two objects of a type Vector_distances_in_diagram. + **/ + friend Vector_distances_in_diagram operator+(const Vector_distances_in_diagram& first, + const Vector_distances_in_diagram& second) { + return operation_on_pair_of_vectors(first, second, std::plus()); + } + /** +* This function computes a difference of two objects of a type Vector_distances_in_diagram. +**/ + friend Vector_distances_in_diagram operator-(const Vector_distances_in_diagram& first, + const Vector_distances_in_diagram& second) { + return operation_on_pair_of_vectors(first, second, std::minus()); + } + /** +* This function computes a product of an object of a type Vector_distances_in_diagram with real number. +**/ + friend Vector_distances_in_diagram operator*(double scalar, const Vector_distances_in_diagram& A) { + return A.multiply_by_scalar(scalar); + } + /** +* This function computes a product of an object of a type Vector_distances_in_diagram with real number. +**/ + friend Vector_distances_in_diagram operator*(const Vector_distances_in_diagram& A, double scalar) { + return A.multiply_by_scalar(scalar); + } + /** +* This function computes a product of an object of a type Vector_distances_in_diagram with real number. +**/ + Vector_distances_in_diagram operator*(double scalar) { return this->multiply_by_scalar(scalar); } + /** + * += operator for Vector_distances_in_diagram. + **/ + Vector_distances_in_diagram operator+=(const Vector_distances_in_diagram& rhs) { + *this = *this + rhs; + return *this; + } + /** + * -= operator for Vector_distances_in_diagram. + **/ + Vector_distances_in_diagram operator-=(const Vector_distances_in_diagram& rhs) { + *this = *this - rhs; + return *this; + } + /** + * *= operator for Vector_distances_in_diagram. + **/ + Vector_distances_in_diagram operator*=(double x) { + *this = *this * x; + return *this; + } + /** + * /= operator for Vector_distances_in_diagram. + **/ + Vector_distances_in_diagram operator/=(double x) { + if (x == 0) throw("In operator /=, division by 0. Program terminated."); + *this = *this * (1 / x); + return *this; + } + + private: + std::vector > intervals; + std::vector sorted_vector_of_distances; + size_t number_of_functions_for_vectorization; + size_t number_of_functions_for_projections_to_reals; + size_t where_to_cut; + + void compute_sorted_vector_of_distances_via_heap(size_t where_to_cut); + void compute_sorted_vector_of_distances_via_vector_sorting(size_t where_to_cut); + + Vector_distances_in_diagram(const std::vector& sorted_vector_of_distances_) + : sorted_vector_of_distances(sorted_vector_of_distances_) { + this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); + } + void set_up_numbers_of_functions_for_vectorization_and_projections_to_reals() { + // warning, this function can be only called after filling in the intervals vector. + this->number_of_functions_for_vectorization = this->sorted_vector_of_distances.size(); + this->number_of_functions_for_projections_to_reals = this->sorted_vector_of_distances.size(); + } +}; template -Vector_distances_in_diagram::Vector_distances_in_diagram( const std::vector< std::pair< double,double > >& intervals_ , size_t where_to_cut_ ):where_to_cut(where_to_cut_) -{ - std::vector< std::pair< double,double > > i( intervals_ ); - this->intervals = i; - //this->compute_sorted_vector_of_distances_via_heap( where_to_cut ); - this->compute_sorted_vector_of_distances_via_vector_sorting(where_to_cut); - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); +Vector_distances_in_diagram::Vector_distances_in_diagram(const std::vector >& intervals_, + size_t where_to_cut_) + : where_to_cut(where_to_cut_) { + std::vector > i(intervals_); + this->intervals = i; + // this->compute_sorted_vector_of_distances_via_heap( where_to_cut ); + this->compute_sorted_vector_of_distances_via_vector_sorting(where_to_cut); + this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); } template -Vector_distances_in_diagram::Vector_distances_in_diagram( const char* filename , size_t where_to_cut , unsigned dimension ):where_to_cut(where_to_cut) -{ - std::vector< std::pair< double , double > > intervals; - if ( dimension == std::numeric_limits::max() ) - { - intervals = read_persistence_intervals_in_one_dimension_from_file( filename ); - } - else - { - intervals = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); - } - this->intervals = intervals; - this->compute_sorted_vector_of_distances_via_heap( where_to_cut ); - //this->compute_sorted_vector_of_distances_via_vector_sorting( where_to_cut ); - set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); +Vector_distances_in_diagram::Vector_distances_in_diagram(const char* filename, size_t where_to_cut, + unsigned dimension) + : where_to_cut(where_to_cut) { + std::vector > intervals; + if (dimension == std::numeric_limits::max()) { + intervals = read_persistence_intervals_in_one_dimension_from_file(filename); + } else { + intervals = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); + } + this->intervals = intervals; + this->compute_sorted_vector_of_distances_via_heap(where_to_cut); + // this->compute_sorted_vector_of_distances_via_vector_sorting( where_to_cut ); + set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); } -template < typename F> -void Vector_distances_in_diagram::compute_sorted_vector_of_distances_via_heap( size_t where_to_cut ) -{ - - bool dbg = false; - if ( dbg ) - { - std::cerr << "Here are the intervals : \n"; - for ( size_t i = 0 ; i != this->intervals.size() ; ++i ) - { - std::cerr << this->intervals[i].first << " , " << this->intervals[i].second <intervals.size() * ( this->intervals.size() - 1 ) + this->intervals.size())); - - std::vector< double > heap( where_to_cut , std::numeric_limits::max() ); - std::make_heap (heap.begin(),heap.end()); - F f; - - //for every pair of points in the diagram, compute the minimum of their distance, and distance of those points from diagonal - for ( size_t i = 0 ; i < this->intervals.size() ; ++i ) - { - for ( size_t j = i+1 ; j < this->intervals.size() ; ++j ) - { - double value = std::min( - f( this->intervals[i] , this->intervals[j] ), - std::min( - f( this->intervals[i] , std::make_pair( 0.5*(this->intervals[i].first+this->intervals[i].second) , 0.5*(this->intervals[i].first+this->intervals[i].second) ) ), - f( this->intervals[j] , std::make_pair( 0.5*(this->intervals[j].first+this->intervals[j].second) , 0.5*(this->intervals[j].first+this->intervals[j].second) ) ) - ) - ); - - if ( dbg ) - { - std::cerr << "Value : " << value < +void Vector_distances_in_diagram::compute_sorted_vector_of_distances_via_heap(size_t where_to_cut) { + bool dbg = false; + if (dbg) { + std::cerr << "Here are the intervals : \n"; + for (size_t i = 0; i != this->intervals.size(); ++i) { + std::cerr << this->intervals[i].first << " , " << this->intervals[i].second << std::endl; } - - //now add distances of all points from diagonal - for ( size_t i = 0 ; i < this->intervals.size() ; ++i ) - { - double value = f( this->intervals[i] , std::make_pair( 0.5*(this->intervals[i].first+this->intervals[i].second) , 0.5*(this->intervals[i].first+this->intervals[i].second) ) ); - if ( -value < heap.front() ) - { - //remove the first element from the heap - std::pop_heap (heap.begin(),heap.end()); - //heap.pop_back(); - //and put value there instead: - //heap.push_back(-value); - heap[ where_to_cut-1 ] = -value; - std::push_heap (heap.begin(),heap.end()); - } - } - - - std::sort_heap (heap.begin(),heap.end()); - for ( size_t i = 0 ; i != heap.size() ; ++i ) - { - if ( heap[i] == std::numeric_limits::max() ) - { - heap[i] = 0; - } - else - { - heap[i] *= -1; + } + where_to_cut = std::min( + where_to_cut, (size_t)(0.5 * this->intervals.size() * (this->intervals.size() - 1) + this->intervals.size())); + + std::vector heap(where_to_cut, std::numeric_limits::max()); + std::make_heap(heap.begin(), heap.end()); + F f; + + // for every pair of points in the diagram, compute the minimum of their distance, and distance of those points from + // diagonal + for (size_t i = 0; i < this->intervals.size(); ++i) { + for (size_t j = i + 1; j < this->intervals.size(); ++j) { + double value = std::min( + f(this->intervals[i], this->intervals[j]), + std::min( + f(this->intervals[i], std::make_pair(0.5 * (this->intervals[i].first + this->intervals[i].second), + 0.5 * (this->intervals[i].first + this->intervals[i].second))), + f(this->intervals[j], std::make_pair(0.5 * (this->intervals[j].first + this->intervals[j].second), + 0.5 * (this->intervals[j].first + this->intervals[j].second))))); + + if (dbg) { + std::cerr << "Value : " << value << std::endl; + std::cerr << "heap.front() : " << heap.front() << std::endl; + getchar(); + } + + if (-value < heap.front()) { + if (dbg) { + std::cerr << "Replacing : " << heap.front() << " with : " << -value << std::endl; + getchar(); } + // remove the first element from the heap + std::pop_heap(heap.begin(), heap.end()); + // heap.pop_back(); + // and put value there instead: + // heap.push_back(-value); + heap[where_to_cut - 1] = -value; + std::push_heap(heap.begin(), heap.end()); + } + } + } + + // now add distances of all points from diagonal + for (size_t i = 0; i < this->intervals.size(); ++i) { + double value = f(this->intervals[i], std::make_pair(0.5 * (this->intervals[i].first + this->intervals[i].second), + 0.5 * (this->intervals[i].first + this->intervals[i].second))); + if (-value < heap.front()) { + // remove the first element from the heap + std::pop_heap(heap.begin(), heap.end()); + // heap.pop_back(); + // and put value there instead: + // heap.push_back(-value); + heap[where_to_cut - 1] = -value; + std::push_heap(heap.begin(), heap.end()); + } + } + + std::sort_heap(heap.begin(), heap.end()); + for (size_t i = 0; i != heap.size(); ++i) { + if (heap[i] == std::numeric_limits::max()) { + heap[i] = 0; + } else { + heap[i] *= -1; } - - if ( dbg ) - { - std::cerr << "This is the heap after all the operations :\n"; - for ( size_t i = 0 ; i != heap.size() ; ++i ) - { - std::cout << heap[i] << " "; - } - std::cout <sorted_vector_of_distances = heap; + } + + if (dbg) { + std::cerr << "This is the heap after all the operations :\n"; + for (size_t i = 0; i != heap.size(); ++i) { + std::cout << heap[i] << " "; + } + std::cout << std::endl; + } + + this->sorted_vector_of_distances = heap; } +template +void Vector_distances_in_diagram::compute_sorted_vector_of_distances_via_vector_sorting(size_t where_to_cut) { + std::vector distances; + distances.reserve((size_t)(0.5 * this->intervals.size() * (this->intervals.size() - 1) + this->intervals.size())); + F f; + + // for every pair of points in the diagram, compute the minimum of their distance, and distance of those points from + // diagonal + for (size_t i = 0; i < this->intervals.size(); ++i) { + // add distance of i-th point in the diagram from the diagonal to the distances vector + distances.push_back( + f(this->intervals[i], std::make_pair(0.5 * (this->intervals[i].first + this->intervals[i].second), + 0.5 * (this->intervals[i].first + this->intervals[i].second)))); + for (size_t j = i + 1; j < this->intervals.size(); ++j) { + double value = std::min( + f(this->intervals[i], this->intervals[j]), + std::min( + f(this->intervals[i], std::make_pair(0.5 * (this->intervals[i].first + this->intervals[i].second), + 0.5 * (this->intervals[i].first + this->intervals[i].second))), + f(this->intervals[j], std::make_pair(0.5 * (this->intervals[j].first + this->intervals[j].second), + 0.5 * (this->intervals[j].first + this->intervals[j].second))))); + distances.push_back(value); + } + } + std::sort(distances.begin(), distances.end(), std::greater()); + if (distances.size() > where_to_cut) distances.resize(where_to_cut); + this->sorted_vector_of_distances = distances; +} +// Implementations of functions for various concepts. +template +double Vector_distances_in_diagram::project_to_R(int number_of_function) const { + if ((size_t)number_of_function > this->number_of_functions_for_projections_to_reals) + throw "Wrong index of a function in a method Vector_distances_in_diagram::project_to_R"; + if (number_of_function < 0) + throw "Wrong index of a function in a method Vector_distances_in_diagram::project_to_R"; + + double result = 0; + for (size_t i = 0; i != (size_t)number_of_function; ++i) { + result += sorted_vector_of_distances[i]; + } + return result; +} -template < typename F> -void Vector_distances_in_diagram::compute_sorted_vector_of_distances_via_vector_sorting( size_t where_to_cut ) -{ - std::vector< double > distances; - distances.reserve( (size_t)(0.5 * this->intervals.size() * ( this->intervals.size() - 1 ) + this->intervals.size()) ); - F f; - - //for every pair of points in the diagram, compute the minimum of their distance, and distance of those points from diagonal - for ( size_t i = 0 ; i < this->intervals.size() ; ++i ) - { - //add distance of i-th point in the diagram from the diagonal to the distances vector - distances.push_back( f( this->intervals[i] , std::make_pair( 0.5*(this->intervals[i].first+this->intervals[i].second) , 0.5*(this->intervals[i].first+this->intervals[i].second) ) ) ); - for ( size_t j = i+1 ; j < this->intervals.size() ; ++j ) - { - double value = std::min( - f( this->intervals[i] , this->intervals[j] ), - std::min( - f( this->intervals[i] , std::make_pair( 0.5*(this->intervals[i].first+this->intervals[i].second) , 0.5*(this->intervals[i].first+this->intervals[i].second) ) ), - f( this->intervals[j] , std::make_pair( 0.5*(this->intervals[j].first+this->intervals[j].second) , 0.5*(this->intervals[j].first+this->intervals[j].second) ) ) - ) - ); - distances.push_back( value ); - - } +template +void Vector_distances_in_diagram::compute_average(const std::vector& to_average) { + if (to_average.size() == 0) { + (*this) = Vector_distances_in_diagram(); + return; + } + + size_t maximal_length_of_vector = 0; + for (size_t i = 0; i != to_average.size(); ++i) { + if (to_average[i]->sorted_vector_of_distances.size() > maximal_length_of_vector) { + maximal_length_of_vector = to_average[i]->sorted_vector_of_distances.size(); } - std::sort( distances.begin() , distances.end() , std::greater() ); - if ( distances.size() > where_to_cut )distances.resize( where_to_cut ); - - this->sorted_vector_of_distances = distances; -} + } + std::vector av(maximal_length_of_vector, 0); + for (size_t i = 0; i != to_average.size(); ++i) { + for (size_t j = 0; j != to_average[i]->sorted_vector_of_distances.size(); ++j) { + av[j] += to_average[i]->sorted_vector_of_distances[j]; + } + } + for (size_t i = 0; i != maximal_length_of_vector; ++i) { + av[i] /= (double)to_average.size(); + } + this->sorted_vector_of_distances = av; + this->where_to_cut = av.size(); +} -//Implementations of functions for various concepts. template -double Vector_distances_in_diagram::project_to_R( int number_of_function )const -{ - if ( (size_t)number_of_function > this->number_of_functions_for_projections_to_reals )throw "Wrong index of a function in a method Vector_distances_in_diagram::project_to_R"; - if ( number_of_function < 0 )throw "Wrong index of a function in a method Vector_distances_in_diagram::project_to_R"; - - double result = 0; - for ( size_t i = 0 ; i != (size_t)number_of_function ; ++i ) - { - result += sorted_vector_of_distances[i]; - } - return result; +double Vector_distances_in_diagram::distance(const Vector_distances_in_diagram& second_, double power) const { + bool dbg = false; + + if (dbg) { + std::cerr << "Entering double Vector_distances_in_diagram::distance( const Abs_Topological_data_with_distances* " + "second , double power ) procedure \n"; + std::cerr << "Power : " << power << std::endl; + std::cerr << "This : " << *this << std::endl; + std::cerr << "second : " << second_ << std::endl; + } + + double result = 0; + for (size_t i = 0; i != std::min(this->sorted_vector_of_distances.size(), second_.sorted_vector_of_distances.size()); + ++i) { + if (power == 1) { + if (dbg) { + std::cerr << "|" << this->sorted_vector_of_distances[i] << " - " << second_.sorted_vector_of_distances[i] + << " | : " << fabs(this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i]) + << std::endl; + } + result += fabs(this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i]); + } else { + if (power < std::numeric_limits::max()) { + result += std::pow(fabs(this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i]), power); + } else { + // max norm + if (result < fabs(this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i])) + result = fabs(this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i]); + } + if (dbg) { + std::cerr << "| " << this->sorted_vector_of_distances[i] << " - " << second_.sorted_vector_of_distances[i] + << " : " << fabs(this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i]) + << std::endl; + } + } + } + if (this->sorted_vector_of_distances.size() != second_.sorted_vector_of_distances.size()) { + if (this->sorted_vector_of_distances.size() > second_.sorted_vector_of_distances.size()) { + for (size_t i = second_.sorted_vector_of_distances.size(); i != this->sorted_vector_of_distances.size(); ++i) { + result += fabs(this->sorted_vector_of_distances[i]); + } + } else { + // this->sorted_vector_of_distances.size() < second_.sorted_vector_of_distances.size() + for (size_t i = this->sorted_vector_of_distances.size(); i != second_.sorted_vector_of_distances.size(); ++i) { + result += fabs(second_.sorted_vector_of_distances[i]); + } + } + } + + if (power != 1) { + result = std::pow(result, (1.0 / power)); + } + return result; } template -void Vector_distances_in_diagram::compute_average( const std::vector< Vector_distances_in_diagram* >& to_average ) -{ - - if ( to_average.size() == 0 ) - { - (*this) = Vector_distances_in_diagram(); - return; - } - - size_t maximal_length_of_vector = 0; - for ( size_t i = 0 ; i != to_average.size() ; ++i ) - { - if ( to_average[i]->sorted_vector_of_distances.size() > maximal_length_of_vector ) - { - maximal_length_of_vector = to_average[i]->sorted_vector_of_distances.size(); - } - } - - std::vector< double > av( maximal_length_of_vector , 0 ); - for ( size_t i = 0 ; i != to_average.size() ; ++i ) - { - for ( size_t j = 0 ; j != to_average[i]->sorted_vector_of_distances.size() ; ++j ) - { - av[j] += to_average[i]->sorted_vector_of_distances[j]; - } - } - - for ( size_t i = 0 ; i != maximal_length_of_vector ; ++i ) - { - av[i] /= (double)to_average.size(); - } - this->sorted_vector_of_distances = av; - this->where_to_cut = av.size(); +std::vector Vector_distances_in_diagram::vectorize(int number_of_function) const { + if ((size_t)number_of_function > this->number_of_functions_for_vectorization) + throw "Wrong index of a function in a method Vector_distances_in_diagram::vectorize"; + if (number_of_function < 0) throw "Wrong index of a function in a method Vector_distances_in_diagram::vectorize"; + + std::vector result(std::min((size_t)number_of_function, this->sorted_vector_of_distances.size())); + for (size_t i = 0; i != std::min((size_t)number_of_function, this->sorted_vector_of_distances.size()); ++i) { + result[i] = this->sorted_vector_of_distances[i]; + } + return result; } template -double Vector_distances_in_diagram::distance( const Vector_distances_in_diagram& second_ , double power )const -{ - bool dbg = false; - - if ( dbg ) - { - std::cerr << "Entering double Vector_distances_in_diagram::distance( const Abs_Topological_data_with_distances* second , double power ) procedure \n"; - std::cerr << "Power : " << power << std::endl; - std::cerr << "This : " << *this << std::endl; - std::cerr << "second : " << second_ << std::endl; - } - - - double result = 0; - for ( size_t i = 0 ; i != std::min(this->sorted_vector_of_distances.size(), second_.sorted_vector_of_distances.size()) ; ++i ) - { - if ( power == 1 ) - { - if ( dbg ) - { - std::cerr << "|" << this->sorted_vector_of_distances[i] << " - " << second_.sorted_vector_of_distances[i] << " | : " << fabs( this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i] ) <sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i] ); - } - else - { - if ( power < std::numeric_limits::max() ) - { - result += std::pow( fabs( this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i] ) , power ); - } - else - { - // max norm - if ( result < fabs( this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i] ) )result = fabs( this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i] ); - } - if ( dbg ) - { - std::cerr << "| " << this->sorted_vector_of_distances[i] << " - " << second_.sorted_vector_of_distances[i] << " : " << fabs( this->sorted_vector_of_distances[i] - second_.sorted_vector_of_distances[i] ) <sorted_vector_of_distances.size() != second_.sorted_vector_of_distances.size() ) - { - if ( this->sorted_vector_of_distances.size() > second_.sorted_vector_of_distances.size() ) - { - for ( size_t i = second_.sorted_vector_of_distances.size() ; i != this->sorted_vector_of_distances.size() ; ++i ) - { - result += fabs( this->sorted_vector_of_distances[i] ); - } - } - else - { - //this->sorted_vector_of_distances.size() < second_.sorted_vector_of_distances.size() - for ( size_t i = this->sorted_vector_of_distances.size() ; i != second_.sorted_vector_of_distances.size() ; ++i ) - { - result += fabs( second_.sorted_vector_of_distances[i] ); - } - } - } - - - if ( power != 1 ) - { - result = std::pow( result , (1.0/power) ); - } - return result; -} - -template < typename F> -std::vector Vector_distances_in_diagram::vectorize( int number_of_function )const -{ - if ( (size_t)number_of_function > this->number_of_functions_for_vectorization )throw "Wrong index of a function in a method Vector_distances_in_diagram::vectorize"; - if ( number_of_function < 0 )throw "Wrong index of a function in a method Vector_distances_in_diagram::vectorize"; - - std::vector< double > result( std::min( (size_t)number_of_function , this->sorted_vector_of_distances.size() ) ); - for ( size_t i = 0 ; i != std::min( (size_t)number_of_function , this->sorted_vector_of_distances.size() ) ; ++i ) - { - result[i] = this->sorted_vector_of_distances[i]; - } - return result; -} +void Vector_distances_in_diagram::write_to_file(const char* filename) const { + std::ofstream out; + out.open(filename); + for (size_t i = 0; i != this->sorted_vector_of_distances.size(); ++i) { + out << this->sorted_vector_of_distances[i] << " "; + } -template < typename F> -void Vector_distances_in_diagram::write_to_file( const char* filename )const -{ - std::ofstream out; - out.open( filename ); - - for ( size_t i = 0 ; i != this->sorted_vector_of_distances.size() ; ++i ) - { - out << this->sorted_vector_of_distances[i] << " "; - } - - out.close(); + out.close(); } -template < typename F> -void Vector_distances_in_diagram::load_from_file( const char* filename ) -{ - std::ifstream in; - in.open( filename ); - //check if the file exist. - if ( !in.good() ) - { - std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; - throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; - } - - double number; - while ( true ) - { - in >> number; - if ( in.eof() )break; - this->sorted_vector_of_distances.push_back(number); - } - in.close(); +template +void Vector_distances_in_diagram::load_from_file(const char* filename) { + std::ifstream in; + in.open(filename); + // check if the file exist. + if (!in.good()) { + std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; + throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; + } + + double number; + while (true) { + in >> number; + if (in.eof()) break; + this->sorted_vector_of_distances.push_back(number); + } + in.close(); } -template < typename F> -double Vector_distances_in_diagram::compute_scalar_product( const Vector_distances_in_diagram& second_vector )const -{ - double result = 0; - for ( size_t i = 0 ; i != std::min(this->sorted_vector_of_distances.size(),second_vector.sorted_vector_of_distances.size()) ; ++i ) - { - result += this->sorted_vector_of_distances[i] * second_vector.sorted_vector_of_distances[i]; - } - return result; +template +double Vector_distances_in_diagram::compute_scalar_product(const Vector_distances_in_diagram& second_vector) const { + double result = 0; + for (size_t i = 0; + i != std::min(this->sorted_vector_of_distances.size(), second_vector.sorted_vector_of_distances.size()); ++i) { + result += this->sorted_vector_of_distances[i] * second_vector.sorted_vector_of_distances[i]; + } + return result; } -}//namespace Persistence_representations -}//namespace Gudhi - +} // namespace Persistence_representations +} // namespace Gudhi #endif // PERSISTENCE_VECTORS_H_ diff --git a/src/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h index f571ca4f..d5c9ece1 100644 --- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h +++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h @@ -23,129 +23,100 @@ #ifndef COMMON_PERSISTENCE_REPRESENTATIONS_H_ #define COMMON_PERSISTENCE_REPRESENTATIONS_H_ +namespace Gudhi { +namespace Persistence_representations { +// this file contain an implementation of some common procedures used in Persistence_representations. -namespace Gudhi -{ -namespace Persistence_representations -{ - //this file contain an implementation of some common procedures used in Persistence_representations. - - //double epsi = std::numeric_limits::epsilon(); +// double epsi = std::numeric_limits::epsilon(); double epsi = 0.000005; - - - - /** - * A procedure used to compare doubles. Typically given two doubles A and B, comparing A == B is not good idea. In this case, we use the procedure almostEqual with the epsi defined at + * A procedure used to compare doubles. Typically given two doubles A and B, comparing A == B is not good idea. In this + *case, we use the procedure almostEqual with the epsi defined at * the top of the file. Setting up the epsi gives the user a tolerance on what should be consider equal. **/ -inline bool almost_equal( double a , double b ) -{ - if ( fabs(a-b) < epsi ) - return true; - return false; +inline bool almost_equal(double a, double b) { + if (fabs(a - b) < epsi) return true; + return false; } - - - -//landscapes +// landscapes /** * Extra functions needed in construction of barcodes. **/ -double minus_length( std::pair a ) -{ - return a.first-a.second; -} -double birth_plus_deaths( std::pair a ) -{ - return a.first+a.second; -} - +double minus_length(std::pair a) { return a.first - a.second; } +double birth_plus_deaths(std::pair a) { return a.first + a.second; } -//landscapes +// landscapes /** - * Given two points in R^2, the procedure compute the parameters A and B of the line y = Ax + B that crosses those two points. + * Given two points in R^2, the procedure compute the parameters A and B of the line y = Ax + B that crosses those two + *points. **/ -std::pair compute_parameters_of_a_line( std::pair p1 , std::pair p2 ) -{ - double a = (p2.second-p1.second)/( p2.first - p1.first ); - double b = p1.second - a*p1.first; - return std::make_pair(a,b); +std::pair compute_parameters_of_a_line(std::pair p1, std::pair p2) { + double a = (p2.second - p1.second) / (p2.first - p1.first); + double b = p1.second - a * p1.first; + return std::make_pair(a, b); } -//landscapes +// landscapes /** - * This procedure given two points which lies on the opposite sides of x axis, compute x for which the line connecting those two points crosses x axis. + * This procedure given two points which lies on the opposite sides of x axis, compute x for which the line connecting + *those two points crosses x axis. **/ -double find_zero_of_a_line_segment_between_those_two_points ( std::pair p1, std::pair p2 ) -{ - if ( p1.first == p2.first )return p1.first; - if ( p1.second*p2.second > 0 ) - { - std::ostringstream errMessage; - errMessage <<"In function find_zero_of_a_line_segment_between_those_two_points the arguments are: (" << p1.first << "," << p1.second << ") and (" << p2.first << "," << p2.second << "). There is no zero in line between those two points. Program terminated."; - std::string errMessageStr = errMessage.str(); - const char* err = errMessageStr.c_str(); - throw(err); - } - //we assume here, that x \in [ p1.first, p2.first ] and p1 and p2 are points between which we will put the line segment - double a = (p2.second - p1.second)/(p2.first - p1.first); - double b = p1.second - a*p1.first; - return -b/a; +double find_zero_of_a_line_segment_between_those_two_points(std::pair p1, + std::pair p2) { + if (p1.first == p2.first) return p1.first; + if (p1.second * p2.second > 0) { + std::ostringstream errMessage; + errMessage << "In function find_zero_of_a_line_segment_between_those_two_points the arguments are: (" << p1.first + << "," << p1.second << ") and (" << p2.first << "," << p2.second + << "). There is no zero in line between those two points. Program terminated."; + std::string errMessageStr = errMessage.str(); + const char* err = errMessageStr.c_str(); + throw(err); + } + // we assume here, that x \in [ p1.first, p2.first ] and p1 and p2 are points between which we will put the line + // segment + double a = (p2.second - p1.second) / (p2.first - p1.first); + double b = p1.second - a * p1.first; + return -b / a; } - - -//landscapes +// landscapes /** - * This method provides a comparison of points that is used in construction of persistence landscapes. The ordering is lexicographical for the first coordinate, and reverse-lexicographical for the - * second coordinate. + * This method provides a comparison of points that is used in construction of persistence landscapes. The ordering is + *lexicographical for the first coordinate, and reverse-lexicographical for the + * second coordinate. **/ -bool compare_points_sorting( std::pair f, std::pair s ) -{ - if ( f.first < s.first ) - { +bool compare_points_sorting(std::pair f, std::pair s) { + if (f.first < s.first) { + return true; + } else { // f.first >= s.first + if (f.first > s.first) { + return false; + } else { // f.first == s.first + if (f.second > s.second) { return true; + } else { + return false; + } } - else - {//f.first >= s.first - if ( f.first > s.first ) - { - return false; - } - else - {//f.first == s.first - if ( f.second > s.second ) - { - return true; - } - else - { - return false; - } - } - } + } } - -//landscapes +// landscapes /** - * This procedure takes two points in R^2 and a double value x. It computes the line parsing through those two points and return the value of that linear function at x. + * This procedure takes two points in R^2 and a double value x. It computes the line parsing through those two points + *and return the value of that linear function at x. **/ -double function_value ( std::pair p1, std::pair p2 , double x ) -{ - //we assume here, that x \in [ p1.first, p2.first ] and p1 and p2 are points between which we will put the line segment - double a = (p2.second - p1.second)/(p2.first - p1.first); - double b = p1.second - a*p1.first; - return (a*x+b); +double function_value(std::pair p1, std::pair p2, double x) { + // we assume here, that x \in [ p1.first, p2.first ] and p1 and p2 are points between which we will put the line + // segment + double a = (p2.second - p1.second) / (p2.first - p1.first); + double b = p1.second - a * p1.first; + return (a * x + b); } - - - } // namespace Persistence_representations } // namespace Gudhi diff --git a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h index a4884314..39d485a9 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -20,7 +20,6 @@ * along with this program. If not, see . */ - #ifndef READ_PERSISTENCE_FROM_FILE_H_ #define READ_PERSISTENCE_FROM_FILE_H_ @@ -30,184 +29,148 @@ #include #include +namespace Gudhi { +namespace Persistence_representations { +/** + * Universal procedure to read files with persistence. It ignores the lines starting from # (treat them as comments). + * It reads the fist line which is not a comment and assume that there are some numerical entries over there. The + *program assume + * that each other line in the file, which is not a comment, have the same number of numerical entries (2, 3 or 4). + * If there are two numerical entries per line, then the function assume that they are birth/death coordinates. + * If there are three numerical entries per line, then the function assume that they are: dimension and birth/death + *coordinates. + * If there are four numerical entries per line, then the function assume that they are: the characteristic of a filed + *over which + * persistence was computed, dimension and birth/death coordinates. + * The 'inf' string can appear only as a last element of a line. + * The procedure returns vector of persistence pairs. +**/ +std::vector > read_persistence_intervals_in_one_dimension_from_file( + std::string const& filename, int dimension = -1, double what_to_substitute_for_infinite_bar = -1) { + bool dbg = false; + std::ifstream in; + in.open(filename); + // checking if the file exist: + if (!in.good()) { + std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; + throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; + } -namespace Gudhi -{ -namespace Persistence_representations -{ + std::string line; + std::vector > barcode; -/** - * Universal procedure to read files with persistence. It ignores the lines starting from # (treat them as comments). - * It reads the fist line which is not a comment and assume that there are some numerical entries over there. The program assume - * that each other line in the file, which is not a comment, have the same number of numerical entries (2, 3 or 4). - * If there are two numerical entries per line, then the function assume that they are birth/death coordinates. - * If there are three numerical entries per line, then the function assume that they are: dimension and birth/death coordinates. - * If there are four numerical entries per line, then the function assume that they are: the characteristic of a filed over which - * persistence was computed, dimension and birth/death coordinates. - * The 'inf' string can appear only as a last element of a line. - * The procedure returns vector of persistence pairs. -**/ -std::vector > read_persistence_intervals_in_one_dimension_from_file(std::string const& filename, int dimension=-1 , double what_to_substitute_for_infinite_bar = -1 ) -{ - bool dbg = false; - std::ifstream in; - in.open( filename ); - //checking if the file exist: - if ( !in.good() ) - { - std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n"; - throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n"; - } - - - + int number_of_entries_per_line = -1; - std::string line; - std::vector< std::pair > barcode; - - int number_of_entries_per_line = -1; + while (!in.eof()) { + getline(in, line); + if (dbg) std::cerr << "Reading line : " << line << std::endl; + if (!(line.length() == 0 || line[0] == '#')) { + // If we do not know how many entries per line we have, we check it in below. + if (number_of_entries_per_line == -1) { + number_of_entries_per_line = 0; + std::string line_copy(line); + if (line_copy.find("inf") != std::string::npos) { + size_t np = line_copy.find("inf"); + // replace symbols 'inf' in line_copy with white spaces: + line_copy[np] = ' '; + line_copy[np + 1] = ' '; + line_copy[np + 2] = ' '; + number_of_entries_per_line = 1; + } + // check how many entries we have in the line. + std::stringstream ss(line_copy); + double number; + std::vector this_line; + while (ss >> number) { + this_line.push_back(number); + } + number_of_entries_per_line += (int)this_line.size(); + if (dbg) { + std::cerr << "number_of_entries_per_line : " << number_of_entries_per_line + << ". This number was obtained by analyzing this line : " << line << std::endl; + } + if ((number_of_entries_per_line < 2) || (number_of_entries_per_line > 4)) { + std::cerr << "The input file you have provided have wrong number of numerical entries per line. The program " + "will now terminate. \n"; + throw "The input file you have provided have wrong number of numerical entries per line. The program will now terminate. \n"; + } + } + // In case there is an 'inf' string in this line, we are dealing with this situation in below. + if (line.find("inf") != std::string::npos) { + if (dbg) { + std::cerr << "This line: " << line << " contains infinite interval. \n"; + } + // first we substitute inf by white spaces: + size_t np = line.find("inf"); + line[np] = ' '; + line[np + 1] = ' '; + line[np + 2] = ' '; + if (what_to_substitute_for_infinite_bar != -1) { + double beginn, field, dim; + std::stringstream lineSS(line); + if (number_of_entries_per_line == 4) lineSS >> field; + if (number_of_entries_per_line >= 3) { + lineSS >> dim; + } else { + dim = dimension; + } + lineSS >> beginn; + if (dim == dimension) { + if (beginn > what_to_substitute_for_infinite_bar) { + barcode.push_back(std::make_pair(what_to_substitute_for_infinite_bar, beginn)); + } else { + barcode.push_back(std::make_pair(beginn, what_to_substitute_for_infinite_bar)); + } + if (dbg) { + std::cerr << "this is the line that is going to the output : " << beginn << " , " + << what_to_substitute_for_infinite_bar << std::endl; + } + } + } else { + // this is a line with infinity. Since the variable what_to_substitute_for_infinite_bar have not been set up, + // it means that this line will be skipped. + if (dbg) { + std::cerr << "We will skip it \n"; + } + } + continue; + } else { + // Then, we read the content of the line. We know that it do not contain 'inf' substring. + std::stringstream lineSS(line); + double beginn, endd, field, dim; + if (number_of_entries_per_line == 4) lineSS >> field; + if (number_of_entries_per_line >= 3) { + lineSS >> dim; + } else { + dim = dimension; + } + lineSS >> beginn; + lineSS >> endd; + if (beginn > endd) { + std::swap(beginn, endd); + } + if (dim == dimension) { + barcode.push_back(std::make_pair(beginn, endd)); + if (dbg) { + std::cerr << "This is a line that is going to the output : " << beginn << " , " << endd << std::endl; + } + } else { + if ((number_of_entries_per_line == 3) && (dimension == -1)) { + barcode.push_back(std::make_pair(beginn, endd)); + } + } + } + } else { + if (dbg) { + std::cerr << "This is a comment line \n"; + } + } + } + in.close(); + if (dbg) std::cerr << "End of reading \n"; - while (!in.eof()) - { - getline(in,line); - if ( dbg )std::cerr << "Reading line : " << line << std::endl; - if ( !(line.length() == 0 || line[0] == '#') ) - { - //If we do not know how many entries per line we have, we check it in below. - if ( number_of_entries_per_line == -1 ) - { - number_of_entries_per_line = 0; - std::string line_copy(line); - if ( line_copy.find("inf") != std::string::npos ) - { - size_t np = line_copy.find("inf"); - //replace symbols 'inf' in line_copy with white spaces: - line_copy[np] = ' '; - line_copy[np+1] = ' '; - line_copy[np+2] = ' '; - number_of_entries_per_line = 1; - } - //check how many entries we have in the line. - std::stringstream ss( line_copy ); - double number; - std::vector this_line; - while ( ss >> number ) - { - this_line.push_back( number ); - } - number_of_entries_per_line += (int)this_line.size(); - if ( dbg ) - { - std::cerr << "number_of_entries_per_line : " << number_of_entries_per_line << ". This number was obtained by analyzing this line : " << line << std::endl; - } - if ( (number_of_entries_per_line < 2) || ( number_of_entries_per_line > 4 ) ) - { - std::cerr << "The input file you have provided have wrong number of numerical entries per line. The program will now terminate. \n"; - throw "The input file you have provided have wrong number of numerical entries per line. The program will now terminate. \n"; - } - } - //In case there is an 'inf' string in this line, we are dealing with this situation in below. - if ( line.find("inf") != std::string::npos ) - { - if ( dbg ) - { - std::cerr << "This line: " << line << " contains infinite interval. \n"; - } - //first we substitute inf by white spaces: - size_t np = line.find("inf"); - line[np] = ' '; - line[np+1] = ' '; - line[np+2] = ' '; - if ( what_to_substitute_for_infinite_bar != -1 ) - { - double beginn, field, dim; - std::stringstream lineSS(line); - if ( number_of_entries_per_line == 4 )lineSS >> field; - if ( number_of_entries_per_line >= 3 ) - { - lineSS >> dim; - } - else - { - dim = dimension; - } - lineSS >> beginn; - if ( dim == dimension ) - { - if ( beginn > what_to_substitute_for_infinite_bar ) - { - barcode.push_back( std::make_pair( what_to_substitute_for_infinite_bar , beginn ) ); - } - else - { - barcode.push_back( std::make_pair( beginn , what_to_substitute_for_infinite_bar ) ); - } - if (dbg) - { - std::cerr << "this is the line that is going to the output : " << beginn << " , " << what_to_substitute_for_infinite_bar << std::endl; - } - } - } - else - { - //this is a line with infinity. Since the variable what_to_substitute_for_infinite_bar have not been set up, it means that this line will be skipped. - if ( dbg ) - { - std::cerr << "We will skip it \n"; - } - } - continue; - } - else - { - //Then, we read the content of the line. We know that it do not contain 'inf' substring. - std::stringstream lineSS(line); - double beginn, endd, field, dim; - if ( number_of_entries_per_line == 4 )lineSS >> field; - if ( number_of_entries_per_line >= 3 ) - { - lineSS >> dim; - } - else - { - dim = dimension; - } - lineSS >> beginn; - lineSS >> endd; - if ( beginn > endd ) - { - std::swap(beginn,endd); - } - if ( dim == dimension ) - { - barcode.push_back( std::make_pair( beginn , endd ) ); - if (dbg) - { - std::cerr << "This is a line that is going to the output : " << beginn << " , " << endd << std::endl; - } - } - else - { - if ( (number_of_entries_per_line==3) && (dimension == -1) ) - { - barcode.push_back( std::make_pair( beginn , endd ) ); - } - } - } - } - else - { - if ( dbg ) - { - std::cerr << "This is a comment line \n"; - } - } - } - in.close(); - if ( dbg )std::cerr << "End of reading \n"; - - return barcode; + return barcode; } // read_persistence_intervals_in_one_dimension_from_file } // namespace Persistence_representations diff --git a/src/Persistence_representations/test/persistence_heat_maps_test.cpp b/src/Persistence_representations/test/persistence_heat_maps_test.cpp index b997382e..48086ba8 100644 --- a/src/Persistence_representations/test/persistence_heat_maps_test.cpp +++ b/src/Persistence_representations/test/persistence_heat_maps_test.cpp @@ -20,8 +20,6 @@ * along with this program. If not, see . */ - - #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "Persistence_representations" #include @@ -30,365 +28,333 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; +BOOST_AUTO_TEST_CASE(check_construction_of_heat_maps) { + std::vector > filter = create_Gaussian_filter(100, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 1); + p.print_to_file("data/persistence_heat_map_from_file_with_diagram"); + Persistence_heat_maps q; + q.load_from_file("data/persistence_heat_map_from_file_with_diagram"); - - -BOOST_AUTO_TEST_CASE(check_construction_of_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(100,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 1 ); - p.print_to_file( "data/persistence_heat_map_from_file_with_diagram" ); - - Persistence_heat_maps q; - q.load_from_file( "data/persistence_heat_map_from_file_with_diagram" ); - - BOOST_CHECK( p == q ); + BOOST_CHECK(p == q); } +BOOST_AUTO_TEST_CASE(check_averages_of_heat_maps) { + std::vector > filter = create_Gaussian_filter(30, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 10); + Persistence_heat_maps q("data/file_with_diagram_1", filter, false, 1000, 0, 10); + Persistence_heat_maps r("data/file_with_diagram_2", filter, false, 1000, 0, 10); -BOOST_AUTO_TEST_CASE(check_averages_of_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 10 ); - Persistence_heat_maps q( "data/file_with_diagram_1" , filter , false , 1000 , 0 , 10 ); - Persistence_heat_maps r( "data/file_with_diagram_2" , filter , false , 1000 , 0 , 10 ); - - Persistence_heat_maps av; - av.compute_average( {&p,&q,&r} ); - - Persistence_heat_maps template_average; - template_average.load_from_file( "data/template_average_of_heat_maps" ); - - BOOST_CHECK( av == template_average ); + Persistence_heat_maps av; + av.compute_average({&p, &q, &r}); + + Persistence_heat_maps template_average; + template_average.load_from_file("data/template_average_of_heat_maps"); + + BOOST_CHECK(av == template_average); } +BOOST_AUTO_TEST_CASE(check_median_of_heat_maps) { + std::vector > filter = create_Gaussian_filter(30, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 1); + Persistence_heat_maps q("data/file_with_diagram_1", filter, false, 1000, 0, 1); + Persistence_heat_maps r("data/file_with_diagram_2", filter, false, 1000, 0, 1); + + std::vector*> to_compute_median; + to_compute_median.push_back(&p); + to_compute_median.push_back(&q); + to_compute_median.push_back(&r); + Persistence_heat_maps median; + median.compute_median(to_compute_median); + + Persistence_heat_maps template_median; + template_median.load_from_file("data/template_median_of_heat_maps"); -BOOST_AUTO_TEST_CASE(check_median_of_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "data/file_with_diagram_1" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "data/file_with_diagram_2" , filter , false , 1000 , 0 , 1 ); - - std::vector< Persistence_heat_maps* > to_compute_median; - to_compute_median.push_back( &p ); - to_compute_median.push_back( &q ); - to_compute_median.push_back( &r ); - Persistence_heat_maps median; - median.compute_median( to_compute_median ); - - Persistence_heat_maps template_median; - template_median.load_from_file( "data/template_median_of_heat_maps" ); - - BOOST_CHECK( median == template_median ); + BOOST_CHECK(median == template_median); } +BOOST_AUTO_TEST_CASE(check_compute_percentage_of_active_of_heat_maps) { + std::vector > filter = create_Gaussian_filter(30, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 1); + Persistence_heat_maps q("data/file_with_diagram_1", filter, false, 1000, 0, 1); + Persistence_heat_maps r("data/file_with_diagram_2", filter, false, 1000, 0, 1); -BOOST_AUTO_TEST_CASE(check_compute_percentage_of_active_of_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "data/file_with_diagram_1" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "data/file_with_diagram_2" , filter , false , 1000 , 0 , 1 ); - - std::vector< Persistence_heat_maps* > to_compute_percentage_of_active; - to_compute_percentage_of_active.push_back( &p ); - to_compute_percentage_of_active.push_back( &q ); - to_compute_percentage_of_active.push_back( &r ); - Persistence_heat_maps percentage_of_active; - percentage_of_active.compute_percentage_of_active( to_compute_percentage_of_active , 0.1 ); - - Persistence_heat_maps template_percentage_of_active; - template_percentage_of_active.load_from_file( "data/template_percentage_of_active_of_heat_maps" ); - - BOOST_CHECK( percentage_of_active == template_percentage_of_active ); + std::vector*> to_compute_percentage_of_active; + to_compute_percentage_of_active.push_back(&p); + to_compute_percentage_of_active.push_back(&q); + to_compute_percentage_of_active.push_back(&r); + Persistence_heat_maps percentage_of_active; + percentage_of_active.compute_percentage_of_active(to_compute_percentage_of_active, 0.1); + + Persistence_heat_maps template_percentage_of_active; + template_percentage_of_active.load_from_file("data/template_percentage_of_active_of_heat_maps"); + + BOOST_CHECK(percentage_of_active == template_percentage_of_active); +} + +BOOST_AUTO_TEST_CASE(check_vectorize_for_heat_maps) { + std::vector > filter = create_Gaussian_filter(30, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 5, 0, 1); + + std::vector p_vect_template; + + p_vect_template.push_back(0.0606728); + p_vect_template.push_back(0.0610023); + p_vect_template.push_back(0.0607978); + p_vect_template.push_back(0.0600647); + p_vect_template.push_back(0.0588224); + p_vect_template.push_back(0.0619829); + p_vect_template.push_back(0.0623218); + p_vect_template.push_back(0.0621152); + p_vect_template.push_back(0.0613686); + p_vect_template.push_back(0.0601016); + p_vect_template.push_back(0.0627679); + p_vect_template.push_back(0.0631134); + p_vect_template.push_back(0.0629066); + p_vect_template.push_back(0.0621528); + p_vect_template.push_back(0.0608719); + p_vect_template.push_back(0.0630073); + p_vect_template.push_back(0.0633564); + p_vect_template.push_back(0.0631511); + p_vect_template.push_back(0.0623968); + p_vect_template.push_back(0.0611132); + p_vect_template.push_back(0.0626947); + p_vect_template.push_back(0.0630445); + p_vect_template.push_back(0.0628425); + p_vect_template.push_back(0.0620941); + p_vect_template.push_back(0.060819); + + std::vector p_vect = p.vectorize(0); + for (size_t i = 0; i != p_vect.size(); ++i) { + BOOST_CHECK(almost_equal(p_vect_template[i], p_vect[i])); + } } -BOOST_AUTO_TEST_CASE(check_vectorize_for_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 5 , 0 , 1 ); - - std::vector p_vect_template; - - p_vect_template.push_back(0.0606728); - p_vect_template.push_back(0.0610023); - p_vect_template.push_back(0.0607978 ); - p_vect_template.push_back(0.0600647 ); - p_vect_template.push_back(0.0588224 ); - p_vect_template.push_back(0.0619829 ); - p_vect_template.push_back(0.0623218 ); - p_vect_template.push_back(0.0621152 ); - p_vect_template.push_back(0.0613686 ); - p_vect_template.push_back(0.0601016 ); - p_vect_template.push_back(0.0627679 ); - p_vect_template.push_back(0.0631134 ); - p_vect_template.push_back(0.0629066 ); - p_vect_template.push_back(0.0621528 ); - p_vect_template.push_back(0.0608719 ); - p_vect_template.push_back(0.0630073 ); - p_vect_template.push_back(0.0633564 ); - p_vect_template.push_back(0.0631511 ); - p_vect_template.push_back(0.0623968 ); - p_vect_template.push_back(0.0611132 ); - p_vect_template.push_back(0.0626947 ); - p_vect_template.push_back(0.0630445 ); - p_vect_template.push_back(0.0628425 ); - p_vect_template.push_back(0.0620941 ); - p_vect_template.push_back(0.060819); - - std::vector p_vect = p.vectorize(0); - for ( size_t i = 0 ; i != p_vect.size() ; ++i ) - { - BOOST_CHECK( almost_equal( p_vect_template[i] , p_vect[i] ) ); - } +BOOST_AUTO_TEST_CASE(check_distance_for_heat_maps) { + std::vector > filter = create_Gaussian_filter(30, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 1); + Persistence_heat_maps q("data/file_with_diagram_1", filter, false, 1000, 0, 1); + Persistence_heat_maps r("data/file_with_diagram_2", filter, false, 1000, 0, 1); + + // cerr << p.distance( p ) << endl; + // cerr << p.distance( q ) << endl; + // cerr << p.distance( r ) << endl; + // cerr << q.distance( p ) << endl; + // cerr << q.distance( q ) << endl; + // cerr << q.distance( r ) << endl; + // cerr << r.distance( p ) << endl; + // cerr << r.distance( q ) << endl; + // cerr << r.distance( r ) << endl; + // 0 624.183 415.815 + // 624.183 0 528.06Z + // 415.815 528.066 0 + + BOOST_CHECK(fabs(p.distance(p) - 0) < 0.0005); + BOOST_CHECK(fabs(p.distance(q) - 624.183) < 0.0005); + BOOST_CHECK(fabs(p.distance(r) - 415.815) < 0.0005); + BOOST_CHECK(fabs(q.distance(p) - 624.183) < 0.0005); + BOOST_CHECK(fabs(q.distance(q) - 0) < 0.0005); + BOOST_CHECK(fabs(q.distance(r) - 528.066) < 0.0005); + BOOST_CHECK(fabs(r.distance(p) - 415.815) < 0.0005); + BOOST_CHECK(fabs(r.distance(q) - 528.066) < 0.0005); + BOOST_CHECK(fabs(r.distance(r) - 0) < 0.0005); } +BOOST_AUTO_TEST_CASE(check_projections_to_R_for_heat_maps) { + std::vector > filter = create_Gaussian_filter(30, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 1); + Persistence_heat_maps q("data/file_with_diagram_1", filter, false, 1000, 0, 1); + Persistence_heat_maps r("data/file_with_diagram_2", filter, false, 1000, 0, 1); -BOOST_AUTO_TEST_CASE(check_distance_for_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "data/file_with_diagram_1" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "data/file_with_diagram_2" , filter , false , 1000 , 0 , 1 ); - - //cerr << p.distance( p ) << endl; - //cerr << p.distance( q ) << endl; - //cerr << p.distance( r ) << endl; - //cerr << q.distance( p ) << endl; - //cerr << q.distance( q ) << endl; - //cerr << q.distance( r ) << endl; - //cerr << r.distance( p ) << endl; - //cerr << r.distance( q ) << endl; - //cerr << r.distance( r ) << endl; - //0 624.183 415.815 - //624.183 0 528.06Z - //415.815 528.066 0 - - BOOST_CHECK( fabs( p.distance( p ) - 0) < 0.0005); - BOOST_CHECK( fabs( p.distance( q ) - 624.183)< 0.0005); - BOOST_CHECK( fabs( p.distance( r ) - 415.815)< 0.0005); - BOOST_CHECK( fabs( q.distance( p ) - 624.183)< 0.0005); - BOOST_CHECK( fabs( q.distance( q ) - 0)< 0.0005); - BOOST_CHECK( fabs( q.distance( r ) - 528.066)< 0.0005); - BOOST_CHECK( fabs( r.distance( p ) - 415.815)< 0.0005); - BOOST_CHECK( fabs( r.distance( q ) - 528.066)< 0.0005); - BOOST_CHECK( fabs( r.distance( r ) - 0)< 0.0005); + // cerr << p.project_to_R(0) << endl; + // cerr << q.project_to_R(0) << endl; + // cerr << r.project_to_R(0) << endl; + + BOOST_CHECK(fabs(p.project_to_R(0) - 44.3308) < 0.0005); + BOOST_CHECK(fabs(q.project_to_R(0) - 650.568) < 0.0005); + BOOST_CHECK(fabs(r.project_to_R(0) - 429.287) < 0.0005); +} + +BOOST_AUTO_TEST_CASE(check_scalar_products_for_heat_maps) { + std::vector > filter = create_Gaussian_filter(30, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 1); + Persistence_heat_maps q("data/file_with_diagram_1", filter, false, 1000, 0, 1); + Persistence_heat_maps r("data/file_with_diagram_2", filter, false, 1000, 0, 1); + + // cerr << p.compute_scalar_product( p ) << endl; + // cerr << p.compute_scalar_product( q ) << endl; + // cerr << p.compute_scalar_product( r ) << endl; + // cerr << q.compute_scalar_product( p ) << endl; + // cerr << q.compute_scalar_product( q ) << endl; + // cerr << q.compute_scalar_product( r ) << endl; + // cerr << r.compute_scalar_product( p ) << endl; + // cerr << r.compute_scalar_product( q ) << endl; + // cerr << r.compute_scalar_product( r ) << endl; + + BOOST_CHECK(fabs(p.compute_scalar_product(p) - 0.0345687) < 0.0005); + BOOST_CHECK(fabs(p.compute_scalar_product(q) - 0.0509357) < 0.0005); + BOOST_CHECK(fabs(p.compute_scalar_product(r) - 0.0375608) < 0.0005); + BOOST_CHECK(fabs(q.compute_scalar_product(p) - 0.0509357) < 0.0005); + BOOST_CHECK(fabs(q.compute_scalar_product(q) - 1.31293) < 0.0005); + BOOST_CHECK(fabs(q.compute_scalar_product(r) - 0.536799) < 0.0005); + BOOST_CHECK(fabs(r.compute_scalar_product(p) - 0.0375608) < 0.0005); + BOOST_CHECK(fabs(r.compute_scalar_product(q) - 0.536799) < 0.0005); + BOOST_CHECK(fabs(r.compute_scalar_product(r) - 0.672907) < 0.0005); } +BOOST_AUTO_TEST_CASE(check_arythmetic_operations_for_heat_maps) { + std::vector > filter = create_Gaussian_filter(30, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 1); + Persistence_heat_maps q("data/file_with_diagram_1", filter, false, 1000, 0, 1); + Persistence_heat_maps sum = p + q; + Persistence_heat_maps difference = p - q; + Persistence_heat_maps multiply_by_scalar = 2 * p; -BOOST_AUTO_TEST_CASE(check_projections_to_R_for_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "data/file_with_diagram_1" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "data/file_with_diagram_2" , filter , false , 1000 , 0 , 1 ); + // sum.print_to_file( "sum" ); + // difference.print_to_file( "difference" ); + // multiply_by_scalar.print_to_file( "multiply_by_scalar" ); - //cerr << p.project_to_R(0) << endl; - //cerr << q.project_to_R(0) << endl; - //cerr << r.project_to_R(0) << endl; + Persistence_heat_maps sum_template; + sum_template.load_from_file("data/heat_map_sum"); + Persistence_heat_maps difference_template; + difference_template.load_from_file("data/heat_map_difference"); + Persistence_heat_maps multiply_by_scalar_template; + multiply_by_scalar_template.load_from_file("data/heat_map_multiply_by_scalar"); - BOOST_CHECK( fabs( p.project_to_R(0) - 44.3308 )< 0.0005); - BOOST_CHECK( fabs( q.project_to_R(0) - 650.568 )< 0.0005); - BOOST_CHECK( fabs( r.project_to_R(0) - 429.287 )< 0.0005); + BOOST_CHECK(sum == sum_template); } +BOOST_AUTO_TEST_CASE(check_distance_of_heat_maps_infinite_power_parameters) { + std::vector > filter = create_Gaussian_filter(100, 1); + Persistence_heat_maps p("data/file_with_diagram", filter, false, 1000, 0, 1); -BOOST_AUTO_TEST_CASE(check_scalar_products_for_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "data/file_with_diagram_1" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "data/file_with_diagram_2" , filter , false , 1000 , 0 , 1 ); - - //cerr << p.compute_scalar_product( p ) << endl; - //cerr << p.compute_scalar_product( q ) << endl; - //cerr << p.compute_scalar_product( r ) << endl; - //cerr << q.compute_scalar_product( p ) << endl; - //cerr << q.compute_scalar_product( q ) << endl; - //cerr << q.compute_scalar_product( r ) << endl; - //cerr << r.compute_scalar_product( p ) << endl; - //cerr << r.compute_scalar_product( q ) << endl; - //cerr << r.compute_scalar_product( r ) << endl; - - - BOOST_CHECK( fabs( p.compute_scalar_product( p ) - 0.0345687 )< 0.0005); - BOOST_CHECK( fabs( p.compute_scalar_product( q ) - 0.0509357 )< 0.0005); - BOOST_CHECK( fabs( p.compute_scalar_product( r ) - 0.0375608 )< 0.0005); - BOOST_CHECK( fabs( q.compute_scalar_product( p ) - 0.0509357 )< 0.0005); - BOOST_CHECK( fabs( q.compute_scalar_product( q ) - 1.31293 )< 0.0005); - BOOST_CHECK( fabs( q.compute_scalar_product( r ) - 0.536799)< 0.0005); - BOOST_CHECK( fabs( r.compute_scalar_product( p ) - 0.0375608)< 0.0005); - BOOST_CHECK( fabs( r.compute_scalar_product( q ) - 0.536799)< 0.0005); - BOOST_CHECK( fabs( r.compute_scalar_product( r ) - 0.672907)< 0.0005); - -} + std::vector > filter_2 = create_Gaussian_filter(150, 1); + Persistence_heat_maps q("data/file_with_diagram", filter_2, true, 1000, 0, 1); + double distance_max_double_parameter = p.distance(q, std::numeric_limits::max()); + double distance_inf_double_parameter = p.distance(q, std::numeric_limits::infinity()); + // std::cerr << "distance_max_double_parameter: " << distance_max_double_parameter << std::endl; + // std::cerr << "distance_inf_double_parameter: " << distance_inf_double_parameter << std::endl; -BOOST_AUTO_TEST_CASE(check_arythmetic_operations_for_heat_maps) -{ - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "data/file_with_diagram_1" , filter , false , 1000 , 0 , 1 ); - - Persistence_heat_maps sum = p + q; - Persistence_heat_maps difference = p - q; - Persistence_heat_maps multiply_by_scalar = 2*p; - - //sum.print_to_file( "sum" ); - //difference.print_to_file( "difference" ); - //multiply_by_scalar.print_to_file( "multiply_by_scalar" ); - - Persistence_heat_maps sum_template; - sum_template.load_from_file( "data/heat_map_sum" ); - Persistence_heat_maps difference_template; - difference_template.load_from_file( "data/heat_map_difference" ); - Persistence_heat_maps multiply_by_scalar_template; - multiply_by_scalar_template.load_from_file( "data/heat_map_multiply_by_scalar" ); - - BOOST_CHECK( sum == sum_template ); + BOOST_CHECK(distance_max_double_parameter == distance_inf_double_parameter); } -BOOST_AUTO_TEST_CASE(check_distance_of_heat_maps_infinite_power_parameters) -{ - std::vector< std::vector > filter = create_Gaussian_filter(100,1); - Persistence_heat_maps p( "data/file_with_diagram" , filter , false , 1000 , 0 , 1 ); - - std::vector< std::vector > filter_2 = create_Gaussian_filter(150,1); - Persistence_heat_maps q( "data/file_with_diagram" , filter_2 , true , 1000 , 0 , 1 ); - - double distance_max_double_parameter = p.distance( q , std::numeric_limits::max() ); - double distance_inf_double_parameter = p.distance( q , std::numeric_limits::infinity() ); - - //std::cerr << "distance_max_double_parameter: " << distance_max_double_parameter << std::endl; - //std::cerr << "distance_inf_double_parameter: " << distance_inf_double_parameter << std::endl; - - BOOST_CHECK( distance_max_double_parameter == distance_inf_double_parameter ); -} +// Below I am storing the code used to generate tests for that functionality. +/* + std::vector< std::pair< double,double > > intervals; + intervals.push_back( std::make_pair(0.5,0.5) ); + std::vector< std::vector > filter = create_Gaussian_filter(5,1); + Persistence_heat_maps p( intervals , filter , constant_function, false , 100 , 0 , 1 ); + p.plot( "heat_map_1" ); + std::vector< std::pair< double,double > > intervals2; + intervals2.push_back( std::make_pair(7,12) ); + Persistence_heat_maps q( intervals2 , filter , constant_function, false , 100 , 0 , 10 ); + q.plot( "heat_map_2" ); +*/ +/* + std::vector< std::pair< double,double > > intervals; + intervals.push_back( std::make_pair(0.5,0.5) ); + std::vector< std::vector > filter = create_Gaussian_filter(5,1); + Persistence_heat_maps p( intervals , filter , constant_function, false , 10 , 0 , 1 ); + p.write_to_file( "aaa" ); + + Persistence_heat_maps q; + q.load_from_file( "aaa" ); + cerr << ( p == q ) << endl; + */ -//Below I am storing the code used to generate tests for that functionality. /* - std::vector< std::pair< double,double > > intervals; - intervals.push_back( std::make_pair(0.5,0.5) ); - std::vector< std::vector > filter = create_Gaussian_filter(5,1); - Persistence_heat_maps p( intervals , filter , constant_function, false , 100 , 0 , 1 ); - p.plot( "heat_map_1" ); - - - std::vector< std::pair< double,double > > intervals2; - intervals2.push_back( std::make_pair(7,12) ); - Persistence_heat_maps q( intervals2 , filter , constant_function, false , 100 , 0 , 10 ); - q.plot( "heat_map_2" ); + std::vector< std::vector > filter = create_Gaussian_filter(30,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 100 , 0 , 1 ); + p.plot( "heat_map_1" ); */ -/* - std::vector< std::pair< double,double > > intervals; - intervals.push_back( std::make_pair(0.5,0.5) ); - std::vector< std::vector > filter = create_Gaussian_filter(5,1); - Persistence_heat_maps p( intervals , filter , constant_function, false , 10 , 0 , 1 ); - p.write_to_file( "aaa" ); - - Persistence_heat_maps q; - q.load_from_file( "aaa" ); - - cerr << ( p == q ) << endl; - */ /* - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 100 , 0 , 1 ); - p.plot( "heat_map_1" ); -*/ - -/* //test to construct persistence heat map: - std::vector< std::vector > filter = create_Gaussian_filter(100,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); - p.print_to_file( "persistence_heat_map_from_file_with_diagram" ); - - Persistence_heat_maps q; - q.load_from_file( "persistence_heat_map_from_file_with_diagram" ); - - cerr << (p == q) << endl; + std::vector< std::vector > filter = create_Gaussian_filter(100,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); + p.print_to_file( "persistence_heat_map_from_file_with_diagram" ); + + Persistence_heat_maps q; + q.load_from_file( "persistence_heat_map_from_file_with_diagram" ); + + cerr << (p == q) << endl; */ /* - //test of computations of a mean: - std::vector< std::pair< double,double > > intervals; - intervals.push_back( std::make_pair(5,5) ); - std::vector< std::vector > filter = create_Gaussian_filter(5,1); - Persistence_heat_maps p( intervals , filter , constant_function, false , 100 , 0 , 10 ); - p.plot( "heat_map_1" ); - - - std::vector< std::pair< double,double > > intervals2; - intervals2.push_back( std::make_pair(7,7) ); - Persistence_heat_maps q( intervals2 , filter , constant_function, false , 100 , 0 , 10 ); - q.plot( "heat_map_2" ); - - - Persistence_heat_maps av; - av.compute_average( { &P , &q } ); - av.plot( "average" ); + //test of computations of a mean: + std::vector< std::pair< double,double > > intervals; + intervals.push_back( std::make_pair(5,5) ); + std::vector< std::vector > filter = create_Gaussian_filter(5,1); + Persistence_heat_maps p( intervals , filter , constant_function, false , 100 , 0 , 10 ); + p.plot( "heat_map_1" ); + + + std::vector< std::pair< double,double > > intervals2; + intervals2.push_back( std::make_pair(7,7) ); + Persistence_heat_maps q( intervals2 , filter , constant_function, false , 100 , 0 , 10 ); + q.plot( "heat_map_2" ); + + + Persistence_heat_maps av; + av.compute_average( { &P , &q } ); + av.plot( "average" ); */ /* - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 10 ); - Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 10 ); - Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 10 ); - Persistence_heat_maps av; - av.compute_average( {&p,&q,&r} ); - - av.print_to_file( "template_average_of_heat_maps" ); -*/ + std::vector< std::vector > filter = create_Gaussian_filter(30,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 10 ); + Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 10 ); + Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 10 ); + Persistence_heat_maps av; + av.compute_average( {&p,&q,&r} ); + + av.print_to_file( "template_average_of_heat_maps" ); +*/ /* - std::vector< std::pair< double,double > > intervals; - intervals.push_back( std::make_pair(5,5) ); - std::vector< std::vector > filter = create_Gaussian_filter(5,1); - Persistence_heat_maps p( intervals , filter , constant_function, false , 10 , 0 , 10 ); - p.plot( "heat_map_1" ); - - std::vector< std::pair< double,double > > intervals2; - intervals2.push_back( std::make_pair(7,7) ); - Persistence_heat_maps q( intervals2 , filter , constant_function, false , 10 , 0 , 10 ); - q.plot( "heat_map_2" ); - - Persistence_heat_maps median; - median.compute_median( {&p,&q} ); - median.plot( "median" ); + std::vector< std::pair< double,double > > intervals; + intervals.push_back( std::make_pair(5,5) ); + std::vector< std::vector > filter = create_Gaussian_filter(5,1); + Persistence_heat_maps p( intervals , filter , constant_function, false , 10 , 0 , 10 ); + p.plot( "heat_map_1" ); + + std::vector< std::pair< double,double > > intervals2; + intervals2.push_back( std::make_pair(7,7) ); + Persistence_heat_maps q( intervals2 , filter , constant_function, false , 10 , 0 , 10 ); + q.plot( "heat_map_2" ); + + Persistence_heat_maps median; + median.compute_median( {&p,&q} ); + median.plot( "median" ); */ /* - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps median; - median.compute_median( {&p,&q,&r} ); - median.print_to_file( "template_median_of_heat_maps" ); + std::vector< std::vector > filter = create_Gaussian_filter(30,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps median; + median.compute_median( {&p,&q,&r} ); + median.print_to_file( "template_median_of_heat_maps" ); */ - /* - std::vector< std::vector > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 1 ); - - Persistence_heat_maps percentage_of_active; - percentage_of_active.compute_percentage_of_active( {&p,&q,&r} , 0.1 ); - - percentage_of_active.print_to_file( "template_percentage_of_active_of_heat_maps" ); - //percentage_of_active.plot( "template_percentage_of_active_of_heat_maps" ); + std::vector< std::vector > filter = create_Gaussian_filter(30,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 1 ); + + Persistence_heat_maps percentage_of_active; + percentage_of_active.compute_percentage_of_active( {&p,&q,&r} , 0.1 ); + + percentage_of_active.print_to_file( "template_percentage_of_active_of_heat_maps" ); + //percentage_of_active.plot( "template_percentage_of_active_of_heat_maps" ); */ diff --git a/src/Persistence_representations/test/persistence_intervals_test.cpp b/src/Persistence_representations/test/persistence_intervals_test.cpp index 8bad499a..a0580bb8 100644 --- a/src/Persistence_representations/test/persistence_intervals_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_test.cpp @@ -20,8 +20,6 @@ * along with this program. If not, see . */ - - #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "Persistence_representations" #include @@ -30,314 +28,275 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; - double epsilon = 0.0000005; +// cout << "Left most end of the interval : " << min_max_.first << std::endl; +// cout << "Right most end of the interval : " << min_max_.second << std::endl; +BOOST_AUTO_TEST_CASE(check_min_max_function) { + Persistence_intervals p("data/file_with_diagram"); + std::pair min_max_ = p.get_x_range(); - - + // cout << min_max_.first << " " << min_max_.second << std::endl;getchar(); -//cout << "Left most end of the interval : " << min_max_.first << std::endl; -//cout << "Right most end of the interval : " << min_max_.second << std::endl; -BOOST_AUTO_TEST_CASE(check_min_max_function) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::pair min_max_ = p.get_x_range(); - - //cout << min_max_.first << " " << min_max_.second << std::endl;getchar(); - - BOOST_CHECK( fabs ( min_max_.first - 0.0290362 ) <= epsilon ); - BOOST_CHECK( fabs ( min_max_.second - 0.994537 ) <= epsilon ); + BOOST_CHECK(fabs(min_max_.first - 0.0290362) <= epsilon); + BOOST_CHECK(fabs(min_max_.second - 0.994537) <= epsilon); } - - - - -BOOST_AUTO_TEST_CASE(check_length_of_dominant_intervals) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::vector dominant_ten_intervals_length = p.length_of_dominant_intervals(10); - std::vector< double > dominant_intervals_length; - dominant_intervals_length.push_back(0.862625); - dominant_intervals_length.push_back(0.800893); - dominant_intervals_length.push_back(0.762061); - dominant_intervals_length.push_back(0.756501); - dominant_intervals_length.push_back(0.729367); - dominant_intervals_length.push_back(0.718177); - dominant_intervals_length.push_back(0.708395); - dominant_intervals_length.push_back(0.702844); - dominant_intervals_length.push_back(0.700468); - dominant_intervals_length.push_back(0.622177); - for ( size_t i = 0 ; i != dominant_ten_intervals_length.size() ; ++i ) - { - BOOST_CHECK( fabs ( dominant_ten_intervals_length[i] - dominant_intervals_length[i] ) <= epsilon ); - } +BOOST_AUTO_TEST_CASE(check_length_of_dominant_intervals) { + Persistence_intervals p("data/file_with_diagram"); + std::vector dominant_ten_intervals_length = p.length_of_dominant_intervals(10); + std::vector dominant_intervals_length; + dominant_intervals_length.push_back(0.862625); + dominant_intervals_length.push_back(0.800893); + dominant_intervals_length.push_back(0.762061); + dominant_intervals_length.push_back(0.756501); + dominant_intervals_length.push_back(0.729367); + dominant_intervals_length.push_back(0.718177); + dominant_intervals_length.push_back(0.708395); + dominant_intervals_length.push_back(0.702844); + dominant_intervals_length.push_back(0.700468); + dominant_intervals_length.push_back(0.622177); + for (size_t i = 0; i != dominant_ten_intervals_length.size(); ++i) { + BOOST_CHECK(fabs(dominant_ten_intervals_length[i] - dominant_intervals_length[i]) <= epsilon); + } } -BOOST_AUTO_TEST_CASE(check_dominant_intervals) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::vector< std::pair > ten_dominant_intervals = p.dominant_intervals( 10 ); - - std::vector< std::pair > templ; - templ.push_back( std::pair( 0.114718,0.977343) ); - templ.push_back( std::pair( 0.133638,0.93453) ); - templ.push_back( std::pair( 0.104599,0.866659) ); - templ.push_back( std::pair( 0.149798,0.906299) ); - templ.push_back( std::pair( 0.247352,0.976719) ); - templ.push_back( std::pair( 0.192675,0.910852) ); - templ.push_back( std::pair( 0.191836,0.900231) ); - templ.push_back( std::pair( 0.284998,0.987842) ); - templ.push_back( std::pair( 0.294069,0.994537) ); - templ.push_back( std::pair( 0.267421,0.889597) ); - - for ( size_t i = 0 ; i != ten_dominant_intervals.size() ; ++i ) - { - BOOST_CHECK( fabs ( ten_dominant_intervals[i].first - templ[i].first ) <= epsilon ); - BOOST_CHECK( fabs ( ten_dominant_intervals[i].second - templ[i].second ) <= epsilon ); - } +BOOST_AUTO_TEST_CASE(check_dominant_intervals) { + Persistence_intervals p("data/file_with_diagram"); + std::vector > ten_dominant_intervals = p.dominant_intervals(10); + + std::vector > templ; + templ.push_back(std::pair(0.114718, 0.977343)); + templ.push_back(std::pair(0.133638, 0.93453)); + templ.push_back(std::pair(0.104599, 0.866659)); + templ.push_back(std::pair(0.149798, 0.906299)); + templ.push_back(std::pair(0.247352, 0.976719)); + templ.push_back(std::pair(0.192675, 0.910852)); + templ.push_back(std::pair(0.191836, 0.900231)); + templ.push_back(std::pair(0.284998, 0.987842)); + templ.push_back(std::pair(0.294069, 0.994537)); + templ.push_back(std::pair(0.267421, 0.889597)); + + for (size_t i = 0; i != ten_dominant_intervals.size(); ++i) { + BOOST_CHECK(fabs(ten_dominant_intervals[i].first - templ[i].first) <= epsilon); + BOOST_CHECK(fabs(ten_dominant_intervals[i].second - templ[i].second) <= epsilon); + } } -BOOST_AUTO_TEST_CASE(check_histogram_of_lengths) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::vector< size_t > histogram = p.histogram_of_lengths( 10 ); - std::vector< size_t > template_histogram; - template_histogram.push_back(10); - template_histogram.push_back(5); - template_histogram.push_back(3); - template_histogram.push_back(4); - template_histogram.push_back(4); - template_histogram.push_back(3); - template_histogram.push_back(6); - template_histogram.push_back(1); - template_histogram.push_back(7); - template_histogram.push_back(1); - template_histogram.push_back(1); - for ( size_t i = 0 ; i != histogram.size() ; ++i ) - { - BOOST_CHECK( fabs ( histogram[i] - template_histogram[i] ) <= epsilon ); - } +BOOST_AUTO_TEST_CASE(check_histogram_of_lengths) { + Persistence_intervals p("data/file_with_diagram"); + std::vector histogram = p.histogram_of_lengths(10); + std::vector template_histogram; + template_histogram.push_back(10); + template_histogram.push_back(5); + template_histogram.push_back(3); + template_histogram.push_back(4); + template_histogram.push_back(4); + template_histogram.push_back(3); + template_histogram.push_back(6); + template_histogram.push_back(1); + template_histogram.push_back(7); + template_histogram.push_back(1); + template_histogram.push_back(1); + for (size_t i = 0; i != histogram.size(); ++i) { + BOOST_CHECK(fabs(histogram[i] - template_histogram[i]) <= epsilon); + } } -BOOST_AUTO_TEST_CASE(check_cumulative_histograms_of_lengths) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::vector< size_t > cumulative_histogram = p.cumulative_histogram_of_lengths( 10 ); - std::vector< size_t > template_cumulative_histogram; - template_cumulative_histogram.push_back(10); - template_cumulative_histogram.push_back(15); - template_cumulative_histogram.push_back(18); - template_cumulative_histogram.push_back(22); - template_cumulative_histogram.push_back(26); - template_cumulative_histogram.push_back(29); - template_cumulative_histogram.push_back(35); - template_cumulative_histogram.push_back(36); - template_cumulative_histogram.push_back(43); - template_cumulative_histogram.push_back(44); - template_cumulative_histogram.push_back(45); - - for ( size_t i = 0 ; i != cumulative_histogram.size() ; ++i ) - { - BOOST_CHECK( fabs ( cumulative_histogram[i] - template_cumulative_histogram[i] ) <= epsilon ); - } -} -BOOST_AUTO_TEST_CASE(check_characteristic_function_of_diagram) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::pair min_max_ = p.get_x_range(); - std::vector< double > char_funct_diag = p.characteristic_function_of_diagram( min_max_.first , min_max_.second ); - std::vector< double > template_char_funct_diag; - template_char_funct_diag.push_back( 0.370665 ); - template_char_funct_diag.push_back( 0.84058 ); - template_char_funct_diag.push_back( 1.24649 ); - template_char_funct_diag.push_back( 1.3664 ); - template_char_funct_diag.push_back( 1.34032 ); - template_char_funct_diag.push_back( 1.31904 ); - template_char_funct_diag.push_back( 1.14076 ); - template_char_funct_diag.push_back( 0.991259 ); - template_char_funct_diag.push_back( 0.800714 ); - template_char_funct_diag.push_back( 0.0676303 ); - - for ( size_t i = 0 ; i != char_funct_diag.size() ; ++i ) - { - //cout << char_funct_diag[i] << std::endl; - if ( fabs ( char_funct_diag[i] - template_char_funct_diag[i] ) >= 0.0001 ) - { - std::cout << "Boost test fail check_characteristic_function_of_diagram : " << std::endl; - std::cerr << char_funct_diag[i] << " " << template_char_funct_diag[i] << std::endl; - std::cerr << fabs ( char_funct_diag[i] - template_char_funct_diag[i] ) << std::endl; - std::cerr << 0.0001 << std::endl; - getchar(); - } - BOOST_CHECK( fabs ( char_funct_diag[i] - template_char_funct_diag[i] ) <= 0.0001 ); - } -} - - -BOOST_AUTO_TEST_CASE(check_cumulative_characteristic_function_of_diagram) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::pair min_max_ = p.get_x_range(); - std::vector< double > cumul_char_funct_diag = p.cumulative_characteristic_function_of_diagram( min_max_.first , min_max_.second ); - std::vector< double > template_char_funct_diag_cumul; - - template_char_funct_diag_cumul.push_back(0.370665); - template_char_funct_diag_cumul.push_back(1.21125); - template_char_funct_diag_cumul.push_back(2.45774); - template_char_funct_diag_cumul.push_back(3.82414); - template_char_funct_diag_cumul.push_back(5.16446); - template_char_funct_diag_cumul.push_back(6.4835); - template_char_funct_diag_cumul.push_back(7.62426); - template_char_funct_diag_cumul.push_back(8.61552); - template_char_funct_diag_cumul.push_back(9.41623); - template_char_funct_diag_cumul.push_back(9.48386); - - for ( size_t i = 0 ; i != cumul_char_funct_diag.size() ; ++i ) - { - //cout << cumul_char_funct_diag[i] << std::endl; - BOOST_CHECK( fabs (cumul_char_funct_diag[i] - template_char_funct_diag_cumul[i] ) <= 0.0001 ); - } +BOOST_AUTO_TEST_CASE(check_cumulative_histograms_of_lengths) { + Persistence_intervals p("data/file_with_diagram"); + std::vector cumulative_histogram = p.cumulative_histogram_of_lengths(10); + std::vector template_cumulative_histogram; + template_cumulative_histogram.push_back(10); + template_cumulative_histogram.push_back(15); + template_cumulative_histogram.push_back(18); + template_cumulative_histogram.push_back(22); + template_cumulative_histogram.push_back(26); + template_cumulative_histogram.push_back(29); + template_cumulative_histogram.push_back(35); + template_cumulative_histogram.push_back(36); + template_cumulative_histogram.push_back(43); + template_cumulative_histogram.push_back(44); + template_cumulative_histogram.push_back(45); + + for (size_t i = 0; i != cumulative_histogram.size(); ++i) { + BOOST_CHECK(fabs(cumulative_histogram[i] - template_cumulative_histogram[i]) <= epsilon); + } } - - -BOOST_AUTO_TEST_CASE(check_compute_persistent_betti_numbers) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::vector< std::pair< double , double > > pbns; - pbns.push_back(std::pair( 0.0290362,1 )); - pbns.push_back(std::pair( 0.0307676,2 )); - pbns.push_back(std::pair( 0.0366312,3 )); - pbns.push_back(std::pair( 0.0544614,4 )); - pbns.push_back(std::pair( 0.0920033,5 )); - pbns.push_back(std::pair( 0.104599,6 )); - pbns.push_back(std::pair( 0.114718,7 )); - pbns.push_back(std::pair( 0.117379,8 )); - pbns.push_back(std::pair( 0.123493,9 )); - pbns.push_back(std::pair( 0.133638,10 )); - pbns.push_back(std::pair( 0.137798,9 )); - pbns.push_back(std::pair( 0.149798,10 )); - pbns.push_back(std::pair( 0.155421,11 )); - pbns.push_back(std::pair( 0.158443,12 )); - pbns.push_back(std::pair( 0.176956,13 )); - pbns.push_back(std::pair( 0.183234,12 )); - pbns.push_back(std::pair( 0.191069,13 )); - pbns.push_back(std::pair( 0.191333,14 )); - pbns.push_back(std::pair( 0.191836,15 )); - pbns.push_back(std::pair( 0.192675,16 )); - pbns.push_back(std::pair( 0.208564,17 )); - pbns.push_back(std::pair( 0.218425,18 )); - pbns.push_back(std::pair( 0.219902,17 )); - pbns.push_back(std::pair( 0.23233,16 )); - pbns.push_back(std::pair( 0.234558,17 )); - pbns.push_back(std::pair( 0.237166,16 )); - pbns.push_back(std::pair( 0.247352,17 )); - pbns.push_back(std::pair( 0.267421,18 )); - pbns.push_back(std::pair( 0.268093,19 )); - pbns.push_back(std::pair( 0.278734,18 )); - pbns.push_back(std::pair( 0.284722,19 )); - pbns.push_back(std::pair( 0.284998,20 )); - pbns.push_back(std::pair( 0.294069,21 )); - pbns.push_back(std::pair( 0.306293,22 )); - pbns.push_back(std::pair( 0.322361,21 )); - pbns.push_back(std::pair( 0.323152,22 )); - pbns.push_back(std::pair( 0.371021,23 )); - pbns.push_back(std::pair( 0.372395,24 )); - pbns.push_back(std::pair( 0.387744,25 )); - pbns.push_back(std::pair( 0.435537,26 )); - pbns.push_back(std::pair( 0.462911,25 )); - pbns.push_back(std::pair( 0.483569,26 )); - pbns.push_back(std::pair( 0.489209,25 )); - pbns.push_back(std::pair( 0.517115,24 )); - pbns.push_back(std::pair( 0.522197,23 )); - pbns.push_back(std::pair( 0.532665,22 )); - pbns.push_back(std::pair( 0.545262,23 )); - pbns.push_back(std::pair( 0.587227,22 )); - pbns.push_back(std::pair( 0.593036,23 )); - pbns.push_back(std::pair( 0.602647,24 )); - pbns.push_back(std::pair( 0.605044,25 )); - pbns.push_back(std::pair( 0.621962,24 )); - pbns.push_back(std::pair( 0.629449,23 )); - pbns.push_back(std::pair( 0.636719,22 )); - pbns.push_back(std::pair( 0.64957,21 )); - pbns.push_back(std::pair( 0.650781,22 )); - pbns.push_back(std::pair( 0.654951,23 )); - pbns.push_back(std::pair( 0.683489,24 )); - pbns.push_back(std::pair( 0.687172,23 )); - pbns.push_back(std::pair( 0.69703,22 )); - pbns.push_back(std::pair( 0.701174,21 )); - pbns.push_back(std::pair( 0.717623,22 )); - pbns.push_back(std::pair( 0.722023,21 )); - pbns.push_back(std::pair( 0.722298,20 )); - pbns.push_back(std::pair( 0.725347,19 )); - pbns.push_back(std::pair( 0.73071,18 )); - pbns.push_back(std::pair( 0.758355,17 )); - pbns.push_back(std::pair( 0.770913,18 )); - pbns.push_back(std::pair( 0.790833,17 )); - pbns.push_back(std::pair( 0.821211,16 )); - pbns.push_back(std::pair( 0.849305,17 )); - pbns.push_back(std::pair( 0.853669,16 )); - pbns.push_back(std::pair( 0.866659,15 )); - pbns.push_back(std::pair( 0.872896,16 )); - pbns.push_back(std::pair( 0.889597,15 )); - pbns.push_back(std::pair( 0.900231,14 )); - pbns.push_back(std::pair( 0.903847,13 )); - pbns.push_back(std::pair( 0.906299,12 )); - pbns.push_back(std::pair( 0.910852,11 )); - pbns.push_back(std::pair( 0.93453,10 )); - pbns.push_back(std::pair( 0.944757,9 )); - pbns.push_back(std::pair( 0.947812,8 )); - pbns.push_back(std::pair( 0.959154,7 )); - pbns.push_back(std::pair( 0.975654,6 )); - pbns.push_back(std::pair( 0.976719,5 )); - pbns.push_back(std::pair( 0.977343,4 )); - pbns.push_back(std::pair( 0.980129,3 )); - pbns.push_back(std::pair( 0.987842,2 )); - pbns.push_back(std::pair( 0.990127,1 )); - pbns.push_back(std::pair( 0.994537,0 )); - - - - - std::vector< std::pair< double , size_t > > pbns_new = p.compute_persistent_betti_numbers(); - for ( size_t i = 0 ; i != pbns.size() ; ++i ) - { - //cout << pbns_new[i].first << "," << pbns_new[i].second << std::endl; - BOOST_CHECK( fabs ( pbns[i].first - pbns_new[i].first ) <= epsilon ); - BOOST_CHECK( fabs ( pbns[i].second - pbns_new[i].second ) <= epsilon ); - } +BOOST_AUTO_TEST_CASE(check_characteristic_function_of_diagram) { + Persistence_intervals p("data/file_with_diagram"); + std::pair min_max_ = p.get_x_range(); + std::vector char_funct_diag = p.characteristic_function_of_diagram(min_max_.first, min_max_.second); + std::vector template_char_funct_diag; + template_char_funct_diag.push_back(0.370665); + template_char_funct_diag.push_back(0.84058); + template_char_funct_diag.push_back(1.24649); + template_char_funct_diag.push_back(1.3664); + template_char_funct_diag.push_back(1.34032); + template_char_funct_diag.push_back(1.31904); + template_char_funct_diag.push_back(1.14076); + template_char_funct_diag.push_back(0.991259); + template_char_funct_diag.push_back(0.800714); + template_char_funct_diag.push_back(0.0676303); + + for (size_t i = 0; i != char_funct_diag.size(); ++i) { + // cout << char_funct_diag[i] << std::endl; + if (fabs(char_funct_diag[i] - template_char_funct_diag[i]) >= 0.0001) { + std::cout << "Boost test fail check_characteristic_function_of_diagram : " << std::endl; + std::cerr << char_funct_diag[i] << " " << template_char_funct_diag[i] << std::endl; + std::cerr << fabs(char_funct_diag[i] - template_char_funct_diag[i]) << std::endl; + std::cerr << 0.0001 << std::endl; + getchar(); + } + BOOST_CHECK(fabs(char_funct_diag[i] - template_char_funct_diag[i]) <= 0.0001); + } } - - -BOOST_AUTO_TEST_CASE(check_k_n_n) -{ - Persistence_intervals p( "data/file_with_diagram" ); - std::vector< double > knn = p.k_n_n( 5 ); - std::vector< double > knn_template; - knn_template.push_back( 1.04208 ); - knn_template.push_back( 1.00344 ); - knn_template.push_back( 0.979395 ); - knn_template.push_back( 0.890643 ); - knn_template.push_back( 0.874769 ); - knn_template.push_back( 0.845787 ); - knn_template.push_back( 0.819713 ); - knn_template.push_back( 0.803984 ); - knn_template.push_back( 0.799864 ); - knn_template.push_back( 0.786945 ); - - for ( size_t i = 0 ; i != knn.size() ; ++i ) - { - //cout << knn[i] << std::endl; - BOOST_CHECK( fabs ( knn[i] - knn_template[i] ) <= 0.000005 ); - } +BOOST_AUTO_TEST_CASE(check_cumulative_characteristic_function_of_diagram) { + Persistence_intervals p("data/file_with_diagram"); + std::pair min_max_ = p.get_x_range(); + std::vector cumul_char_funct_diag = + p.cumulative_characteristic_function_of_diagram(min_max_.first, min_max_.second); + std::vector template_char_funct_diag_cumul; + + template_char_funct_diag_cumul.push_back(0.370665); + template_char_funct_diag_cumul.push_back(1.21125); + template_char_funct_diag_cumul.push_back(2.45774); + template_char_funct_diag_cumul.push_back(3.82414); + template_char_funct_diag_cumul.push_back(5.16446); + template_char_funct_diag_cumul.push_back(6.4835); + template_char_funct_diag_cumul.push_back(7.62426); + template_char_funct_diag_cumul.push_back(8.61552); + template_char_funct_diag_cumul.push_back(9.41623); + template_char_funct_diag_cumul.push_back(9.48386); + + for (size_t i = 0; i != cumul_char_funct_diag.size(); ++i) { + // cout << cumul_char_funct_diag[i] << std::endl; + BOOST_CHECK(fabs(cumul_char_funct_diag[i] - template_char_funct_diag_cumul[i]) <= 0.0001); + } } +BOOST_AUTO_TEST_CASE(check_compute_persistent_betti_numbers) { + Persistence_intervals p("data/file_with_diagram"); + std::vector > pbns; + pbns.push_back(std::pair(0.0290362, 1)); + pbns.push_back(std::pair(0.0307676, 2)); + pbns.push_back(std::pair(0.0366312, 3)); + pbns.push_back(std::pair(0.0544614, 4)); + pbns.push_back(std::pair(0.0920033, 5)); + pbns.push_back(std::pair(0.104599, 6)); + pbns.push_back(std::pair(0.114718, 7)); + pbns.push_back(std::pair(0.117379, 8)); + pbns.push_back(std::pair(0.123493, 9)); + pbns.push_back(std::pair(0.133638, 10)); + pbns.push_back(std::pair(0.137798, 9)); + pbns.push_back(std::pair(0.149798, 10)); + pbns.push_back(std::pair(0.155421, 11)); + pbns.push_back(std::pair(0.158443, 12)); + pbns.push_back(std::pair(0.176956, 13)); + pbns.push_back(std::pair(0.183234, 12)); + pbns.push_back(std::pair(0.191069, 13)); + pbns.push_back(std::pair(0.191333, 14)); + pbns.push_back(std::pair(0.191836, 15)); + pbns.push_back(std::pair(0.192675, 16)); + pbns.push_back(std::pair(0.208564, 17)); + pbns.push_back(std::pair(0.218425, 18)); + pbns.push_back(std::pair(0.219902, 17)); + pbns.push_back(std::pair(0.23233, 16)); + pbns.push_back(std::pair(0.234558, 17)); + pbns.push_back(std::pair(0.237166, 16)); + pbns.push_back(std::pair(0.247352, 17)); + pbns.push_back(std::pair(0.267421, 18)); + pbns.push_back(std::pair(0.268093, 19)); + pbns.push_back(std::pair(0.278734, 18)); + pbns.push_back(std::pair(0.284722, 19)); + pbns.push_back(std::pair(0.284998, 20)); + pbns.push_back(std::pair(0.294069, 21)); + pbns.push_back(std::pair(0.306293, 22)); + pbns.push_back(std::pair(0.322361, 21)); + pbns.push_back(std::pair(0.323152, 22)); + pbns.push_back(std::pair(0.371021, 23)); + pbns.push_back(std::pair(0.372395, 24)); + pbns.push_back(std::pair(0.387744, 25)); + pbns.push_back(std::pair(0.435537, 26)); + pbns.push_back(std::pair(0.462911, 25)); + pbns.push_back(std::pair(0.483569, 26)); + pbns.push_back(std::pair(0.489209, 25)); + pbns.push_back(std::pair(0.517115, 24)); + pbns.push_back(std::pair(0.522197, 23)); + pbns.push_back(std::pair(0.532665, 22)); + pbns.push_back(std::pair(0.545262, 23)); + pbns.push_back(std::pair(0.587227, 22)); + pbns.push_back(std::pair(0.593036, 23)); + pbns.push_back(std::pair(0.602647, 24)); + pbns.push_back(std::pair(0.605044, 25)); + pbns.push_back(std::pair(0.621962, 24)); + pbns.push_back(std::pair(0.629449, 23)); + pbns.push_back(std::pair(0.636719, 22)); + pbns.push_back(std::pair(0.64957, 21)); + pbns.push_back(std::pair(0.650781, 22)); + pbns.push_back(std::pair(0.654951, 23)); + pbns.push_back(std::pair(0.683489, 24)); + pbns.push_back(std::pair(0.687172, 23)); + pbns.push_back(std::pair(0.69703, 22)); + pbns.push_back(std::pair(0.701174, 21)); + pbns.push_back(std::pair(0.717623, 22)); + pbns.push_back(std::pair(0.722023, 21)); + pbns.push_back(std::pair(0.722298, 20)); + pbns.push_back(std::pair(0.725347, 19)); + pbns.push_back(std::pair(0.73071, 18)); + pbns.push_back(std::pair(0.758355, 17)); + pbns.push_back(std::pair(0.770913, 18)); + pbns.push_back(std::pair(0.790833, 17)); + pbns.push_back(std::pair(0.821211, 16)); + pbns.push_back(std::pair(0.849305, 17)); + pbns.push_back(std::pair(0.853669, 16)); + pbns.push_back(std::pair(0.866659, 15)); + pbns.push_back(std::pair(0.872896, 16)); + pbns.push_back(std::pair(0.889597, 15)); + pbns.push_back(std::pair(0.900231, 14)); + pbns.push_back(std::pair(0.903847, 13)); + pbns.push_back(std::pair(0.906299, 12)); + pbns.push_back(std::pair(0.910852, 11)); + pbns.push_back(std::pair(0.93453, 10)); + pbns.push_back(std::pair(0.944757, 9)); + pbns.push_back(std::pair(0.947812, 8)); + pbns.push_back(std::pair(0.959154, 7)); + pbns.push_back(std::pair(0.975654, 6)); + pbns.push_back(std::pair(0.976719, 5)); + pbns.push_back(std::pair(0.977343, 4)); + pbns.push_back(std::pair(0.980129, 3)); + pbns.push_back(std::pair(0.987842, 2)); + pbns.push_back(std::pair(0.990127, 1)); + pbns.push_back(std::pair(0.994537, 0)); + + std::vector > pbns_new = p.compute_persistent_betti_numbers(); + for (size_t i = 0; i != pbns.size(); ++i) { + // cout << pbns_new[i].first << "," << pbns_new[i].second << std::endl; + BOOST_CHECK(fabs(pbns[i].first - pbns_new[i].first) <= epsilon); + BOOST_CHECK(fabs(pbns[i].second - pbns_new[i].second) <= epsilon); + } +} - - +BOOST_AUTO_TEST_CASE(check_k_n_n) { + Persistence_intervals p("data/file_with_diagram"); + std::vector knn = p.k_n_n(5); + std::vector knn_template; + knn_template.push_back(1.04208); + knn_template.push_back(1.00344); + knn_template.push_back(0.979395); + knn_template.push_back(0.890643); + knn_template.push_back(0.874769); + knn_template.push_back(0.845787); + knn_template.push_back(0.819713); + knn_template.push_back(0.803984); + knn_template.push_back(0.799864); + knn_template.push_back(0.786945); + + for (size_t i = 0; i != knn.size(); ++i) { + // cout << knn[i] << std::endl; + BOOST_CHECK(fabs(knn[i] - knn_template[i]) <= 0.000005); + } +} diff --git a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp index 703b5011..b936c41d 100644 --- a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp @@ -29,42 +29,33 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; +BOOST_AUTO_TEST_CASE(check_bottleneck_distances_computation) { + Persistence_intervals_with_distances p("data/file_with_diagram"); + Persistence_intervals_with_distances q("data/file_with_diagram_1"); -BOOST_AUTO_TEST_CASE(check_bottleneck_distances_computation) -{ - Persistence_intervals_with_distances p( "data/file_with_diagram" ); - Persistence_intervals_with_distances q( "data/file_with_diagram_1" ); - - double dist = p.distance( q ); - - //std::cout << "dist : " << dist << std::endl; - - BOOST_CHECK( almost_equal(dist,0.389043) ); -} + double dist = p.distance(q); + // std::cout << "dist : " << dist << std::endl; -BOOST_AUTO_TEST_CASE(check_default_parameters_in_distance) -{ - Persistence_intervals_with_distances p( "data/file_with_diagram" ); - Persistence_intervals_with_distances q( "data/file_with_diagram_1" ); - - double default_parameter_distance = p.distance( q ); - double max_parameter_distance = p.distance( q , std::numeric_limits< double >::max() ); - double inf_parameter_distance = p.distance( q , std::numeric_limits::infinity() ); - - //std::cout << "default_parameter_distance : " << default_parameter_distance << std::endl; - //std::cout << "max_parameter_distance : " << max_parameter_distance << std::endl; - //std::cout << "inf_parameter_distance : " << inf_parameter_distance << std::endl; - - BOOST_CHECK( default_parameter_distance == max_parameter_distance ); - BOOST_CHECK( inf_parameter_distance == max_parameter_distance ); - BOOST_CHECK( inf_parameter_distance == max_parameter_distance ); + BOOST_CHECK(almost_equal(dist, 0.389043)); } +BOOST_AUTO_TEST_CASE(check_default_parameters_in_distance) { + Persistence_intervals_with_distances p("data/file_with_diagram"); + Persistence_intervals_with_distances q("data/file_with_diagram_1"); + double default_parameter_distance = p.distance(q); + double max_parameter_distance = p.distance(q, std::numeric_limits::max()); + double inf_parameter_distance = p.distance(q, std::numeric_limits::infinity()); + // std::cout << "default_parameter_distance : " << default_parameter_distance << std::endl; + // std::cout << "max_parameter_distance : " << max_parameter_distance << std::endl; + // std::cout << "inf_parameter_distance : " << inf_parameter_distance << std::endl; + + BOOST_CHECK(default_parameter_distance == max_parameter_distance); + BOOST_CHECK(inf_parameter_distance == max_parameter_distance); + BOOST_CHECK(inf_parameter_distance == max_parameter_distance); +} diff --git a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp index 865a8280..40d52415 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp @@ -20,8 +20,6 @@ * along with this program. If not, see . */ - - #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "Persistence_representations" #include @@ -30,359 +28,317 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; +BOOST_AUTO_TEST_CASE(check_construction_of_landscape) { + Persistence_landscape_on_grid l("data/file_with_diagram_1", 100, std::numeric_limits::max()); + l.print_to_file("landscape_from_file_with_diagram_1"); - + Persistence_landscape_on_grid g; + g.load_landscape_from_file("landscape_from_file_with_diagram_1"); -BOOST_AUTO_TEST_CASE(check_construction_of_landscape) -{ - Persistence_landscape_on_grid l( "data/file_with_diagram_1" , 100 , std::numeric_limits::max()); - l.print_to_file( "landscape_from_file_with_diagram_1" ); - - Persistence_landscape_on_grid g; - g.load_landscape_from_file( "landscape_from_file_with_diagram_1" ); - - BOOST_CHECK( l == g ); + BOOST_CHECK(l == g); } -BOOST_AUTO_TEST_CASE(check_construction_of_landscape_using_only_ten_levels) -{ - //TODO - unsigned number = 10; - Persistence_landscape_on_grid l( "data/file_with_diagram_1" , 100 , number ); - Persistence_landscape_on_grid g( "data/file_with_diagram_1" , 100 , std::numeric_limits::max()); - //cut all the elements of order > 10 in g. - - for ( size_t level = 0 ; level != number ; ++level ) - { - std::vector v1 = l.vectorize(level); - std::vector v2 = g.vectorize(level); - BOOST_CHECK( v1.size() == v2.size() ); - for ( size_t i = 0 ; i != v1.size() ; ++i ) - { - BOOST_CHECK( v1[i] == v2[i] ); - } - } - } - - - -BOOST_AUTO_TEST_CASE(check_computations_of_integrals) -{ - Persistence_landscape_on_grid p( "data/file_with_diagram_1" , 100 , std::numeric_limits::max()); - double integral = p.compute_integral_of_landscape(); - //cerr << "integral : " << integral << endl;getchar(); - BOOST_CHECK( fabs( integral - 27.343 ) <= 0.00005 ); +BOOST_AUTO_TEST_CASE(check_construction_of_landscape_using_only_ten_levels) { + // TODO + unsigned number = 10; + Persistence_landscape_on_grid l("data/file_with_diagram_1", 100, number); + Persistence_landscape_on_grid g("data/file_with_diagram_1", 100, std::numeric_limits::max()); + // cut all the elements of order > 10 in g. + + for (size_t level = 0; level != number; ++level) { + std::vector v1 = l.vectorize(level); + std::vector v2 = g.vectorize(level); + BOOST_CHECK(v1.size() == v2.size()); + for (size_t i = 0; i != v1.size(); ++i) { + BOOST_CHECK(v1[i] == v2[i]); + } + } } - -BOOST_AUTO_TEST_CASE(check_computations_of_integrals_for_each_level_separatelly) -{ - Persistence_landscape_on_grid p( "data/file_with_diagram_1" , 100, std::numeric_limits::max() ); - - std::vector< double > integrals_fir_different_levels; - //integrals_fir_different_levels.push_back(); - integrals_fir_different_levels.push_back(0.241168); - integrals_fir_different_levels.push_back(0.239276); - integrals_fir_different_levels.push_back(0.237882); - integrals_fir_different_levels.push_back(0.235193); - integrals_fir_different_levels.push_back(0.230115); - integrals_fir_different_levels.push_back(0.227626); - integrals_fir_different_levels.push_back(0.226132); - integrals_fir_different_levels.push_back(0.223643); - integrals_fir_different_levels.push_back(0.221651); - integrals_fir_different_levels.push_back(0.220556); - integrals_fir_different_levels.push_back(0.21727); - integrals_fir_different_levels.push_back(0.215976); - integrals_fir_different_levels.push_back(0.213685); - integrals_fir_different_levels.push_back(0.211993); - integrals_fir_different_levels.push_back(0.2102); - integrals_fir_different_levels.push_back(0.208707); - integrals_fir_different_levels.push_back(0.207014); - integrals_fir_different_levels.push_back(0.205122); - integrals_fir_different_levels.push_back(0.204226); - integrals_fir_different_levels.push_back(0.202633); - - - for ( size_t level = 0 ; level != integrals_fir_different_levels.size() ; ++level ) - { - double integral = p.compute_integral_of_landscape( level ); - //cerr << integral << endl; - BOOST_CHECK( fabs( integral - integrals_fir_different_levels[level] ) <= 0.00005 ); - } - +BOOST_AUTO_TEST_CASE(check_computations_of_integrals) { + Persistence_landscape_on_grid p("data/file_with_diagram_1", 100, std::numeric_limits::max()); + double integral = p.compute_integral_of_landscape(); + // cerr << "integral : " << integral << endl;getchar(); + BOOST_CHECK(fabs(integral - 27.343) <= 0.00005); } +BOOST_AUTO_TEST_CASE(check_computations_of_integrals_for_each_level_separatelly) { + Persistence_landscape_on_grid p("data/file_with_diagram_1", 100, std::numeric_limits::max()); + + std::vector integrals_fir_different_levels; + // integrals_fir_different_levels.push_back(); + integrals_fir_different_levels.push_back(0.241168); + integrals_fir_different_levels.push_back(0.239276); + integrals_fir_different_levels.push_back(0.237882); + integrals_fir_different_levels.push_back(0.235193); + integrals_fir_different_levels.push_back(0.230115); + integrals_fir_different_levels.push_back(0.227626); + integrals_fir_different_levels.push_back(0.226132); + integrals_fir_different_levels.push_back(0.223643); + integrals_fir_different_levels.push_back(0.221651); + integrals_fir_different_levels.push_back(0.220556); + integrals_fir_different_levels.push_back(0.21727); + integrals_fir_different_levels.push_back(0.215976); + integrals_fir_different_levels.push_back(0.213685); + integrals_fir_different_levels.push_back(0.211993); + integrals_fir_different_levels.push_back(0.2102); + integrals_fir_different_levels.push_back(0.208707); + integrals_fir_different_levels.push_back(0.207014); + integrals_fir_different_levels.push_back(0.205122); + integrals_fir_different_levels.push_back(0.204226); + integrals_fir_different_levels.push_back(0.202633); + + for (size_t level = 0; level != integrals_fir_different_levels.size(); ++level) { + double integral = p.compute_integral_of_landscape(level); + // cerr << integral << endl; + BOOST_CHECK(fabs(integral - integrals_fir_different_levels[level]) <= 0.00005); + } +} +BOOST_AUTO_TEST_CASE(check_computations_of_integrals_of_powers_of_landscape) { + Persistence_landscape_on_grid p("data/file_with_diagram_1", 100, std::numeric_limits::max()); + + std::vector integrals_fir_different_powers; + integrals_fir_different_powers.push_back(0.241168); + integrals_fir_different_powers.push_back(0.239276); + integrals_fir_different_powers.push_back(0.237882); + integrals_fir_different_powers.push_back(0.235193); + integrals_fir_different_powers.push_back(0.23011); + + for (size_t power = 0; power != 5; ++power) { + double integral = p.compute_integral_of_landscape(power); + // cerr << integral << endl; + BOOST_CHECK(fabs(integral - integrals_fir_different_powers[power]) <= 0.00001); + } +} -BOOST_AUTO_TEST_CASE(check_computations_of_integrals_of_powers_of_landscape) -{ - Persistence_landscape_on_grid p( "data/file_with_diagram_1" , 100, std::numeric_limits::max() ); - - std::vector integrals_fir_different_powers; - integrals_fir_different_powers.push_back( 0.241168); - integrals_fir_different_powers.push_back( 0.239276); - integrals_fir_different_powers.push_back( 0.237882); - integrals_fir_different_powers.push_back( 0.235193); - integrals_fir_different_powers.push_back( 0.23011); - - for ( size_t power = 0 ; power != 5 ; ++power ) - { - double integral = p.compute_integral_of_landscape( power ); - //cerr << integral << endl; - BOOST_CHECK( fabs( integral - integrals_fir_different_powers[power] ) <= 0.00001 ); - } +BOOST_AUTO_TEST_CASE(check_computations_of_values_on_different_points) { + Persistence_landscape_on_grid p("data/file_with_diagram_1", 100, std::numeric_limits::max()); + + std::vector results_level_0; + results_level_0.push_back(0.00997867); + results_level_0.push_back(0.0521921); + results_level_0.push_back(0.104312); + results_level_0.push_back(0.156432); + results_level_0.push_back(0.208552); + results_level_0.push_back(0.260672); + results_level_0.push_back(0.312792); + results_level_0.push_back(0.364912); + results_level_0.push_back(0.417032); + results_level_0.push_back(0.429237); + + std::vector results_level_10; + results_level_10.push_back(7.21433e-05); + results_level_10.push_back(0.0422135); + results_level_10.push_back(0.0943335); + results_level_10.push_back(0.146453); + results_level_10.push_back(0.198573); + results_level_10.push_back(0.240715); + results_level_10.push_back(0.272877); + results_level_10.push_back(0.324997); + results_level_10.push_back(0.359232); + results_level_10.push_back(0.379344); + + double x = 0.0012321; + double dx = 0.05212; + for (size_t i = 0; i != 10; ++i) { + BOOST_CHECK(almost_equal(p.compute_value_at_a_given_point(0, x), results_level_0[i])); + BOOST_CHECK(almost_equal(p.compute_value_at_a_given_point(10, x), results_level_10[i])); + x += dx; + } } +BOOST_AUTO_TEST_CASE(check_computations_sum_differences_and_multiplications) { + Persistence_landscape_on_grid p("data/file_with_diagram_1", 100, std::numeric_limits::max()); + Persistence_landscape_on_grid second("data/file_with_diagram_1", 100, std::numeric_limits::max()); -BOOST_AUTO_TEST_CASE(check_computations_of_values_on_different_points) -{ - Persistence_landscape_on_grid p( "data/file_with_diagram_1" , 100, std::numeric_limits::max() ); - - std::vector< double > results_level_0; - results_level_0.push_back(0.00997867); - results_level_0.push_back(0.0521921); - results_level_0.push_back(0.104312); - results_level_0.push_back(0.156432); - results_level_0.push_back(0.208552); - results_level_0.push_back(0.260672); - results_level_0.push_back(0.312792); - results_level_0.push_back(0.364912); - results_level_0.push_back(0.417032); - results_level_0.push_back(0.429237); - - std::vector< double > results_level_10; - results_level_10.push_back(7.21433e-05); - results_level_10.push_back(0.0422135); - results_level_10.push_back(0.0943335); - results_level_10.push_back(0.146453); - results_level_10.push_back(0.198573); - results_level_10.push_back(0.240715); - results_level_10.push_back(0.272877); - results_level_10.push_back(0.324997); - results_level_10.push_back(0.359232); - results_level_10.push_back(0.379344); - - double x = 0.0012321; - double dx = 0.05212; - for ( size_t i = 0 ; i != 10 ; ++i ) - { - BOOST_CHECK( almost_equal( p.compute_value_at_a_given_point(0,x) , results_level_0[i] ) ); - BOOST_CHECK( almost_equal( p.compute_value_at_a_given_point(10,x) , results_level_10[i] ) ); - x += dx; - } -} + Persistence_landscape_on_grid sum = p + second; + Persistence_landscape_on_grid difference = p - second; + Persistence_landscape_on_grid multiply_by_scalar = 10 * p; + ; + Persistence_landscape_on_grid template_sum; + template_sum.load_landscape_from_file("data/sum_on_grid_test"); -BOOST_AUTO_TEST_CASE(check_computations_sum_differences_and_multiplications) -{ - Persistence_landscape_on_grid p( "data/file_with_diagram_1" ,100 , std::numeric_limits::max()); - Persistence_landscape_on_grid second("data/file_with_diagram_1" , 100, std::numeric_limits::max() ); - - Persistence_landscape_on_grid sum = p + second; - Persistence_landscape_on_grid difference = p - second; - Persistence_landscape_on_grid multiply_by_scalar = 10*p; ; - - - Persistence_landscape_on_grid template_sum; - template_sum.load_landscape_from_file( "data/sum_on_grid_test" ); - - Persistence_landscape_on_grid template_difference; - template_difference.load_landscape_from_file( "data/difference_on_grid_test" ); - - Persistence_landscape_on_grid template_multiply_by_scalar; - template_multiply_by_scalar.load_landscape_from_file( "data/multiply_by_scalar_on_grid_test" ); - - BOOST_CHECK( sum == template_sum ); - BOOST_CHECK( difference == template_difference ); - BOOST_CHECK( multiply_by_scalar == template_multiply_by_scalar ); -} + Persistence_landscape_on_grid template_difference; + template_difference.load_landscape_from_file("data/difference_on_grid_test"); + Persistence_landscape_on_grid template_multiply_by_scalar; + template_multiply_by_scalar.load_landscape_from_file("data/multiply_by_scalar_on_grid_test"); + BOOST_CHECK(sum == template_sum); + BOOST_CHECK(difference == template_difference); + BOOST_CHECK(multiply_by_scalar == template_multiply_by_scalar); +} -BOOST_AUTO_TEST_CASE(check_computations_of_maxima_and_norms) -{ - Persistence_landscape_on_grid p( "data/file_with_diagram_1" , 0. , 1. , 100 ); - Persistence_landscape_on_grid second("data/file_with_diagram_2" , 0. , 1. , 100 ); - Persistence_landscape_on_grid sum = p + second; - - //cerr << p.compute_maximum() << endl; - //cerr << p.compute_norm_of_landscape(1) << endl; - //cerr << p.compute_norm_of_landscape(2) << endl; - //cerr << p.compute_norm_of_landscape(3) << endl; - //cerr << compute_distance_of_landscapes_on_grid(p,sum,1) << endl; - //cerr << compute_distance_of_landscapes_on_grid(p,sum,2) << endl; - //cerr << compute_distance_of_landscapes_on_grid(p,sum,std::numeric_limits::max()) << endl; - - BOOST_CHECK( fabs( p.compute_maximum() - 0.46 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_norm_of_landscape(1) - 27.3373 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_norm_of_landscape(2) - 1.84143 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_norm_of_landscape(3) - 0.927067 ) <= 0.00001 ); - BOOST_CHECK( fabs( compute_distance_of_landscapes_on_grid(p,sum,1) - 16.8519 ) <= 0.00005 ); - BOOST_CHECK( fabs( compute_distance_of_landscapes_on_grid(p,sum,2) - 1.44542 ) <= 0.00001 ); - BOOST_CHECK( fabs(compute_distance_of_landscapes_on_grid(p,sum,std::numeric_limits::max()) - 0.45 ) <= 0.00001 ); +BOOST_AUTO_TEST_CASE(check_computations_of_maxima_and_norms) { + Persistence_landscape_on_grid p("data/file_with_diagram_1", 0., 1., 100); + Persistence_landscape_on_grid second("data/file_with_diagram_2", 0., 1., 100); + Persistence_landscape_on_grid sum = p + second; + + // cerr << p.compute_maximum() << endl; + // cerr << p.compute_norm_of_landscape(1) << endl; + // cerr << p.compute_norm_of_landscape(2) << endl; + // cerr << p.compute_norm_of_landscape(3) << endl; + // cerr << compute_distance_of_landscapes_on_grid(p,sum,1) << endl; + // cerr << compute_distance_of_landscapes_on_grid(p,sum,2) << endl; + // cerr << compute_distance_of_landscapes_on_grid(p,sum,std::numeric_limits::max()) << endl; + + BOOST_CHECK(fabs(p.compute_maximum() - 0.46) <= 0.00001); + BOOST_CHECK(fabs(p.compute_norm_of_landscape(1) - 27.3373) <= 0.00001); + BOOST_CHECK(fabs(p.compute_norm_of_landscape(2) - 1.84143) <= 0.00001); + BOOST_CHECK(fabs(p.compute_norm_of_landscape(3) - 0.927067) <= 0.00001); + BOOST_CHECK(fabs(compute_distance_of_landscapes_on_grid(p, sum, 1) - 16.8519) <= 0.00005); + BOOST_CHECK(fabs(compute_distance_of_landscapes_on_grid(p, sum, 2) - 1.44542) <= 0.00001); + BOOST_CHECK(fabs(compute_distance_of_landscapes_on_grid(p, sum, std::numeric_limits::max()) - 0.45) <= + 0.00001); } -BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances ) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape_on_grid p( diag , 0. , 1. , 100 ); - - std::vector< std::pair< double , double > > diag1 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); - Persistence_landscape_on_grid q( diag1 , 0. , 1. , 100 ); - - double dist_numeric_limit_max = p.distance( q,std::numeric_limits::max() ); - double dist_infinity = p.distance( q,std::numeric_limits::infinity() ); - - BOOST_CHECK( dist_numeric_limit_max == dist_infinity ); +BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape_on_grid p(diag, 0., 1., 100); + + std::vector > diag1 = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram_1"); + Persistence_landscape_on_grid q(diag1, 0., 1., 100); + + double dist_numeric_limit_max = p.distance(q, std::numeric_limits::max()); + double dist_infinity = p.distance(q, std::numeric_limits::infinity()); + + BOOST_CHECK(dist_numeric_limit_max == dist_infinity); } +BOOST_AUTO_TEST_CASE(check_computations_of_averages) { + Persistence_landscape_on_grid p("data/file_with_diagram", 0., 1., 100); + Persistence_landscape_on_grid q("data/file_with_diagram_1", 0., 1., 100); + Persistence_landscape_on_grid av; + av.compute_average({&p, &q}); + Persistence_landscape_on_grid template_average; + template_average.load_landscape_from_file("data/average_on_a_grid"); + BOOST_CHECK(template_average == av); +} +BOOST_AUTO_TEST_CASE(check_computations_of_distances) { + Persistence_landscape_on_grid p("data/file_with_diagram", 0., 1., 10000); + Persistence_landscape_on_grid q("data/file_with_diagram_1", 0., 1., 10000); + BOOST_CHECK(fabs(p.distance(q) - 25.5779) <= 0.00005); + BOOST_CHECK(fabs(p.distance(q, 2) - 2.04891) <= 0.00001); + BOOST_CHECK(fabs(p.distance(q, std::numeric_limits::max()) - 0.359) <= 0.00001); +} -BOOST_AUTO_TEST_CASE(check_computations_of_averages) -{ - Persistence_landscape_on_grid p( "data/file_with_diagram", 0.,1.,100 ); - Persistence_landscape_on_grid q( "data/file_with_diagram_1", 0.,1.,100 ); - Persistence_landscape_on_grid av; - av.compute_average( {&p,&q} ); - - Persistence_landscape_on_grid template_average; - template_average.load_landscape_from_file( "data/average_on_a_grid" ); - BOOST_CHECK ( template_average == av ); +BOOST_AUTO_TEST_CASE(check_computations_of_scalar_product) { + Persistence_landscape_on_grid p("data/file_with_diagram", 0., 1., 10000); + Persistence_landscape_on_grid q("data/file_with_diagram_1", 0., 1., 10000); + // std::cerr << p.compute_scalar_product( q ) << std::endl; + BOOST_CHECK(almost_equal(p.compute_scalar_product(q), 0.754367)); } +// Below I am storing the code used to generate tests for that functionality. +/* + Persistence_landscape_on_grid l( "file_with_diagram_1" , 100 ); + l.print_to_file( "landscape_from_file_with_diagram_1" ); + Persistence_landscape_on_grid g; + g.load_landscape_from_file( "landscape_from_file_with_diagram_1" ); + cerr << ( l == g ); + */ -BOOST_AUTO_TEST_CASE(check_computations_of_distances) +/* +Persistence_landscape_on_grid l( "file_with_diagram_1" , 100 ); +cerr << l << endl; +cerr << l.compute_integral_of_landscape() << endl; +*/ + +/* +Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); +for ( size_t level = 0 ; level != 30 ; ++level ) { - Persistence_landscape_on_grid p( "data/file_with_diagram", 0.,1.,10000 ); - Persistence_landscape_on_grid q( "data/file_with_diagram_1", 0.,1.,10000 ); - BOOST_CHECK( fabs( p.distance( q )- 25.5779) <= 0.00005 ); - BOOST_CHECK( fabs( p.distance( q , 2) - 2.04891) <= 0.00001 ); - BOOST_CHECK( fabs( p.distance( q , std::numeric_limits::max() )-0.359 ) <= 0.00001 ); + double integral = p.compute_integral_of_landscape( level ); + cerr << integral << endl; } - +*/ -BOOST_AUTO_TEST_CASE(check_computations_of_scalar_product) +/* +Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); +for ( size_t power = 0 ; power != 5 ; ++power ) { - Persistence_landscape_on_grid p( "data/file_with_diagram" , 0.,1.,10000); - Persistence_landscape_on_grid q( "data/file_with_diagram_1", 0.,1.,10000 ); - //std::cerr << p.compute_scalar_product( q ) << std::endl; - BOOST_CHECK( almost_equal( p.compute_scalar_product( q ) , 0.754367 ) ); + double integral = p.compute_integral_of_landscape( (double)power ); + cerr << integral << endl; } +*/ +/* +Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); +double x = 0.0012321; +double dx = 0.05212; +for ( size_t i = 0 ; i != 10 ; ++i ) +{ + cerr << p.compute_value_at_a_given_point(10,x) << endl; + x += dx; +} +*/ +/* +Persistence_landscape_on_grid p( "file_with_diagram_1",100 ); +Persistence_landscape_on_grid second("file_with_diagram_1",100 ); +Persistence_landscape_on_grid sum = p + second; +Persistence_landscape_on_grid difference = p - second; +Persistence_landscape_on_grid multiply_by_scalar = 10*p; +sum.print_to_file( "sum_on_grid_test" ); +difference.print_to_file( "difference_on_grid_test" ); +multiply_by_scalar.print_to_file( "multiply_by_scalar_on_grid_test" ); +*/ +/* +Persistence_landscape_on_grid p( "file_with_diagram_1" , 0 , 1 , 100 ); +Persistence_landscape_on_grid second("file_with_diagram_1", 0 , 1 , 100 ); +Persistence_landscape_on_grid sum = p + second; + +cerr << "max : " << p.compute_maximum() << endl; +cerr << "1-norm : " << p.compute_norm_of_landscape(1) << endl; +cerr << "2-norm : " << p.compute_norm_of_landscape(2) << endl; +cerr << "3-norm : " << p.compute_norm_of_landscape(3) << endl; + +cerr << compute_distance_of_landscapes_on_grid(p,sum,1) << endl; +cerr << compute_distance_of_landscapes_on_grid(p,sum,2) << endl; +cerr << compute_distance_of_landscapes_on_grid(p,sum,-1) << endl; +*/ -//Below I am storing the code used to generate tests for that functionality. /* - Persistence_landscape_on_grid l( "file_with_diagram_1" , 100 ); - l.print_to_file( "landscape_from_file_with_diagram_1" ); - - Persistence_landscape_on_grid g; - g.load_landscape_from_file( "landscape_from_file_with_diagram_1" ); - - cerr << ( l == g ); - */ - - /* - Persistence_landscape_on_grid l( "file_with_diagram_1" , 100 ); - cerr << l << endl; - cerr << l.compute_integral_of_landscape() << endl; - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); - for ( size_t level = 0 ; level != 30 ; ++level ) - { - double integral = p.compute_integral_of_landscape( level ); - cerr << integral << endl; - } - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); - for ( size_t power = 0 ; power != 5 ; ++power ) - { - double integral = p.compute_integral_of_landscape( (double)power ); - cerr << integral << endl; - } - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); - double x = 0.0012321; - double dx = 0.05212; - for ( size_t i = 0 ; i != 10 ; ++i ) - { - cerr << p.compute_value_at_a_given_point(10,x) << endl; - x += dx; - } - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1",100 ); - Persistence_landscape_on_grid second("file_with_diagram_1",100 ); - Persistence_landscape_on_grid sum = p + second; - Persistence_landscape_on_grid difference = p - second; - Persistence_landscape_on_grid multiply_by_scalar = 10*p; - sum.print_to_file( "sum_on_grid_test" ); - difference.print_to_file( "difference_on_grid_test" ); - multiply_by_scalar.print_to_file( "multiply_by_scalar_on_grid_test" ); - */ - - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1" , 0 , 1 , 100 ); - Persistence_landscape_on_grid second("file_with_diagram_1", 0 , 1 , 100 ); - Persistence_landscape_on_grid sum = p + second; - - cerr << "max : " << p.compute_maximum() << endl; - cerr << "1-norm : " << p.compute_norm_of_landscape(1) << endl; - cerr << "2-norm : " << p.compute_norm_of_landscape(2) << endl; - cerr << "3-norm : " << p.compute_norm_of_landscape(3) << endl; - - cerr << compute_distance_of_landscapes_on_grid(p,sum,1) << endl; - cerr << compute_distance_of_landscapes_on_grid(p,sum,2) << endl; - cerr << compute_distance_of_landscapes_on_grid(p,sum,-1) << endl; - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram", 0,1,100 ); - Persistence_landscape_on_grid q( "file_with_diagram_1", 0,1,100 ); - Persistence_landscape_on_grid av; - av.compute_average( {&p,&q} ); - av.print_to_file("average_on_a_grid"); - - Persistence_landscape_on_grid template_average; - template_average.load_landscape_from_file( "average_on_a_grid" ); - if ( template_average == av ) - { - cerr << "OK OK \n"; - }*/ - - /* - Persistence_landscape_on_grid p( "file_with_diagram" , 0,1,10000); - Persistence_landscape_on_grid q( "file_with_diagram_1" , 0,1,10000); - cerr << p.distance( &q )<< endl; - cerr << p.distance( &q , 2 ) << endl; - cerr << p.distance( &q , std::numeric_limits::max() ) << endl; - */ - +Persistence_landscape_on_grid p( "file_with_diagram", 0,1,100 ); +Persistence_landscape_on_grid q( "file_with_diagram_1", 0,1,100 ); +Persistence_landscape_on_grid av; +av.compute_average( {&p,&q} ); +av.print_to_file("average_on_a_grid"); + +Persistence_landscape_on_grid template_average; +template_average.load_landscape_from_file( "average_on_a_grid" ); +if ( template_average == av ) +{ + cerr << "OK OK \n"; +}*/ + /* - Persistence_landscape_on_grid p( "file_with_diagram", 0,1,10000 ); - Persistence_landscape_on_grid q( "file_with_diagram_1", 0,1,10000 ); - - //std::vector< std::pair< double,double > > aa; - //aa.push_back( std::make_pair( 0,1 ) ); - //Persistence_landscape_on_grid p( aa, 0,1,10 ); - //Persistence_landscape_on_grid q( aa, 0,1,10 ); - cerr << p.compute_scalar_product( &q ) << endl; +Persistence_landscape_on_grid p( "file_with_diagram" , 0,1,10000); +Persistence_landscape_on_grid q( "file_with_diagram_1" , 0,1,10000); +cerr << p.distance( &q )<< endl; +cerr << p.distance( &q , 2 ) << endl; +cerr << p.distance( &q , std::numeric_limits::max() ) << endl; */ +/* + Persistence_landscape_on_grid p( "file_with_diagram", 0,1,10000 ); + Persistence_landscape_on_grid q( "file_with_diagram_1", 0,1,10000 ); + + //std::vector< std::pair< double,double > > aa; + //aa.push_back( std::make_pair( 0,1 ) ); + //Persistence_landscape_on_grid p( aa, 0,1,10 ); + //Persistence_landscape_on_grid q( aa, 0,1,10 ); + cerr << p.compute_scalar_product( &q ) << endl; +*/ diff --git a/src/Persistence_representations/test/persistence_lanscapes_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_test.cpp index c1e24b1c..2bdc6bdb 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_test.cpp @@ -20,8 +20,6 @@ * along with this program. If not, see . */ - - #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "Persistence_representations" #include @@ -31,354 +29,332 @@ #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; - double epsilon = 0.0000005; - - - -BOOST_AUTO_TEST_CASE(check_construction_of_landscape) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - Persistence_landscape q; - q.load_landscape_from_file( "data/file_with_landscape_from_file_with_diagram" ); - BOOST_CHECK( p == q ); +BOOST_AUTO_TEST_CASE(check_construction_of_landscape) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + Persistence_landscape q; + q.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram"); + BOOST_CHECK(p == q); } - -BOOST_AUTO_TEST_CASE(check_construction_of_landscape_form_gudhi_style_file) -{ - Persistence_landscape p( "data/persistence_file_with_four_entries_per_line" , 1 ); - //p.print_to_file("persistence_file_with_four_entries_per_line_landscape"); - Persistence_landscape q; - q.load_landscape_from_file( "data/persistence_file_with_four_entries_per_line_landscape" ); - BOOST_CHECK( p == q ); +BOOST_AUTO_TEST_CASE(check_construction_of_landscape_form_gudhi_style_file) { + Persistence_landscape p("data/persistence_file_with_four_entries_per_line", 1); + // p.print_to_file("persistence_file_with_four_entries_per_line_landscape"); + Persistence_landscape q; + q.load_landscape_from_file("data/persistence_file_with_four_entries_per_line_landscape"); + BOOST_CHECK(p == q); } - -BOOST_AUTO_TEST_CASE(check_computations_of_integrals) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - double integral = p.compute_integral_of_landscape(); - //cerr << integral << " " << 2.34992 << endl; - BOOST_CHECK( fabs( integral - 2.34992 ) <= 0.00001 ); +BOOST_AUTO_TEST_CASE(check_computations_of_integrals) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + double integral = p.compute_integral_of_landscape(); + // cerr << integral << " " << 2.34992 << endl; + BOOST_CHECK(fabs(integral - 2.34992) <= 0.00001); } - -BOOST_AUTO_TEST_CASE(check_computations_of_integrals_for_each_level_separatelly) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - - std::vector< double > integrals_fir_different_levels; - integrals_fir_different_levels.push_back( 0.216432 ); - integrals_fir_different_levels.push_back( 0.204763 ); - integrals_fir_different_levels.push_back( 0.188793 ); - integrals_fir_different_levels.push_back( 0.178856 ); - integrals_fir_different_levels.push_back( 0.163142 ); - integrals_fir_different_levels.push_back( 0.155015 ); - integrals_fir_different_levels.push_back( 0.143046 ); - integrals_fir_different_levels.push_back( 0.133765 ); - integrals_fir_different_levels.push_back( 0.123531 ); - integrals_fir_different_levels.push_back( 0.117393 ); - integrals_fir_different_levels.push_back( 0.111269 ); - integrals_fir_different_levels.push_back( 0.104283 ); - integrals_fir_different_levels.push_back( 0.0941308 ); - integrals_fir_different_levels.push_back( 0.0811208 ); - integrals_fir_different_levels.push_back( 0.0679001 ); - integrals_fir_different_levels.push_back( 0.0580801 ); - integrals_fir_different_levels.push_back( 0.0489647 ); - integrals_fir_different_levels.push_back( 0.0407936 ); - integrals_fir_different_levels.push_back( 0.0342599 ); - integrals_fir_different_levels.push_back( 0.02896 ); - integrals_fir_different_levels.push_back( 0.0239881 ); - integrals_fir_different_levels.push_back( 0.0171792 ); - integrals_fir_different_levels.push_back( 0.0071511 ); - integrals_fir_different_levels.push_back( 0.00462067 ); - integrals_fir_different_levels.push_back( 0.00229033 ); - integrals_fir_different_levels.push_back( 0.000195296 ); - - - - - for ( size_t level = 0 ; level != p.size() ; ++level ) - { - double integral = p.compute_integral_of_a_level_of_a_landscape( level ); - BOOST_CHECK( fabs( integral - integrals_fir_different_levels[level] ) <= 0.00001 ); - } - +BOOST_AUTO_TEST_CASE(check_computations_of_integrals_for_each_level_separatelly) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + + std::vector integrals_fir_different_levels; + integrals_fir_different_levels.push_back(0.216432); + integrals_fir_different_levels.push_back(0.204763); + integrals_fir_different_levels.push_back(0.188793); + integrals_fir_different_levels.push_back(0.178856); + integrals_fir_different_levels.push_back(0.163142); + integrals_fir_different_levels.push_back(0.155015); + integrals_fir_different_levels.push_back(0.143046); + integrals_fir_different_levels.push_back(0.133765); + integrals_fir_different_levels.push_back(0.123531); + integrals_fir_different_levels.push_back(0.117393); + integrals_fir_different_levels.push_back(0.111269); + integrals_fir_different_levels.push_back(0.104283); + integrals_fir_different_levels.push_back(0.0941308); + integrals_fir_different_levels.push_back(0.0811208); + integrals_fir_different_levels.push_back(0.0679001); + integrals_fir_different_levels.push_back(0.0580801); + integrals_fir_different_levels.push_back(0.0489647); + integrals_fir_different_levels.push_back(0.0407936); + integrals_fir_different_levels.push_back(0.0342599); + integrals_fir_different_levels.push_back(0.02896); + integrals_fir_different_levels.push_back(0.0239881); + integrals_fir_different_levels.push_back(0.0171792); + integrals_fir_different_levels.push_back(0.0071511); + integrals_fir_different_levels.push_back(0.00462067); + integrals_fir_different_levels.push_back(0.00229033); + integrals_fir_different_levels.push_back(0.000195296); + + for (size_t level = 0; level != p.size(); ++level) { + double integral = p.compute_integral_of_a_level_of_a_landscape(level); + BOOST_CHECK(fabs(integral - integrals_fir_different_levels[level]) <= 0.00001); + } } -BOOST_AUTO_TEST_CASE(check_computations_of_integrals_of_powers_of_landscape) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - - std::vector integrals_fir_different_powers; - integrals_fir_different_powers.push_back( 17.1692 ); - integrals_fir_different_powers.push_back( 2.34992 ); - integrals_fir_different_powers.push_back( 0.49857 ); - integrals_fir_different_powers.push_back( 0.126405 ); - integrals_fir_different_powers.push_back( 0.0355235 ); - - for ( size_t power = 0 ; power != 5 ; ++power ) - { - double integral = p.compute_integral_of_landscape( (double)power ); - BOOST_CHECK( fabs( integral - integrals_fir_different_powers[power] ) <= 0.00005 ); - } +BOOST_AUTO_TEST_CASE(check_computations_of_integrals_of_powers_of_landscape) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + + std::vector integrals_fir_different_powers; + integrals_fir_different_powers.push_back(17.1692); + integrals_fir_different_powers.push_back(2.34992); + integrals_fir_different_powers.push_back(0.49857); + integrals_fir_different_powers.push_back(0.126405); + integrals_fir_different_powers.push_back(0.0355235); + + for (size_t power = 0; power != 5; ++power) { + double integral = p.compute_integral_of_landscape((double)power); + BOOST_CHECK(fabs(integral - integrals_fir_different_powers[power]) <= 0.00005); + } } -BOOST_AUTO_TEST_CASE(check_computations_of_values_on_different_points) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - - - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(1,0.0) ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(1,0.1) - 0.0692324 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(1,0.2) - 0.163369 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(1,0.3) - 0.217115 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(2,0.0) ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(2,0.1) - 0.0633688 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(2,0.2) - 0.122361 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(2,0.3) - 0.195401 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(3,0.0) ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(3,0.1) - 0.0455386 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(3,0.2) - 0.0954012 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_value_at_a_given_point(3,0.3) - 0.185282 ) <= 0.00001 ); +BOOST_AUTO_TEST_CASE(check_computations_of_values_on_different_points) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(1, 0.0)) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(1, 0.1) - 0.0692324) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(1, 0.2) - 0.163369) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(1, 0.3) - 0.217115) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(2, 0.0)) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(2, 0.1) - 0.0633688) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(2, 0.2) - 0.122361) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(2, 0.3) - 0.195401) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(3, 0.0)) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(3, 0.1) - 0.0455386) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(3, 0.2) - 0.0954012) <= 0.00001); + BOOST_CHECK(fabs(p.compute_value_at_a_given_point(3, 0.3) - 0.185282) <= 0.00001); } +BOOST_AUTO_TEST_CASE(check_computations_sum_differences_and_multiplications) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + Persistence_landscape second; + second.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram_1"); -BOOST_AUTO_TEST_CASE(check_computations_sum_differences_and_multiplications) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - Persistence_landscape second; - second.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram_1" ); - - Persistence_landscape sum = p + second; - Persistence_landscape difference = p - second; - Persistence_landscape multiply_by_scalar = 10*p; - - - Persistence_landscape template_sum; - template_sum.load_landscape_from_file( "data/sum" ); - - Persistence_landscape template_difference; - template_difference.load_landscape_from_file( "data/difference" ); - - Persistence_landscape template_multiply_by_scalar; - template_multiply_by_scalar.load_landscape_from_file( "data/multiply_by_scalar" ); - - BOOST_CHECK( sum == template_sum ); - BOOST_CHECK( difference == template_difference ); - BOOST_CHECK( multiply_by_scalar == template_multiply_by_scalar ); -} - + Persistence_landscape sum = p + second; + Persistence_landscape difference = p - second; + Persistence_landscape multiply_by_scalar = 10 * p; + Persistence_landscape template_sum; + template_sum.load_landscape_from_file("data/sum"); -BOOST_AUTO_TEST_CASE(check_computations_of_maxima_and_norms) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - Persistence_landscape second; - second.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram_1" ); - Persistence_landscape sum = p + second; - - BOOST_CHECK( fabs( p.compute_maximum() - 0.431313 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_norm_of_landscape(1) - 2.34992 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_norm_of_landscape(2) - 0.706095 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.compute_norm_of_landscape(3) - 0.501867 ) <= 0.00001 ); - BOOST_CHECK( fabs( compute_distance_of_landscapes(p,sum,1) - 27.9323 ) <= 0.00005 ); - BOOST_CHECK( fabs( compute_distance_of_landscapes(p,sum,2) - 2.35199 ) <= 0.00001 ); - BOOST_CHECK( fabs(compute_distance_of_landscapes( p , sum , std::numeric_limits::max() ) - 0.464478 ) <= 0.00001 ); -} + Persistence_landscape template_difference; + template_difference.load_landscape_from_file("data/difference"); + Persistence_landscape template_multiply_by_scalar; + template_multiply_by_scalar.load_landscape_from_file("data/multiply_by_scalar"); -BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances ) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - - std::vector< std::pair< double , double > > diag1 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); - Persistence_landscape q( diag1 ); - - double dist_numeric_limit_max = p.distance( q,std::numeric_limits::max() ); - double dist_infinity = p.distance( q,std::numeric_limits::infinity() ); - - BOOST_CHECK( dist_numeric_limit_max == dist_infinity ); + BOOST_CHECK(sum == template_sum); + BOOST_CHECK(difference == template_difference); + BOOST_CHECK(multiply_by_scalar == template_multiply_by_scalar); } -BOOST_AUTO_TEST_CASE(check_computations_of_averages) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - std::vector< std::pair< double , double > > diag2 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); - Persistence_landscape q( diag2 ); - Persistence_landscape av; - av.compute_average( {&p,&q} ); - - Persistence_landscape template_average; - template_average.load_landscape_from_file( "data/average" ); - BOOST_CHECK ( template_average == av ); +BOOST_AUTO_TEST_CASE(check_computations_of_maxima_and_norms) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + Persistence_landscape second; + second.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram_1"); + Persistence_landscape sum = p + second; + + BOOST_CHECK(fabs(p.compute_maximum() - 0.431313) <= 0.00001); + BOOST_CHECK(fabs(p.compute_norm_of_landscape(1) - 2.34992) <= 0.00001); + BOOST_CHECK(fabs(p.compute_norm_of_landscape(2) - 0.706095) <= 0.00001); + BOOST_CHECK(fabs(p.compute_norm_of_landscape(3) - 0.501867) <= 0.00001); + BOOST_CHECK(fabs(compute_distance_of_landscapes(p, sum, 1) - 27.9323) <= 0.00005); + BOOST_CHECK(fabs(compute_distance_of_landscapes(p, sum, 2) - 2.35199) <= 0.00001); + BOOST_CHECK(fabs(compute_distance_of_landscapes(p, sum, std::numeric_limits::max()) - 0.464478) <= 0.00001); } +BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + std::vector > diag1 = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram_1"); + Persistence_landscape q(diag1); + double dist_numeric_limit_max = p.distance(q, std::numeric_limits::max()); + double dist_infinity = p.distance(q, std::numeric_limits::infinity()); -BOOST_AUTO_TEST_CASE(check_computations_of_distances) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - std::vector< std::pair< double , double > > diag2 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); - Persistence_landscape q( diag2 ); - BOOST_CHECK( fabs( p.distance( q )- 25.5824) <= 0.00005 ); - BOOST_CHECK( fabs( p.distance( q , 2) - 2.12636 ) <= 0.00001 ); - BOOST_CHECK( fabs( p.distance( q , std::numeric_limits::max() )-0.359068 ) <= 0.00001 ); - std::cerr << "p.distance( q , std::numeric_limits::max() ) : " << p.distance( q , std::numeric_limits::max() ) << std::endl; + BOOST_CHECK(dist_numeric_limit_max == dist_infinity); } - - -BOOST_AUTO_TEST_CASE(check_computations_of_scalar_product) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Persistence_landscape p( diag ); - std::vector< std::pair< double , double > > diag2 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); - Persistence_landscape q( diag2 ); - BOOST_CHECK( fabs( p.compute_scalar_product( q ) - 0.754498 ) <= 0.00001 ); + +BOOST_AUTO_TEST_CASE(check_computations_of_averages) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + std::vector > diag2 = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram_1"); + Persistence_landscape q(diag2); + Persistence_landscape av; + av.compute_average({&p, &q}); + + Persistence_landscape template_average; + template_average.load_landscape_from_file("data/average"); + BOOST_CHECK(template_average == av); } +BOOST_AUTO_TEST_CASE(check_computations_of_distances) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + std::vector > diag2 = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram_1"); + Persistence_landscape q(diag2); + BOOST_CHECK(fabs(p.distance(q) - 25.5824) <= 0.00005); + BOOST_CHECK(fabs(p.distance(q, 2) - 2.12636) <= 0.00001); + BOOST_CHECK(fabs(p.distance(q, std::numeric_limits::max()) - 0.359068) <= 0.00001); + std::cerr << "p.distance( q , std::numeric_limits::max() ) : " + << p.distance(q, std::numeric_limits::max()) << std::endl; +} +BOOST_AUTO_TEST_CASE(check_computations_of_scalar_product) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Persistence_landscape p(diag); + std::vector > diag2 = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram_1"); + Persistence_landscape q(diag2); + BOOST_CHECK(fabs(p.compute_scalar_product(q) - 0.754498) <= 0.00001); +} -//Below I am storing the code used to generate tests for that functionality. +// Below I am storing the code used to generate tests for that functionality. /* if ( argc != 2 ) - { - std::cerr << "To run this program, please provide a name of a file with persistence landscape \n"; - //return 1; - } - Persistence_landscape p("../test/data/file_with_diagram"); - - Persistence_landscape q; - q.load_landscape_from_file( "file_with_landscape_from_file_with_diagram" ); - - if ( p != q ) - { - cout << "Not equal \n"; - } - - double integral = p.compute_integral_of_landscape(); - cout << "integral : " << integral <::max() ) << endl; - - { - Persistence_landscape p( "../test/data/file_with_diagram" ); - Persistence_landscape q( "../test/data/file_with_diagram_1" ); - Persistence_landscape av; - av.compute_average( {&p,&q} ); - - Persistence_landscape template_average; - template_average.load_landscape_from_file( "average" ); - if ( template_average != av ) - { - cerr << "We have a problem with average \n"; - } - } - - - { - Persistence_landscape p( "../test/data/file_with_diagram" ); - Persistence_landscape q( "../test/data/file_with_diagram_1" ); - cout << "L^1 distance : " << p.distance( &q ) << endl; - cout << "L^2 distance : " << p.distance( &q , 2) << endl; - cout << "L^infty distance : " << p.distance( &q , std::numeric_limits::max() ) << endl; - } - - - { - Persistence_landscape p( "../test/data/file_with_diagram" ); - Persistence_landscape q( "../test/data/file_with_diagram_1" ); - cout << "Scalar product : " << p.compute_scalar_product( &q ) << endl; - } -*/ + { + std::cerr << "To run this program, please provide a name of a file with persistence landscape \n"; + //return 1; + } + Persistence_landscape p("../test/data/file_with_diagram"); + + Persistence_landscape q; + q.load_landscape_from_file( "file_with_landscape_from_file_with_diagram" ); + + if ( p != q ) + { + cout << "Not equal \n"; + } + + double integral = p.compute_integral_of_landscape(); + cout << "integral : " << integral <::max() ) << +endl; + + { + Persistence_landscape p( "../test/data/file_with_diagram" ); + Persistence_landscape q( "../test/data/file_with_diagram_1" ); + Persistence_landscape av; + av.compute_average( {&p,&q} ); + + Persistence_landscape template_average; + template_average.load_landscape_from_file( "average" ); + if ( template_average != av ) + { + cerr << "We have a problem with average \n"; + } + } + + + { + Persistence_landscape p( "../test/data/file_with_diagram" ); + Persistence_landscape q( "../test/data/file_with_diagram_1" ); + cout << "L^1 distance : " << p.distance( &q ) << endl; + cout << "L^2 distance : " << p.distance( &q , 2) << endl; + cout << "L^infty distance : " << p.distance( &q , std::numeric_limits::max() ) << endl; + } + + + { + Persistence_landscape p( "../test/data/file_with_diagram" ); + Persistence_landscape q( "../test/data/file_with_diagram_1" ); + cout << "Scalar product : " << p.compute_scalar_product( &q ) << endl; + } +*/ diff --git a/src/Persistence_representations/test/read_persistence_from_file_test.cpp b/src/Persistence_representations/test/read_persistence_from_file_test.cpp index 69493efb..924a67a1 100644 --- a/src/Persistence_representations/test/read_persistence_from_file_test.cpp +++ b/src/Persistence_representations/test/read_persistence_from_file_test.cpp @@ -20,8 +20,6 @@ * along with this program. If not, see . */ - - #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "Persistence_representations" #include @@ -30,86 +28,71 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; +BOOST_AUTO_TEST_CASE(test_read_file_with_four_elements_per_line) { + std::vector > what_we_should_get; + what_we_should_get.push_back(std::make_pair(0, 2)); + what_we_should_get.push_back(std::make_pair(10, 1000)); + what_we_should_get.push_back(std::make_pair(10, 90)); + what_we_should_get.push_back(std::make_pair(4, 4)); + std::vector > what_we_get = read_persistence_intervals_in_one_dimension_from_file( + "data/persistence_file_with_four_entries_per_line", 1, 1000); + + // for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) + //{ + // std::cerr << what_we_get[i].first << " , " << what_we_get[i].second << std::endl; + //} + + BOOST_CHECK(what_we_should_get.size() == what_we_get.size()); + + for (size_t i = 0; i != what_we_get.size(); ++i) { + BOOST_CHECK(what_we_should_get[i] == what_we_get[i]); + } +} +BOOST_AUTO_TEST_CASE(test_read_file_with_three_elements_per_line) { + std::vector > what_we_should_get; + what_we_should_get.push_back(std::make_pair(4, 9999)); + what_we_should_get.push_back(std::make_pair(0, 1)); + what_we_should_get.push_back(std::make_pair(1, 9999)); + what_we_should_get.push_back(std::make_pair(10, 90)); + what_we_should_get.push_back(std::make_pair(4, 4)); - - -BOOST_AUTO_TEST_CASE(test_read_file_with_four_elements_per_line) -{ - std::vector< std::pair< double,double > > what_we_should_get; - what_we_should_get.push_back( std::make_pair( 0 , 2 ) ); - what_we_should_get.push_back( std::make_pair( 10 , 1000 ) ); - what_we_should_get.push_back( std::make_pair( 10 , 90 ) ); - what_we_should_get.push_back( std::make_pair( 4 , 4 ) ); - std::vector > what_we_get = read_persistence_intervals_in_one_dimension_from_file("data/persistence_file_with_four_entries_per_line" , 1 , 1000 ); - - - //for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) - //{ - // std::cerr << what_we_get[i].first << " , " << what_we_get[i].second << std::endl; - //} - - BOOST_CHECK( what_we_should_get.size() == what_we_get.size() ); - - for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) - { - BOOST_CHECK( what_we_should_get[i] == what_we_get[i] ); - } -} + std::vector > what_we_get = read_persistence_intervals_in_one_dimension_from_file( + "data/persistence_file_with_three_entries_per_line", 1, 9999); + // for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) + //{ + // std::cerr << what_we_get[i].first << " , " << what_we_get[i].second << std::endl; + //} -BOOST_AUTO_TEST_CASE(test_read_file_with_three_elements_per_line) -{ - std::vector< std::pair< double,double > > what_we_should_get; - what_we_should_get.push_back( std::make_pair( 4 , 9999 ) ); - what_we_should_get.push_back( std::make_pair( 0 , 1 ) ); - what_we_should_get.push_back( std::make_pair( 1 , 9999 ) ); - what_we_should_get.push_back( std::make_pair( 10 , 90 ) ); - what_we_should_get.push_back( std::make_pair( 4 , 4 ) ); - - std::vector > what_we_get = read_persistence_intervals_in_one_dimension_from_file("data/persistence_file_with_three_entries_per_line" , 1 , 9999 ); - - - //for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) - //{ - // std::cerr << what_we_get[i].first << " , " << what_we_get[i].second << std::endl; - //} - - BOOST_CHECK( what_we_should_get.size() == what_we_get.size() ); - - for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) - { - BOOST_CHECK( what_we_should_get[i] == what_we_get[i] ); - } + BOOST_CHECK(what_we_should_get.size() == what_we_get.size()); + + for (size_t i = 0; i != what_we_get.size(); ++i) { + BOOST_CHECK(what_we_should_get[i] == what_we_get[i]); + } } +BOOST_AUTO_TEST_CASE(test_read_file_with_two_elements_per_line) { + std::vector > what_we_should_get; + what_we_should_get.push_back(std::make_pair(4, 10)); + what_we_should_get.push_back(std::make_pair(4, 9999)); + what_we_should_get.push_back(std::make_pair(0, 1)); + what_we_should_get.push_back(std::make_pair(1, 4)); -BOOST_AUTO_TEST_CASE(test_read_file_with_two_elements_per_line) -{ - std::vector< std::pair< double,double > > what_we_should_get; - what_we_should_get.push_back( std::make_pair( 4 , 10 ) ); - what_we_should_get.push_back( std::make_pair( 4 , 9999 ) ); - what_we_should_get.push_back( std::make_pair( 0 , 1 ) ); - what_we_should_get.push_back( std::make_pair( 1 , 4 ) ); - - std::vector > what_we_get = read_persistence_intervals_in_one_dimension_from_file("data/persistence_file_with_two_entries_per_line" , 1 , 9999 ); - - - //for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) - //{ - // std::cerr << what_we_get[i].first << " , " << what_we_get[i].second << std::endl; - //} - - BOOST_CHECK( what_we_should_get.size() == what_we_get.size() ); - - for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) - { - BOOST_CHECK( what_we_should_get[i] == what_we_get[i] ); - } -} + std::vector > what_we_get = + read_persistence_intervals_in_one_dimension_from_file("data/persistence_file_with_two_entries_per_line", 1, 9999); + + // for ( size_t i = 0 ; i != what_we_get.size() ; ++i ) + //{ + // std::cerr << what_we_get[i].first << " , " << what_we_get[i].second << std::endl; + //} + BOOST_CHECK(what_we_should_get.size() == what_we_get.size()); + + for (size_t i = 0; i != what_we_get.size(); ++i) { + BOOST_CHECK(what_we_should_get[i] == what_we_get[i]); + } +} diff --git a/src/Persistence_representations/test/vector_representation_test.cpp b/src/Persistence_representations/test/vector_representation_test.cpp index 5e185445..d541d3e1 100644 --- a/src/Persistence_representations/test/vector_representation_test.cpp +++ b/src/Persistence_representations/test/vector_representation_test.cpp @@ -20,7 +20,6 @@ * along with this program. If not, see . */ - #include #include #include @@ -33,381 +32,351 @@ #include #include - using namespace Gudhi; using namespace Gudhi::Persistence_representations; +BOOST_AUTO_TEST_CASE(check_read_write_to_files) { + std::vector > intervals; + intervals.push_back(std::make_pair(2, 3)); + intervals.push_back(std::make_pair(4, 7)); + intervals.push_back(std::make_pair(9, 10)); + intervals.push_back(std::make_pair(3, 11)); + Vector_distances_in_diagram p(intervals, -1); + p.write_to_file("test_vector_representation_write_read"); + Vector_distances_in_diagram q; + q.load_from_file("test_vector_representation_write_read"); - - - - -BOOST_AUTO_TEST_CASE(check_read_write_to_files) -{ - std::vector< std::pair > intervals; - intervals.push_back( std::make_pair(2,3) ); - intervals.push_back( std::make_pair(4,7) ); - intervals.push_back( std::make_pair(9,10) ); - intervals.push_back( std::make_pair(3,11) ); - Vector_distances_in_diagram< Euclidean_distance > p( intervals , -1 ); - p.write_to_file( "test_vector_representation_write_read" ); - - Vector_distances_in_diagram< Euclidean_distance > q; - q.load_from_file( "test_vector_representation_write_read" ); - - BOOST_CHECK( p == q ); - + BOOST_CHECK(p == q); } +BOOST_AUTO_TEST_CASE(check_sortev_vector_distances_template) { + Vector_distances_in_diagram p("data/file_with_diagram", 100); + std::vector sortev_vector_distances_template; + + sortev_vector_distances_template.push_back(0.609968); + sortev_vector_distances_template.push_back(0.566317); + sortev_vector_distances_template.push_back(0.538858); + sortev_vector_distances_template.push_back(0.534927); + sortev_vector_distances_template.push_back(0.515741); + sortev_vector_distances_template.push_back(0.507828); + sortev_vector_distances_template.push_back(0.500911); + sortev_vector_distances_template.push_back(0.496986); + sortev_vector_distances_template.push_back(0.495306); + sortev_vector_distances_template.push_back(0.439945); + sortev_vector_distances_template.push_back(0.424097); + sortev_vector_distances_template.push_back(0.413891); + sortev_vector_distances_template.push_back(0.413891); + sortev_vector_distances_template.push_back(0.413891); + sortev_vector_distances_template.push_back(0.412621); + sortev_vector_distances_template.push_back(0.410613); + sortev_vector_distances_template.push_back(0.407853); + sortev_vector_distances_template.push_back(0.407853); + sortev_vector_distances_template.push_back(0.402306); + sortev_vector_distances_template.push_back(0.401937); + sortev_vector_distances_template.push_back(0.377605); + sortev_vector_distances_template.push_back(0.363859); + sortev_vector_distances_template.push_back(0.357765); + sortev_vector_distances_template.push_back(0.357765); + sortev_vector_distances_template.push_back(0.357765); + sortev_vector_distances_template.push_back(0.357765); + sortev_vector_distances_template.push_back(0.357765); + sortev_vector_distances_template.push_back(0.353401); + sortev_vector_distances_template.push_back(0.348004); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.345124); + sortev_vector_distances_template.push_back(0.34469); + sortev_vector_distances_template.push_back(0.339466); + sortev_vector_distances_template.push_back(0.33935); + sortev_vector_distances_template.push_back(0.32834); + sortev_vector_distances_template.push_back(0.327276); + sortev_vector_distances_template.push_back(0.318626); + sortev_vector_distances_template.push_back(0.318082); + sortev_vector_distances_template.push_back(0.30603); + sortev_vector_distances_template.push_back(0.30525); + sortev_vector_distances_template.push_back(0.297308); + sortev_vector_distances_template.push_back(0.296333); + sortev_vector_distances_template.push_back(0.296333); + sortev_vector_distances_template.push_back(0.296333); + sortev_vector_distances_template.push_back(0.296333); + sortev_vector_distances_template.push_back(0.293372); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.292666); + sortev_vector_distances_template.push_back(0.29029); + sortev_vector_distances_template.push_back(0.290218); + sortev_vector_distances_template.push_back(0.289782); + sortev_vector_distances_template.push_back(0.288128); + sortev_vector_distances_template.push_back(0.286416); + sortev_vector_distances_template.push_back(0.285969); + sortev_vector_distances_template.push_back(0.282046); + sortev_vector_distances_template.push_back(0.28154); + sortev_vector_distances_template.push_back(0.281085); + sortev_vector_distances_template.push_back(0.280227); + sortev_vector_distances_template.push_back(0.279273); + sortev_vector_distances_template.push_back(0.278936); + sortev_vector_distances_template.push_back(0.278706); + sortev_vector_distances_template.push_back(0.278507); + sortev_vector_distances_template.push_back(0.278097); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276293); + sortev_vector_distances_template.push_back(0.276169); + sortev_vector_distances_template.push_back(0.270563); + sortev_vector_distances_template.push_back(0.264009); + + size_t proj_no = p.number_of_vectorize_functions(); + std::vector aa = p.vectorize(proj_no); + + for (size_t i = 0; i != aa.size(); ++i) { + BOOST_CHECK(almost_equal(sortev_vector_distances_template[i], aa[i])); + } +} -BOOST_AUTO_TEST_CASE(check_sortev_vector_distances_template) -{ - Vector_distances_in_diagram< Euclidean_distance > p( "data/file_with_diagram" , 100 ); - std::vector< double > sortev_vector_distances_template; - - sortev_vector_distances_template.push_back( 0.609968 ); - sortev_vector_distances_template.push_back( 0.566317 ); - sortev_vector_distances_template.push_back( 0.538858 ); - sortev_vector_distances_template.push_back( 0.534927 ); - sortev_vector_distances_template.push_back( 0.515741 ); - sortev_vector_distances_template.push_back( 0.507828 ); - sortev_vector_distances_template.push_back( 0.500911 ); - sortev_vector_distances_template.push_back( 0.496986 ); - sortev_vector_distances_template.push_back( 0.495306 ); - sortev_vector_distances_template.push_back( 0.439945 ); - sortev_vector_distances_template.push_back( 0.424097 ); - sortev_vector_distances_template.push_back( 0.413891 ); - sortev_vector_distances_template.push_back( 0.413891 ); - sortev_vector_distances_template.push_back( 0.413891 ); - sortev_vector_distances_template.push_back( 0.412621 ); - sortev_vector_distances_template.push_back( 0.410613 ); - sortev_vector_distances_template.push_back( 0.407853 ); - sortev_vector_distances_template.push_back( 0.407853 ); - sortev_vector_distances_template.push_back( 0.402306 ); - sortev_vector_distances_template.push_back( 0.401937 ); - sortev_vector_distances_template.push_back( 0.377605 ); - sortev_vector_distances_template.push_back( 0.363859 ); - sortev_vector_distances_template.push_back( 0.357765 ); - sortev_vector_distances_template.push_back( 0.357765 ); - sortev_vector_distances_template.push_back( 0.357765 ); - sortev_vector_distances_template.push_back( 0.357765 ); - sortev_vector_distances_template.push_back( 0.357765 ); - sortev_vector_distances_template.push_back( 0.353401 ); - sortev_vector_distances_template.push_back( 0.348004 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.345124 ); - sortev_vector_distances_template.push_back( 0.34469 ); - sortev_vector_distances_template.push_back( 0.339466 ); - sortev_vector_distances_template.push_back( 0.33935 ); - sortev_vector_distances_template.push_back( 0.32834 ); - sortev_vector_distances_template.push_back( 0.327276 ); - sortev_vector_distances_template.push_back( 0.318626 ); - sortev_vector_distances_template.push_back( 0.318082 ); - sortev_vector_distances_template.push_back( 0.30603 ); - sortev_vector_distances_template.push_back( 0.30525 ); - sortev_vector_distances_template.push_back( 0.297308 ); - sortev_vector_distances_template.push_back( 0.296333 ); - sortev_vector_distances_template.push_back( 0.296333 ); - sortev_vector_distances_template.push_back( 0.296333 ); - sortev_vector_distances_template.push_back( 0.296333 ); - sortev_vector_distances_template.push_back( 0.293372 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.292666 ); - sortev_vector_distances_template.push_back( 0.29029 ); - sortev_vector_distances_template.push_back( 0.290218 ); - sortev_vector_distances_template.push_back( 0.289782 ); - sortev_vector_distances_template.push_back( 0.288128 ); - sortev_vector_distances_template.push_back( 0.286416 ); - sortev_vector_distances_template.push_back( 0.285969 ); - sortev_vector_distances_template.push_back( 0.282046 ); - sortev_vector_distances_template.push_back( 0.28154 ); - sortev_vector_distances_template.push_back( 0.281085 ); - sortev_vector_distances_template.push_back( 0.280227 ); - sortev_vector_distances_template.push_back( 0.279273 ); - sortev_vector_distances_template.push_back( 0.278936 ); - sortev_vector_distances_template.push_back( 0.278706 ); - sortev_vector_distances_template.push_back( 0.278507 ); - sortev_vector_distances_template.push_back( 0.278097 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276293 ); - sortev_vector_distances_template.push_back( 0.276169 ); - sortev_vector_distances_template.push_back( 0.270563 ); - sortev_vector_distances_template.push_back( 0.264009 ); - - - - size_t proj_no = p.number_of_vectorize_functions(); - std::vector< double > aa = p.vectorize(proj_no); - - for ( size_t i = 0 ; i != aa.size() ; ++i ) - { - BOOST_CHECK( almost_equal( sortev_vector_distances_template[i] , aa[i] ) ); - } -} - - - - -BOOST_AUTO_TEST_CASE(check_projections_to_R) -{ - Vector_distances_in_diagram< Euclidean_distance > p( "data/file_with_diagram" , 100 ); - std::vector< double > proj; - proj.push_back( 0 ); - proj.push_back( 0.6099679993 ); - proj.push_back( 1.176284775 ); - proj.push_back( 1.715142954 ); - proj.push_back( 2.25006986 ); - proj.push_back( 2.765810506 ); - proj.push_back( 3.273638431 ); - proj.push_back( 3.774549309 ); - proj.push_back( 4.271535042 ); - proj.push_back( 4.766840875 ); - proj.push_back( 5.206786149 ); - proj.push_back( 5.63088295 ); - proj.push_back( 6.04477433 ); - proj.push_back( 6.45866571 ); - proj.push_back( 6.87255709 ); - proj.push_back( 7.285177939 ); - proj.push_back( 7.695791381 ); - proj.push_back( 8.103643945 ); - proj.push_back( 8.511496508 ); - proj.push_back( 8.913802775 ); - proj.push_back( 9.315740229 ); - proj.push_back( 9.693344927 ); - proj.push_back( 10.0572035 ); - proj.push_back( 10.41496899 ); - proj.push_back( 10.77273448 ); - proj.push_back( 11.13049996 ); - proj.push_back( 11.48826545 ); - proj.push_back( 11.84603094 ); - proj.push_back( 12.19943233 ); - proj.push_back( 12.5474364 ); - proj.push_back( 12.89256042 ); - proj.push_back( 13.23768444 ); - proj.push_back( 13.58280846 ); - proj.push_back( 13.92793248 ); - proj.push_back( 14.2730565 ); - proj.push_back( 14.61818051 ); - proj.push_back( 14.96330453 ); - proj.push_back( 15.30842855 ); - proj.push_back( 15.65355257 ); - proj.push_back( 15.99867659 ); - proj.push_back( 16.34380061 ); - proj.push_back( 16.68892462 ); - proj.push_back( 17.03404864 ); - proj.push_back( 17.37917266 ); - proj.push_back( 17.7238622 ); - proj.push_back( 18.06332781 ); - proj.push_back( 18.40267754 ); - proj.push_back( 18.73101759 ); - proj.push_back( 19.05829313 ); - proj.push_back( 19.3769189 ); - proj.push_back( 19.69500045 ); - proj.push_back( 20.0010306 ); - proj.push_back( 20.30628026 ); - proj.push_back( 20.60358868 ); - proj.push_back( 20.89992192 ); - proj.push_back( 21.19625516 ); - proj.push_back( 21.4925884 ); - proj.push_back( 21.78892164 ); - proj.push_back( 22.08229394 ); - proj.push_back( 22.37495987 ); - proj.push_back( 22.66762581 ); - proj.push_back( 22.96029174 ); - proj.push_back( 23.25295768 ); - proj.push_back( 23.54562361 ); - proj.push_back( 23.83828955 ); - proj.push_back( 24.13095549 ); - proj.push_back( 24.42362142 ); - proj.push_back( 24.71628736 ); - proj.push_back( 25.00895329 ); - proj.push_back( 25.30161923 ); - proj.push_back( 25.59428516 ); - proj.push_back( 25.8869511 ); - proj.push_back( 26.17961703 ); - proj.push_back( 26.47228297 ); - proj.push_back( 26.76257262 ); - proj.push_back( 27.05279049 ); - proj.push_back( 27.34257265 ); - proj.push_back( 27.63070097 ); - proj.push_back( 27.91711687 ); - proj.push_back( 28.20308566 ); - proj.push_back( 28.48513176 ); - proj.push_back( 28.76667161 ); - proj.push_back( 29.04775635 ); - proj.push_back( 29.32798359 ); - proj.push_back( 29.60725702 ); - proj.push_back( 29.88619335 ); - proj.push_back( 30.16489915 ); - proj.push_back( 30.44340655 ); - proj.push_back( 30.72150329 ); - proj.push_back( 30.99779604 ); - proj.push_back( 31.27408878 ); - proj.push_back( 31.55038153 ); - proj.push_back( 31.82667427 ); - proj.push_back( 32.10296702 ); - proj.push_back( 32.37925976 ); - proj.push_back( 32.6555525 ); - proj.push_back( 32.93184525 ); - proj.push_back( 33.20813799 ); - proj.push_back( 33.48430662 ); - proj.push_back( 33.7548692 ); - - for ( size_t proj_no = 0 ; proj_no != p.number_of_projections_to_R() ; ++proj_no ) - { - //cout << std::setprecision(10) << p.project_to_R(proj_no) << endl; - BOOST_CHECK( almost_equal( p.project_to_R(proj_no) , proj[proj_no] ) ); - } +BOOST_AUTO_TEST_CASE(check_projections_to_R) { + Vector_distances_in_diagram p("data/file_with_diagram", 100); + std::vector proj; + proj.push_back(0); + proj.push_back(0.6099679993); + proj.push_back(1.176284775); + proj.push_back(1.715142954); + proj.push_back(2.25006986); + proj.push_back(2.765810506); + proj.push_back(3.273638431); + proj.push_back(3.774549309); + proj.push_back(4.271535042); + proj.push_back(4.766840875); + proj.push_back(5.206786149); + proj.push_back(5.63088295); + proj.push_back(6.04477433); + proj.push_back(6.45866571); + proj.push_back(6.87255709); + proj.push_back(7.285177939); + proj.push_back(7.695791381); + proj.push_back(8.103643945); + proj.push_back(8.511496508); + proj.push_back(8.913802775); + proj.push_back(9.315740229); + proj.push_back(9.693344927); + proj.push_back(10.0572035); + proj.push_back(10.41496899); + proj.push_back(10.77273448); + proj.push_back(11.13049996); + proj.push_back(11.48826545); + proj.push_back(11.84603094); + proj.push_back(12.19943233); + proj.push_back(12.5474364); + proj.push_back(12.89256042); + proj.push_back(13.23768444); + proj.push_back(13.58280846); + proj.push_back(13.92793248); + proj.push_back(14.2730565); + proj.push_back(14.61818051); + proj.push_back(14.96330453); + proj.push_back(15.30842855); + proj.push_back(15.65355257); + proj.push_back(15.99867659); + proj.push_back(16.34380061); + proj.push_back(16.68892462); + proj.push_back(17.03404864); + proj.push_back(17.37917266); + proj.push_back(17.7238622); + proj.push_back(18.06332781); + proj.push_back(18.40267754); + proj.push_back(18.73101759); + proj.push_back(19.05829313); + proj.push_back(19.3769189); + proj.push_back(19.69500045); + proj.push_back(20.0010306); + proj.push_back(20.30628026); + proj.push_back(20.60358868); + proj.push_back(20.89992192); + proj.push_back(21.19625516); + proj.push_back(21.4925884); + proj.push_back(21.78892164); + proj.push_back(22.08229394); + proj.push_back(22.37495987); + proj.push_back(22.66762581); + proj.push_back(22.96029174); + proj.push_back(23.25295768); + proj.push_back(23.54562361); + proj.push_back(23.83828955); + proj.push_back(24.13095549); + proj.push_back(24.42362142); + proj.push_back(24.71628736); + proj.push_back(25.00895329); + proj.push_back(25.30161923); + proj.push_back(25.59428516); + proj.push_back(25.8869511); + proj.push_back(26.17961703); + proj.push_back(26.47228297); + proj.push_back(26.76257262); + proj.push_back(27.05279049); + proj.push_back(27.34257265); + proj.push_back(27.63070097); + proj.push_back(27.91711687); + proj.push_back(28.20308566); + proj.push_back(28.48513176); + proj.push_back(28.76667161); + proj.push_back(29.04775635); + proj.push_back(29.32798359); + proj.push_back(29.60725702); + proj.push_back(29.88619335); + proj.push_back(30.16489915); + proj.push_back(30.44340655); + proj.push_back(30.72150329); + proj.push_back(30.99779604); + proj.push_back(31.27408878); + proj.push_back(31.55038153); + proj.push_back(31.82667427); + proj.push_back(32.10296702); + proj.push_back(32.37925976); + proj.push_back(32.6555525); + proj.push_back(32.93184525); + proj.push_back(33.20813799); + proj.push_back(33.48430662); + proj.push_back(33.7548692); + + for (size_t proj_no = 0; proj_no != p.number_of_projections_to_R(); ++proj_no) { + // cout << std::setprecision(10) << p.project_to_R(proj_no) << endl; + BOOST_CHECK(almost_equal(p.project_to_R(proj_no), proj[proj_no])); + } } +BOOST_AUTO_TEST_CASE(check_distance_computations) { + Vector_distances_in_diagram p("data/file_with_diagram", 100); + Vector_distances_in_diagram p_prime("data/file_with_diagram", 10); + std::vector > intervals(10); + intervals[0] = std::pair(1, 2); + intervals[1] = std::pair(3, 4); + intervals[2] = std::pair(5, 6); + intervals[3] = std::pair(7, 8); + intervals[4] = std::pair(9, 10); + intervals[5] = std::pair(11, 12); + intervals[6] = std::pair(13, 14); + intervals[7] = std::pair(15, 16); + intervals[8] = std::pair(17, 18); + intervals[9] = std::pair(19, 20); + Vector_distances_in_diagram p_bis(intervals, 10); + // cerr << "p_prime.distance( (Abs_Topological_data_with_distances*)(&p_bis) , 1 ) : " << p_prime.distance( + // (Abs_Topological_data_with_distances*)(&p_bis) , 1 ) << endl; + BOOST_CHECK(almost_equal(p_prime.distance(p_bis, 1), 1.86428)); +} +BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances) { + std::vector > diag = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram"); + Vector_distances_in_diagram p(diag, 100); + std::vector > diag1 = + read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram_1"); + Vector_distances_in_diagram q(diag1, 100); + double dist_numeric_limit_max = p.distance(q, std::numeric_limits::max()); + double dist_infinity = p.distance(q, std::numeric_limits::infinity()); -BOOST_AUTO_TEST_CASE(check_distance_computations) -{ - Vector_distances_in_diagram< Euclidean_distance > p( "data/file_with_diagram" , 100 ); - Vector_distances_in_diagram< Euclidean_distance > p_prime( "data/file_with_diagram" , 10 ); - std::vector< std::pair > intervals(10); - intervals[0] = std::pair( 1,2 ); - intervals[1] = std::pair( 3,4 ); - intervals[2] = std::pair( 5,6 ); - intervals[3] = std::pair( 7,8 ); - intervals[4] = std::pair( 9,10 ); - intervals[5] = std::pair( 11,12 ); - intervals[6] = std::pair( 13,14 ); - intervals[7] = std::pair( 15,16 ); - intervals[8] = std::pair( 17,18 ); - intervals[9] = std::pair( 19,20 ); - Vector_distances_in_diagram< Euclidean_distance > p_bis( intervals , 10 ); - //cerr << "p_prime.distance( (Abs_Topological_data_with_distances*)(&p_bis) , 1 ) : " << p_prime.distance( (Abs_Topological_data_with_distances*)(&p_bis) , 1 ) << endl; - BOOST_CHECK( almost_equal ( p_prime.distance( p_bis , 1 ) , 1.86428 ) ); + BOOST_CHECK(dist_numeric_limit_max == dist_infinity); } -BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances ) -{ - std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); - Vector_distances_in_diagram< Euclidean_distance > p( diag , 100 ); - - std::vector< std::pair< double , double > > diag1 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); - Vector_distances_in_diagram< Euclidean_distance > q( diag1 , 100 ); - - double dist_numeric_limit_max = p.distance( q,std::numeric_limits::max() ); - double dist_infinity = p.distance( q,std::numeric_limits::infinity() ); - - BOOST_CHECK( dist_numeric_limit_max == dist_infinity ); -} +BOOST_AUTO_TEST_CASE(check_compute_average) { + Vector_distances_in_diagram p("data/file_with_diagram", 100); + // compute average + std::vector > i1(3); + i1[0] = std::pair(1, 2); + i1[1] = std::pair(3, 8); + i1[2] = std::pair(1, 6); + std::vector > i2(3); + i2[0] = std::pair(2, 9); + i2[1] = std::pair(2, 15); + i2[2] = std::pair(6, 17); + Vector_distances_in_diagram A(i1, -1); + Vector_distances_in_diagram B(i1, -1); -BOOST_AUTO_TEST_CASE(check_compute_average) -{ - Vector_distances_in_diagram< Euclidean_distance > p( "data/file_with_diagram" , 100 ); - //compute average - std::vector< std::pair > i1(3); - i1[0] = std::pair( 1,2 ); - i1[1] = std::pair( 3,8 ); - i1[2] = std::pair( 1,6 ); - - std::vector< std::pair > i2(3); - i2[0] = std::pair( 2,9 ); - i2[1] = std::pair( 2,15); - i2[2] = std::pair( 6,17 ); - - Vector_distances_in_diagram< Euclidean_distance > A( i1 , -1 ); - Vector_distances_in_diagram< Euclidean_distance > B( i1 , -1 ); + Vector_distances_in_diagram average; + average.compute_average({&A, &B}); - Vector_distances_in_diagram< Euclidean_distance > average; - average.compute_average( {&A,&B} ); - - Vector_distances_in_diagram< Euclidean_distance > template_average; - template_average.load_from_file( "data/average_of_persistence_vectors" ); - - BOOST_CHECK( template_average == average ); - -} + Vector_distances_in_diagram template_average; + template_average.load_from_file("data/average_of_persistence_vectors"); + BOOST_CHECK(template_average == average); +} - -BOOST_AUTO_TEST_CASE(check_arythmetic_operations) -{ - std::vector< std::pair > i1(3); - i1[0] = std::pair( 1,2 ); - i1[1] = std::pair( 3,8 ); - i1[2] = std::pair( 1,6 ); - - std::vector< std::pair > i2(3); - i2[0] = std::pair( 2,9 ); - i2[1] = std::pair( 2,15); - i2[2] = std::pair( 6,17 ); - - Vector_distances_in_diagram< Euclidean_distance > A( i1 , -1 ); - Vector_distances_in_diagram< Euclidean_distance > B( i1 , -1 ); - - Vector_distances_in_diagram< Euclidean_distance > sum = A+B; - Vector_distances_in_diagram< Euclidean_distance > difference = A-B; - - BOOST_CHECK( almost_equal( sum.vector_in_position(0) , 7.07107) ); - BOOST_CHECK( almost_equal( sum.vector_in_position(1) , 7.07107) ); - BOOST_CHECK( almost_equal( sum.vector_in_position(2) , 5.65685) ); - BOOST_CHECK( almost_equal( sum.vector_in_position(3) , 1.41421) ); - BOOST_CHECK( almost_equal( sum.vector_in_position(4) , 1.41421) ); - BOOST_CHECK( almost_equal( sum.vector_in_position(5) , 1.41421) ); - - BOOST_CHECK( almost_equal( difference.vector_in_position(0) , 0) ); - BOOST_CHECK( almost_equal( difference.vector_in_position(1) , 0) ); - BOOST_CHECK( almost_equal( difference.vector_in_position(2) , 0) ); - BOOST_CHECK( almost_equal( difference.vector_in_position(3) , 0) ); - BOOST_CHECK( almost_equal( difference.vector_in_position(4) , 0) ); - BOOST_CHECK( almost_equal( difference.vector_in_position(5) , 0) ); - - Vector_distances_in_diagram< Euclidean_distance > prod = 2.*A; - BOOST_CHECK( almost_equal( prod.vector_in_position(0) , 7.07107) ); - BOOST_CHECK( almost_equal( prod.vector_in_position(1) , 7.07107) ); - BOOST_CHECK( almost_equal( prod.vector_in_position(2) , 5.65685) ); - BOOST_CHECK( almost_equal( prod.vector_in_position(3) , 1.41421) ); - BOOST_CHECK( almost_equal( prod.vector_in_position(4) , 1.41421) ); - BOOST_CHECK( almost_equal( prod.vector_in_position(5) , 1.41421) ); - - Vector_distances_in_diagram< Euclidean_distance > prod1 = A*2; - BOOST_CHECK( almost_equal( prod1.vector_in_position(0) , 7.07107) ); - BOOST_CHECK( almost_equal( prod1.vector_in_position(1) , 7.07107) ); - BOOST_CHECK( almost_equal( prod1.vector_in_position(2) , 5.65685) ); - BOOST_CHECK( almost_equal( prod1.vector_in_position(3) , 1.41421) ); - BOOST_CHECK( almost_equal( prod1.vector_in_position(4) , 1.41421) ); - BOOST_CHECK( almost_equal( prod1.vector_in_position(5) , 1.41421) ); - +BOOST_AUTO_TEST_CASE(check_arythmetic_operations) { + std::vector > i1(3); + i1[0] = std::pair(1, 2); + i1[1] = std::pair(3, 8); + i1[2] = std::pair(1, 6); + + std::vector > i2(3); + i2[0] = std::pair(2, 9); + i2[1] = std::pair(2, 15); + i2[2] = std::pair(6, 17); + + Vector_distances_in_diagram A(i1, -1); + Vector_distances_in_diagram B(i1, -1); + + Vector_distances_in_diagram sum = A + B; + Vector_distances_in_diagram difference = A - B; + + BOOST_CHECK(almost_equal(sum.vector_in_position(0), 7.07107)); + BOOST_CHECK(almost_equal(sum.vector_in_position(1), 7.07107)); + BOOST_CHECK(almost_equal(sum.vector_in_position(2), 5.65685)); + BOOST_CHECK(almost_equal(sum.vector_in_position(3), 1.41421)); + BOOST_CHECK(almost_equal(sum.vector_in_position(4), 1.41421)); + BOOST_CHECK(almost_equal(sum.vector_in_position(5), 1.41421)); + + BOOST_CHECK(almost_equal(difference.vector_in_position(0), 0)); + BOOST_CHECK(almost_equal(difference.vector_in_position(1), 0)); + BOOST_CHECK(almost_equal(difference.vector_in_position(2), 0)); + BOOST_CHECK(almost_equal(difference.vector_in_position(3), 0)); + BOOST_CHECK(almost_equal(difference.vector_in_position(4), 0)); + BOOST_CHECK(almost_equal(difference.vector_in_position(5), 0)); + + Vector_distances_in_diagram prod = 2. * A; + BOOST_CHECK(almost_equal(prod.vector_in_position(0), 7.07107)); + BOOST_CHECK(almost_equal(prod.vector_in_position(1), 7.07107)); + BOOST_CHECK(almost_equal(prod.vector_in_position(2), 5.65685)); + BOOST_CHECK(almost_equal(prod.vector_in_position(3), 1.41421)); + BOOST_CHECK(almost_equal(prod.vector_in_position(4), 1.41421)); + BOOST_CHECK(almost_equal(prod.vector_in_position(5), 1.41421)); + + Vector_distances_in_diagram prod1 = A * 2; + BOOST_CHECK(almost_equal(prod1.vector_in_position(0), 7.07107)); + BOOST_CHECK(almost_equal(prod1.vector_in_position(1), 7.07107)); + BOOST_CHECK(almost_equal(prod1.vector_in_position(2), 5.65685)); + BOOST_CHECK(almost_equal(prod1.vector_in_position(3), 1.41421)); + BOOST_CHECK(almost_equal(prod1.vector_in_position(4), 1.41421)); + BOOST_CHECK(almost_equal(prod1.vector_in_position(5), 1.41421)); } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp index 2d221d27..34fdb1f8 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp @@ -20,53 +20,45 @@ * along with this program. If not, see . */ - - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +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 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*> 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(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]; + } -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< Persistence_heat_maps* > 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( 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; + std::cout << "Done \n"; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index 27a7836f..cfa209d1 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -20,89 +20,72 @@ * along with this program. If not, see . */ - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +int main(int argc, char** argv) { + std::cout << "This program compute distance of persistence heat maps stored in a file (the file needs to be created " + "beforehand). \n"; + std::cout << "The first parameter of a program is an integer p. The program compute L^p distance of the two heat " + "maps. For L^infty distance choose p = -1. \n"; + std::cout << "The remaining parameters of this programs are names of files with persistence heat maps.\n"; -int main( int argc , char** argv ) -{ - std::cout << "This program compute distance of persistence heat maps stored in a file (the file needs to be created beforehand). \n"; - std::cout << "The first parameter of a program is an integer p. The program compute L^p distance of the two heat maps. For L^infty distance choose p = -1. \n"; - std::cout << "The remaining parameters of this programs are names of files with persistence heat maps.\n"; - - if ( argc < 3 ) - { - std::cout << "Wrong number of parameters, the program will now terminate \n"; - return 1; - } - - int pp = atoi( argv[1] ); - double p = std::numeric_limits::max(); - if ( pp != -1 ) - { - p = pp; - } - + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; + return 1; + } - std::vector< const char* > filenames; - for ( int i = 2 ; 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; - 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 > > 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 != filenames.size() ; ++i ) - { - for ( size_t j = i ; j != filenames.size() ; ++j ) - { - distance[i][j] = distance[j][i] = maps[i].distance( maps[j] , p ) ; - } - } - - //and now output the result to the screen and a file: - std::ofstream out; - out.open( "distance" ); - for ( size_t i = 0 ; i != distance.size() ; ++i ) - { - for ( size_t j = 0 ; j != distance.size() ; ++j ) - { - std::cout << distance[i][j] << " "; - out << distance[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - - return 0; -} + int pp = atoi(argv[1]); + double p = std::numeric_limits::max(); + if (pp != -1) { + p = pp; + } + std::vector filenames; + for (int i = 2; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::vector > maps; + maps.reserve(filenames.size()); + for (size_t file_no = 0; file_no != filenames.size(); ++file_no) { + Persistence_heat_maps l; + 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 > distance(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector v(filenames.size(), 0); + distance[i] = v; + } + // and now we can compute the distances: + for (size_t i = 0; i != filenames.size(); ++i) { + for (size_t j = i; j != filenames.size(); ++j) { + distance[i][j] = distance[j][i] = maps[i].distance(maps[j], p); + } + } + + // and now output the result to the screen and a file: + std::ofstream out; + out.open("distance"); + for (size_t i = 0; i != distance.size(); ++i) { + for (size_t j = 0; j != distance.size(); ++j) { + std::cout << distance[i][j] << " "; + out << distance[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); + + return 0; +} diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp index edbf16c1..22bb9e2e 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp @@ -20,70 +20,59 @@ * along with this program. If not, see . */ - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 filenames; + for (int i = 1; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::vector > maps; + maps.reserve(filenames.size()); + for (size_t file_no = 0; file_no != filenames.size(); ++file_no) { + Persistence_heat_maps l; + 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 > scalar_product(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector 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] = maps[i].compute_scalar_product(maps[j]); + } + } -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"; + // and now output the result to the screen and a file: + std::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) { + std::cout << scalar_product[i][j] << " "; + out << scalar_product[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); - 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; - 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] = maps[i].compute_scalar_product( maps[j] ) ; - } - } - - //and now output the result to the screen and a file: - std::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 ) - { - std::cout << scalar_product[i][j] << " "; - out << scalar_product[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - - return 0; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp index f755e9a6..942246a4 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp @@ -1,88 +1,82 @@ - /* 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 (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 . - */ - - +/* 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 (France) +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 arc tangential 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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " + "persistence heat maps."; + std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " + "procedure please provide the dimension of persistence you want to use."; + std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." + << std::endl; + 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]); + + unsigned dimension = std::numeric_limits::max(); + int dim = atoi(argv[5]); + if (dim >= 0) { + dimension = (unsigned)dim; + } + std::vector filenames; + for (int i = 6; i < argc; ++i) { + filenames.push_back(argv[i]); + } -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 arc tangential 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 fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + std::cout << "Creating persistence heat maps...\n"; + std::vector > filter = create_Gaussian_filter(stdiv, 1); - 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] ); - - unsigned dimension = std::numeric_limits::max(); - int dim = atoi( argv[5] ); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - - std::vector< const char* > filenames; - for ( int i = 6 ; i < argc ; ++i ) - { - filenames.push_back( argv[i] ); - } + 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, false, size_of_grid, min_, max_, + dimension); - - - std::cout << "Creating persistence heat maps...\n"; - std::vector< std::vector > 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, false , size_of_grid , min_ , max_ , dimension ); - - std::stringstream ss; - ss << filenames[i] << ".mps"; - l.print_to_file( ss.str().c_str() ); - } - std::cout << "Done \n"; - return 0; + 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/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp index 732b3768..fce874bd 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp @@ -20,68 +20,63 @@ * along with this program. If not, see . */ - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " + "persistence heat maps."; + std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " + "procedure please provide the dimension of persistence you want to use."; + std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." + << std::endl; + 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]); + + unsigned dimension = std::numeric_limits::max(); + int dim = atoi(argv[5]); + if (dim >= 0) { + dimension = (unsigned)dim; + } + + std::vector filenames; + for (int i = 6; i != argc; ++i) { + filenames.push_back(argv[i]); + } + std::cout << "Creating persistence heat maps...\n"; + std::vector > filter = create_Gaussian_filter(stdiv, 1); -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 fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; - 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] ); - - unsigned dimension = std::numeric_limits::max(); - int dim = atoi( argv[5] ); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - - std::vector< const char* > filenames; - for ( int i = 6 ; i != argc ; ++i ) - { - filenames.push_back( argv[i] ); - } + 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, false, size_of_grid, min_, max_, + dimension); - - - std::cout << "Creating persistence heat maps...\n"; - std::vector< std::vector > 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 , false , size_of_grid , min_ , max_ , dimension ); - - std::stringstream ss; - ss << filenames[i] << ".mps"; - l.print_to_file( ss.str().c_str() ); - } - std::cout << "Done \n"; - return 0; + 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/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index 58406d08..92375387 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -20,66 +20,63 @@ * along with this program. If not, see . */ - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " + "persistence heat maps."; + std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " + "procedure please provide the dimension of persistence you want to use."; + std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." + << std::endl; + 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]); + + unsigned dimension = std::numeric_limits::max(); + int dim = atoi(argv[5]); + if (dim >= 0) { + dimension = (unsigned)dim; + } + std::vector filenames; + for (int i = 6; i < argc; ++i) { + filenames.push_back(argv[i]); + } -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 fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + std::cout << "Creating persistence heat maps...\n"; + std::vector > filter = create_Gaussian_filter(stdiv, 1); - 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] ); + 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, false, size_of_grid, min_, + max_, dimension); - unsigned dimension = std::numeric_limits::max(); - int dim = atoi( argv[5] ); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - - std::vector< const char* > filenames; - for ( int i = 6 ; i < argc ; ++i ) - { - filenames.push_back( argv[i] ); - } - - std::cout << "Creating persistence heat maps...\n"; - std::vector< std::vector > 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, false , size_of_grid , min_ , max_ , dimension ); - - std::stringstream ss; - ss << filenames[i] << ".mps"; - l.print_to_file( ss.str().c_str() ); - } - std::cout << "Done \n"; - return 0; + 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/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index 90b50b0b..3b0fd8ae 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -20,65 +20,60 @@ * along with this program. If not, see . */ - - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " + "persistence heat maps."; + std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " + "procedure please provide the dimension of persistence you want to use."; + std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." + << std::endl; + 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]); + + unsigned dimension = std::numeric_limits::max(); + int dim = atoi(argv[5]); + if (dim >= 0) { + dimension = (unsigned)dim; + } + std::vector filenames; + for (int i = 6; i < argc; ++i) { + filenames.push_back(argv[i]); + } + + std::cout << "Creating persistence heat maps...\n"; + std::vector > 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, false, size_of_grid, min_, max_, + dimension); -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 fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; - 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] ); - - unsigned dimension = std::numeric_limits::max(); - int dim = atoi( argv[5] ); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - std::vector< const char* > filenames; - for ( int i = 6 ; i < argc ; ++i ) - { - filenames.push_back( argv[i] ); - } - - std::cout << "Creating persistence heat maps...\n"; - std::vector< std::vector > 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, false , size_of_grid , min_ , max_ , dimension ); - - std::stringstream ss; - ss << filenames[i] << ".mps"; - l.print_to_file( ss.str().c_str() ); - } - std::cout << "Done \n"; - return 0; + 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/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp index 6a07bf19..6b464378 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -22,63 +22,59 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " + "persistence heat maps."; + std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " + "procedure please provide the dimension of persistence you want to use."; + std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." + << std::endl; + 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]); + + unsigned dimension = std::numeric_limits::max(); + int dim = atoi(argv[5]); + if (dim >= 0) { + dimension = (unsigned)dim; + } + + std::vector filenames; + for (int i = 6; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::cout << "Creating persistence heat maps...\n"; + std::vector > filter = create_Gaussian_filter(stdiv, 1); -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 fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + 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_, dimension); - 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] ); - - unsigned dimension = std::numeric_limits::max(); - int dim = atoi( argv[5] ); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - - std::vector< const char* > filenames; - for ( int i = 6 ; i < argc ; ++i ) - { - filenames.push_back( argv[i] ); - } - - std::cout << "Creating persistence heat maps...\n"; - std::vector< std::vector > 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_ , dimension ); - - std::stringstream ss; - ss << filenames[i] << ".pssk"; - l.print_to_file( ss.str().c_str() ); - } - std::cout << "Done \n"; - return 0; + 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/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index 7aedfbb1..59f12a7d 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -20,23 +20,19 @@ * along with this program. If not, see . */ - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include - -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 landscape file \n"; - Persistence_heat_maps l; - l.load_from_file( argv[1] ); - l.plot( argv[1] ); - return 0; +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 landscape file \n"; + Persistence_heat_maps l; + l.load_from_file(argv[1]); + l.plot(argv[1]); + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp index 2e0d680f..750d0a55 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp @@ -20,8 +20,6 @@ * along with this program. If not, see . */ - - #include #include @@ -29,43 +27,38 @@ #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; +int main(int argc, char** argv) { + std::cout << "This program compute the range of birth and death times of persistence pairs in diagrams provided as " + "an input. \n"; + std::cout << "The first parameter of the program is the dimension of persistence to be used. If your file contains "; + std::cout << "the information about dimension of persistence pairs, please provide here the dimension of persistence " + "pairs you want to use. If your input files consist only "; + std::cout << "of birth-death pairs, please set this first parameter to -1 \n"; + std::cout << "The remaining parameters of the program are the names of files with persistence diagrams. \n"; + + int dim = atoi(argv[1]); + unsigned dimension = std::numeric_limits::max(); + if (dim >= 0) { + dimension = (unsigned)dim; + } + std::vector filenames; + for (int i = 2; i < argc; ++i) { + filenames.push_back(argv[i]); + } + + double min_ = std::numeric_limits::max(); + double max_ = -std::numeric_limits::max(); -int main( int argc , char** argv ) -{ - std::cout << "This program compute the range of birth and death times of persistence pairs in diagrams provided as an input. \n"; - std::cout << "The first parameter of the program is the dimension of persistence to be used. If your file contains "; - std::cout << "the information about dimension of persistence pairs, please provide here the dimension of persistence pairs you want to use. If your input files consist only "; - std::cout << "of birth-death pairs, please set this first parameter to -1 \n"; - std::cout << "The remaining parameters of the program are the names of files with persistence diagrams. \n"; - - int dim = atoi( argv[1] ); - unsigned dimension = std::numeric_limits::max(); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - std::vector< const char* > filenames; - for ( int i = 2 ; i < argc ; ++i ) - { - filenames.push_back( argv[i] ); - } - - double min_ = std::numeric_limits::max(); - double max_ = -std::numeric_limits::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] , dimension ); - std::pair min_max_ = p.get_x_range(); - if ( min_max_.first < min_ )min_ = min_max_.first; - if ( min_max_.second > max_ )max_ = min_max_.second; - } - std::cout << "Birth-death range : min: " << min_ << ", max: " << max_ << std::endl; - return 0; + 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], dimension); + std::pair min_max_ = p.get_x_range(); + if (min_max_.first < min_) min_ = min_max_.first; + if (min_max_.second > max_) max_ = min_max_.second; + } + std::cout << "Birth-death range : min: " << min_ << ", max: " << max_ << std::endl; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp index fe4e709f..d5d166ce 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -23,91 +23,72 @@ #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include - -int main( int argc , char** argv ) -{ - std::cout << "This program compute the bottleneck distance of persistence diagrams stored in a files. \n"; - std::cout << "The first parameter of the program is the dimension of persistence to be used to construct persistence landscapes. If your file contains "; - std::cout << "the information about dimension of persistence pairs, please provide here the dimension of persistence pairs you want to use. If your input files consist only "; - std::cout << "of birth-death pairs, please set this first parameter to -1 \n"; - std::cout << "The remaining parameters of this programs are names of files with persistence diagrams.\n"; - - if ( argc < 3 ) - { - std::cout << "Wrong number of parameters, the program will now terminate \n"; - return 1; - } - - int dim = atoi(argv[1]); - unsigned dimension = std::numeric_limits::max(); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - - - std::vector< const char* > filenames; - for ( int i = 2 ; i < argc ; ++i ) - { - filenames.push_back( argv[i] ); - } - - //reading the persistence intervals: - std::vector< Persistence_intervals_with_distances > persistence_intervals; - for ( size_t i = 0 ; i != filenames.size() ; ++i ) - { - Persistence_intervals_with_distances pers(filenames[i] , dimension ); - persistence_intervals.push_back( pers ); - } - - //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 != persistence_intervals.size() ; ++i ) - { - for ( size_t j = i+1 ; j != persistence_intervals.size() ; ++j ) - { - distance[i][j] = distance[j][i] = persistence_intervals[i].distance( persistence_intervals[j] ); - } - } - - //and now output the result to the screen and a file: - std::ofstream out; - out.open( "distance" ); - for ( size_t i = 0 ; i != distance.size() ; ++i ) - { - for ( size_t j = 0 ; j != distance.size() ; ++j ) - { - std::cout << distance[i][j] << " "; - out << distance[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - - return 0; +int main(int argc, char** argv) { + std::cout << "This program compute the bottleneck distance of persistence diagrams stored in a files. \n"; + std::cout << "The first parameter of the program is the dimension of persistence to be used to construct persistence " + "landscapes. If your file contains "; + std::cout << "the information about dimension of persistence pairs, please provide here the dimension of persistence " + "pairs you want to use. If your input files consist only "; + std::cout << "of birth-death pairs, please set this first parameter to -1 \n"; + std::cout << "The remaining parameters of this programs are names of files with persistence diagrams.\n"; + + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; + return 1; + } + + int dim = atoi(argv[1]); + unsigned dimension = std::numeric_limits::max(); + if (dim >= 0) { + dimension = (unsigned)dim; + } + + std::vector filenames; + for (int i = 2; i < argc; ++i) { + filenames.push_back(argv[i]); + } + + // reading the persistence intervals: + std::vector persistence_intervals; + for (size_t i = 0; i != filenames.size(); ++i) { + Persistence_intervals_with_distances pers(filenames[i], dimension); + persistence_intervals.push_back(pers); + } + + // and now we will compute the scalar product of landscapes. + + // first we prepare an array: + std::vector > distance(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector v(filenames.size(), 0); + distance[i] = v; + } + + // and now we can compute the distances: + for (size_t i = 0; i != persistence_intervals.size(); ++i) { + for (size_t j = i + 1; j != persistence_intervals.size(); ++j) { + distance[i][j] = distance[j][i] = persistence_intervals[i].distance(persistence_intervals[j]); + } + } + + // and now output the result to the screen and a file: + std::ofstream out; + out.open("distance"); + for (size_t i = 0; i != distance.size(); ++i) { + for (size_t j = 0; j != distance.size(); ++j) { + std::cout << distance[i][j] << " "; + out << distance[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); + + return 0; } - - - - - - - diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp index c099befc..5308878e 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp @@ -20,40 +20,34 @@ * along with this program. If not, see . */ - - #include #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; - -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 != 4 ) - { - std::cout << "To run this program, please provide the name of a file with persistence diagram, dimension of intervals that should be taken into account (if your file contains only persistence pairs in a single dimension, set it up to -1) and number of dominant intervals you would like to get \n"; - return 1; - } - int dim = atoi( argv[2] ); - unsigned dimension = std::numeric_limits::max(); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - Persistence_intervals p( argv[1] , dimension ); - std::vector< std::pair > dominant_intervals = p.dominant_intervals( atoi( argv[3] ) ); - std::cout << "Here are the dominant intervals : " << std::endl; - for ( size_t i = 0 ; i != dominant_intervals.size() ; ++i ) - { - std::cout << " " << dominant_intervals[i].first<< "," << dominant_intervals[i].second << " "<< std::endl; - } - - return 0; +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 != 4) { + std::cout << "To run this program, please provide the name of a file with persistence diagram, dimension of " + "intervals that should be taken into account (if your file contains only persistence pairs in a " + "single dimension, set it up to -1) and number of dominant intervals you would like to get \n"; + return 1; + } + int dim = atoi(argv[2]); + unsigned dimension = std::numeric_limits::max(); + if (dim >= 0) { + dimension = (unsigned)dim; + } + Persistence_intervals p(argv[1], dimension); + std::vector > dominant_intervals = p.dominant_intervals(atoi(argv[3])); + std::cout << "Here are the dominant intervals : " << std::endl; + for (size_t i = 0; i != dominant_intervals.size(); ++i) { + std::cout << " " << dominant_intervals[i].first << "," << dominant_intervals[i].second << " " << std::endl; + } + + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index 6e2598fa..dd81af88 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -20,58 +20,51 @@ * along with this program. If not, see . */ - - #include #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; +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) { + std::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"; + std::cout << "The third parameter of a program is the dimension of the persistence that is to be used. If your " + "file contains only birth-death pairs, you can skip this parameter\n"; + return 1; + } + unsigned dimension = std::numeric_limits::max(); + int dim = -1; + if (argc > 2) { + dim = atoi(argv[2]); + } + if (dim >= 0) { + dimension = (unsigned)dim; + } + + Persistence_intervals p(argv[1], dimension); + std::vector > dominant_intervals = p.dominant_intervals(atoi(argv[2])); + std::vector histogram = p.histogram_of_lengths(10); -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 ) - { - std::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"; - std::cout << "The third parameter of a program is the dimension of the persistence that is to be used. If your file contains only birth-death pairs, you can skip this parameter\n"; - return 1; - } - unsigned dimension = std::numeric_limits::max(); - int dim = -1; - if ( argc > 2 ) - { - dim = atoi( argv[2] ); - } - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } + std::stringstream gnuplot_script; + gnuplot_script << argv[1] << "_Gnuplot_script"; + std::ofstream out; + out.open(gnuplot_script.str().c_str()); - Persistence_intervals p( argv[1] , dimension ); - std::vector< std::pair > dominant_intervals = p.dominant_intervals( atoi( argv[2] ) ); - std::vector< size_t > histogram = p.histogram_of_lengths( 10 ); - - std::stringstream gnuplot_script; - gnuplot_script << argv[1] << "_Gnuplot_script"; - std::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 << std::endl; - std::cout << "To visualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; - out.close(); - return 0; + 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 << std::endl; + std::cout << "To visualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; + out.close(); + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp index 5b36e0ce..08d308aa 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp @@ -20,76 +20,66 @@ * along with this program. If not, see . */ - - #include #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; +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"; + std::cout << "The second optional parameter of a program is the dimension of the persistence that is to be used. If " + "your file contains only birth-death pairs, you can skip this parameter\n"; + if (argc < 2) { + std::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; + } + unsigned dimension = std::numeric_limits::max(); + int dim = -1; + if (argc > 2) { + dim = atoi(argv[2]); + } + if (dim >= 0) { + dimension = (unsigned)dim; + } + + std::stringstream gnuplot_script; + gnuplot_script << argv[1] << "_Gnuplot_script"; + std::ofstream out; + out.open(gnuplot_script.str().c_str()); + + Persistence_intervals p(argv[1], dimension); + std::vector > 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 << "]" << std::endl; + out << "set yrange [" << yRangeBegin << " : " << yRangeEnd << "]" << std::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 << std::endl; + out << pbns[i].first << " " << pbns[i].second << std::endl; + previous_y = pbns[i].second; + } + out << std::endl; + out.close(); + + std::cout << "To visualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; -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"; - std::cout << "The second optional parameter of a program is the dimension of the persistence that is to be used. If your file contains only birth-death pairs, you can skip this parameter\n"; - if ( argc < 2 ) - { - std::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; - } - unsigned dimension = std::numeric_limits::max(); - int dim = -1; - if ( argc > 2 ) - { - dim = atoi( argv[2] ); - } - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - - - std::stringstream gnuplot_script; - gnuplot_script << argv[1] << "_Gnuplot_script"; - std::ofstream out; - out.open( gnuplot_script.str().c_str() ); - - Persistence_intervals p( argv[1] , dimension ); - 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 << "]" << std::endl; - out << "set yrange [" << yRangeBegin << " : " << yRangeEnd << "]" << std::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 << std::endl; - out << pbns[i].first << " " << pbns[i].second << std::endl; - previous_y = pbns[i].second; - } - out << std::endl; - out.close(); - - std::cout << "To visualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; - - return 0; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp index ed03459b..32ca0fd9 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -20,50 +20,35 @@ * along with this program. If not, see . */ - - #include #include #include #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; - double epsilon = 0.0000005; - -int main( int argc , char** argv ) -{ - if ( argc < 2 ) - { - std::cout << "To run this program, please provide the name of a file with persistence diagram \n"; - std::cout << "The second optional parameter of a program is the dimension of the persistence that is to be used. If your file contains only birth-death pairs, you can skip this parameter\n"; - return 1; - } - unsigned dimension = std::numeric_limits::max(); - int dim = -1; - if ( argc > 2 ) - { - dim = atoi( argv[2] ); - } - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - std::vector< std::pair< double , double > > intervals = read_persistence_intervals_in_one_dimension_from_file( argv[1] , dimension ); - Persistence_intervals b( intervals ); - b.plot( argv[1] ); - return 0; +int main(int argc, char** argv) { + if (argc < 2) { + std::cout << "To run this program, please provide the name of a file with persistence diagram \n"; + std::cout << "The second optional parameter of a program is the dimension of the persistence that is to be used. " + "If your file contains only birth-death pairs, you can skip this parameter\n"; + return 1; + } + unsigned dimension = std::numeric_limits::max(); + int dim = -1; + if (argc > 2) { + dim = atoi(argv[2]); + } + if (dim >= 0) { + dimension = (unsigned)dim; + } + std::vector > intervals = + read_persistence_intervals_in_one_dimension_from_file(argv[1], dimension); + Persistence_intervals b(intervals); + b.plot(argv[1]); + return 0; } - - - - - - - diff --git a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp index 1e0caa30..9816ff1d 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp @@ -20,55 +20,47 @@ * along with this program. If not, see . */ - - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +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 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 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(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]; + } -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< Persistence_landscape* > 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( 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"; + std::cout << "Done \n"; - return 0; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index ef969ed0..1c690c53 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -22,91 +22,71 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 integer 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."; -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 integer 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 pp = atoi( argv[1] ); - double p = std::numeric_limits::max(); - if ( pp != -1 ) - { - p = pp; - } - + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; + return 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_distance_of_landscapes( landscaspes[i], landscaspes[j] , p ) ; - - } - } - - //and now output the result to the screen and a file: - std::ofstream out; - out.open( "distance" ); - for ( size_t i = 0 ; i != distance.size() ; ++i ) - { - for ( size_t j = 0 ; j != distance.size() ; ++j ) - { - std::cout << distance[i][j] << " "; - out << distance[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - - return 0; -} + int pp = atoi(argv[1]); + double p = std::numeric_limits::max(); + if (pp != -1) { + p = pp; + } + std::vector filenames; + for (int i = 2; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::vector 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 > distance(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector 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_distance_of_landscapes(landscaspes[i], landscaspes[j], p); + } + } + // and now output the result to the screen and a file: + std::ofstream out; + out.open("distance"); + for (size_t i = 0; i != distance.size(); ++i) { + for (size_t j = 0; j != distance.size(); ++j) { + std::cout << distance[i][j] << " "; + out << distance[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); - + return 0; +} diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp index 02b729b2..83121a9c 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp @@ -22,68 +22,58 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 filenames; + for (int i = 1; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::vector 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 > scalar_product(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector 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]); + } + } -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"; + // and now output the result to the screen and a file: + std::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) { + std::cout << scalar_product[i][j] << " "; + out << scalar_product[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); - 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: - std::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 ) - { - std::cout << scalar_product[i][j] << " "; - out << scalar_product[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - - return 0; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp index b85c8644..f98fe3ad 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp @@ -22,41 +22,37 @@ #include - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +int main(int argc, char** argv) { + std::cout << "This program creates persistence landscapes of diagrams provided as an input. \n"; + std::cout << "The first parameter of the program is the dimension of persistence to be used to construct persistence " + "landscapes. If your file contains "; + std::cout << "the information about dimension of persistence pairs, please provide here the dimension of persistence " + "pairs you want to use. If your input files consist only "; + std::cout << "of birth-death pairs, please set this first parameter to -1 \n"; + std::cout << "The remaining parameters of the program are the names of files with persistence diagrams. \n"; + std::vector filenames; + int dim = atoi(argv[1]); + unsigned dimension = std::numeric_limits::max(); + if (dim >= 0) { + dimension = (unsigned)dim; + } + for (int i = 2; i < argc; ++i) { + filenames.push_back(argv[i]); + } -int main( int argc , char** argv ) -{ - std::cout << "This program creates persistence landscapes of diagrams provided as an input. \n"; - std::cout << "The first parameter of the program is the dimension of persistence to be used to construct persistence landscapes. If your file contains "; - std::cout << "the information about dimension of persistence pairs, please provide here the dimension of persistence pairs you want to use. If your input files consist only "; - std::cout << "of birth-death pairs, please set this first parameter to -1 \n"; - std::cout << "The remaining parameters of the program are the names of files with persistence diagrams. \n"; - std::vector< const char* > filenames; - int dim = atoi(argv[1]); - unsigned dimension = std::numeric_limits::max(); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - for ( int i = 2 ; 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] , dimension ); - std::stringstream ss; - ss << filenames[i] << ".land"; - l.print_to_file( ss.str().c_str() ); - } - std::cout << "Done \n"; - return 0; + std::cout << "Creating persistence landscapes...\n"; + for (size_t i = 0; i != filenames.size(); ++i) { + Persistence_landscape l(filenames[i], dimension); + 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/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp index 670f0364..4761a095 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -22,26 +22,23 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 landscape 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"; -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 landscape 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; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp index 10d9e7ac..87512212 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp @@ -22,50 +22,44 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +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 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 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(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]; + } -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< Persistence_landscape_on_grid* > 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( 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"; + std::cout << "Done \n"; - return 0; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index 3065b52c..db920c82 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -22,87 +22,70 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +int main(int argc, char** argv) { + std::cout << "This program compute distance 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 integer p. The program compute L^p distance of 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"; -int main( int argc , char** argv ) -{ - std::cout << "This program compute distance 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 integer p. The program compute L^p distance of 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 pp = atoi( argv[1] ); - double p = std::numeric_limits::max(); - if ( pp != -1 ) - { - p = pp; - } - + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; + return 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_distance_of_landscapes_on_grid( landscaspes[i], landscaspes[j] , p ) ; - } - } - - //and now output the result to the screen and a file: - std::ofstream out; - out.open( "distance" ); - for ( size_t i = 0 ; i != distance.size() ; ++i ) - { - for ( size_t j = 0 ; j != distance.size() ; ++j ) - { - std::cout << distance[i][j] << " "; - out << distance[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - - return 0; -} + int pp = atoi(argv[1]); + double p = std::numeric_limits::max(); + if (pp != -1) { + p = pp; + } + std::vector filenames; + for (int i = 2; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::vector 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 > distance(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector 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_distance_of_landscapes_on_grid(landscaspes[i], landscaspes[j], p); + } + } + // and now output the result to the screen and a file: + std::ofstream out; + out.open("distance"); + for (size_t i = 0; i != distance.size(); ++i) { + for (size_t j = 0; j != distance.size(); ++j) { + std::cout << distance[i][j] << " "; + out << distance[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); + + return 0; +} diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp index 342613b4..9bbba7cf 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp @@ -20,70 +20,59 @@ * along with this program. If not, see . */ - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 filenames; + for (int i = 1; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::vector 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 > scalar_product(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector 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]); + } + } -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"; + // and now output the result to the screen and a file: + std::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) { + std::cout << scalar_product[i][j] << " "; + out << scalar_product[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); - 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: - std::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 ) - { - std::cout << scalar_product[i][j] << " "; - out << scalar_product[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - - return 0; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index a033362c..e135896c 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -22,65 +22,57 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 fourth parameter of the program is the dimension of persistence to be used to construct " + "persistence landscape on a grid. If your file contains "; + std::cout << "the information about dimension of birth-death pairs, please provide here the dimension of intervals " + "you want to use. If your input files consist only "; + std::cout << "of birth-death pairs, please set the fourth parameter to -1 \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]); + int dim = atoi(argv[4]); + unsigned dimension = std::numeric_limits::max(); + if (dim >= 0) { + dimension = (unsigned)dim; + } + + std::vector filenames; + for (int i = 5; i < argc; ++i) { + filenames.push_back(argv[i]); + } -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 fourth parameter of the program is the dimension of persistence to be used to construct persistence landscape on a grid. If your file contains "; - std::cout << "the information about dimension of birth-death pairs, please provide here the dimension of intervals you want to use. If your input files consist only "; - std::cout << "of birth-death pairs, please set the fourth parameter to -1 \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] ); - int dim = atoi( argv[4] ); - unsigned dimension = std::numeric_limits::max(); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - - std::vector< const char* > filenames; - for ( int i = 5 ; 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 , dimension ); - } - 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 , dimension ); - } - std::stringstream ss; - ss << filenames[i] << ".g_land"; - l.print_to_file( ss.str().c_str() ); - } - std::cout << "Done \n"; - return 0; + 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, dimension); + } 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, dimension); + } + 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/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index b4fa3046..d9d7d7af 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -22,31 +22,27 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 landscape 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"; -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 landscape 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; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp index 320d1f63..aa26ce2b 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp @@ -20,54 +20,46 @@ * along with this program. If not, see . */ - #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +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 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*> lands; + for (size_t i = 0; i != filenames.size(); ++i) { + Vector_distances_in_diagram* l = new Vector_distances_in_diagram; + l->load_from_file(filenames[i]); + lands.push_back(l); + } + + Vector_distances_in_diagram av; + av.compute_average(lands); + + av.print_to_file("average.vect"); + + for (size_t i = 0; i != filenames.size(); ++i) { + delete lands[i]; + } -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< Vector_distances_in_diagram< Euclidean_distance >* > lands; - for ( size_t i = 0 ; i != filenames.size() ; ++i ) - { - Vector_distances_in_diagram< Euclidean_distance >* l = new Vector_distances_in_diagram< Euclidean_distance >; - l->load_from_file( filenames[i] ); - lands.push_back(l ); - } - - Vector_distances_in_diagram< Euclidean_distance > 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"; + std::cout << "Done \n"; - return 0; + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index 5c0d3328..3ab8033c 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -22,89 +22,70 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 integer 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"; -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 integer 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 pp = atoi( argv[1] ); - double p = std::numeric_limits::max(); - if ( pp != -1 ) - { - p = pp; - } - + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; + return 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 > > vectors; - vectors.reserve( filenames.size() ); - for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no ) - { - Vector_distances_in_diagram< Euclidean_distance > l; - 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] = vectors[i].distance( vectors[j] , p ) ; - } - } - - //and now output the result to the screen and a file: - std::ofstream out; - out.open( "distance" ); - for ( size_t i = 0 ; i != distance.size() ; ++i ) - { - for ( size_t j = 0 ; j != distance.size() ; ++j ) - { - std::cout << distance[i][j] << " "; - out << distance[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - - return 0; -} + int pp = atoi(argv[1]); + double p = std::numeric_limits::max(); + if (pp != -1) { + p = pp; + } + std::vector filenames; + for (int i = 2; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::vector > vectors; + vectors.reserve(filenames.size()); + for (size_t file_no = 0; file_no != filenames.size(); ++file_no) { + Vector_distances_in_diagram l; + 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 > distance(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector 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] = vectors[i].distance(vectors[j], p); + } + } + // and now output the result to the screen and a file: + std::ofstream out; + out.open("distance"); + for (size_t i = 0; i != distance.size(); ++i) { + for (size_t j = 0; j != distance.size(); ++j) { + std::cout << distance[i][j] << " "; + out << distance[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); - + return 0; +} diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp index 7a1bbaf0..2a79b1ea 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp @@ -22,66 +22,56 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include +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 filenames; + for (int i = 1; i < argc; ++i) { + filenames.push_back(argv[i]); + } + std::vector > vectors; + vectors.reserve(filenames.size()); + for (size_t file_no = 0; file_no != filenames.size(); ++file_no) { + Vector_distances_in_diagram l; + 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 > scalar_product(filenames.size()); + for (size_t i = 0; i != filenames.size(); ++i) { + std::vector v(filenames.size(), 0); + scalar_product[i] = v; + } -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"; + // 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] = vectors[i].compute_scalar_product(vectors[j]); + } + } - 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 > > vectors; - vectors.reserve( filenames.size() ); - for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no ) - { - Vector_distances_in_diagram< Euclidean_distance > l; - 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] = vectors[i].compute_scalar_product( vectors[j] ) ; - } - } - - //and now output the result to the screen and a file: - std::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 ) - { - std::cout << scalar_product[i][j] << " "; - out << scalar_product[i][j] << " "; - } - std::cout << std::endl; - out << std::endl; - } - out.close(); - return 0; + // and now output the result to the screen and a file: + std::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) { + std::cout << scalar_product[i][j] << " "; + out << scalar_product[i][j] << " "; + } + std::cout << std::endl; + out << std::endl; + } + out.close(); + return 0; } diff --git a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp index d7a22e58..3c4c7dad 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -22,43 +22,39 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include - -int main( int argc , char** argv ) -{ - std::cout << "This program creates persistence vectors of diagrams provided as an input. The first parameter of this program is a dimension of persistence "; - std::cout << " that will be used in creation of the persistence vectors. If our input files contain persistence pairs of various dimension, as a second parameter of the "; - std::cout << " procedure please provide the dimension of persistence you want to use. If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; - int dim = atoi( argv[1] ); - unsigned dimension = std::numeric_limits::max(); - if ( dim >= 0 ) - { - dimension = (unsigned)dim; - } - - std::vector< const char* > filenames; - for ( int i = 2 ; i < argc ; ++i ) - { - filenames.push_back( argv[i] ); - } - - for ( size_t i = 0 ; i != filenames.size() ; ++i ) - { - std::cerr << "Creating persistence vectors based on a file : " << filenames[i] << std::endl; - Vector_distances_in_diagram< Euclidean_distance > l( filenames[i] , dimension ); - std::stringstream ss; - ss << filenames[i] << ".vect"; - l.print_to_file( ss.str().c_str() ); - } - std::cout << "Done \n"; - return 0; +int main(int argc, char** argv) { + std::cout << "This program creates persistence vectors of diagrams provided as an input. The first parameter of this " + "program is a dimension of persistence "; + std::cout << " that will be used in creation of the persistence vectors. If our input files contain persistence " + "pairs of various dimension, as a second parameter of the "; + std::cout << " procedure please provide the dimension of persistence you want to use. If in your file there are only " + "birth-death pairs of the same dimension, set the first parameter to -1." + << std::endl; + std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + int dim = atoi(argv[1]); + unsigned dimension = std::numeric_limits::max(); + if (dim >= 0) { + dimension = (unsigned)dim; + } + + std::vector filenames; + for (int i = 2; i < argc; ++i) { + filenames.push_back(argv[i]); + } + + for (size_t i = 0; i != filenames.size(); ++i) { + std::cerr << "Creating persistence vectors based on a file : " << filenames[i] << std::endl; + Vector_distances_in_diagram l(filenames[i], dimension); + 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/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp index c72fc1ee..48e0b258 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp @@ -22,27 +22,22 @@ #include - - using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include #include - -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 > l; - l.load_from_file( argv[1] ); - l.plot( argv[1] ); - - return 0; +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 l; + l.load_from_file(argv[1]); + l.plot(argv[1]); + + return 0; } - -- cgit v1.2.3 From f5c98662aca50605bad5260782924e16ecddde7a Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 30 May 2017 20:26:39 +0000 Subject: Fix copyright git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2478 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a39e151c31bdf4968f5cc09cc8fd3115d2eaed3e --- src/Persistence_representations/concept/Real_valued_topological_data.h | 2 +- .../concept/Topological_data_with_averages.h | 2 +- .../concept/Topological_data_with_distances.h | 2 +- .../concept/Topological_data_with_scalar_product.h | 2 +- src/Persistence_representations/concept/Vectorized_topological_data.h | 2 +- src/Persistence_representations/doc/Persistence_representations_doc.h | 2 +- src/Persistence_representations/example/persistence_heat_maps.cpp | 2 +- src/Persistence_representations/example/persistence_intervals.cpp | 2 +- src/Persistence_representations/example/persistence_landscape.cpp | 2 +- .../example/persistence_landscape_on_grid.cpp | 2 +- src/Persistence_representations/example/persistence_vectors.cpp | 2 +- src/Persistence_representations/include/gudhi/PSSK.h | 2 +- src/Persistence_representations/include/gudhi/Persistence_heat_maps.h | 2 +- src/Persistence_representations/include/gudhi/Persistence_intervals.h | 2 +- .../include/gudhi/Persistence_intervals_with_distances.h | 2 +- src/Persistence_representations/include/gudhi/Persistence_landscape.h | 2 +- .../include/gudhi/Persistence_landscape_on_grid.h | 2 +- src/Persistence_representations/include/gudhi/Persistence_vectors.h | 2 +- .../include/gudhi/common_persistence_representations.h | 2 +- .../include/gudhi/read_persistence_from_file.h | 2 +- src/Persistence_representations/test/persistence_heat_maps_test.cpp | 2 +- src/Persistence_representations/test/persistence_intervals_test.cpp | 2 +- .../test/persistence_intervals_with_distances_test.cpp | 2 +- .../test/persistence_lanscapes_on_grid_test.cpp | 2 +- src/Persistence_representations/test/persistence_lanscapes_test.cpp | 2 +- .../test/read_persistence_from_file_test.cpp | 2 +- src/Persistence_representations/test/vector_representation_test.cpp | 2 +- .../utilities/persistence_heat_maps/average_persistence_heat_maps.cpp | 2 +- .../persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp | 2 +- .../compute_scalar_product_of_persistence_heat_maps.cpp | 2 +- .../create_p_h_m_weighted_by_arctan_of_their_persistence.cpp | 2 +- .../create_p_h_m_weighted_by_distance_from_diagonal.cpp | 2 +- .../create_p_h_m_weighted_by_squared_diag_distance.cpp | 2 +- .../utilities/persistence_heat_maps/create_persistence_heat_maps.cpp | 2 +- .../utilities/persistence_heat_maps/create_pssk.cpp | 2 +- .../utilities/persistence_heat_maps/plot_persistence_heat_map.cpp | 2 +- .../compute_birth_death_range_in_persistence_diagram.cpp | 2 +- .../utilities/persistence_intervals/compute_bottleneck_distance.cpp | 2 +- .../persistence_intervals/compute_number_of_dominant_intervals.cpp | 2 +- .../persistence_intervals/plot_histogram_of_intervals_lengths.cpp | 2 +- .../utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp | 2 +- .../utilities/persistence_intervals/plot_persistence_intervals.cpp | 2 +- .../utilities/persistence_landscapes/average_landscapes.cpp | 2 +- .../utilities/persistence_landscapes/compute_distance_of_landscapes.cpp | 2 +- .../persistence_landscapes/compute_scalar_product_of_landscapes.cpp | 2 +- .../utilities/persistence_landscapes/create_landscapes.cpp | 2 +- .../utilities/persistence_landscapes/plot_landscapes.cpp | 2 +- .../persistence_landscapes_on_grid/average_landscapes_on_grid.cpp | 2 +- .../compute_distance_of_landscapes_on_grid.cpp | 2 +- .../compute_scalar_product_of_landscapes_on_grid.cpp | 2 +- .../persistence_landscapes_on_grid/create_landscapes_on_grid.cpp | 2 +- .../persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp | 2 +- .../utilities/persistence_vectors/average_persistence_vectors.cpp | 2 +- .../persistence_vectors/compute_distance_of_persistence_vectors.cpp | 2 +- .../compute_scalar_product_of_persistence_vectors.cpp | 2 +- .../utilities/persistence_vectors/create_persistence_vectors.cpp | 2 +- .../utilities/persistence_vectors/plot_persistence_vectors.cpp | 2 +- 57 files changed, 57 insertions(+), 57 deletions(-) (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/src/Persistence_representations/concept/Real_valued_topological_data.h b/src/Persistence_representations/concept/Real_valued_topological_data.h index e60f28ac..1d3595ad 100644 --- a/src/Persistence_representations/concept/Real_valued_topological_data.h +++ b/src/Persistence_representations/concept/Real_valued_topological_data.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/concept/Topological_data_with_averages.h b/src/Persistence_representations/concept/Topological_data_with_averages.h index 2b6d46c4..9ebd105f 100644 --- a/src/Persistence_representations/concept/Topological_data_with_averages.h +++ b/src/Persistence_representations/concept/Topological_data_with_averages.h @@ -5,7 +5,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/concept/Topological_data_with_distances.h b/src/Persistence_representations/concept/Topological_data_with_distances.h index c2078403..a6a62307 100644 --- a/src/Persistence_representations/concept/Topological_data_with_distances.h +++ b/src/Persistence_representations/concept/Topological_data_with_distances.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/concept/Topological_data_with_scalar_product.h b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h index a0677fb2..2e506ca9 100644 --- a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h +++ b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/concept/Vectorized_topological_data.h b/src/Persistence_representations/concept/Vectorized_topological_data.h index 0d4591d1..b6b5b109 100644 --- a/src/Persistence_representations/concept/Vectorized_topological_data.h +++ b/src/Persistence_representations/concept/Vectorized_topological_data.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/doc/Persistence_representations_doc.h b/src/Persistence_representations/doc/Persistence_representations_doc.h index 60b9d6da..7884574d 100644 --- a/src/Persistence_representations/doc/Persistence_representations_doc.h +++ b/src/Persistence_representations/doc/Persistence_representations_doc.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Sophia-Saclay (France) + * Copyright (C) 2016 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 diff --git a/src/Persistence_representations/example/persistence_heat_maps.cpp b/src/Persistence_representations/example/persistence_heat_maps.cpp index 44227823..5e3be880 100644 --- a/src/Persistence_representations/example/persistence_heat_maps.cpp +++ b/src/Persistence_representations/example/persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/example/persistence_intervals.cpp b/src/Persistence_representations/example/persistence_intervals.cpp index 69870744..1accfb0c 100644 --- a/src/Persistence_representations/example/persistence_intervals.cpp +++ b/src/Persistence_representations/example/persistence_intervals.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/example/persistence_landscape.cpp b/src/Persistence_representations/example/persistence_landscape.cpp index e080154a..4225f83a 100644 --- a/src/Persistence_representations/example/persistence_landscape.cpp +++ b/src/Persistence_representations/example/persistence_landscape.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/example/persistence_landscape_on_grid.cpp b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp index 75461fc6..821fb5b7 100644 --- a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp +++ b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/example/persistence_vectors.cpp b/src/Persistence_representations/example/persistence_vectors.cpp index c41d261b..bc2f3fe7 100644 --- a/src/Persistence_representations/example/persistence_vectors.cpp +++ b/src/Persistence_representations/example/persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/PSSK.h b/src/Persistence_representations/include/gudhi/PSSK.h index ece7e323..59e73af4 100644 --- a/src/Persistence_representations/include/gudhi/PSSK.h +++ b/src/Persistence_representations/include/gudhi/PSSK.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index 55c94ec6..549c19e7 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index 2a1c6283..939ae274 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h index f7664e8d..0f3920cd 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/Persistence_landscape.h b/src/Persistence_representations/include/gudhi/Persistence_landscape.h index 01d44fec..be7c9e31 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h index 64385846..bea98f74 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index 587eb212..282c107d 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h index d5c9ece1..8f56ad3e 100644 --- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h +++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/include/gudhi/read_persistence_from_file.h b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h index 39d485a9..a5c2b286 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2017 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/test/persistence_heat_maps_test.cpp b/src/Persistence_representations/test/persistence_heat_maps_test.cpp index 48086ba8..fef397a3 100644 --- a/src/Persistence_representations/test/persistence_heat_maps_test.cpp +++ b/src/Persistence_representations/test/persistence_heat_maps_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/test/persistence_intervals_test.cpp b/src/Persistence_representations/test/persistence_intervals_test.cpp index a0580bb8..7a3a058f 100644 --- a/src/Persistence_representations/test/persistence_intervals_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/test/persistence_intervals_with_distances_test.cpp b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp index b936c41d..c6d4796c 100644 --- a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp index 40d52415..098e08b2 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/test/persistence_lanscapes_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_test.cpp index 2bdc6bdb..6749fbd8 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/test/read_persistence_from_file_test.cpp b/src/Persistence_representations/test/read_persistence_from_file_test.cpp index 924a67a1..31dbed61 100644 --- a/src/Persistence_representations/test/read_persistence_from_file_test.cpp +++ b/src/Persistence_representations/test/read_persistence_from_file_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/test/vector_representation_test.cpp b/src/Persistence_representations/test/vector_representation_test.cpp index d541d3e1..5a29c109 100644 --- a/src/Persistence_representations/test/vector_representation_test.cpp +++ b/src/Persistence_representations/test/vector_representation_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp index 34fdb1f8..b0ea3a35 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index cfa209d1..f87530d4 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp index 22bb9e2e..f801d056 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp index 942246a4..a127996f 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * -* Copyright (C) 2015 INRIA (France) +* Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp index fce874bd..371d94a6 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index 92375387..e2b9abb1 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index 3b0fd8ae..03f1641a 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp index 6b464378..004fa90e 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index 59f12a7d..0b7841d1 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp index 750d0a55..058677d9 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp index d5d166ce..f1ccda9f 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp index 5308878e..1f7011e1 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index dd81af88..6bdb0081 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp index 08d308aa..206745c1 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp index 32ca0fd9..971f039e 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp index 9816ff1d..1927551d 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index 1c690c53..a4027fa7 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp index 83121a9c..95d5a998 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp index f98fe3ad..1692c7ac 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp index 4761a095..35262fe2 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp index 87512212..a17a8998 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index db920c82..1ba34762 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp index 9bbba7cf..4ec9a740 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index e135896c..65addbe5 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index d9d7d7af..f5a70826 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp index aa26ce2b..2bfc4a6d 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index 3ab8033c..a2e27612 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp index 2a79b1ea..95f2d2ae 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp index 3c4c7dad..2996f49b 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp index 48e0b258..d8846ed7 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2016 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 -- cgit v1.2.3 From 4ba017094d3246cd8fe917a6c45443ba25d74b1d Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 2 Jun 2017 14:00:20 +0000 Subject: Fix some cpplint git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2502 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 0a6422b0fa27105b9aaba743371da3328d9039be --- .../example/CMakeLists.txt | 7 ++----- .../example/persistence_heat_maps.cpp | 23 ++++++++++------------ .../example/persistence_intervals.cpp | 4 +--- .../example/persistence_landscape.cpp | 3 +-- .../example/persistence_landscape_on_grid.cpp | 3 +-- .../example/persistence_vectors.cpp | 13 +++++------- .../test/persistence_heat_maps_test.cpp | 2 +- .../test/persistence_intervals_test.cpp | 2 +- .../persistence_intervals_with_distances_test.cpp | 2 +- .../test/persistence_lanscapes_on_grid_test.cpp | 2 +- .../test/persistence_lanscapes_test.cpp | 2 +- .../utilities/CMakeLists.txt | 6 ++++++ .../utilities/persistence_heat_maps/CMakeLists.txt | 3 +-- .../average_persistence_heat_maps.cpp | 12 +++++------ .../compute_distance_of_persistence_heat_maps.cpp | 10 +++++----- ...ute_scalar_product_of_persistence_heat_maps.cpp | 10 +++++----- ...h_m_weighted_by_arctan_of_their_persistence.cpp | 12 +++++------ ...te_p_h_m_weighted_by_distance_from_diagonal.cpp | 12 +++++------ ...ate_p_h_m_weighted_by_squared_diag_distance.cpp | 12 +++++------ .../create_persistence_heat_maps.cpp | 11 +++++------ .../persistence_heat_maps/create_pssk.cpp | 7 +++---- .../plot_persistence_heat_map.cpp | 8 ++++---- ...te_birth_death_range_in_persistence_diagram.cpp | 3 +-- .../compute_bottleneck_distance.cpp | 5 ++--- .../compute_number_of_dominant_intervals.cpp | 3 +-- .../plot_histogram_of_intervals_lengths.cpp | 3 +-- .../plot_persistence_Betti_numbers.cpp | 3 +-- .../plot_persistence_intervals.cpp | 7 ++----- .../persistence_landscapes/average_landscapes.cpp | 5 ++--- .../compute_distance_of_landscapes.cpp | 6 +++--- .../compute_scalar_product_of_landscapes.cpp | 5 ++--- .../persistence_landscapes/create_landscapes.cpp | 5 ++--- .../persistence_landscapes/plot_landscapes.cpp | 5 ++--- .../average_landscapes_on_grid.cpp | 6 +++--- .../compute_distance_of_landscapes_on_grid.cpp | 5 ++--- ...ompute_scalar_product_of_landscapes_on_grid.cpp | 5 ++--- .../create_landscapes_on_grid.cpp | 5 ++--- .../plot_landscapes_on_grid.cpp | 5 ++--- 38 files changed, 108 insertions(+), 134 deletions(-) create mode 100644 src/Persistence_representations/utilities/CMakeLists.txt (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/src/Persistence_representations/example/CMakeLists.txt b/src/Persistence_representations/example/CMakeLists.txt index 3c783d36..3357017a 100644 --- a/src/Persistence_representations/example/CMakeLists.txt +++ b/src/Persistence_representations/example/CMakeLists.txt @@ -1,27 +1,24 @@ cmake_minimum_required(VERSION 2.6) -project(GUDHI_STAT) +project(Persistence_representations_example) file(COPY "simple_diagram.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + add_executable ( persistence_landscape_on_grid persistence_landscape_on_grid.cpp ) target_link_libraries(persistence_landscape_on_grid ${Boost_SYSTEM_LIBRARY}) add_test ( persistence_landscape_on_grid ${CMAKE_CURRENT_BINARY_DIR}/persistence_landscape_on_grid ) -file(COPY "simple_diagram.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) add_executable ( persistence_landscape persistence_landscape.cpp ) target_link_libraries(persistence_landscape ${Boost_SYSTEM_LIBRARY}) add_test ( persistence_landscape ${CMAKE_CURRENT_BINARY_DIR}/persistence_landscape ) -file(COPY "simple_diagram.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) add_executable ( persistence_intervals persistence_intervals.cpp ) target_link_libraries(persistence_intervals ${Boost_SYSTEM_LIBRARY}) add_test ( persistence_intervals ${CMAKE_CURRENT_BINARY_DIR}/persistence_intervals simple_diagram.txt ) -file(COPY "simple_diagram.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) add_executable ( persistence_vectors persistence_vectors.cpp ) target_link_libraries(persistence_vectors ${Boost_SYSTEM_LIBRARY}) add_test ( persistence_vectors ${CMAKE_CURRENT_BINARY_DIR}/persistence_vectors ) -file(COPY "simple_diagram.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) add_executable ( persistence_heat_maps persistence_heat_maps.cpp ) target_link_libraries(persistence_heat_maps ${Boost_SYSTEM_LIBRARY}) add_test ( persistence_heat_maps ${CMAKE_CURRENT_BINARY_DIR}/persistence_heat_maps ) diff --git a/src/Persistence_representations/example/persistence_heat_maps.cpp b/src/Persistence_representations/example/persistence_heat_maps.cpp index a9ac5df5..2a472ac6 100644 --- a/src/Persistence_representations/example/persistence_heat_maps.cpp +++ b/src/Persistence_representations/example/persistence_heat_maps.cpp @@ -20,17 +20,14 @@ * along with this program. If not, see . */ -#include #include #include #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - -double epsilon = 0.0000005; +using constant_scaling_function = Gudhi::Persistence_representations::constant_scaling_function; +using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; int main(int argc, char** argv) { // create two simple vectors with birth--death pairs: @@ -50,30 +47,30 @@ int main(int argc, char** argv) { // over here we define a function we sill put on a top on every birth--death pair in the persistence interval. It can // be anything. Over here we will use standard Gaussian - std::vector > filter = create_Gaussian_filter(5, 1); + std::vector > filter = Gudhi::Persistence_representations::create_Gaussian_filter(5, 1); // creating two heat maps. - Persistence_heat_maps hm1(persistence1, filter, false, 20, 0, 11); - Persistence_heat_maps hm2(persistence2, filter, false, 20, 0, 11); + Persistence_heat_maps hm1(persistence1, filter, false, 20, 0, 11); + Persistence_heat_maps hm2(persistence2, filter, false, 20, 0, 11); - std::vector*> vector_of_maps; + std::vector vector_of_maps; vector_of_maps.push_back(&hm1); vector_of_maps.push_back(&hm2); // compute median/mean of a vector of heat maps: - Persistence_heat_maps mean; + Persistence_heat_maps mean; mean.compute_mean(vector_of_maps); - Persistence_heat_maps median; + Persistence_heat_maps median; median.compute_median(vector_of_maps); // to compute L^1 distance between hm1 and hm2: std::cout << "The L^1 distance is : " << hm1.distance(hm2, 1) << std::endl; // to average of hm1 and hm2: - std::vector*> to_average; + std::vector to_average; to_average.push_back(&hm1); to_average.push_back(&hm2); - Persistence_heat_maps av; + Persistence_heat_maps av; av.compute_average(to_average); // to compute scalar product of hm1 and hm2: diff --git a/src/Persistence_representations/example/persistence_intervals.cpp b/src/Persistence_representations/example/persistence_intervals.cpp index 29cd66f3..c1ceb458 100644 --- a/src/Persistence_representations/example/persistence_intervals.cpp +++ b/src/Persistence_representations/example/persistence_intervals.cpp @@ -20,15 +20,13 @@ * along with this program. If not, see . */ -#include #include #include #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; +using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals; int main(int argc, char** argv) { if (argc != 2) { diff --git a/src/Persistence_representations/example/persistence_landscape.cpp b/src/Persistence_representations/example/persistence_landscape.cpp index 1bcc524a..400a9ae1 100644 --- a/src/Persistence_representations/example/persistence_landscape.cpp +++ b/src/Persistence_representations/example/persistence_landscape.cpp @@ -26,8 +26,7 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; +using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; int main(int argc, char** argv) { // create two simple vectors with birth--death pairs: diff --git a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp index 0cede07e..b201b397 100644 --- a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp +++ b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp @@ -26,8 +26,7 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; +using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; int main(int argc, char** argv) { // create two simple vectors with birth--death pairs: diff --git a/src/Persistence_representations/example/persistence_vectors.cpp b/src/Persistence_representations/example/persistence_vectors.cpp index c6581039..59eca152 100644 --- a/src/Persistence_representations/example/persistence_vectors.cpp +++ b/src/Persistence_representations/example/persistence_vectors.cpp @@ -21,7 +21,6 @@ */ #include -#include #include #include @@ -30,8 +29,8 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; +using Vector_distances_in_diagram = + Gudhi::Persistence_representations::Vector_distances_in_diagram; int main(int argc, char** argv) { // create two simple vectors with birth--death pairs: @@ -50,17 +49,15 @@ int main(int argc, char** argv) { persistence2.push_back(std::make_pair(6, 10)); // create two persistence vectors based on persistence1 and persistence2: - Vector_distances_in_diagram v1 = - Vector_distances_in_diagram(persistence1, std::numeric_limits::max()); - Vector_distances_in_diagram v2 = - Vector_distances_in_diagram(persistence2, std::numeric_limits::max()); + Vector_distances_in_diagram v1(persistence1, std::numeric_limits::max()); + Vector_distances_in_diagram v2(persistence2, std::numeric_limits::max()); // writing to a stream: std::cout << "v1 : " << v1 << std::endl; std::cout << "v2 : " << v2 << std::endl; // averages: - Vector_distances_in_diagram average; + Vector_distances_in_diagram average; average.compute_average({&v1, &v2}); std::cout << "Average : " << average << std::endl; diff --git a/src/Persistence_representations/test/persistence_heat_maps_test.cpp b/src/Persistence_representations/test/persistence_heat_maps_test.cpp index fef397a3..1f1502f5 100644 --- a/src/Persistence_representations/test/persistence_heat_maps_test.cpp +++ b/src/Persistence_representations/test/persistence_heat_maps_test.cpp @@ -21,7 +21,7 @@ */ #define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE "Persistence_representations" +#define BOOST_TEST_MODULE "Persistence_heat_maps_test" #include #include #include diff --git a/src/Persistence_representations/test/persistence_intervals_test.cpp b/src/Persistence_representations/test/persistence_intervals_test.cpp index 7a3a058f..51d8a0f9 100644 --- a/src/Persistence_representations/test/persistence_intervals_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_test.cpp @@ -21,7 +21,7 @@ */ #define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE "Persistence_representations" +#define BOOST_TEST_MODULE "Persistence_intervals_test" #include #include #include "gudhi/Persistence_intervals.h" diff --git a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp index c6d4796c..7b70eee3 100644 --- a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp @@ -21,7 +21,7 @@ */ #define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE "Persistence_representations" +#define BOOST_TEST_MODULE "Persistence_intervals_with_distances_test" #include #include #include "gudhi/Persistence_intervals_with_distances.h" diff --git a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp index 098e08b2..8ab7449e 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp @@ -21,7 +21,7 @@ */ #define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE "Persistence_representations" +#define BOOST_TEST_MODULE "Persistence_landscapes_on_grid_test" #include #include #include diff --git a/src/Persistence_representations/test/persistence_lanscapes_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_test.cpp index 6749fbd8..1141edfb 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_test.cpp @@ -21,7 +21,7 @@ */ #define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE "Persistence_representations" +#define BOOST_TEST_MODULE "Persistence_landscapes_test" #include #include #include diff --git a/src/Persistence_representations/utilities/CMakeLists.txt b/src/Persistence_representations/utilities/CMakeLists.txt new file mode 100644 index 00000000..66524666 --- /dev/null +++ b/src/Persistence_representations/utilities/CMakeLists.txt @@ -0,0 +1,6 @@ +add_subdirectory(persistence_heat_maps) +add_subdirectory(persistence_intervals) +add_subdirectory(persistence_landscapes) +add_subdirectory(persistence_landscapes_on_grid) +add_subdirectory(persistence_vectors) + diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt index c90c637d..4ad924cb 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt @@ -1,11 +1,10 @@ cmake_minimum_required(VERSION 2.6) -project(GUDHI_STAT) +project(Persistence_representations_heat_maps_utilities) #persitence heat maps add_executable ( create_persistence_heat_maps create_persistence_heat_maps.cpp ) target_link_libraries(create_persistence_heat_maps ${Boost_SYSTEM_LIBRARY}) -#add_test ( create_persistence_heat_maps ${CMAKE_CURRENT_BINARY_DIR}/create_persistence_heat_maps 10 -1 -1 4 -1 simple_diagram.txt ) add_test ( create_persistence_heat_maps ${CMAKE_CURRENT_BINARY_DIR}/create_persistence_heat_maps 10 -1 -1 4 -1 "${CMAKE_SOURCE_DIR}/data/persistence_diagram/simple_diagram.txt" ) add_executable ( create_pssk create_pssk.cpp ) diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp index b4e2be89..4e81375a 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp @@ -22,12 +22,12 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include +using constant_scaling_function = Gudhi::Persistence_representations::constant_scaling_function; +using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; + 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 " @@ -44,14 +44,14 @@ int main(int argc, char** argv) { } std::cout << "Creating persistence landscapes...\n"; - std::vector*> maps; + std::vector maps; for (size_t i = 0; i != filenames.size(); ++i) { - Persistence_heat_maps* l = new Persistence_heat_maps; + Persistence_heat_maps* l = new Persistence_heat_maps; l->load_from_file(filenames[i]); maps.push_back(l); } - Persistence_heat_maps av; + Persistence_heat_maps av; av.compute_average(maps); av.print_to_file("average.mps"); diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index 56b2d336..a9e8821f 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -22,14 +22,14 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using constant_scaling_function = Gudhi::Persistence_representations::constant_scaling_function; +using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; + int main(int argc, char** argv) { std::cout << "This program compute distance of persistence heat maps stored in a file (the file needs to be created " "beforehand). \n"; @@ -52,10 +52,10 @@ int main(int argc, char** argv) { for (int i = 2; i < argc; ++i) { filenames.push_back(argv[i]); } - std::vector > maps; + std::vector maps; maps.reserve(filenames.size()); for (size_t file_no = 0; file_no != filenames.size(); ++file_no) { - Persistence_heat_maps l; + Persistence_heat_maps l; l.load_from_file(filenames[file_no]); maps.push_back(l); } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp index ec9482f0..1cee1f82 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp @@ -22,13 +22,13 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include +using constant_scaling_function = Gudhi::Persistence_representations::constant_scaling_function; +using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; + 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"; @@ -38,10 +38,10 @@ int main(int argc, char** argv) { for (int i = 1; i < argc; ++i) { filenames.push_back(argv[i]); } - std::vector > maps; + std::vector maps; maps.reserve(filenames.size()); for (size_t file_no = 0; file_no != filenames.size(); ++file_no) { - Persistence_heat_maps l; + Persistence_heat_maps l; l.load_from_file(filenames[file_no]); maps.push_back(l); } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp index 68c75059..2bf185a3 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp @@ -22,14 +22,15 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using arc_tan_of_persistence_of_point = Gudhi::Persistence_representations::arc_tan_of_persistence_of_point; +using Persistence_heat_maps = + Gudhi::Persistence_representations::Persistence_heat_maps; + 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 arc tangential of their persistence.\n"; @@ -68,12 +69,11 @@ int main(int argc, char** argv) { } std::cout << "Creating persistence heat maps...\n"; - std::vector > filter = create_Gaussian_filter(stdiv, 1); + std::vector > filter = Gudhi::Persistence_representations::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, false, size_of_grid, min_, max_, - dimension); + Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension); std::stringstream ss; ss << filenames[i] << ".mps"; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp index a56393a3..ec9477f1 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp @@ -22,14 +22,15 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using distance_from_diagonal_scaling = Gudhi::Persistence_representations::distance_from_diagonal_scaling; +using Persistence_heat_maps = + Gudhi::Persistence_representations::Persistence_heat_maps; + 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"; @@ -68,12 +69,11 @@ int main(int argc, char** argv) { } std::cout << "Creating persistence heat maps...\n"; - std::vector > filter = create_Gaussian_filter(stdiv, 1); + std::vector > filter = Gudhi::Persistence_representations::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, false, size_of_grid, min_, max_, - dimension); + Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension); std::stringstream ss; ss << filenames[i] << ".mps"; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index 44115329..cb7e282c 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -22,14 +22,15 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using squared_distance_from_diagonal_scaling = Gudhi::Persistence_representations::squared_distance_from_diagonal_scaling; +using Persistence_heat_maps = + Gudhi::Persistence_representations::Persistence_heat_maps; + 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"; @@ -68,12 +69,11 @@ int main(int argc, char** argv) { } std::cout << "Creating persistence heat maps...\n"; - std::vector > filter = create_Gaussian_filter(stdiv, 1); + std::vector > filter = Gudhi::Persistence_representations::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, false, size_of_grid, min_, - max_, dimension); + Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension); std::stringstream ss; ss << filenames[i] << ".mps"; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index ebc82f82..bd5ec89a 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -22,14 +22,14 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using constant_scaling_function = Gudhi::Persistence_representations::constant_scaling_function; +using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; + 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"; @@ -65,12 +65,11 @@ int main(int argc, char** argv) { } std::cout << "Creating persistence heat maps...\n"; - std::vector > filter = create_Gaussian_filter(stdiv, 1); + std::vector > filter = Gudhi::Persistence_representations::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, false, size_of_grid, min_, max_, - dimension); + Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension); std::stringstream ss; ss << filenames[i] << ".mps"; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp index 7b24bb7c..6aefbb00 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -22,14 +22,13 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using PSSK = Gudhi::Persistence_representations::PSSK; + 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"; @@ -67,7 +66,7 @@ int main(int argc, char** argv) { } std::cout << "Creating persistence heat maps...\n"; - std::vector > filter = create_Gaussian_filter(stdiv, 1); + std::vector > filter = Gudhi::Persistence_representations::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; diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index 0b7841d1..a7c9f2d8 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -22,16 +22,16 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include +using constant_scaling_function = Gudhi::Persistence_representations::constant_scaling_function; +using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; + 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 landscape file \n"; - Persistence_heat_maps l; + Persistence_heat_maps l; l.load_from_file(argv[1]); l.plot(argv[1]); return 0; diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp index 72c56e92..66fa31ca 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp @@ -28,8 +28,7 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; +using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals; int main(int argc, char** argv) { std::cout << "This program compute the range of birth and death times of persistence pairs in diagrams provided as " diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp index 6a872b7a..0b1b526d 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -23,14 +23,13 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using Persistence_intervals_with_distances = Gudhi::Persistence_representations::Persistence_intervals_with_distances; + int main(int argc, char** argv) { std::cout << "This program compute the bottleneck distance of persistence diagrams stored in a files. \n"; std::cout << "The first parameter of the program is the dimension of persistence to be used to construct persistence " diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp index 5fbbef14..1286ca57 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp @@ -28,8 +28,7 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; +using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals; 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 " diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index b8f96b60..d68f4584 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -28,8 +28,7 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; +using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals; 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 " diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp index 521621b2..da2b9319 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp @@ -28,8 +28,7 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; +using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals; int main(int argc, char** argv) { std::cout << "This program compute a plot of persistence Betti numbers. The input parameter is a file with " diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp index e76906e9..e7d29e84 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -29,10 +29,7 @@ #include #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - -double epsilon = 0.0000005; +using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals; int main(int argc, char** argv) { if (argc < 2) { @@ -50,7 +47,7 @@ int main(int argc, char** argv) { dimension = (unsigned)dim; } std::vector > intervals = - read_persistence_intervals_in_one_dimension_from_file(argv[1], dimension); + Gudhi::Persistence_representations::read_persistence_intervals_in_one_dimension_from_file(argv[1], dimension); Persistence_intervals b(intervals); b.plot(argv[1]); return 0; diff --git a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp index f885a7a7..526130e9 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp @@ -22,12 +22,11 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include +using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; + 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"; diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index 7028b98b..b3881d6a 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -22,12 +22,12 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include +#include + +using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; 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 " diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp index 76a9d433..8dad7b4d 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp @@ -22,13 +22,12 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include +using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; + 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"; diff --git a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp index a6b33225..325081d1 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp @@ -22,14 +22,13 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; + int main(int argc, char** argv) { std::cout << "This program creates persistence landscapes of diagrams provided as an input. \n"; std::cout << "The first parameter of the program is the dimension of persistence to be used to construct persistence " diff --git a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp index 35262fe2..ebdb20a1 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -22,12 +22,11 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include +using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; + 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 landscape file \n"; diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp index a17a8998..d50118a0 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp @@ -22,10 +22,10 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include +#include + +using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; int main(int argc, char** argv) { std::cout << "This program computes average persistence landscape on grid of persistence landscapes on grid created " diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index 4694e897..859c6991 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -22,14 +22,13 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; + int main(int argc, char** argv) { std::cout << "This program compute distance of persistence landscapes on grid stored in a file (the file needs to be " "created beforehand). \n"; diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp index 75c33cb1..e95bf8ad 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp @@ -22,13 +22,12 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include +using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; + 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"; diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index 490a1c25..8d747c14 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -22,14 +22,13 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include #include #include +using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; + 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"; diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index f5a70826..42822a01 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -22,12 +22,11 @@ #include -using namespace Gudhi; -using namespace Gudhi::Persistence_representations; - #include #include +using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; + 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 landscape on grid file \n"; -- cgit v1.2.3 From ca8474aa59374fc5f4266aa56196587685b86637 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Sat, 9 Dec 2017 12:47:11 +0000 Subject: CMake modification strategy as it was quite painful to maintain all these utilities git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration_cmake_improvement@3062 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c0eae764abe5c7076ae59027eeab2a7ad451463c --- .../include/gudhi/Persistence_heat_maps.h | 10 +-- .../include/gudhi/Persistence_landscape.h | 11 ++-- .../include/gudhi/Persistence_landscape_on_grid.h | 12 ++-- .../include/gudhi/Persistence_vectors.h | 3 +- .../utilities/CMakeLists.txt | 48 +++++++++++++++ .../utilities/persistence_heat_maps/CMakeLists.txt | 72 ++++------------------ .../average_persistence_heat_maps.cpp | 16 +++-- .../compute_distance_of_persistence_heat_maps.cpp | 13 ++-- ...ute_scalar_product_of_persistence_heat_maps.cpp | 14 +++-- ...h_m_weighted_by_arctan_of_their_persistence.cpp | 33 +++++----- ...te_p_h_m_weighted_by_distance_from_diagonal.cpp | 34 +++++----- ...ate_p_h_m_weighted_by_squared_diag_distance.cpp | 34 +++++----- .../create_persistence_heat_maps.cpp | 34 +++++----- .../persistence_heat_maps/create_pssk.cpp | 34 +++++----- .../plot_persistence_heat_map.cpp | 8 ++- .../utilities/persistence_intervals/CMakeLists.txt | 6 -- .../persistence_landscapes/CMakeLists.txt | 40 ++---------- .../persistence_landscapes/average_landscapes.cpp | 15 ++--- .../compute_distance_of_landscapes.cpp | 14 ++--- .../compute_scalar_product_of_landscapes.cpp | 15 +++-- .../persistence_landscapes/create_landscapes.cpp | 24 +++++--- .../persistence_landscapes/plot_landscapes.cpp | 16 ++--- .../persistence_landscapes_on_grid/CMakeLists.txt | 39 ++---------- .../average_landscapes_on_grid.cpp | 16 +++-- .../compute_distance_of_landscapes_on_grid.cpp | 13 ++-- ...ompute_scalar_product_of_landscapes_on_grid.cpp | 14 +++-- .../create_landscapes_on_grid.cpp | 27 ++++---- .../plot_landscapes_on_grid.cpp | 17 +++-- .../utilities/persistence_vectors/CMakeLists.txt | 38 ++---------- .../average_persistence_vectors.cpp | 13 ++-- .../compute_distance_of_persistence_vectors.cpp | 3 +- ...mpute_scalar_product_of_persistence_vectors.cpp | 15 +++-- .../create_persistence_vectors.cpp | 23 ++++--- .../modules/GUDHI_third_party_libraries.cmake | 5 +- 34 files changed, 332 insertions(+), 397 deletions(-) (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index 04dd78ad..ae1740a7 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -743,10 +743,10 @@ void Persistence_heat_maps::compute_percentage_of_active( template void Persistence_heat_maps::plot(const char* filename) const { std::ofstream out; - std::stringstream ss; - ss << filename << "_GnuplotScript"; + std::stringstream gnuplot_script; + gnuplot_script << filename << "_GnuplotScript"; - out.open(ss.str().c_str()); + out.open(gnuplot_script.str().c_str()); out << "plot '-' matrix with image" << std::endl; for (size_t i = 0; i != this->heat_map.size(); ++i) { for (size_t j = 0; j != this->heat_map[i].size(); ++j) { @@ -755,8 +755,8 @@ void Persistence_heat_maps::plot(const char* filename) cons out << std::endl; } out.close(); - std::cout << "Gnuplot script have been created. Open gnuplot and type load \'" << ss.str().c_str() - << "\' to see the picture." << std::endl; + std::cout << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'" + << gnuplot_script.str().c_str() << "\'\"" << std::endl; } template diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape.h b/src/Persistence_representations/include/gudhi/Persistence_landscape.h index 5c300112..72498edf 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape.h @@ -1340,10 +1340,9 @@ void Persistence_landscape::plot(const char* filename, double xRangeBegin, doubl // this program create a gnuplot script file that allows to plot persistence diagram. std::ofstream out; - std::ostringstream nameSS; - nameSS << filename << "_GnuplotScript"; - std::string nameStr = nameSS.str(); - out.open(nameStr); + std::ostringstream gnuplot_script; + gnuplot_script << filename << "_GnuplotScript"; + out.open(gnuplot_script.str().c_str()); if ((xRangeBegin != std::numeric_limits::max()) || (xRangeEnd != std::numeric_limits::max()) || (yRangeBegin != std::numeric_limits::max()) || (yRangeEnd != std::numeric_limits::max())) { @@ -1376,8 +1375,8 @@ void Persistence_landscape::plot(const char* filename, double xRangeBegin, doubl } out << "EOF" << std::endl; } - std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" - << nameStr << "' in gnuplot to visualize." << std::endl; + std::cout << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'" + << gnuplot_script.str().c_str() << "\'\"" << std::endl; } } // namespace Persistence_representations diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h index 4ceb9bf6..84fd22ed 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h @@ -1207,10 +1207,9 @@ void Persistence_landscape_on_grid::plot(const char* filename, double min_x, dou // this program create a gnuplot script file that allows to plot persistence diagram. std::ofstream out; - std::ostringstream nameSS; - nameSS << filename << "_GnuplotScript"; - std::string nameStr = nameSS.str(); - out.open(nameStr); + std::ostringstream gnuplot_script; + gnuplot_script << filename << "_GnuplotScript"; + out.open(gnuplot_script.str().c_str()); if (min_x == max_x) { std::pair min_max = compute_minimum_maximum(); @@ -1241,7 +1240,6 @@ void Persistence_landscape_on_grid::plot(const char* filename, double min_x, dou out << "plot "; for (size_t lambda = from; lambda != to; ++lambda) { - // out << " '-' using 1:2 title 'l" << lambda << "' with lp"; out << " '-' using 1:2 notitle with lp"; if (lambda + 1 != to) { out << ", \\"; @@ -1261,8 +1259,8 @@ void Persistence_landscape_on_grid::plot(const char* filename, double min_x, dou } out << "EOF" << std::endl; } - std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" - << nameStr << "' in gnuplot to visualize." << std::endl; + std::cout << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'" + << gnuplot_script.str().c_str() << "\'\"" << std::endl; } template diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index 0fb49eee..39df37e0 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -201,7 +201,8 @@ class Vector_distances_in_diagram { } out << std::endl; out.close(); - std::cout << "To visualize, open gnuplot and type: load \'" << gnuplot_script.str().c_str() << "\'" << std::endl; + std::cout << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'" + << gnuplot_script.str().c_str() << "\'\"" << std::endl; } /** diff --git a/src/Persistence_representations/utilities/CMakeLists.txt b/src/Persistence_representations/utilities/CMakeLists.txt index 66524666..d0d93f9d 100644 --- a/src/Persistence_representations/utilities/CMakeLists.txt +++ b/src/Persistence_representations/utilities/CMakeLists.txt @@ -1,3 +1,51 @@ +# Copy files, otherwise result files are created in sources +file(COPY "${CMAKE_SOURCE_DIR}/data/persistence_diagram/first.pers" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") +file(COPY "${CMAKE_SOURCE_DIR}/data/persistence_diagram/second.pers" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + +function(add_persistence_representation_creation_utility creation_utility) + add_executable ( ${creation_utility} ${creation_utility}.cpp ) + + # as the function is called in a subdirectory level, need to '../' to find persistence files + # ARGN will add all the other arguments (except creation_utility) sent to the CMake functions + add_test(NAME Persistence_representation_utilities_${creation_utility} COMMAND $ + ${ARGN} "${CMAKE_CURRENT_BINARY_DIR}/../first.pers" + "${CMAKE_CURRENT_BINARY_DIR}/../second.pers") +endfunction(add_persistence_representation_creation_utility) + +function(add_persistence_representation_plot_utility plot_utility tool_extension) + add_executable ( ${plot_utility} ${plot_utility}.cpp ) + + # as the function is called in a subdirectory level, need to '../' to find persistence heat maps files + add_test(NAME Persistence_representation_utilities_${plot_utility}_first COMMAND $ + "${CMAKE_CURRENT_BINARY_DIR}/../first.pers${tool_extension}") + add_test(NAME Persistence_representation_utilities_${plot_utility}_second COMMAND $ + "${CMAKE_CURRENT_BINARY_DIR}/../second.pers${tool_extension}") + if(GNUPLOT_PATH) + add_test(NAME Persistence_representation_utilities_${plot_utility}_first_gnuplot COMMAND ${GNUPLOT_PATH} + "-e" "load '${CMAKE_CURRENT_BINARY_DIR}/../first.pers${tool_extension}_GnuplotScript'") + add_test(NAME Persistence_representation_utilities_${plot_utility}_second_gnuplot COMMAND ${GNUPLOT_PATH} + "-e" "load '${CMAKE_CURRENT_BINARY_DIR}/../second.pers${tool_extension}_GnuplotScript'") + endif() +endfunction(add_persistence_representation_plot_utility) + +function(add_persistence_representation_function_utility function_utility tool_extension) + add_executable ( ${function_utility} ${function_utility}.cpp ) + + # ARGV2 is an optional argument + if (${ARGV2}) + # as the function is called in a subdirectory level, need to '../' to find persistence heat maps files + add_test(NAME Persistence_representation_utilities_${function_utility} COMMAND $ + "${ARGV2}" + "${CMAKE_CURRENT_BINARY_DIR}/../first.pers${tool_extension}" + "${CMAKE_CURRENT_BINARY_DIR}/../second.pers${tool_extension}") + else() + # as the function is called in a subdirectory level, need to '../' to find persistence heat maps files + add_test(NAME Persistence_representation_utilities_${function_utility} COMMAND $ + "${CMAKE_CURRENT_BINARY_DIR}/../first.pers${tool_extension}" + "${CMAKE_CURRENT_BINARY_DIR}/../second.pers${tool_extension}") + endif() +endfunction(add_persistence_representation_function_utility) + add_subdirectory(persistence_heat_maps) add_subdirectory(persistence_intervals) add_subdirectory(persistence_landscapes) diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt index 0dd63852..386e9fa5 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt @@ -1,63 +1,15 @@ cmake_minimum_required(VERSION 2.6) project(Persistence_representations_heat_maps_utilities) -file(COPY "${CMAKE_SOURCE_DIR}/data/persistence_diagram/simple_diagram.txt" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") - -add_executable ( create_persistence_heat_maps create_persistence_heat_maps.cpp ) -target_link_libraries(create_persistence_heat_maps ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME create_persistence_heat_maps COMMAND $ - "10" "-1" "-1" "4" "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - - -add_executable ( create_pssk create_pssk.cpp ) -target_link_libraries(create_pssk ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME create_pssk COMMAND $ - "10" "-1" "-1" "4" "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( create_p_h_m_weighted_by_distance_from_diagonal create_p_h_m_weighted_by_distance_from_diagonal.cpp ) -target_link_libraries(create_p_h_m_weighted_by_distance_from_diagonal ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME create_p_h_m_weighted_by_distance_from_diagonal COMMAND $ - "10" "-1" "-1" "4" "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( create_p_h_m_weighted_by_squared_diag_distance create_p_h_m_weighted_by_squared_diag_distance.cpp ) -target_link_libraries(create_p_h_m_weighted_by_squared_diag_distance ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME create_p_h_m_weighted_by_squared_diag_distance COMMAND $ - "10" "-1" "-1" "4" "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( create_p_h_m_weighted_by_arctan_of_their_persistence create_p_h_m_weighted_by_arctan_of_their_persistence.cpp ) -target_link_libraries(create_p_h_m_weighted_by_arctan_of_their_persistence ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME create_p_h_m_weighted_by_arctan_of_their_persistence COMMAND $ - "10" "-1" "-1" "4" "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( average_persistence_heat_maps average_persistence_heat_maps.cpp ) -target_link_libraries(average_persistence_heat_maps ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME average_persistence_heat_maps COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( plot_persistence_heat_map plot_persistence_heat_map.cpp ) -target_link_libraries(plot_persistence_heat_map ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME plot_persistence_heat_map COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( compute_distance_of_persistence_heat_maps compute_distance_of_persistence_heat_maps.cpp ) -target_link_libraries(compute_distance_of_persistence_heat_maps ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME compute_distance_of_persistence_heat_maps COMMAND $ - "1" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( compute_scalar_product_of_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_test(NAME compute_scalar_product_of_persistence_heat_maps COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") +add_persistence_representation_creation_utility(create_pssk "10" "-1" "-1" "4" "-1") +add_persistence_representation_creation_utility(create_p_h_m_weighted_by_arctan_of_their_persistence "10" "-1" "-1" "4" "-1") +add_persistence_representation_creation_utility(create_p_h_m_weighted_by_distance_from_diagonal "10" "-1" "-1" "4" "-1") +add_persistence_representation_creation_utility(create_p_h_m_weighted_by_squared_diag_distance "10" "-1" "-1" "4" "-1") +# Need to set grid min and max for further average, distance and scalar_product +add_persistence_representation_creation_utility(create_persistence_heat_maps "10" "0" "35" "10" "-1") + +add_persistence_representation_plot_utility(plot_persistence_heat_map ".mps") + +add_persistence_representation_function_utility(average_persistence_heat_maps ".mps") +add_persistence_representation_function_utility(compute_distance_of_persistence_heat_maps ".mps" "1") +add_persistence_representation_function_utility(compute_scalar_product_of_persistence_heat_maps ".mps") diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp index 4e81375a..6739e0b6 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp @@ -29,21 +29,20 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; 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 filenames; + std::cout << "This program computes average of persistence heat maps stored in files (the files needs to be " + << "created beforehand).\n" + << "The parameters of this programs are names of files with persistence heat maps.\n"; - if (argc == 1) { - std::cout << "No input files given, the program will now terminate \n"; + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; return 1; } + std::vector filenames; for (int i = 1; i < argc; ++i) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence landscapes...\n"; std::vector maps; for (size_t i = 0; i != filenames.size(); ++i) { Persistence_heat_maps* l = new Persistence_heat_maps; @@ -53,13 +52,12 @@ int main(int argc, char** argv) { 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"; + std::cout << "Average can be found in 'average.mps' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index befb0837..ed8278a2 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -31,11 +31,11 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; int main(int argc, char** argv) { - std::cout << "This program computes distance of persistence heat maps stored in a file (the file needs to be created " - "beforehand). \n"; - std::cout << "The first parameter of a program is an integer p. The program compute L^p distance of the two heat " - "maps. For L^infty distance choose p = -1. \n"; - std::cout << "The remaining parameters of this program are names of files with persistence heat maps.\n"; + std::cout << "This program computes distance of persistence heat maps stored in files (the files needs to be " + << "created beforehand).\n" + << "The first parameter of a program is an integer p. The program compute L^p distance of the two heat " + << "maps. For L^infty distance choose p = -1. \n" + << "The remaining parameters of this program are names of files with persistence heat maps.\n"; if (argc < 3) { std::cout << "Wrong number of parameters, the program will now terminate \n"; @@ -78,7 +78,7 @@ int main(int argc, char** argv) { // and now output the result to the screen and a file: std::ofstream out; - out.open("distance"); + out.open("distance.mps"); for (size_t i = 0; i != distance.size(); ++i) { for (size_t j = 0; j != distance.size(); ++j) { std::cout << distance[i][j] << " "; @@ -89,5 +89,6 @@ int main(int argc, char** argv) { } out.close(); + std::cout << "Distance can be found in 'distance.mps' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp index c684a336..63626853 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp @@ -30,9 +30,14 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; int main(int argc, char** argv) { - std::cout << "This program computes 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::cout << "This program computes scalar product of persistence heat maps stored in a file (the file needs to be " + << "created beforehand). \n" + << "The parameters of this programs are names of files with persistence heat maps.\n"; + + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; + return 1; + } std::vector filenames; for (int i = 1; i < argc; ++i) { @@ -64,7 +69,7 @@ int main(int argc, char** argv) { // and now output the result to the screen and a file: std::ofstream out; - out.open("scalar_product"); + out.open("scalar_product.mps"); for (size_t i = 0; i != scalar_product.size(); ++i) { for (size_t j = 0; j != scalar_product.size(); ++j) { std::cout << scalar_product[i][j] << " "; @@ -75,5 +80,6 @@ int main(int argc, char** argv) { } out.close(); + std::cout << "Distance can be found in 'scalar_product.mps' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp index 2bf185a3..47c70484 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp @@ -32,22 +32,22 @@ using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; 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 arc tangential 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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " - "persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " - "procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." - << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + std::cout << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) " + << "provided as an input.The Gaussian kernels are weighted by the arc tangential of their persistence.\n" + << "The first parameter of a program is an integer, a size of a grid.\n" + << "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" + << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number " + << "of pixels.\n" + << "The fifth parameter of this program is a dimension of persistence that will be used in creation of " + << "the persistence heat maps." + << "If your input files contains persistence pairs of various dimension, as a fifth parameter of the " + << "procedure please provide the dimension of persistence you want to use." + << "If in your files there are only birth-death pairs of the same dimension, set the fifth parameter to " + << "-1.\n" + << "The remaining parameters are the names of files with persistence diagrams. \n"; - if (argc < 5) { + if (argc < 7) { std::cout << "Wrong parameter list, the program will now terminate \n"; return 1; } @@ -68,9 +68,7 @@ int main(int argc, char** argv) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence heat maps...\n"; std::vector > filter = Gudhi::Persistence_representations::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, false, size_of_grid, min_, max_, dimension); @@ -79,6 +77,5 @@ int main(int argc, char** argv) { ss << filenames[i] << ".mps"; l.print_to_file(ss.str().c_str()); } - std::cout << "Done \n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp index ec9477f1..659a5105 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp @@ -32,22 +32,23 @@ using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; 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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " - "persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " - "procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." - << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + std::cout << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) " + << "provided as an input.The Gaussian kernels are weighted by the distance of a center from the " + << "diagonal.\n" + << "The first parameter of a program is an integer, a size of a grid.\n" + << "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" + << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number " + << "of pixels.\n" + << "The fifth parameter of this program is a dimension of persistence that will be used in creation of " + << "the persistence heat maps." + << "If your input files contains persistence pairs of various dimension, as a fifth parameter of the " + << "procedure please provide the dimension of persistence you want to use." + << "If in your files there are only birth-death pairs of the same dimension, set the fifth parameter to " + << "-1.\n" + << "The remaining parameters are the names of files with persistence diagrams. \n"; - if (argc < 5) { + if (argc < 7) { std::cout << "Wrong parameter list, the program will now terminate \n"; return 1; } @@ -68,9 +69,7 @@ int main(int argc, char** argv) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence heat maps...\n"; std::vector > filter = Gudhi::Persistence_representations::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, false, size_of_grid, min_, max_, dimension); @@ -79,6 +78,5 @@ int main(int argc, char** argv) { ss << filenames[i] << ".mps"; l.print_to_file(ss.str().c_str()); } - std::cout << "Done \n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index ffec8b3d..9497b188 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -33,22 +33,23 @@ using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; 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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " - "persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " - "procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." - << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + std::cout << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) " + << "provided as an input.The Gaussian kernels are weighted by the square of distance of a center from the " + << "diagonal.\n" + << "The first parameter of a program is an integer, a size of a grid.\n" + << "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" + << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number " + << "of pixels.\n" + << "The fifth parameter of this program is a dimension of persistence that will be used in creation of " + << "the persistence heat maps." + << "If your input files contains persistence pairs of various dimension, as a fifth parameter of the " + << "procedure please provide the dimension of persistence you want to use." + << "If in your files there are only birth-death pairs of the same dimension, set the fifth parameter to " + << "-1.\n" + << "The remaining parameters are the names of files with persistence diagrams. \n"; - if (argc < 5) { + if (argc < 7) { std::cout << "Wrong parameter list, the program will now terminate \n"; return 1; } @@ -69,9 +70,7 @@ int main(int argc, char** argv) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence heat maps...\n"; std::vector > filter = Gudhi::Persistence_representations::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, false, size_of_grid, min_, max_, dimension); @@ -80,6 +79,5 @@ int main(int argc, char** argv) { ss << filenames[i] << ".mps"; l.print_to_file(ss.str().c_str()); } - std::cout << "Done \n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index db2f0008..25cd1067 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -31,21 +31,22 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; 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 << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) " + << "provided as an input.\n" + << "The first parameter of a program is an integer, a size of a grid.\n" + << "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" + << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number " + << "of pixels.\n" + << "The fifth parameter of this program is a dimension of persistence that will be used in creation of " + << "the persistence heat maps." + << "If your input files contains persistence pairs of various dimension, as a fifth parameter of the " + << "procedure please provide the dimension of persistence you want to use." + << "If in your files there are only birth-death pairs of the same dimension, set the fifth parameter to " + << "-1.\n" + << "The remaining parameters are the names of files with persistence diagrams. \n"; - std::cout << "The fifth parameter of this program is a dimension of persistence that will be used in creation of the " - "persistence heat maps."; - std::cout << "If your input file contains persistence pairs of various dimension, as a fifth parameter of the " - "procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." - << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; - if (argc < 5) { + if (argc < 7) { std::cout << "Wrong parameter list, the program will now terminate \n"; return 1; } @@ -64,17 +65,14 @@ int main(int argc, char** argv) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence heat maps...\n"; std::vector > filter = Gudhi::Persistence_representations::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; + std::cout << "Creating a heat map based on file : " << filenames[i] << std::endl; Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension); 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/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp index 6aefbb00..97ddb8f0 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -30,21 +30,22 @@ using PSSK = Gudhi::Persistence_representations::PSSK; 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 fifth parameter of this program is a dimension of persistence that will be used in creation of the " - "persistence heat maps."; - std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the " - "procedure please provide the dimension of persistence you want to use."; - std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." - << std::endl; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + std::cout << "This program creates PSSK files (*.pssk) of persistence diagrams files (*.pers) " + << "provided as an input.\n" + << "The first parameter of a program is an integer, a size of a grid.\n" + << "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" + << "The fourth parameter is an integer, the standard deviation of a Gaussian kernel expressed in a number " + << "of pixels.\n" + << "The fifth parameter of this program is a dimension of persistence that will be used in creation of " + << "the PSSK." + << "If your input files contains persistence pairs of various dimension, as a fifth parameter of the " + << "procedure please provide the dimension of persistence you want to use." + << "If in your files there are only birth-death pairs of the same dimension, set the first parameter to " + << "-1.\n" + << "The remaining parameters are the names of files with persistence diagrams. \n"; - if (argc < 5) { + if (argc < 7) { std::cout << "Wrong parameter list, the program will now terminate \n"; return 1; } @@ -65,17 +66,14 @@ int main(int argc, char** argv) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence heat maps...\n"; std::vector > filter = Gudhi::Persistence_representations::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; + std::cout << "Creating a PSSK based on a file : " << filenames[i] << std::endl; PSSK l(filenames[i], filter, size_of_grid, min_, max_, dimension); 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/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index a7c9f2d8..63711d83 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -29,8 +29,12 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps; 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 landscape file \n"; + std::cout << "This program creates a gnuplot script from a persistence heat maps stored in a file (the file needs " + << "to be created beforehand). Please call the code with the name of a single heat maps file \n"; + if (argc != 2) { + std::cout << "Wrong parameter list, the program will now terminate \n"; + return 1; + } Persistence_heat_maps l; l.load_from_file(argv[1]); l.plot(argv[1]); diff --git a/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt index 105b7efb..2ba6efe5 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt @@ -4,38 +4,32 @@ project(Persistence_representations_intervals_utilities) file(COPY "${CMAKE_SOURCE_DIR}/data/persistence_diagram/simple_diagram.txt" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") add_executable ( plot_persistence_intervals plot_persistence_intervals.cpp ) -target_link_libraries( plot_persistence_intervals ${Boost_SYSTEM_LIBRARY}) add_test(NAME plot_persistence_intervals COMMAND $ "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") add_executable ( compute_birth_death_range_in_persistence_diagram compute_birth_death_range_in_persistence_diagram.cpp ) -target_link_libraries( compute_birth_death_range_in_persistence_diagram ${Boost_SYSTEM_LIBRARY}) add_test(NAME compute_birth_death_range_in_persistence_diagram COMMAND $ "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") add_executable ( compute_number_of_dominant_intervals compute_number_of_dominant_intervals.cpp ) -target_link_libraries( compute_number_of_dominant_intervals ${Boost_SYSTEM_LIBRARY}) add_test(NAME compute_number_of_dominant_intervals COMMAND $ "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt" "-1" "2") add_executable ( plot_histogram_of_intervals_lengths plot_histogram_of_intervals_lengths.cpp ) -target_link_libraries( plot_histogram_of_intervals_lengths ${Boost_SYSTEM_LIBRARY}) add_test(NAME plot_histogram_of_intervals_lengths COMMAND $ "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt" "2") add_executable ( plot_persistence_Betti_numbers plot_persistence_Betti_numbers.cpp ) -target_link_libraries( plot_persistence_Betti_numbers ${Boost_SYSTEM_LIBRARY}) add_test(NAME plot_persistence_Betti_numbers COMMAND $ "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) add_executable ( compute_bottleneck_distance compute_bottleneck_distance.cpp ) - target_link_libraries( compute_bottleneck_distance ${Boost_SYSTEM_LIBRARY}) if (TBB_FOUND) target_link_libraries(compute_bottleneck_distance ${TBB_LIBRARIES}) endif(TBB_FOUND) diff --git a/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt index baf8de3c..d7087ed8 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt @@ -1,38 +1,10 @@ cmake_minimum_required(VERSION 2.6) -project(Persistence_representations_lanscapes_utilities) +project(Persistence_representations_landscapes_utilities) -file(COPY "${CMAKE_SOURCE_DIR}/data/persistence_diagram/simple_diagram.txt" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") +add_persistence_representation_creation_utility(create_landscapes "-1") -add_executable ( create_landscapes create_landscapes.cpp ) -target_link_libraries(create_landscapes ${Boost_SYSTEM_LIBRARY}) +add_persistence_representation_plot_utility(plot_landscapes ".land") -# Will create simple_diagram.txt.land -add_test(NAME create_landscapes COMMAND $ - "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( average_landscapes average_landscapes.cpp ) -target_link_libraries(average_landscapes ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME average_landscapes COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( plot_landscapes plot_landscapes.cpp ) -target_link_libraries(plot_landscapes ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME plot_landscapes COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( compute_distance_of_landscapes compute_distance_of_landscapes.cpp ) -target_link_libraries(compute_distance_of_landscapes ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME compute_distance_of_landscapes COMMAND $ - "1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.land" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.land") - -add_executable ( compute_scalar_product_of_landscapes compute_scalar_product_of_landscapes.cpp ) -target_link_libraries(compute_scalar_product_of_landscapes ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME compute_scalar_product_of_landscapes COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.land" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.land") +add_persistence_representation_function_utility(average_landscapes ".land") +add_persistence_representation_function_utility(compute_distance_of_landscapes ".land" "1") +add_persistence_representation_function_utility(compute_scalar_product_of_landscapes ".land") diff --git a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp index 526130e9..1a59be8c 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp @@ -28,14 +28,13 @@ using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; 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::cout << "This program computes average of persistence landscapes stored in files (the files needs to be " + << "created beforehand).\n" + << "The parameters of this programs are names of files with persistence landscapes.\n"; std::vector filenames; - if (argc == 1) { - std::cout << "No input files given, the program will now terminate \n"; + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; return 1; } @@ -43,7 +42,6 @@ int main(int argc, char** argv) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence landscapes...\n"; std::vector lands; for (size_t i = 0; i != filenames.size(); ++i) { Persistence_landscape* l = new Persistence_landscape; @@ -60,7 +58,6 @@ int main(int argc, char** argv) { delete lands[i]; } - std::cout << "Done \n"; - + std::cout << "Average can be found in 'average.land' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index b3881d6a..5062f521 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -30,11 +30,11 @@ using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; 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 integer 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."; + std::cout << "This program computes distance of persistence landscapes stored in files (the files needs to be " + << "created beforehand).\n" + << "The first parameter of a program is an integer p. The program compute L^p distance of the two heat " + << "maps. For L^infty distance choose p = -1. \n" + << "The remaining parameters of this program are names of files with persistence landscapes.\n"; if (argc < 3) { std::cout << "Wrong number of parameters, the program will now terminate \n"; @@ -54,7 +54,6 @@ int main(int argc, char** argv) { std::vector 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); @@ -78,7 +77,7 @@ int main(int argc, char** argv) { // and now output the result to the screen and a file: std::ofstream out; - out.open("distance"); + out.open("distance.land"); for (size_t i = 0; i != distance.size(); ++i) { for (size_t j = 0; j != distance.size(); ++j) { std::cout << distance[i][j] << " "; @@ -89,5 +88,6 @@ int main(int argc, char** argv) { } out.close(); + std::cout << "Distance can be found in 'distance.land' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp index 8dad7b4d..5b5e9fa3 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp @@ -29,9 +29,14 @@ using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; 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::cout << "This program computes scalar product of persistence landscapes stored in a file (the file needs to be " + << "created beforehand). \n" + << "The 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; + } std::vector filenames; for (int i = 1; i < argc; ++i) { @@ -40,7 +45,6 @@ int main(int argc, char** argv) { std::vector 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); @@ -64,7 +68,7 @@ int main(int argc, char** argv) { // and now output the result to the screen and a file: std::ofstream out; - out.open("scalar_product"); + out.open("scalar_product.land"); for (size_t i = 0; i != scalar_product.size(); ++i) { for (size_t j = 0; j != scalar_product.size(); ++j) { std::cout << scalar_product[i][j] << " "; @@ -75,5 +79,6 @@ int main(int argc, char** argv) { } out.close(); + std::cout << "Distance can be found in 'scalar_product.land' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp index 325081d1..6030e994 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp @@ -30,13 +30,20 @@ using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; int main(int argc, char** argv) { - std::cout << "This program creates persistence landscapes of diagrams provided as an input. \n"; - std::cout << "The first parameter of the program is the dimension of persistence to be used to construct persistence " - "landscapes. If your file contains "; - std::cout << "the information about dimension of persistence pairs, please provide here the dimension of persistence " - "pairs you want to use. If your input files consist only "; - std::cout << "of birth-death pairs, please set this first parameter to -1 \n"; - std::cout << "The remaining parameters of the program are the names of files with persistence diagrams. \n"; + std::cout << "This program creates persistence landscapes files (*.land) of persistence diagrams files (*.pers) " + << "provided as an input.\n" + << "The first parameter of this program is a dimension of persistence that will be used in creation of " + << "the persistence heat maps." + << "If your input files contains persistence pairs of various dimension, as a first parameter of the " + << "procedure please provide the dimension of persistence you want to use." + << "If in your files there are only birth-death pairs of the same dimension, set the first parameter to " + << "-1.\n" + << "The remaining parameters are the names of files with persistence diagrams. \n"; + + if (argc < 3) { + std::cout << "Wrong parameter list, the program will now terminate \n"; + return 1; + } std::vector filenames; int dim = atoi(argv[1]); unsigned dimension = std::numeric_limits::max(); @@ -47,13 +54,12 @@ int main(int argc, char** argv) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence landscapes...\n"; for (size_t i = 0; i != filenames.size(); ++i) { + std::cout << "Creating a landscape based on file : " << filenames[i] << std::endl; Persistence_landscape l(filenames[i], dimension); 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/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp index ebdb20a1..c797a7a8 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -28,16 +28,16 @@ using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape; 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 landscape file \n"; + std::cout << "This program creates a gnuplot script from a persistence landscape stored in a file (the file needs " + << "to be created beforehand). Please call the code with the name of a single landscape file.\n"; + if (argc != 2) { + std::cout << "Wrong parameter list, the program will now terminate \n"; + return 1; + } + 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"; + l.plot(argv[1]); return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt index 55a4fd50..c5ea4bbf 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt @@ -1,38 +1,11 @@ cmake_minimum_required(VERSION 2.6) project(Persistence_representations_lanscapes_on_grid_utilities) -file(COPY "${CMAKE_SOURCE_DIR}/data/persistence_diagram/simple_diagram.txt" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") +# Need to set grid min and max for further average, distance and scalar_product +add_persistence_representation_creation_utility(create_landscapes_on_grid "100" "0" "35" "-1") -add_executable ( create_landscapes_on_grid create_landscapes_on_grid.cpp ) -target_link_libraries(create_landscapes_on_grid ${Boost_SYSTEM_LIBRARY}) +add_persistence_representation_plot_utility(plot_landscapes_on_grid ".g_land") -# Will create simple_diagram.txt.land -add_test(NAME create_landscapes_on_grid COMMAND $ - "100" "-1" "-1" "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( average_landscapes_on_grid average_landscapes_on_grid.cpp ) -target_link_libraries(average_landscapes_on_grid ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME average_landscapes_on_grid COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.g_land" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.g_land") - -add_executable ( plot_landscapes_on_grid plot_landscapes_on_grid.cpp ) -target_link_libraries(plot_landscapes_on_grid ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME plot_landscapes_on_grid COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.g_land") - -add_executable ( compute_distance_of_landscapes_on_grid compute_distance_of_landscapes_on_grid.cpp ) -target_link_libraries(compute_distance_of_landscapes_on_grid ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME compute_distance_of_landscapes_on_grid COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.g_land" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.g_land") - -add_executable ( compute_scalar_product_of_landscapes_on_grid compute_scalar_product_of_landscapes_on_grid.cpp ) -target_link_libraries(compute_scalar_product_of_landscapes_on_grid ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME compute_scalar_product_of_landscapes_on_grid COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.g_land" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.g_land") +add_persistence_representation_function_utility(average_landscapes_on_grid ".g_land") +add_persistence_representation_function_utility(compute_distance_of_landscapes_on_grid ".g_land" "1") +add_persistence_representation_function_utility(compute_scalar_product_of_landscapes_on_grid ".g_land") diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp index d50118a0..0b098d1a 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp @@ -28,21 +28,20 @@ using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; 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 filenames; + std::cout << "This program computes average of persistence landscapes on grid stored in files (the files needs to " + << "be created beforehand).\n" + << "The parameters of this programs are names of files with persistence landscapes on grid.\n"; - if (argc == 1) { - std::cout << "No input files given, the program will now terminate \n"; + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; return 1; } + std::vector filenames; for (int i = 1; i < argc; ++i) { filenames.push_back(argv[i]); } - std::cout << "Creating persistence landscapes...\n"; std::vector lands; for (size_t i = 0; i != filenames.size(); ++i) { Persistence_landscape_on_grid* l = new Persistence_landscape_on_grid; @@ -59,7 +58,6 @@ int main(int argc, char** argv) { delete lands[i]; } - std::cout << "Done \n"; - + std::cout << "Average can be found in 'average.g_land' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index 859c6991..fd0fcd15 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -30,11 +30,11 @@ using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; int main(int argc, char** argv) { - std::cout << "This program compute distance 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 integer p. The program compute L^p distance of 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"; + std::cout << "This program computes distance of persistence landscapes on grid stored in files (the files needs to " + << "be created beforehand).\n" + << "The first parameter of a program is an integer p. The program compute L^p distance of the two heat " + << "maps. For L^infty distance choose p = -1. \n" + << "The remaining parameters of this program 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"; @@ -77,7 +77,7 @@ int main(int argc, char** argv) { // and now output the result to the screen and a file: std::ofstream out; - out.open("distance"); + out.open("distance.g_land"); for (size_t i = 0; i != distance.size(); ++i) { for (size_t j = 0; j != distance.size(); ++j) { std::cout << distance[i][j] << " "; @@ -88,5 +88,6 @@ int main(int argc, char** argv) { } out.close(); + std::cout << "Distance can be found in 'distance.g_land' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp index e95bf8ad..e2222487 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp @@ -29,9 +29,14 @@ using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; 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::cout << "This program computes scalar product of persistence landscapes on grid stored in a file (the file needs to " + << "be created beforehand). \n" + << "The 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; + } std::vector filenames; for (int i = 1; i < argc; ++i) { @@ -63,7 +68,7 @@ int main(int argc, char** argv) { // and now output the result to the screen and a file: std::ofstream out; - out.open("scalar_product"); + out.open("scalar_product.g_land"); for (size_t i = 0; i != scalar_product.size(); ++i) { for (size_t j = 0; j != scalar_product.size(); ++j) { std::cout << scalar_product[i][j] << " "; @@ -74,5 +79,6 @@ int main(int argc, char** argv) { } out.close(); + std::cout << "Distance can be found in 'scalar_product.g_land' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index 8d747c14..2827f982 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -30,22 +30,25 @@ using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; 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 fourth parameter of the program is the dimension of persistence to be used to construct " - "persistence landscape on a grid. If your file contains "; - std::cout << "the information about dimension of birth-death pairs, please provide here the dimension of intervals " - "you want to use. If your input files consist only "; - std::cout << "of birth-death pairs, please set the fourth parameter to -1 \n"; - std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; + std::cout << "This program creates persistence landscapes on grid files (*.g_land) of persistence diagrams files " + << "(*.pers) provided as an input.\n" + << "The first parameter of a program is an integer, a size of a grid.\n" + << "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" + << "The fourth parameter of this program is a dimension of persistence that will be used in creation of " + << "the persistence heat maps." + << "If your input files contains persistence pairs of various dimension, as a fourth parameter of the " + << "procedure please provide the dimension of persistence you want to use." + << "If in your files there are only birth-death pairs of the same dimension, set the fourth parameter to " + << "-1.\n" + << "The remaining parameters are the names of files with persistence diagrams. \n"; - if (argc < 5) { + if (argc < 6) { 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]); @@ -60,7 +63,6 @@ int main(int argc, char** argv) { 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; @@ -74,6 +76,5 @@ int main(int argc, char** argv) { ss << filenames[i] << ".g_land"; l.print_to_file(ss.str().c_str()); } - std::cout << "Done \n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index 42822a01..dddb3615 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -28,20 +28,17 @@ using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid; 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 landscape on grid file \n"; - if (argc == 1) { - std::cout << "Wrong parameters of a program call, the program will now terminate \n"; + std::cout << "This program creates a gnuplot script from a persistence landscape on grid stored in a file (the file " + << "needs to be created beforehand). Please call the code with the name of a single landscape on grid file" + << ".\n"; + if (argc != 2) { + std::cout << "Wrong parameter list, 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"; + l.plot(argv[1]); return 0; } diff --git a/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt index e3d1013b..a401c955 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt @@ -1,38 +1,10 @@ cmake_minimum_required(VERSION 2.6) project(Persistence_vectors_utilities) -file(COPY "${CMAKE_SOURCE_DIR}/data/persistence_diagram/simple_diagram.txt" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") +add_persistence_representation_creation_utility(create_persistence_vectors "-1") -add_executable ( create_persistence_vectors create_persistence_vectors.cpp ) -target_link_libraries(create_persistence_vectors ${Boost_SYSTEM_LIBRARY}) +add_persistence_representation_plot_utility(plot_persistence_vectors ".vect") -# Will create simple_diagram.txt.vect -add_test(NAME create_persistence_vectors COMMAND $ - "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt") - -add_executable ( average_persistence_vectors average_persistence_vectors.cpp ) -target_link_libraries(average_persistence_vectors ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME average_persistence_vectors COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.vect" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.vect") - -add_executable ( compute_distance_of_persistence_vectors compute_distance_of_persistence_vectors.cpp ) -target_link_libraries(compute_distance_of_persistence_vectors ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME compute_distance_of_persistence_vectors COMMAND $ - "-1" "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.vect" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.vect") - -add_executable ( compute_scalar_product_of_persistence_vectors compute_scalar_product_of_persistence_vectors.cpp ) -target_link_libraries(compute_scalar_product_of_persistence_vectors ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME compute_scalar_product_of_persistence_vectors COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.vect" - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.vect") - -add_executable ( plot_persistence_vectors plot_persistence_vectors.cpp ) -target_link_libraries(plot_persistence_vectors ${Boost_SYSTEM_LIBRARY}) - -add_test(NAME plot_persistence_vectors COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/simple_diagram.txt.vect") +add_persistence_representation_function_utility(average_persistence_vectors ".vect") +add_persistence_representation_function_utility(compute_distance_of_persistence_vectors ".vect" "1") +add_persistence_representation_function_utility(compute_scalar_product_of_persistence_vectors ".vect") diff --git a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp index 366ee2bc..8de7725c 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp @@ -30,21 +30,20 @@ using Vector_distances_in_diagram = Gudhi::Persistence_representations::Vector_distances_in_diagram; 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 filenames; + std::cout << "This program computes average of persistence vectors stored in files (the files needs to " + << "be created beforehand).\n" + << "The parameters of this programs are names of files with persistence vectors.\n"; - if (argc == 1) { - std::cout << "No input files given, the program will now terminate \n"; + if (argc < 3) { + std::cout << "Wrong number of parameters, the program will now terminate \n"; return 1; } + std::vector filenames; for (int i = 1; i < argc; ++i) { filenames.push_back(argv[i]); } - std::cout << "Reading persistence vectors...\n"; std::vector lands; for (size_t i = 0; i != filenames.size(); ++i) { Vector_distances_in_diagram* l = new Vector_distances_in_diagram; diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index 3aed297e..f8b71e5b 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -79,7 +79,7 @@ int main(int argc, char** argv) { // and now output the result to the screen and a file: std::ofstream out; - out.open("distance"); + out.open("distance.vect"); for (size_t i = 0; i != distance.size(); ++i) { for (size_t j = 0; j != distance.size(); ++j) { std::cout << distance[i][j] << " "; @@ -90,5 +90,6 @@ int main(int argc, char** argv) { } out.close(); + std::cout << "Distance can be found in 'distance.vect' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp index d9ad4360..bda0b61b 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp @@ -32,9 +32,14 @@ using Vector_distances_in_diagram = Gudhi::Persistence_representations::Vector_distances_in_diagram; 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::cout << "This program computes scalar product of persistence vectors stored in a file (the file needs to " + << "be created beforehand). \n" + << "The 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; + } std::vector filenames; for (int i = 1; i < argc; ++i) { @@ -66,7 +71,7 @@ int main(int argc, char** argv) { // and now output the result to the screen and a file: std::ofstream out; - out.open("scalar_product"); + out.open("scalar_product.vect"); for (size_t i = 0; i != scalar_product.size(); ++i) { for (size_t j = 0; j != scalar_product.size(); ++j) { std::cout << scalar_product[i][j] << " "; @@ -76,5 +81,7 @@ int main(int argc, char** argv) { out << std::endl; } out.close(); + + std::cout << "Distance can be found in 'scalar_product.vect' file\n"; return 0; } diff --git a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp index b618ca67..753675cb 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -32,13 +32,21 @@ using Vector_distances_in_diagram = Gudhi::Persistence_representations::Vector_distances_in_diagram; int main(int argc, char** argv) { - std::cout << "This program creates persistence vectors of diagrams provided as an input. The first parameter of this " - "program is a dimension of persistence "; - std::cout << " that will be used in creation of the persistence vectors. If our input files contain persistence " - "pairs of various dimension, as a second parameter of the "; - std::cout << " procedure please provide the dimension of persistence you want to use. If in your file there are only " - "birth-death pairs of the same dimension, set the first parameter to -1." - << std::endl; + std::cout << "This program creates persistence vectors files (*.vect) of persistence diagrams files (*.pers) " + << "provided as an input.\n" + << "The first parameter of this program is a dimension of persistence that will be used in creation of " + << "the persistence heat maps." + << "If your input files contains persistence pairs of various dimension, as a first parameter of the " + << "procedure please provide the dimension of persistence you want to use." + << "If in your files there are only birth-death pairs of the same dimension, set the first parameter to " + << "-1.\n" + << "The remaining parameters are the names of files with persistence diagrams. \n"; + + if (argc < 3) { + std::cout << "Wrong parameter list, the program will now terminate \n"; + return 1; + } + std::cout << "The remaining parameters are the names of files with persistence diagrams. \n"; int dim = atoi(argv[1]); unsigned dimension = std::numeric_limits::max(); @@ -58,6 +66,5 @@ int main(int argc, char** argv) { ss << filenames[i] << ".vect"; l.print_to_file(ss.str().c_str()); } - std::cout << "Done \n"; return 0; } diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 8269c3bf..e44bbe04 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -85,7 +85,6 @@ FIND_PROGRAM( GCOVR_PATH gcovr ) if (GCOVR_PATH) message("gcovr found in ${GCOVR_PATH}") endif() -# Required programs for unitary tests purpose FIND_PROGRAM( GPROF_PATH gprof ) if (GPROF_PATH) message("gprof found in ${GPROF_PATH}") @@ -94,6 +93,10 @@ FIND_PROGRAM( DIFF_PATH diff ) if (DIFF_PATH) message("diff found in ${DIFF_PATH}") endif() +FIND_PROGRAM( GNUPLOT_PATH gnuplot ) +if (GNUPLOT_PATH) + message("gnuplot found in ${GNUPLOT_PATH}") +endif() # BOOST ISSUE result_of vs C++11 add_definitions(-DBOOST_RESULT_OF_USE_DECLTYPE) -- cgit v1.2.3 From 4869d669f029886586d6211b40c8c549da85207b Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 26 Apr 2018 15:54:12 +0000 Subject: Fix Copyrights git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/copyright_clarification_vincent@3400 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ff348beedf92656c6913c2a1df983b5804b33988 --- .../concept/SimplicialComplexForAlpha.h | 2 +- src/Alpha_complex/doc/COPYRIGHT | 2 +- src/Alpha_complex/doc/Intro_alpha_complex.h | 2 +- src/Alpha_complex/include/gudhi/Alpha_complex.h | 2 +- src/Alpha_complex/test/Alpha_complex_unit_test.cpp | 2 +- .../utilities/alpha_complex_3d_helper.h | 2 +- .../utilities/alpha_complex_3d_persistence.cpp | 2 +- .../utilities/alpha_complex_persistence.cpp | 22 +++++++++++++++++++++ .../exact_alpha_complex_3d_persistence.cpp | 2 +- .../periodic_alpha_complex_3d_persistence.cpp | 2 +- .../weighted_alpha_complex_3d_persistence.cpp | 2 +- ...ghted_periodic_alpha_complex_3d_persistence.cpp | 2 +- src/Bitmap_cubical_complex/doc/COPYRIGHT | 2 +- .../doc/Gudhi_Cubical_Complex_doc.h | 2 +- .../example/Random_bitmap_cubical_complex.cpp | 2 +- .../include/gudhi/Bitmap_cubical_complex.h | 2 +- .../include/gudhi/Bitmap_cubical_complex/counter.h | 2 +- .../include/gudhi/Bitmap_cubical_complex_base.h | 2 +- ...cal_complex_periodic_boundary_conditions_base.h | 2 +- src/Bitmap_cubical_complex/test/Bitmap_test.cpp | 2 +- .../utilities/cubical_complex_persistence.cpp | 2 +- .../periodic_cubical_complex_persistence.cpp | 2 +- .../benchmark/bottleneck_chrono.cpp | 2 +- .../concept/Persistence_diagram.h | 2 +- src/Bottleneck_distance/doc/COPYRIGHT | 2 +- .../doc/Intro_bottleneck_distance.h | 2 +- .../alpha_rips_persistence_bottleneck_distance.cpp | 2 +- .../example/bottleneck_basic_example.cpp | 2 +- src/Bottleneck_distance/include/gudhi/Bottleneck.h | 2 +- .../include/gudhi/Graph_matching.h | 2 +- .../include/gudhi/Internal_point.h | 2 +- .../include/gudhi/Neighbors_finder.h | 2 +- .../include/gudhi/Persistence_graph.h | 2 +- .../test/bottleneck_unit_test.cpp | 2 +- .../utilities/bottleneck_distance.cpp | 2 +- src/Contraction/doc/COPYRIGHT | 2 +- src/Contraction/example/Garland_heckbert.cpp | 2 +- .../example/Garland_heckbert/Error_quadric.h | 2 +- src/Contraction/example/Rips_contraction.cpp | 2 +- .../include/gudhi/Contraction/Edge_profile.h | 2 +- .../Contraction/policies/Contraction_visitor.h | 2 +- .../gudhi/Contraction/policies/Cost_policy.h | 2 +- .../Contraction/policies/Dummy_valid_contraction.h | 2 +- .../gudhi/Contraction/policies/Edge_length_cost.h | 2 +- .../Contraction/policies/First_vertex_placement.h | 2 +- .../policies/Link_condition_valid_contraction.h | 2 +- .../gudhi/Contraction/policies/Middle_placement.h | 2 +- .../gudhi/Contraction/policies/Placement_policy.h | 2 +- .../policies/Valid_contraction_policy.h | 2 +- src/Contraction/include/gudhi/Edge_contraction.h | 2 +- .../include/gudhi/Skeleton_blocker_contractor.h | 2 +- src/GudhUI/gui/MainWindow.cpp | 2 +- src/GudhUI/gui/MainWindow.h | 2 +- src/GudhUI/gui/Menu_edge_contraction.cpp | 2 +- src/GudhUI/gui/Menu_edge_contraction.h | 2 +- src/GudhUI/gui/Menu_k_nearest_neighbors.cpp | 2 +- src/GudhUI/gui/Menu_k_nearest_neighbors.h | 2 +- src/GudhUI/gui/Menu_persistence.cpp | 2 +- src/GudhUI/gui/Menu_persistence.h | 2 +- src/GudhUI/gui/Menu_uniform_neighbors.cpp | 2 +- src/GudhUI/gui/Menu_uniform_neighbors.h | 2 +- src/GudhUI/gui/gudhui.cpp | 4 ++-- src/GudhUI/model/Complex_typedefs.h | 2 +- src/GudhUI/model/Model.h | 2 +- src/GudhUI/utils/Bar_code_persistence.h | 23 ++++++++++++++++++++++ src/GudhUI/utils/Critical_points.h | 2 +- src/GudhUI/utils/Edge_collapsor.h | 2 +- src/GudhUI/utils/Edge_contractor.h | 2 +- src/GudhUI/utils/Furthest_point_epsilon_net.h | 2 +- src/GudhUI/utils/Is_manifold.h | 2 +- src/GudhUI/utils/K_nearest_builder.h | 2 +- src/GudhUI/utils/Lloyd_builder.h | 2 +- src/GudhUI/utils/MClock.h | 2 +- src/GudhUI/utils/Persistence_compute.h | 2 +- src/GudhUI/utils/Rips_builder.h | 2 +- src/GudhUI/utils/UI_utils.h | 2 +- src/GudhUI/utils/Vertex_collapsor.h | 2 +- src/GudhUI/view/Color.h | 2 +- src/GudhUI/view/FirstCoordProjector.h | 2 +- src/GudhUI/view/Projector3D.h | 2 +- src/GudhUI/view/View_parameter.h | 2 +- src/GudhUI/view/Viewer.cpp | 2 +- src/GudhUI/view/Viewer.h | 2 +- src/GudhUI/view/Viewer_instructor.cpp | 2 +- src/GudhUI/view/Viewer_instructor.h | 2 +- src/Hasse_complex/include/gudhi/Hasse_complex.h | 2 +- src/Nerve_GIC/doc/COPYRIGHT | 2 +- src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 2 +- src/Nerve_GIC/example/CoordGIC.cpp | 2 +- src/Nerve_GIC/example/FuncGIC.cpp | 2 +- src/Nerve_GIC/include/gudhi/GIC.h | 2 +- src/Nerve_GIC/test/test_GIC.cpp | 2 +- .../utilities/KeplerMapperVisuFromTxtFile.py | 4 ++-- src/Nerve_GIC/utilities/Nerve.cpp | 2 +- src/Nerve_GIC/utilities/VoronoiGIC.cpp | 2 +- .../concept/Real_valued_topological_data.h | 2 +- .../concept/Topological_data_with_averages.h | 2 +- .../concept/Topological_data_with_distances.h | 2 +- .../concept/Topological_data_with_scalar_product.h | 2 +- .../concept/Vectorized_topological_data.h | 2 +- .../doc/Persistence_representations_doc.h | 2 +- .../example/persistence_heat_maps.cpp | 2 +- .../example/persistence_intervals.cpp | 2 +- .../example/persistence_landscape.cpp | 2 +- .../example/persistence_landscape_on_grid.cpp | 2 +- .../example/persistence_vectors.cpp | 2 +- .../include/gudhi/PSSK.h | 2 +- .../include/gudhi/Persistence_heat_maps.h | 2 +- .../include/gudhi/Persistence_intervals.h | 2 +- .../gudhi/Persistence_intervals_with_distances.h | 2 +- .../include/gudhi/Persistence_landscape.h | 2 +- .../include/gudhi/Persistence_landscape_on_grid.h | 2 +- .../include/gudhi/Persistence_vectors.h | 2 +- .../gudhi/common_persistence_representations.h | 2 +- .../include/gudhi/read_persistence_from_file.h | 2 +- .../test/persistence_heat_maps_test.cpp | 2 +- .../test/persistence_intervals_test.cpp | 2 +- .../persistence_intervals_with_distances_test.cpp | 2 +- .../test/persistence_lanscapes_on_grid_test.cpp | 2 +- .../test/persistence_lanscapes_test.cpp | 2 +- .../test/read_persistence_from_file_test.cpp | 2 +- .../test/vector_representation_test.cpp | 2 +- .../average_persistence_heat_maps.cpp | 2 +- .../compute_distance_of_persistence_heat_maps.cpp | 2 +- ...ute_scalar_product_of_persistence_heat_maps.cpp | 2 +- ...h_m_weighted_by_arctan_of_their_persistence.cpp | 2 +- ...te_p_h_m_weighted_by_distance_from_diagonal.cpp | 2 +- ...ate_p_h_m_weighted_by_squared_diag_distance.cpp | 2 +- .../create_persistence_heat_maps.cpp | 2 +- .../persistence_heat_maps/create_pssk.cpp | 2 +- .../plot_persistence_heat_map.cpp | 2 +- ...te_birth_death_range_in_persistence_diagram.cpp | 2 +- .../compute_bottleneck_distance.cpp | 2 +- .../compute_number_of_dominant_intervals.cpp | 2 +- .../plot_histogram_of_intervals_lengths.cpp | 2 +- .../plot_persistence_Betti_numbers.cpp | 2 +- .../plot_persistence_intervals.cpp | 2 +- .../persistence_landscapes/average_landscapes.cpp | 2 +- .../compute_distance_of_landscapes.cpp | 2 +- .../compute_scalar_product_of_landscapes.cpp | 2 +- .../persistence_landscapes/create_landscapes.cpp | 2 +- .../persistence_landscapes/plot_landscapes.cpp | 2 +- .../average_landscapes_on_grid.cpp | 2 +- .../compute_distance_of_landscapes_on_grid.cpp | 2 +- ...ompute_scalar_product_of_landscapes_on_grid.cpp | 2 +- .../create_landscapes_on_grid.cpp | 2 +- .../plot_landscapes_on_grid.cpp | 2 +- .../average_persistence_vectors.cpp | 2 +- .../compute_distance_of_persistence_vectors.cpp | 2 +- ...mpute_scalar_product_of_persistence_vectors.cpp | 2 +- .../create_persistence_vectors.cpp | 2 +- .../plot_persistence_vectors.cpp | 2 +- .../benchmark/performance_rips_persistence.cpp | 2 +- .../concept/CoefficientField.h | 2 +- .../concept/FilteredComplex.h | 2 +- .../concept/PersistentHomology.h | 2 +- src/Persistent_cohomology/doc/COPYRIGHT | 2 +- .../doc/Intro_persistent_cohomology.h | 2 +- .../example/custom_persistence_sort.cpp | 2 +- .../example/persistence_from_file.cpp | 2 +- .../persistence_from_simple_simplex_tree.cpp | 2 +- .../example/plain_homology.cpp | 2 +- .../example/rips_multifield_persistence.cpp | 2 +- .../example/rips_persistence_step_by_step.cpp | 2 +- .../rips_persistence_via_boundary_matrix.cpp | 2 +- .../include/gudhi/Persistent_cohomology.h | 2 +- .../include/gudhi/Persistent_cohomology/Field_Zp.h | 2 +- .../gudhi/Persistent_cohomology/Multi_field.h | 2 +- .../Persistent_cohomology_column.h | 2 +- .../concept/SimplicialComplexForRips.h | 2 +- src/Rips_complex/doc/COPYRIGHT | 2 +- src/Rips_complex/doc/Intro_rips_complex.h | 2 +- src/Rips_complex/include/gudhi/Rips_complex.h | 2 +- .../include/gudhi/Sparse_rips_complex.h | 2 +- src/Rips_complex/test/test_rips_complex.cpp | 2 +- .../rips_correlation_matrix_persistence.cpp | 2 +- .../utilities/rips_distance_matrix_persistence.cpp | 2 +- src/Rips_complex/utilities/rips_persistence.cpp | 2 +- .../utilities/sparse_rips_persistence.cpp | 2 +- src/Simplex_tree/concept/FiltrationValue.h | 2 +- src/Simplex_tree/concept/IndexingTag.h | 2 +- src/Simplex_tree/concept/SimplexKey.h | 2 +- src/Simplex_tree/concept/SimplexTreeOptions.h | 2 +- src/Simplex_tree/concept/VertexHandle.h | 2 +- src/Simplex_tree/doc/COPYRIGHT | 2 +- src/Simplex_tree/doc/Intro_simplex_tree.h | 2 +- .../example/cech_complex_cgal_mini_sphere_3d.cpp | 4 ++-- ...e_alpha_shapes_3_simplex_tree_from_off_file.cpp | 2 +- .../example/graph_expansion_with_blocker.cpp | 2 +- src/Simplex_tree/example/mini_simplex_tree.cpp | 2 +- src/Simplex_tree/example/simple_simplex_tree.cpp | 2 +- .../example/simplex_tree_from_cliques_of_graph.cpp | 2 +- src/Simplex_tree/include/gudhi/Simplex_tree.h | 2 +- .../gudhi/Simplex_tree/Simplex_tree_iterators.h | 2 +- .../Simplex_tree_node_explicit_storage.h | 2 +- .../gudhi/Simplex_tree/Simplex_tree_siblings.h | 2 +- .../include/gudhi/Simplex_tree/indexing_tag.h | 2 +- src/Skeleton_blocker/concept/SkeletonBlockerDS.h | 2 +- .../concept/SkeletonBlockerGeometricDS.h | 2 +- src/Skeleton_blocker/doc/COPYRIGHT | 2 +- .../example/Skeleton_blocker_from_simplices.cpp | 2 +- .../example/Skeleton_blocker_iteration.cpp | 2 +- .../example/Skeleton_blocker_link.cpp | 2 +- .../include/gudhi/Skeleton_blocker.h | 2 +- .../Skeleton_blocker_complex_visitor.h | 2 +- .../Skeleton_blocker_link_superior.h | 2 +- .../Skeleton_blocker/Skeleton_blocker_off_io.h | 2 +- .../Skeleton_blocker_simple_geometric_traits.h | 2 +- .../Skeleton_blocker_simple_traits.h | 2 +- .../Skeleton_blocker/Skeleton_blocker_simplex.h | 2 +- .../Skeleton_blocker_sub_complex.h | 2 +- .../gudhi/Skeleton_blocker/internal/Top_faces.h | 2 +- .../include/gudhi/Skeleton_blocker/internal/Trie.h | 2 +- .../Skeleton_blockers_blockers_iterators.h | 2 +- .../iterators/Skeleton_blockers_edges_iterators.h | 2 +- .../iterators/Skeleton_blockers_iterators.h | 2 +- .../Skeleton_blockers_simplices_iterators.h | 2 +- .../Skeleton_blockers_triangles_iterators.h | 2 +- .../Skeleton_blockers_vertices_iterators.h | 2 +- .../include/gudhi/Skeleton_blocker_complex.h | 2 +- .../gudhi/Skeleton_blocker_geometric_complex.h | 2 +- .../include/gudhi/Skeleton_blocker_link_complex.h | 2 +- .../gudhi/Skeleton_blocker_simplifiable_complex.h | 2 +- .../test/test_skeleton_blocker_complex.cpp | 2 +- .../test_skeleton_blocker_geometric_complex.cpp | 2 +- .../test/test_skeleton_blocker_simplifiable.cpp | 2 +- .../doc/Intro_spatial_searching.h | 2 +- .../include/gudhi/Kd_tree_search.h | 2 +- src/Spatial_searching/test/test_Kd_tree_search.cpp | 2 +- src/Subsampling/doc/Intro_subsampling.h | 2 +- .../include/gudhi/choose_n_farthest_points.h | 2 +- .../include/gudhi/pick_n_random_points.h | 2 +- src/Subsampling/include/gudhi/sparsify_point_set.h | 2 +- .../test/test_choose_n_farthest_points.cpp | 2 +- src/Subsampling/test/test_pick_n_random_points.cpp | 2 +- src/Subsampling/test/test_sparsify_point_set.cpp | 2 +- src/Tangential_complex/benchmark/RIB_exporter.h | 2 +- src/Tangential_complex/benchmark/XML_exporter.h | 2 +- src/Tangential_complex/doc/COPYRIGHT | 2 +- .../doc/Intro_tangential_complex.h | 2 +- .../include/gudhi/Tangential_complex.h | 2 +- .../gudhi/Tangential_complex/Simplicial_complex.h | 2 +- .../include/gudhi/Tangential_complex/config.h | 2 +- .../include/gudhi/Tangential_complex/utilities.h | 2 +- .../test/test_tangential_complex.cpp | 2 +- .../concept/SimplicialComplexForWitness.h | 2 +- src/Witness_complex/doc/COPYRIGHT | 2 +- .../example/example_nearest_landmark_table.cpp | 22 --------------------- .../example/example_strong_witness_complex_off.cpp | 22 --------------------- .../example/example_witness_complex_sphere.cpp | 22 --------------------- src/Witness_complex/example/generators.h | 2 +- .../include/gudhi/Active_witness/Active_witness.h | 2 +- .../gudhi/Active_witness/Active_witness_iterator.h | 2 +- .../gudhi/Euclidean_strong_witness_complex.h | 2 +- .../include/gudhi/Euclidean_witness_complex.h | 2 +- .../include/gudhi/Strong_witness_complex.h | 2 +- .../include/gudhi/Witness_complex.h | 2 +- .../include/gudhi/Witness_complex/all_faces_in.h | 2 +- .../utilities/strong_witness_persistence.cpp | 2 +- .../utilities/weak_witness_persistence.cpp | 2 +- src/common/doc/file_formats.h | 2 +- src/common/include/gudhi/Clock.h | 2 +- src/common/include/gudhi/Debug_utils.h | 2 +- src/common/include/gudhi/Null_output_iterator.h | 2 +- src/common/include/gudhi/Off_reader.h | 2 +- src/common/include/gudhi/Point.h | 2 +- src/common/include/gudhi/Points_3D_off_io.h | 2 +- src/common/include/gudhi/Points_off_io.h | 2 +- src/common/include/gudhi/Simple_object_pool.h | 2 +- src/common/include/gudhi/Unitary_tests_utils.h | 2 +- src/common/include/gudhi/allocator.h | 2 +- src/common/include/gudhi/console_color.h | 2 +- src/common/include/gudhi/distance_functions.h | 2 +- .../include/gudhi/graph_simplicial_complex.h | 2 +- src/common/include/gudhi/random_point_generators.h | 2 +- src/common/include/gudhi/reader_utils.h | 2 +- src/common/test/test_distance_matrix_reader.cpp | 2 +- .../test/test_persistence_intervals_reader.cpp | 2 +- src/common/test/test_points_off_reader.cpp | 2 +- .../utilities/off_file_from_shape_generator.cpp | 2 +- src/cython/cython/alpha_complex.pyx | 4 ++-- src/cython/cython/bottleneck_distance.pyx | 4 ++-- src/cython/cython/cubical_complex.pyx | 4 ++-- .../cython/euclidean_strong_witness_complex.pyx | 4 ++-- src/cython/cython/euclidean_witness_complex.pyx | 4 ++-- src/cython/cython/off_reader.pyx | 4 ++-- src/cython/cython/periodic_cubical_complex.pyx | 4 ++-- src/cython/cython/persistence_graphical_tools.py | 4 ++-- src/cython/cython/reader_utils.pyx | 4 ++-- src/cython/cython/rips_complex.pyx | 4 ++-- src/cython/cython/simplex_tree.pyx | 4 ++-- src/cython/cython/strong_witness_complex.pyx | 4 ++-- src/cython/cython/subsampling.pyx | 4 ++-- src/cython/cython/tangential_complex.pyx | 4 ++-- src/cython/cython/witness_complex.pyx | 4 ++-- ...ex_diagram_persistence_from_off_file_example.py | 4 ++-- .../example/alpha_complex_from_points_example.py | 4 ++-- .../alpha_rips_persistence_bottleneck_distance.py | 4 ++-- src/cython/example/bottleneck_basic_example.py | 4 ++-- ...ex_diagram_persistence_from_off_file_example.py | 4 ++-- ...ex_diagram_persistence_from_off_file_example.py | 4 ++-- .../example/gudhi_graphical_tools_example.py | 4 ++-- ...arcode_persistence_from_perseus_file_example.py | 4 ++-- .../random_cubical_complex_persistence_example.py | 4 ++-- ...istence_from_correlation_matrix_file_example.py | 4 ++-- ...ersistence_from_distance_matrix_file_example.py | 4 ++-- ...ex_diagram_persistence_from_off_file_example.py | 4 ++-- .../example/rips_complex_from_points_example.py | 4 ++-- src/cython/example/rips_persistence_diagram.py | 4 ++-- src/cython/example/simplex_tree_example.py | 4 ++-- ...complex_plain_homology_from_off_file_example.py | 4 ++-- .../witness_complex_from_nearest_landmark_table.py | 4 ++-- src/cython/gudhi.pyx.in | 4 ++-- src/cython/include/Alpha_complex_interface.h | 2 +- src/cython/include/Bottleneck_distance_interface.h | 2 +- src/cython/include/Cubical_complex_interface.h | 2 +- .../Euclidean_strong_witness_complex_interface.h | 2 +- .../include/Euclidean_witness_complex_interface.h | 2 +- src/cython/include/Off_reader_interface.h | 2 +- .../include/Persistent_cohomology_interface.h | 2 +- src/cython/include/Reader_utils_interface.h | 2 +- src/cython/include/Rips_complex_interface.h | 2 +- src/cython/include/Simplex_tree_interface.h | 2 +- .../include/Strong_witness_complex_interface.h | 2 +- src/cython/include/Subsampling_interface.h | 2 +- src/cython/include/Tangential_complex_interface.h | 2 +- src/cython/include/Witness_complex_interface.h | 2 +- src/cython/setup.py.in | 4 ++-- src/cython/test/test_alpha_complex.py | 4 ++-- src/cython/test/test_bottleneck_distance.py | 4 ++-- src/cython/test/test_cubical_complex.py | 4 ++-- src/cython/test/test_euclidean_witness_complex.py | 4 ++-- src/cython/test/test_reader_utils.py | 4 ++-- src/cython/test/test_rips_complex.py | 4 ++-- src/cython/test/test_simplex_tree.py | 4 ++-- src/cython/test/test_subsampling.py | 4 ++-- src/cython/test/test_tangential_complex.py | 4 ++-- src/cython/test/test_witness_complex.py | 4 ++-- 338 files changed, 425 insertions(+), 446 deletions(-) (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/src/Alpha_complex/concept/SimplicialComplexForAlpha.h b/src/Alpha_complex/concept/SimplicialComplexForAlpha.h index 2b8bff94..a51df127 100644 --- a/src/Alpha_complex/concept/SimplicialComplexForAlpha.h +++ b/src/Alpha_complex/concept/SimplicialComplexForAlpha.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/doc/COPYRIGHT b/src/Alpha_complex/doc/COPYRIGHT index dbad2380..5f1d97cc 100644 --- a/src/Alpha_complex/doc/COPYRIGHT +++ b/src/Alpha_complex/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): Vincent Rouvreau -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index a08663ca..db298ea6 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index 91305032..4c07eddb 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp index c3ad1a9c..622fcae8 100644 --- a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp +++ b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_helper.h b/src/Alpha_complex/utilities/alpha_complex_3d_helper.h index a59f0654..a72fd96d 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_helper.h +++ b/src/Alpha_complex/utilities/alpha_complex_3d_helper.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA Saclay (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index 8ef5ffb2..efa20db9 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/utilities/alpha_complex_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_persistence.cpp index 2105220a..42390b0e 100644 --- a/src/Alpha_complex/utilities/alpha_complex_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_persistence.cpp @@ -1,3 +1,25 @@ +/* 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): Vincent Rouvreau + * + * Copyright (C) 2016 Inria + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include diff --git a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp index cceac46e..54c074c4 100644 --- a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp index 188cf604..7c6e1583 100644 --- a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp @@ -5,7 +5,7 @@ * Author(s): Vincent Rouvreau * Pawel Dlotko - 2017 - Swansea University, UK * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp index 93be8a05..54483819 100644 --- a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp index 5321bb0a..f03f29a7 100644 --- a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -5,7 +5,7 @@ * Author(s): Vincent Rouvreau * Pawel Dlotko - 2017 - Swansea University, UK * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/doc/COPYRIGHT b/src/Bitmap_cubical_complex/doc/COPYRIGHT index bcd46b23..2b14dcb9 100644 --- a/src/Bitmap_cubical_complex/doc/COPYRIGHT +++ b/src/Bitmap_cubical_complex/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): Pawel Dlotko -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h b/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h index a5d7b60f..d1836ef0 100644 --- a/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h +++ b/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Sophia-Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp index f70558f2..6eb24040 100644 --- a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp +++ b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h index 770eb55f..cc19b8b5 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Sophia-Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h index 705b68a0..f82d4cc3 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Sophia-Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h index bf257be1..47e71f8a 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Sophia-Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h index 4a0d1c74..97070cda 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Sophia-Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp index 4af699e9..ca7bd986 100644 --- a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp +++ b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp index 9d1bc08c..170aa684 100644 --- a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp +++ b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp index c812cb3a..e9ba5495 100644 --- a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp +++ b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2015 INRIA Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp b/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp index 456c570b..acafb199 100644 --- a/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp +++ b/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp @@ -4,7 +4,7 @@ * * Author: Francois Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/concept/Persistence_diagram.h b/src/Bottleneck_distance/concept/Persistence_diagram.h index b157f22a..d016faf4 100644 --- a/src/Bottleneck_distance/concept/Persistence_diagram.h +++ b/src/Bottleneck_distance/concept/Persistence_diagram.h @@ -4,7 +4,7 @@ * * Author: François Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/doc/COPYRIGHT b/src/Bottleneck_distance/doc/COPYRIGHT index 179740a6..1c2016b1 100644 --- a/src/Bottleneck_distance/doc/COPYRIGHT +++ b/src/Bottleneck_distance/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): François Godi -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h index 3998fe8d..f8fce96c 100644 --- a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h +++ b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h @@ -4,7 +4,7 @@ * * Author: François Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp b/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp index fd164b22..1e27887c 100644 --- a/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp +++ b/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/example/bottleneck_basic_example.cpp b/src/Bottleneck_distance/example/bottleneck_basic_example.cpp index d0ca4e20..3df7d12d 100644 --- a/src/Bottleneck_distance/example/bottleneck_basic_example.cpp +++ b/src/Bottleneck_distance/example/bottleneck_basic_example.cpp @@ -4,7 +4,7 @@ * * Authors: Francois Godi, small modifications by Pawel Dlotko * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/include/gudhi/Bottleneck.h b/src/Bottleneck_distance/include/gudhi/Bottleneck.h index 7aee07bb..41f8b16a 100644 --- a/src/Bottleneck_distance/include/gudhi/Bottleneck.h +++ b/src/Bottleneck_distance/include/gudhi/Bottleneck.h @@ -4,7 +4,7 @@ * * Author: Francois Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/include/gudhi/Graph_matching.h b/src/Bottleneck_distance/include/gudhi/Graph_matching.h index f51e22e9..313e7d9c 100644 --- a/src/Bottleneck_distance/include/gudhi/Graph_matching.h +++ b/src/Bottleneck_distance/include/gudhi/Graph_matching.h @@ -4,7 +4,7 @@ * * Author: Francois Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/include/gudhi/Internal_point.h b/src/Bottleneck_distance/include/gudhi/Internal_point.h index 0b2d26fe..7f350f64 100644 --- a/src/Bottleneck_distance/include/gudhi/Internal_point.h +++ b/src/Bottleneck_distance/include/gudhi/Internal_point.h @@ -4,7 +4,7 @@ * * Author: Francois Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h index 87c7cee5..36a63ea0 100644 --- a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h +++ b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h @@ -4,7 +4,7 @@ * * Author: Francois Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h index 622b0691..cb163623 100644 --- a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h +++ b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h @@ -4,7 +4,7 @@ * * Author: Francois Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/test/bottleneck_unit_test.cpp b/src/Bottleneck_distance/test/bottleneck_unit_test.cpp index e39613b3..bce88e13 100644 --- a/src/Bottleneck_distance/test/bottleneck_unit_test.cpp +++ b/src/Bottleneck_distance/test/bottleneck_unit_test.cpp @@ -4,7 +4,7 @@ * * Author: Francois Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Bottleneck_distance/utilities/bottleneck_distance.cpp b/src/Bottleneck_distance/utilities/bottleneck_distance.cpp index 9dd52b31..8f724f95 100644 --- a/src/Bottleneck_distance/utilities/bottleneck_distance.cpp +++ b/src/Bottleneck_distance/utilities/bottleneck_distance.cpp @@ -4,7 +4,7 @@ * * Authors: Francois Godi, small modifications by Pawel Dlotko * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/doc/COPYRIGHT b/src/Contraction/doc/COPYRIGHT index 1de850d7..5b606ac2 100644 --- a/src/Contraction/doc/COPYRIGHT +++ b/src/Contraction/doc/COPYRIGHT @@ -3,7 +3,7 @@ The files of this directory are part of the Gudhi Library. The Gudhi library computational topology. Author(s): David Salinas -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Contraction/example/Garland_heckbert.cpp b/src/Contraction/example/Garland_heckbert.cpp index 2b0dc973..08dd932e 100644 --- a/src/Contraction/example/Garland_heckbert.cpp +++ b/src/Contraction/example/Garland_heckbert.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-M�diterran�e (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/example/Garland_heckbert/Error_quadric.h b/src/Contraction/example/Garland_heckbert/Error_quadric.h index e7dafaa0..8bd9b545 100644 --- a/src/Contraction/example/Garland_heckbert/Error_quadric.h +++ b/src/Contraction/example/Garland_heckbert/Error_quadric.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-M�diterran�e (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp index 501b0e87..7f9b150a 100644 --- a/src/Contraction/example/Rips_contraction.cpp +++ b/src/Contraction/example/Rips_contraction.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/Edge_profile.h b/src/Contraction/include/gudhi/Contraction/Edge_profile.h index e4910b27..30b1b80a 100644 --- a/src/Contraction/include/gudhi/Contraction/Edge_profile.h +++ b/src/Contraction/include/gudhi/Contraction/Edge_profile.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/Contraction_visitor.h b/src/Contraction/include/gudhi/Contraction/policies/Contraction_visitor.h index 7ee05aad..fa02308b 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Contraction_visitor.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Contraction_visitor.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/Cost_policy.h b/src/Contraction/include/gudhi/Contraction/policies/Cost_policy.h index f4d343ec..04ce36b6 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Cost_policy.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Cost_policy.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/Dummy_valid_contraction.h b/src/Contraction/include/gudhi/Contraction/policies/Dummy_valid_contraction.h index 5d329496..a5567454 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Dummy_valid_contraction.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Dummy_valid_contraction.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/Edge_length_cost.h b/src/Contraction/include/gudhi/Contraction/policies/Edge_length_cost.h index dac2d448..1b7a825b 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Edge_length_cost.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Edge_length_cost.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/First_vertex_placement.h b/src/Contraction/include/gudhi/Contraction/policies/First_vertex_placement.h index 1f68db0d..0b9f8775 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/First_vertex_placement.h +++ b/src/Contraction/include/gudhi/Contraction/policies/First_vertex_placement.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/Link_condition_valid_contraction.h b/src/Contraction/include/gudhi/Contraction/policies/Link_condition_valid_contraction.h index 250bba27..8c869830 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Link_condition_valid_contraction.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Link_condition_valid_contraction.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/Middle_placement.h b/src/Contraction/include/gudhi/Contraction/policies/Middle_placement.h index 4b59f1b5..0ba23a35 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Middle_placement.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Middle_placement.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/Placement_policy.h b/src/Contraction/include/gudhi/Contraction/policies/Placement_policy.h index 34ffa49f..19509fad 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Placement_policy.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Placement_policy.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Contraction/policies/Valid_contraction_policy.h b/src/Contraction/include/gudhi/Contraction/policies/Valid_contraction_policy.h index 78d61173..8a91f0b5 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Valid_contraction_policy.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Valid_contraction_policy.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Edge_contraction.h b/src/Contraction/include/gudhi/Edge_contraction.h index cf9a2c27..fcd06996 100644 --- a/src/Contraction/include/gudhi/Edge_contraction.h +++ b/src/Contraction/include/gudhi/Edge_contraction.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h b/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h index df884c93..13086161 100644 --- a/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h +++ b/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/MainWindow.cpp b/src/GudhUI/gui/MainWindow.cpp index 779ccd33..b11b80e9 100644 --- a/src/GudhUI/gui/MainWindow.cpp +++ b/src/GudhUI/gui/MainWindow.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/MainWindow.h b/src/GudhUI/gui/MainWindow.h index 15664dcb..6076c2ee 100644 --- a/src/GudhUI/gui/MainWindow.h +++ b/src/GudhUI/gui/MainWindow.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/Menu_edge_contraction.cpp b/src/GudhUI/gui/Menu_edge_contraction.cpp index a679b0bf..041bdf9e 100644 --- a/src/GudhUI/gui/Menu_edge_contraction.cpp +++ b/src/GudhUI/gui/Menu_edge_contraction.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/Menu_edge_contraction.h b/src/GudhUI/gui/Menu_edge_contraction.h index 2d5640e8..0ef7b267 100644 --- a/src/GudhUI/gui/Menu_edge_contraction.h +++ b/src/GudhUI/gui/Menu_edge_contraction.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp b/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp index e24865f2..b1ad15c8 100644 --- a/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp +++ b/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/Menu_k_nearest_neighbors.h b/src/GudhUI/gui/Menu_k_nearest_neighbors.h index 77303b67..56b5b63d 100644 --- a/src/GudhUI/gui/Menu_k_nearest_neighbors.h +++ b/src/GudhUI/gui/Menu_k_nearest_neighbors.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/Menu_persistence.cpp b/src/GudhUI/gui/Menu_persistence.cpp index 016c076b..ec990559 100644 --- a/src/GudhUI/gui/Menu_persistence.cpp +++ b/src/GudhUI/gui/Menu_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/Menu_persistence.h b/src/GudhUI/gui/Menu_persistence.h index 1a2a2408..32f0c5ca 100644 --- a/src/GudhUI/gui/Menu_persistence.h +++ b/src/GudhUI/gui/Menu_persistence.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/Menu_uniform_neighbors.cpp b/src/GudhUI/gui/Menu_uniform_neighbors.cpp index 20e4f98f..7f392b6c 100644 --- a/src/GudhUI/gui/Menu_uniform_neighbors.cpp +++ b/src/GudhUI/gui/Menu_uniform_neighbors.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/Menu_uniform_neighbors.h b/src/GudhUI/gui/Menu_uniform_neighbors.h index 61316966..88a3823b 100644 --- a/src/GudhUI/gui/Menu_uniform_neighbors.h +++ b/src/GudhUI/gui/Menu_uniform_neighbors.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/gui/gudhui.cpp b/src/GudhUI/gui/gudhui.cpp index 276c4a5f..2a100fd5 100644 --- a/src/GudhUI/gui/gudhui.cpp +++ b/src/GudhUI/gui/gudhui.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ int main(int argc, char** argv) { QApplication application(argc, argv); application.setOrganizationDomain("inria.fr"); - application.setOrganizationName("INRIA"); + application.setOrganizationName("Inria"); application.setApplicationName("GudhUI"); MainWindow mw; diff --git a/src/GudhUI/model/Complex_typedefs.h b/src/GudhUI/model/Complex_typedefs.h index a4df2c94..347db1e3 100644 --- a/src/GudhUI/model/Complex_typedefs.h +++ b/src/GudhUI/model/Complex_typedefs.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/model/Model.h b/src/GudhUI/model/Model.h index 072d1185..1d5cc087 100644 --- a/src/GudhUI/model/Model.h +++ b/src/GudhUI/model/Model.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Bar_code_persistence.h b/src/GudhUI/utils/Bar_code_persistence.h index b527d684..49c87b3c 100644 --- a/src/GudhUI/utils/Bar_code_persistence.h +++ b/src/GudhUI/utils/Bar_code_persistence.h @@ -1,3 +1,26 @@ +/* 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): David Salinas + * + * Copyright (C) 2014 Inria + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + #include // isfinite #include diff --git a/src/GudhUI/utils/Critical_points.h b/src/GudhUI/utils/Critical_points.h index e7b9ef31..fbd690f8 100644 --- a/src/GudhUI/utils/Critical_points.h +++ b/src/GudhUI/utils/Critical_points.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Edge_collapsor.h b/src/GudhUI/utils/Edge_collapsor.h index 151e9b01..b3cc7df7 100644 --- a/src/GudhUI/utils/Edge_collapsor.h +++ b/src/GudhUI/utils/Edge_collapsor.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Edge_contractor.h b/src/GudhUI/utils/Edge_contractor.h index 8a29ff4b..090baabe 100644 --- a/src/GudhUI/utils/Edge_contractor.h +++ b/src/GudhUI/utils/Edge_contractor.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Furthest_point_epsilon_net.h b/src/GudhUI/utils/Furthest_point_epsilon_net.h index 98346daa..dbb6661c 100644 --- a/src/GudhUI/utils/Furthest_point_epsilon_net.h +++ b/src/GudhUI/utils/Furthest_point_epsilon_net.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Is_manifold.h b/src/GudhUI/utils/Is_manifold.h index d0974463..732df607 100644 --- a/src/GudhUI/utils/Is_manifold.h +++ b/src/GudhUI/utils/Is_manifold.h @@ -7,7 +7,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/K_nearest_builder.h b/src/GudhUI/utils/K_nearest_builder.h index 4000a331..14851d96 100644 --- a/src/GudhUI/utils/K_nearest_builder.h +++ b/src/GudhUI/utils/K_nearest_builder.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Lloyd_builder.h b/src/GudhUI/utils/Lloyd_builder.h index 18ec9fac..67595d33 100644 --- a/src/GudhUI/utils/Lloyd_builder.h +++ b/src/GudhUI/utils/Lloyd_builder.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/MClock.h b/src/GudhUI/utils/MClock.h index e8d8918a..992f6fa5 100644 --- a/src/GudhUI/utils/MClock.h +++ b/src/GudhUI/utils/MClock.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Persistence_compute.h b/src/GudhUI/utils/Persistence_compute.h index 2dc03c8e..c8afded9 100644 --- a/src/GudhUI/utils/Persistence_compute.h +++ b/src/GudhUI/utils/Persistence_compute.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Rips_builder.h b/src/GudhUI/utils/Rips_builder.h index 59b4bee2..ed62c1c0 100644 --- a/src/GudhUI/utils/Rips_builder.h +++ b/src/GudhUI/utils/Rips_builder.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/UI_utils.h b/src/GudhUI/utils/UI_utils.h index 9cc209d3..67a02869 100644 --- a/src/GudhUI/utils/UI_utils.h +++ b/src/GudhUI/utils/UI_utils.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/utils/Vertex_collapsor.h b/src/GudhUI/utils/Vertex_collapsor.h index 568dab2f..fca57f7d 100644 --- a/src/GudhUI/utils/Vertex_collapsor.h +++ b/src/GudhUI/utils/Vertex_collapsor.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/view/Color.h b/src/GudhUI/view/Color.h index ba0592e1..808dc2d8 100644 --- a/src/GudhUI/view/Color.h +++ b/src/GudhUI/view/Color.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/view/FirstCoordProjector.h b/src/GudhUI/view/FirstCoordProjector.h index 1333f5d3..3f8a6fd9 100644 --- a/src/GudhUI/view/FirstCoordProjector.h +++ b/src/GudhUI/view/FirstCoordProjector.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/view/Projector3D.h b/src/GudhUI/view/Projector3D.h index 2a756541..a1421f51 100644 --- a/src/GudhUI/view/Projector3D.h +++ b/src/GudhUI/view/Projector3D.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/view/View_parameter.h b/src/GudhUI/view/View_parameter.h index 9805abc2..578a0268 100644 --- a/src/GudhUI/view/View_parameter.h +++ b/src/GudhUI/view/View_parameter.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/view/Viewer.cpp b/src/GudhUI/view/Viewer.cpp index c6c2b345..42e35d6c 100644 --- a/src/GudhUI/view/Viewer.cpp +++ b/src/GudhUI/view/Viewer.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/view/Viewer.h b/src/GudhUI/view/Viewer.h index 797ddc53..414044ef 100644 --- a/src/GudhUI/view/Viewer.h +++ b/src/GudhUI/view/Viewer.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/view/Viewer_instructor.cpp b/src/GudhUI/view/Viewer_instructor.cpp index 1ddd4d8b..a9dc4525 100644 --- a/src/GudhUI/view/Viewer_instructor.cpp +++ b/src/GudhUI/view/Viewer_instructor.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GudhUI/view/Viewer_instructor.h b/src/GudhUI/view/Viewer_instructor.h index 05c5c1fc..4b06acb8 100644 --- a/src/GudhUI/view/Viewer_instructor.h +++ b/src/GudhUI/view/Viewer_instructor.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Hasse_complex/include/gudhi/Hasse_complex.h b/src/Hasse_complex/include/gudhi/Hasse_complex.h index e67f7609..efcaea55 100644 --- a/src/Hasse_complex/include/gudhi/Hasse_complex.h +++ b/src/Hasse_complex/include/gudhi/Hasse_complex.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/doc/COPYRIGHT b/src/Nerve_GIC/doc/COPYRIGHT index 0c36a526..6b33053e 100644 --- a/src/Nerve_GIC/doc/COPYRIGHT +++ b/src/Nerve_GIC/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): Mathieu Carrière -Copyright (C) 2017 INRIA +Copyright (C) 2017 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index 2b648425..bc8aecc3 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carriere * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/example/CoordGIC.cpp b/src/Nerve_GIC/example/CoordGIC.cpp index d544db94..73edae18 100644 --- a/src/Nerve_GIC/example/CoordGIC.cpp +++ b/src/Nerve_GIC/example/CoordGIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/example/FuncGIC.cpp b/src/Nerve_GIC/example/FuncGIC.cpp index cb0f0d63..1f5de999 100644 --- a/src/Nerve_GIC/example/FuncGIC.cpp +++ b/src/Nerve_GIC/example/FuncGIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index d6f3ded6..aa6478e5 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -4,7 +4,7 @@ * * Author: Mathieu Carriere * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/test/test_GIC.cpp b/src/Nerve_GIC/test/test_GIC.cpp index e3067d35..0db2cce2 100644 --- a/src/Nerve_GIC/test/test_GIC.cpp +++ b/src/Nerve_GIC/test/test_GIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py b/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py index c811f610..701e7a52 100755 --- a/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py +++ b/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py @@ -11,7 +11,7 @@ import argparse Author(s): Mathieu Carriere - Copyright (C) 2017 INRIA + Copyright (C) 2017 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ import argparse """ __author__ = "Mathieu Carriere" -__copyright__ = "Copyright (C) 2017 INRIA" +__copyright__ = "Copyright (C) 2017 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='Creates an html Keppler Mapper ' diff --git a/src/Nerve_GIC/utilities/Nerve.cpp b/src/Nerve_GIC/utilities/Nerve.cpp index aefc3874..667129e0 100644 --- a/src/Nerve_GIC/utilities/Nerve.cpp +++ b/src/Nerve_GIC/utilities/Nerve.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/utilities/VoronoiGIC.cpp b/src/Nerve_GIC/utilities/VoronoiGIC.cpp index 54bb871e..33deca40 100644 --- a/src/Nerve_GIC/utilities/VoronoiGIC.cpp +++ b/src/Nerve_GIC/utilities/VoronoiGIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/concept/Real_valued_topological_data.h b/src/Persistence_representations/concept/Real_valued_topological_data.h index 1d3595ad..22ef6d72 100644 --- a/src/Persistence_representations/concept/Real_valued_topological_data.h +++ b/src/Persistence_representations/concept/Real_valued_topological_data.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/concept/Topological_data_with_averages.h b/src/Persistence_representations/concept/Topological_data_with_averages.h index 9ebd105f..aa64467f 100644 --- a/src/Persistence_representations/concept/Topological_data_with_averages.h +++ b/src/Persistence_representations/concept/Topological_data_with_averages.h @@ -5,7 +5,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/concept/Topological_data_with_distances.h b/src/Persistence_representations/concept/Topological_data_with_distances.h index a6a62307..c8eb2b34 100644 --- a/src/Persistence_representations/concept/Topological_data_with_distances.h +++ b/src/Persistence_representations/concept/Topological_data_with_distances.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h index 2e506ca9..0f08b8c6 100644 --- a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h +++ b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/concept/Vectorized_topological_data.h b/src/Persistence_representations/concept/Vectorized_topological_data.h index b6b5b109..365105d6 100644 --- a/src/Persistence_representations/concept/Vectorized_topological_data.h +++ b/src/Persistence_representations/concept/Vectorized_topological_data.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/doc/Persistence_representations_doc.h b/src/Persistence_representations/doc/Persistence_representations_doc.h index 38bd3a21..4d850a02 100644 --- a/src/Persistence_representations/doc/Persistence_representations_doc.h +++ b/src/Persistence_representations/doc/Persistence_representations_doc.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA Sophia-Saclay (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/example/persistence_heat_maps.cpp b/src/Persistence_representations/example/persistence_heat_maps.cpp index 2a472ac6..323b57e9 100644 --- a/src/Persistence_representations/example/persistence_heat_maps.cpp +++ b/src/Persistence_representations/example/persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/example/persistence_intervals.cpp b/src/Persistence_representations/example/persistence_intervals.cpp index c1ceb458..b5dcf25c 100644 --- a/src/Persistence_representations/example/persistence_intervals.cpp +++ b/src/Persistence_representations/example/persistence_intervals.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/example/persistence_landscape.cpp b/src/Persistence_representations/example/persistence_landscape.cpp index 400a9ae1..27542cf7 100644 --- a/src/Persistence_representations/example/persistence_landscape.cpp +++ b/src/Persistence_representations/example/persistence_landscape.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp index b201b397..0f471a67 100644 --- a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp +++ b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/example/persistence_vectors.cpp b/src/Persistence_representations/example/persistence_vectors.cpp index 834ae644..072e530d 100644 --- a/src/Persistence_representations/example/persistence_vectors.cpp +++ b/src/Persistence_representations/example/persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/PSSK.h b/src/Persistence_representations/include/gudhi/PSSK.h index 630f5623..e1174455 100644 --- a/src/Persistence_representations/include/gudhi/PSSK.h +++ b/src/Persistence_representations/include/gudhi/PSSK.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index a80c3c40..35e51e63 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index 3d04d8b7..76eac7d7 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h index 79908883..f48d1a3b 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape.h b/src/Persistence_representations/include/gudhi/Persistence_landscape.h index c5aa7867..4381a55b 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h index 84fd22ed..fd8a181c 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index 63577e46..9c04be1d 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h index 44e125a7..3d03f1f6 100644 --- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h +++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h index 83b89d0e..e0fc7107 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/test/persistence_heat_maps_test.cpp b/src/Persistence_representations/test/persistence_heat_maps_test.cpp index e36108b7..5fad8051 100644 --- a/src/Persistence_representations/test/persistence_heat_maps_test.cpp +++ b/src/Persistence_representations/test/persistence_heat_maps_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/test/persistence_intervals_test.cpp b/src/Persistence_representations/test/persistence_intervals_test.cpp index f555e243..a89db9e3 100644 --- a/src/Persistence_representations/test/persistence_intervals_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp index 631e4d70..6ba9a470 100644 --- a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp index 130ac8cc..7eca413b 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/test/persistence_lanscapes_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_test.cpp index e98ef894..27ad0987 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/test/read_persistence_from_file_test.cpp b/src/Persistence_representations/test/read_persistence_from_file_test.cpp index 276b92ab..c3e8cb4e 100644 --- a/src/Persistence_representations/test/read_persistence_from_file_test.cpp +++ b/src/Persistence_representations/test/read_persistence_from_file_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/test/vector_representation_test.cpp b/src/Persistence_representations/test/vector_representation_test.cpp index c545dce7..a6b9314e 100644 --- a/src/Persistence_representations/test/vector_representation_test.cpp +++ b/src/Persistence_representations/test/vector_representation_test.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp index 6739e0b6..2cbd812b 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index ed8278a2..14d0db8f 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp index 63626853..12fceedc 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp index b4a1daa5..21c553b9 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * -* Copyright (C) 2016 INRIA (France) +* Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp index c50f9ddb..99b0bd17 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index 59ff3c24..a4b6e458 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index 25cd1067..5960a89f 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp index 97ddb8f0..04f33915 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index 63711d83..e4402589 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp index 9102da79..3be3de8f 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp index c8290845..a6953b98 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp index b3d126f0..4f052f42 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index ccb5b645..f283971b 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp index b433c2b3..1cacbcd0 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp index 33387802..f92d5782 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp index 1a59be8c..4048f508 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index 5062f521..253fa273 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp index 5b5e9fa3..11fe2886 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp index 6030e994..59aad2f3 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp index c797a7a8..f32a92a1 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp index 0b098d1a..47102087 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index fd0fcd15..6cf2739d 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp index 01de3dee..9417be6b 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index 78e8ef57..46e229bc 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index dddb3615..39e438d2 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp index 0144e76f..45199838 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index 7e66d25e..0db7dbec 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp index 303c6e3e..8e99251b 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp index cc5e5393..364284e5 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp index aa33107d..550e47c5 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/benchmark/performance_rips_persistence.cpp b/src/Persistent_cohomology/benchmark/performance_rips_persistence.cpp index 252e8aef..3b00d7a9 100644 --- a/src/Persistent_cohomology/benchmark/performance_rips_persistence.cpp +++ b/src/Persistent_cohomology/benchmark/performance_rips_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/concept/CoefficientField.h b/src/Persistent_cohomology/concept/CoefficientField.h index 953b06c2..9d066cca 100644 --- a/src/Persistent_cohomology/concept/CoefficientField.h +++ b/src/Persistent_cohomology/concept/CoefficientField.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/concept/FilteredComplex.h b/src/Persistent_cohomology/concept/FilteredComplex.h index d6b662e9..178503c9 100644 --- a/src/Persistent_cohomology/concept/FilteredComplex.h +++ b/src/Persistent_cohomology/concept/FilteredComplex.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/concept/PersistentHomology.h b/src/Persistent_cohomology/concept/PersistentHomology.h index 111723a5..f9a78763 100644 --- a/src/Persistent_cohomology/concept/PersistentHomology.h +++ b/src/Persistent_cohomology/concept/PersistentHomology.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/doc/COPYRIGHT b/src/Persistent_cohomology/doc/COPYRIGHT index 34345bef..6cde9520 100644 --- a/src/Persistent_cohomology/doc/COPYRIGHT +++ b/src/Persistent_cohomology/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): Clément Maria -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h index 3113a22c..5fb9d4d2 100644 --- a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h +++ b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/example/custom_persistence_sort.cpp b/src/Persistent_cohomology/example/custom_persistence_sort.cpp index 64f2a4dc..35366144 100644 --- a/src/Persistent_cohomology/example/custom_persistence_sort.cpp +++ b/src/Persistent_cohomology/example/custom_persistence_sort.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA Saclay (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/example/persistence_from_file.cpp b/src/Persistent_cohomology/example/persistence_from_file.cpp index eafa3fd5..c40434a4 100644 --- a/src/Persistent_cohomology/example/persistence_from_file.cpp +++ b/src/Persistent_cohomology/example/persistence_from_file.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA Saclay (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp b/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp index 8ef479d4..ffccfd86 100644 --- a/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp +++ b/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/example/plain_homology.cpp b/src/Persistent_cohomology/example/plain_homology.cpp index a5ae09c8..a2256060 100644 --- a/src/Persistent_cohomology/example/plain_homology.cpp +++ b/src/Persistent_cohomology/example/plain_homology.cpp @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse * - * Copyright (C) 2015 INRIA Saclay - Ile-de-France (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/example/rips_multifield_persistence.cpp b/src/Persistent_cohomology/example/rips_multifield_persistence.cpp index dae36ed2..626ec2ef 100644 --- a/src/Persistent_cohomology/example/rips_multifield_persistence.cpp +++ b/src/Persistent_cohomology/example/rips_multifield_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp b/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp index c1de0ef8..7c81fcfb 100644 --- a/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp +++ b/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/example/rips_persistence_via_boundary_matrix.cpp b/src/Persistent_cohomology/example/rips_persistence_via_boundary_matrix.cpp index 9618f278..c7607dce 100644 --- a/src/Persistent_cohomology/example/rips_persistence_via_boundary_matrix.cpp +++ b/src/Persistent_cohomology/example/rips_persistence_via_boundary_matrix.cpp @@ -4,7 +4,7 @@ * * Author(s): Clément Maria, Marc Glisse * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index a8c9afa3..c68b5c0b 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h index 6db16e69..e98b4bb4 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h index 38bc08d1..2bae8654 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h index 5deb2d88..de6c0750 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/concept/SimplicialComplexForRips.h b/src/Rips_complex/concept/SimplicialComplexForRips.h index 7dab0615..3c5acecf 100644 --- a/src/Rips_complex/concept/SimplicialComplexForRips.h +++ b/src/Rips_complex/concept/SimplicialComplexForRips.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/doc/COPYRIGHT b/src/Rips_complex/doc/COPYRIGHT index 594b7d03..2c31a0d6 100644 --- a/src/Rips_complex/doc/COPYRIGHT +++ b/src/Rips_complex/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): Clément Maria, Pawel Dlotko, Vincent Rouvreau -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Rips_complex/doc/Intro_rips_complex.h b/src/Rips_complex/doc/Intro_rips_complex.h index 5a551e60..712d3b6e 100644 --- a/src/Rips_complex/doc/Intro_rips_complex.h +++ b/src/Rips_complex/doc/Intro_rips_complex.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria, Pawel Dlotko, Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/include/gudhi/Rips_complex.h b/src/Rips_complex/include/gudhi/Rips_complex.h index 1e4b76a7..f0fe57f4 100644 --- a/src/Rips_complex/include/gudhi/Rips_complex.h +++ b/src/Rips_complex/include/gudhi/Rips_complex.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria, Pawel Dlotko, Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h index 1a9d6ebb..19a44b28 100644 --- a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h +++ b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse * - * Copyright (C) 2018 INRIA + * Copyright (C) 2018 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/test/test_rips_complex.cpp b/src/Rips_complex/test/test_rips_complex.cpp index 4e7b79d2..b8b444c9 100644 --- a/src/Rips_complex/test/test_rips_complex.cpp +++ b/src/Rips_complex/test/test_rips_complex.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA Saclay (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp index c2082fae..d4671b45 100644 --- a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko, Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp index ca3c0327..53191ca7 100644 --- a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko, Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/utilities/rips_persistence.cpp b/src/Rips_complex/utilities/rips_persistence.cpp index 8405c014..7cee927e 100644 --- a/src/Rips_complex/utilities/rips_persistence.cpp +++ b/src/Rips_complex/utilities/rips_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rips_complex/utilities/sparse_rips_persistence.cpp b/src/Rips_complex/utilities/sparse_rips_persistence.cpp index d4bae3ba..bcd5c2c5 100644 --- a/src/Rips_complex/utilities/sparse_rips_persistence.cpp +++ b/src/Rips_complex/utilities/sparse_rips_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse, Clément Maria * - * Copyright (C) 2018 INRIA + * Copyright (C) 2018 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/concept/FiltrationValue.h b/src/Simplex_tree/concept/FiltrationValue.h index 79ca06cc..f4dcf985 100644 --- a/src/Simplex_tree/concept/FiltrationValue.h +++ b/src/Simplex_tree/concept/FiltrationValue.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/concept/IndexingTag.h b/src/Simplex_tree/concept/IndexingTag.h index 1dcdd756..37e7e294 100644 --- a/src/Simplex_tree/concept/IndexingTag.h +++ b/src/Simplex_tree/concept/IndexingTag.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/concept/SimplexKey.h b/src/Simplex_tree/concept/SimplexKey.h index 9fbed401..c03f7da1 100644 --- a/src/Simplex_tree/concept/SimplexKey.h +++ b/src/Simplex_tree/concept/SimplexKey.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/concept/SimplexTreeOptions.h b/src/Simplex_tree/concept/SimplexTreeOptions.h index 89acdc18..6638da26 100644 --- a/src/Simplex_tree/concept/SimplexTreeOptions.h +++ b/src/Simplex_tree/concept/SimplexTreeOptions.h @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse * - * Copyright (C) 2015 INRIA Saclay - Ile-de-France (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/concept/VertexHandle.h b/src/Simplex_tree/concept/VertexHandle.h index 3efbba61..9d0642c3 100644 --- a/src/Simplex_tree/concept/VertexHandle.h +++ b/src/Simplex_tree/concept/VertexHandle.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/doc/COPYRIGHT b/src/Simplex_tree/doc/COPYRIGHT index 34345bef..6cde9520 100644 --- a/src/Simplex_tree/doc/COPYRIGHT +++ b/src/Simplex_tree/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): Clément Maria -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Simplex_tree/doc/Intro_simplex_tree.h b/src/Simplex_tree/doc/Intro_simplex_tree.h index 6b80d1c9..db399489 100644 --- a/src/Simplex_tree/doc/Intro_simplex_tree.h +++ b/src/Simplex_tree/doc/Intro_simplex_tree.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp b/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp index 9bd51106..08ed74bb 100644 --- a/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp +++ b/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp @@ -2,9 +2,9 @@ * (Geometric Understanding in Higher Dimensions) is a generic C++ * library for computational topology. * - * Author(s): Clément Maria + * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp b/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp index d8289ba9..290a9d9b 100644 --- a/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp +++ b/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA Saclay (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/example/graph_expansion_with_blocker.cpp b/src/Simplex_tree/example/graph_expansion_with_blocker.cpp index 0d458cbd..f675e353 100644 --- a/src/Simplex_tree/example/graph_expansion_with_blocker.cpp +++ b/src/Simplex_tree/example/graph_expansion_with_blocker.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/example/mini_simplex_tree.cpp b/src/Simplex_tree/example/mini_simplex_tree.cpp index 19e45361..e7c7177f 100644 --- a/src/Simplex_tree/example/mini_simplex_tree.cpp +++ b/src/Simplex_tree/example/mini_simplex_tree.cpp @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse * - * Copyright (C) 2015 INRIA Saclay - Ile-de-France (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/example/simple_simplex_tree.cpp b/src/Simplex_tree/example/simple_simplex_tree.cpp index 828977c2..d71b5608 100644 --- a/src/Simplex_tree/example/simple_simplex_tree.cpp +++ b/src/Simplex_tree/example/simple_simplex_tree.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp b/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp index d1b8b2de..6d70f3d1 100644 --- a/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp +++ b/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 7456cb1f..5d4ea30c 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h index ab7346d4..335bac1e 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h index 25d4888a..3a75ec72 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h index 1eca7f6f..ab2ca707 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h b/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h index 0adeb46d..ec4461f3 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/concept/SkeletonBlockerDS.h b/src/Skeleton_blocker/concept/SkeletonBlockerDS.h index d82425a0..fd806ff1 100644 --- a/src/Skeleton_blocker/concept/SkeletonBlockerDS.h +++ b/src/Skeleton_blocker/concept/SkeletonBlockerDS.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h b/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h index 477464c4..d8521343 100644 --- a/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h +++ b/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/doc/COPYRIGHT b/src/Skeleton_blocker/doc/COPYRIGHT index 1de850d7..5b606ac2 100644 --- a/src/Skeleton_blocker/doc/COPYRIGHT +++ b/src/Skeleton_blocker/doc/COPYRIGHT @@ -3,7 +3,7 @@ The files of this directory are part of the Gudhi Library. The Gudhi library computational topology. Author(s): David Salinas -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_from_simplices.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_from_simplices.cpp index 076c6a53..f288e39c 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_from_simplices.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_from_simplices.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp index 08ff0264..4d008450 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_link.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_link.cpp index 58322038..2ec72128 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_link.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_link.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h index aca2aa57..e8b6fde8 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h index ba3636bc..6c6a8638 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h index d4b60613..feab7b3f 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h index 747e60f1..56009daf 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h index 275376e6..22c1668e 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h index 3835cf77..144f1fd0 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h index aa6f2215..d7193157 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h index fadf6619..dbfb4042 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h index 2b681752..f80ca4fe 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h index 2c9602fa..7a5d38eb 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h index d2fff960..95c5f7ef 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h index b90dcf34..5c725aae 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_iterators.h index 1351614f..8054e64f 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_iterators.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h index 2acdb555..e2024652 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h index 736941dd..a834fe1d 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h index 9e9ae961..3a638ae6 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h index 4f052ba5..addd8104 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h index 95331b7a..39b88ceb 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h index 4db075b0..428d4e9b 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h index 544e02e8..d5adb39d 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp b/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp index 4f9888ba..9760c74d 100644 --- a/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp +++ b/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/test/test_skeleton_blocker_geometric_complex.cpp b/src/Skeleton_blocker/test/test_skeleton_blocker_geometric_complex.cpp index d035b2c3..f2d3bb27 100644 --- a/src/Skeleton_blocker/test/test_skeleton_blocker_geometric_complex.cpp +++ b/src/Skeleton_blocker/test/test_skeleton_blocker_geometric_complex.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Skeleton_blocker/test/test_skeleton_blocker_simplifiable.cpp b/src/Skeleton_blocker/test/test_skeleton_blocker_simplifiable.cpp index 360b91db..1f263c98 100644 --- a/src/Skeleton_blocker/test/test_skeleton_blocker_simplifiable.cpp +++ b/src/Skeleton_blocker/test/test_skeleton_blocker_simplifiable.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Spatial_searching/doc/Intro_spatial_searching.h b/src/Spatial_searching/doc/Intro_spatial_searching.h index 52ed65e4..f387ab2f 100644 --- a/src/Spatial_searching/doc/Intro_spatial_searching.h +++ b/src/Spatial_searching/doc/Intro_spatial_searching.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Spatial_searching/include/gudhi/Kd_tree_search.h b/src/Spatial_searching/include/gudhi/Kd_tree_search.h index 96bbeb36..ad1054e5 100644 --- a/src/Spatial_searching/include/gudhi/Kd_tree_search.h +++ b/src/Spatial_searching/include/gudhi/Kd_tree_search.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Spatial_searching/test/test_Kd_tree_search.cpp b/src/Spatial_searching/test/test_Kd_tree_search.cpp index 8a8334c3..981a5850 100644 --- a/src/Spatial_searching/test/test_Kd_tree_search.cpp +++ b/src/Spatial_searching/test/test_Kd_tree_search.cpp @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Subsampling/doc/Intro_subsampling.h b/src/Subsampling/doc/Intro_subsampling.h index ab9cdc37..d88f6bf6 100644 --- a/src/Subsampling/doc/Intro_subsampling.h +++ b/src/Subsampling/doc/Intro_subsampling.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Subsampling/include/gudhi/choose_n_farthest_points.h b/src/Subsampling/include/gudhi/choose_n_farthest_points.h index 8390b4c9..ab1c4c73 100644 --- a/src/Subsampling/include/gudhi/choose_n_farthest_points.h +++ b/src/Subsampling/include/gudhi/choose_n_farthest_points.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Subsampling/include/gudhi/pick_n_random_points.h b/src/Subsampling/include/gudhi/pick_n_random_points.h index 8c90b6bf..64821e5d 100644 --- a/src/Subsampling/include/gudhi/pick_n_random_points.h +++ b/src/Subsampling/include/gudhi/pick_n_random_points.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Subsampling/include/gudhi/sparsify_point_set.h b/src/Subsampling/include/gudhi/sparsify_point_set.h index 7d3b97fb..db10e0b1 100644 --- a/src/Subsampling/include/gudhi/sparsify_point_set.h +++ b/src/Subsampling/include/gudhi/sparsify_point_set.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Subsampling/test/test_choose_n_farthest_points.cpp b/src/Subsampling/test/test_choose_n_farthest_points.cpp index ee9d4c77..0e0eb29c 100644 --- a/src/Subsampling/test/test_choose_n_farthest_points.cpp +++ b/src/Subsampling/test/test_choose_n_farthest_points.cpp @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Subsampling/test/test_pick_n_random_points.cpp b/src/Subsampling/test/test_pick_n_random_points.cpp index 6c8dbea2..4baf4a5d 100644 --- a/src/Subsampling/test/test_pick_n_random_points.cpp +++ b/src/Subsampling/test/test_pick_n_random_points.cpp @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Subsampling/test/test_sparsify_point_set.cpp b/src/Subsampling/test/test_sparsify_point_set.cpp index f993d6d6..f414dda3 100644 --- a/src/Subsampling/test/test_sparsify_point_set.cpp +++ b/src/Subsampling/test/test_sparsify_point_set.cpp @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tangential_complex/benchmark/RIB_exporter.h b/src/Tangential_complex/benchmark/RIB_exporter.h index 73c14041..59ca138a 100644 --- a/src/Tangential_complex/benchmark/RIB_exporter.h +++ b/src/Tangential_complex/benchmark/RIB_exporter.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tangential_complex/benchmark/XML_exporter.h b/src/Tangential_complex/benchmark/XML_exporter.h index ed44f90a..4db5687f 100644 --- a/src/Tangential_complex/benchmark/XML_exporter.h +++ b/src/Tangential_complex/benchmark/XML_exporter.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tangential_complex/doc/COPYRIGHT b/src/Tangential_complex/doc/COPYRIGHT index c4df0f64..f9f92471 100644 --- a/src/Tangential_complex/doc/COPYRIGHT +++ b/src/Tangential_complex/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): Clement Jamin -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Tangential_complex/doc/Intro_tangential_complex.h b/src/Tangential_complex/doc/Intro_tangential_complex.h index 00e00c52..f4fc8ac7 100644 --- a/src/Tangential_complex/doc/Intro_tangential_complex.h +++ b/src/Tangential_complex/doc/Intro_tangential_complex.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h index 6f061922..d8356520 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h index 65c74ca5..f79186b0 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/config.h b/src/Tangential_complex/include/gudhi/Tangential_complex/config.h index ffefcd6b..e1af1ea6 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/config.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/config.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h b/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h index b2d6d674..2dd46118 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tangential_complex/test/test_tangential_complex.cpp b/src/Tangential_complex/test/test_tangential_complex.cpp index 48156440..4e2d4f65 100644 --- a/src/Tangential_complex/test/test_tangential_complex.cpp +++ b/src/Tangential_complex/test/test_tangential_complex.cpp @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/concept/SimplicialComplexForWitness.h b/src/Witness_complex/concept/SimplicialComplexForWitness.h index d78cc83f..8b85f4e4 100644 --- a/src/Witness_complex/concept/SimplicialComplexForWitness.h +++ b/src/Witness_complex/concept/SimplicialComplexForWitness.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/doc/COPYRIGHT b/src/Witness_complex/doc/COPYRIGHT index 7d032c87..25a700cf 100644 --- a/src/Witness_complex/doc/COPYRIGHT +++ b/src/Witness_complex/doc/COPYRIGHT @@ -4,7 +4,7 @@ computational topology. Author(s): Siargey Kachanovich -Copyright (C) 2015 INRIA +Copyright (C) 2015 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/Witness_complex/example/example_nearest_landmark_table.cpp b/src/Witness_complex/example/example_nearest_landmark_table.cpp index b8594212..acaf7c54 100644 --- a/src/Witness_complex/example/example_nearest_landmark_table.cpp +++ b/src/Witness_complex/example/example_nearest_landmark_table.cpp @@ -1,25 +1,3 @@ -/* 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): Siargey Kachanovich - * - * Copyright (C) 2016 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 - * 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 . - */ - #define BOOST_PARAMETER_MAX_ARITY 12 #include diff --git a/src/Witness_complex/example/example_strong_witness_complex_off.cpp b/src/Witness_complex/example/example_strong_witness_complex_off.cpp index 346bef6d..19f73836 100644 --- a/src/Witness_complex/example/example_strong_witness_complex_off.cpp +++ b/src/Witness_complex/example/example_strong_witness_complex_off.cpp @@ -1,25 +1,3 @@ -/* 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): Siargey Kachanovich - * - * Copyright (C) 2016 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - #include #include #include diff --git a/src/Witness_complex/example/example_witness_complex_sphere.cpp b/src/Witness_complex/example/example_witness_complex_sphere.cpp index a6e9b11a..9e3c972d 100644 --- a/src/Witness_complex/example/example_witness_complex_sphere.cpp +++ b/src/Witness_complex/example/example_witness_complex_sphere.cpp @@ -1,25 +1,3 @@ -/* 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): Siargey Kachanovich - * - * Copyright (C) 2016 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 - * 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 . - */ - #define BOOST_PARAMETER_MAX_ARITY 12 #include diff --git a/src/Witness_complex/example/generators.h b/src/Witness_complex/example/generators.h index 7df43db5..81566824 100644 --- a/src/Witness_complex/example/generators.h +++ b/src/Witness_complex/example/generators.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2015 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h b/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h index d41a6811..8cb8662b 100644 --- a/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h +++ b/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h b/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h index 0a05173a..10d2ec52 100644 --- a/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h +++ b/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h b/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h index 4f3cef4f..ea97cd3f 100644 --- a/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h b/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h index ff8bb139..1dacefa5 100644 --- a/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/include/gudhi/Strong_witness_complex.h b/src/Witness_complex/include/gudhi/Strong_witness_complex.h index b3d00b11..fd6b3f38 100644 --- a/src/Witness_complex/include/gudhi/Strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Strong_witness_complex.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index 53c38520..67885258 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h b/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h index b68d75a1..c7b732b9 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h +++ b/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2015 INRIA (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/utilities/strong_witness_persistence.cpp b/src/Witness_complex/utilities/strong_witness_persistence.cpp index 2fba631b..9d23df74 100644 --- a/src/Witness_complex/utilities/strong_witness_persistence.cpp +++ b/src/Witness_complex/utilities/strong_witness_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Witness_complex/utilities/weak_witness_persistence.cpp b/src/Witness_complex/utilities/weak_witness_persistence.cpp index 23fa93aa..1315d2ba 100644 --- a/src/Witness_complex/utilities/weak_witness_persistence.cpp +++ b/src/Witness_complex/utilities/weak_witness_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h index c60ed15a..523153b8 100644 --- a/src/common/doc/file_formats.h +++ b/src/common/doc/file_formats.h @@ -4,7 +4,7 @@ * * Author(s): Clément Jamin * -* Copyright (C) 2017 INRIA +* Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Clock.h b/src/common/include/gudhi/Clock.h index b83de2f5..cdf18cb2 100644 --- a/src/common/include/gudhi/Clock.h +++ b/src/common/include/gudhi/Clock.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Debug_utils.h b/src/common/include/gudhi/Debug_utils.h index 90d3cf47..3f5cb04f 100644 --- a/src/common/include/gudhi/Debug_utils.h +++ b/src/common/include/gudhi/Debug_utils.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Null_output_iterator.h b/src/common/include/gudhi/Null_output_iterator.h index 42e6e449..c700af5f 100644 --- a/src/common/include/gudhi/Null_output_iterator.h +++ b/src/common/include/gudhi/Null_output_iterator.h @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Off_reader.h b/src/common/include/gudhi/Off_reader.h index 32320e4d..024f0568 100644 --- a/src/common/include/gudhi/Off_reader.h +++ b/src/common/include/gudhi/Off_reader.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Point.h b/src/common/include/gudhi/Point.h index 0479e71e..345a8465 100644 --- a/src/common/include/gudhi/Point.h +++ b/src/common/include/gudhi/Point.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Points_3D_off_io.h b/src/common/include/gudhi/Points_3D_off_io.h index b0d24998..704f73a7 100644 --- a/src/common/include/gudhi/Points_3D_off_io.h +++ b/src/common/include/gudhi/Points_3D_off_io.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2015 INRIA Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Points_off_io.h b/src/common/include/gudhi/Points_off_io.h index 08f324c6..38029658 100644 --- a/src/common/include/gudhi/Points_off_io.h +++ b/src/common/include/gudhi/Points_off_io.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2015 INRIA Saclay (France) + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Simple_object_pool.h b/src/common/include/gudhi/Simple_object_pool.h index fb9c8e23..47283521 100644 --- a/src/common/include/gudhi/Simple_object_pool.h +++ b/src/common/include/gudhi/Simple_object_pool.h @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse * - * Copyright (C) 2015 INRIA Saclay - Ile de France + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/Unitary_tests_utils.h b/src/common/include/gudhi/Unitary_tests_utils.h index 8394a062..e07c8d42 100644 --- a/src/common/include/gudhi/Unitary_tests_utils.h +++ b/src/common/include/gudhi/Unitary_tests_utils.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/allocator.h b/src/common/include/gudhi/allocator.h index 4ede14e4..3de16a49 100644 --- a/src/common/include/gudhi/allocator.h +++ b/src/common/include/gudhi/allocator.h @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse * - * Copyright (C) 2015 INRIA Saclay - Ile de France + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/console_color.h b/src/common/include/gudhi/console_color.h index c4671da3..a493e0d0 100644 --- a/src/common/include/gudhi/console_color.h +++ b/src/common/include/gudhi/console_color.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA Sophia-Antipolis (France) + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 3a5d1fd5..f7baed6f 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/graph_simplicial_complex.h b/src/common/include/gudhi/graph_simplicial_complex.h index d84421b2..6ab7b0b4 100644 --- a/src/common/include/gudhi/graph_simplicial_complex.h +++ b/src/common/include/gudhi/graph_simplicial_complex.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/random_point_generators.h b/src/common/include/gudhi/random_point_generators.h index 9df77760..1f8f2cd8 100644 --- a/src/common/include/gudhi/random_point_generators.h +++ b/src/common/include/gudhi/random_point_generators.h @@ -4,7 +4,7 @@ * * Author(s): Clement Jamin * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h index 90be4fc7..26eeb76d 100644 --- a/src/common/include/gudhi/reader_utils.h +++ b/src/common/include/gudhi/reader_utils.h @@ -4,7 +4,7 @@ * * Author(s): Clement Maria, Pawel Dlotko, Clement Jamin * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/test/test_distance_matrix_reader.cpp b/src/common/test/test_distance_matrix_reader.cpp index 656e6f2e..6fee86e2 100644 --- a/src/common/test/test_distance_matrix_reader.cpp +++ b/src/common/test/test_distance_matrix_reader.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/test/test_persistence_intervals_reader.cpp b/src/common/test/test_persistence_intervals_reader.cpp index be299376..b7ece9bd 100644 --- a/src/common/test/test_persistence_intervals_reader.cpp +++ b/src/common/test/test_persistence_intervals_reader.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/test/test_points_off_reader.cpp b/src/common/test/test_points_off_reader.cpp index 0a78d190..ba3bab71 100644 --- a/src/common/test/test_points_off_reader.cpp +++ b/src/common/test/test_points_off_reader.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2015 + * Copyright (C) 2015 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common/utilities/off_file_from_shape_generator.cpp b/src/common/utilities/off_file_from_shape_generator.cpp index afcd558c..5e3da7f7 100644 --- a/src/common/utilities/off_file_from_shape_generator.cpp +++ b/src/common/utilities/off_file_from_shape_generator.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA Saclay (France) + * Copyright (C) 2014 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/cython/alpha_complex.pyx b/src/cython/cython/alpha_complex.pyx index a0e8f9b7..4f772e31 100644 --- a/src/cython/cython/alpha_complex.pyx +++ b/src/cython/cython/alpha_complex.pyx @@ -11,7 +11,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Alpha_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/bottleneck_distance.pyx b/src/cython/cython/bottleneck_distance.pyx index 9fb377ff..76ef81f4 100644 --- a/src/cython/cython/bottleneck_distance.pyx +++ b/src/cython/cython/bottleneck_distance.pyx @@ -9,7 +9,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Bottleneck_distance_interface.h" namespace "Gudhi::persistence_diagram": diff --git a/src/cython/cython/cubical_complex.pyx b/src/cython/cython/cubical_complex.pyx index ffc85130..a98a3ec3 100644 --- a/src/cython/cython/cubical_complex.pyx +++ b/src/cython/cython/cubical_complex.pyx @@ -11,7 +11,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Cubical_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/euclidean_strong_witness_complex.pyx b/src/cython/cython/euclidean_strong_witness_complex.pyx index c1523892..62b7cf71 100644 --- a/src/cython/cython/euclidean_strong_witness_complex.pyx +++ b/src/cython/cython/euclidean_strong_witness_complex.pyx @@ -8,7 +8,7 @@ from libcpp.utility cimport pair Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ from libcpp.utility cimport pair """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Euclidean_strong_witness_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/euclidean_witness_complex.pyx b/src/cython/cython/euclidean_witness_complex.pyx index 7c443b6b..c10ca73d 100644 --- a/src/cython/cython/euclidean_witness_complex.pyx +++ b/src/cython/cython/euclidean_witness_complex.pyx @@ -8,7 +8,7 @@ from libcpp.utility cimport pair Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ from libcpp.utility cimport pair """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Euclidean_witness_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/off_reader.pyx b/src/cython/cython/off_reader.pyx index 266dae2c..b939013f 100644 --- a/src/cython/cython/off_reader.pyx +++ b/src/cython/cython/off_reader.pyx @@ -9,7 +9,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Off_reader_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/periodic_cubical_complex.pyx b/src/cython/cython/periodic_cubical_complex.pyx index 3025f125..c25b83e9 100644 --- a/src/cython/cython/periodic_cubical_complex.pyx +++ b/src/cython/cython/periodic_cubical_complex.pyx @@ -11,7 +11,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Cubical_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/persistence_graphical_tools.py b/src/cython/cython/persistence_graphical_tools.py index fb837e29..e2405e96 100755 --- a/src/cython/cython/persistence_graphical_tools.py +++ b/src/cython/cython/persistence_graphical_tools.py @@ -8,7 +8,7 @@ import os Author(s): Vincent Rouvreau, Bertrand Michel - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ import os """ __author__ = "Vincent Rouvreau, Bertrand Michel" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" def __min_birth_max_death(persistence, band_boot=0.): diff --git a/src/cython/cython/reader_utils.pyx b/src/cython/cython/reader_utils.pyx index 3a17c5a0..e4572db0 100644 --- a/src/cython/cython/reader_utils.pyx +++ b/src/cython/cython/reader_utils.pyx @@ -11,7 +11,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2017 INRIA + Copyright (C) 2017 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2017 INRIA" +__copyright__ = "Copyright (C) 2017 Inria" __license__ = "GPL v3" cdef extern from "Reader_utils_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/rips_complex.pyx b/src/cython/cython/rips_complex.pyx index 73b154b8..59c16bff 100644 --- a/src/cython/cython/rips_complex.pyx +++ b/src/cython/cython/rips_complex.pyx @@ -11,7 +11,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Rips_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/simplex_tree.pyx b/src/cython/cython/simplex_tree.pyx index 0cb575d2..8abeb5f8 100644 --- a/src/cython/cython/simplex_tree.pyx +++ b/src/cython/cython/simplex_tree.pyx @@ -10,7 +10,7 @@ from libcpp.string cimport string Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ from libcpp.string cimport string """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Simplex_tree_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/strong_witness_complex.pyx b/src/cython/cython/strong_witness_complex.pyx index 770b46f5..74c5cb05 100644 --- a/src/cython/cython/strong_witness_complex.pyx +++ b/src/cython/cython/strong_witness_complex.pyx @@ -8,7 +8,7 @@ from libcpp.utility cimport pair Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ from libcpp.utility cimport pair """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Strong_witness_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/subsampling.pyx b/src/cython/cython/subsampling.pyx index 894a4fbe..ac09b7a3 100644 --- a/src/cython/cython/subsampling.pyx +++ b/src/cython/cython/subsampling.pyx @@ -10,7 +10,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Subsampling_interface.h" namespace "Gudhi::subsampling": diff --git a/src/cython/cython/tangential_complex.pyx b/src/cython/cython/tangential_complex.pyx index d55bb050..10fa1468 100644 --- a/src/cython/cython/tangential_complex.pyx +++ b/src/cython/cython/tangential_complex.pyx @@ -11,7 +11,7 @@ import os Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ import os """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Tangential_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/cython/witness_complex.pyx b/src/cython/cython/witness_complex.pyx index 96d122bb..8591465a 100644 --- a/src/cython/cython/witness_complex.pyx +++ b/src/cython/cython/witness_complex.pyx @@ -8,7 +8,7 @@ from libcpp.utility cimport pair Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ from libcpp.utility cimport pair """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" cdef extern from "Witness_complex_interface.h" namespace "Gudhi": diff --git a/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py index b4487be4..27550025 100755 --- a/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py +++ b/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py @@ -9,7 +9,7 @@ import argparse Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import argparse """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='AlphaComplex creation from ' diff --git a/src/cython/example/alpha_complex_from_points_example.py b/src/cython/example/alpha_complex_from_points_example.py index 7d6278ce..ad73c744 100755 --- a/src/cython/example/alpha_complex_from_points_example.py +++ b/src/cython/example/alpha_complex_from_points_example.py @@ -8,7 +8,7 @@ from gudhi import AlphaComplex, SimplexTree Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ from gudhi import AlphaComplex, SimplexTree """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" print("#####################################################################") diff --git a/src/cython/example/alpha_rips_persistence_bottleneck_distance.py b/src/cython/example/alpha_rips_persistence_bottleneck_distance.py index 386f8457..b51fa7a8 100755 --- a/src/cython/example/alpha_rips_persistence_bottleneck_distance.py +++ b/src/cython/example/alpha_rips_persistence_bottleneck_distance.py @@ -10,7 +10,7 @@ import math Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ import math """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='AlphaComplex and RipsComplex ' diff --git a/src/cython/example/bottleneck_basic_example.py b/src/cython/example/bottleneck_basic_example.py index a7fa01c1..287956e7 100755 --- a/src/cython/example/bottleneck_basic_example.py +++ b/src/cython/example/bottleneck_basic_example.py @@ -8,7 +8,7 @@ import gudhi Author(s): Francois Godi, Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ import gudhi """ __author__ = "Francois Godi, Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diag1 = [[2.7, 3.7],[9.6, 14.],[34.2, 34.974], [3.,float('Inf')]] diff --git a/src/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py index e3f362dc..1c142d9a 100755 --- a/src/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py +++ b/src/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py @@ -9,7 +9,7 @@ import argparse Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import argparse """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='EuclideanStrongWitnessComplex creation from ' diff --git a/src/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py index c236d992..216fcff2 100755 --- a/src/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py +++ b/src/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py @@ -9,7 +9,7 @@ import argparse Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import argparse """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='EuclideanWitnessComplex creation from ' diff --git a/src/cython/example/gudhi_graphical_tools_example.py b/src/cython/example/gudhi_graphical_tools_example.py index ed87806b..9f37efc0 100755 --- a/src/cython/example/gudhi_graphical_tools_example.py +++ b/src/cython/example/gudhi_graphical_tools_example.py @@ -8,7 +8,7 @@ import gudhi Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ import gudhi """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" print("#####################################################################") diff --git a/src/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py b/src/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py index 00334121..5f968bf1 100755 --- a/src/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py +++ b/src/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py @@ -9,7 +9,7 @@ import argparse Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import argparse """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" def is_file_perseus(file): diff --git a/src/cython/example/random_cubical_complex_persistence_example.py b/src/cython/example/random_cubical_complex_persistence_example.py index c832d6bf..80ff2452 100755 --- a/src/cython/example/random_cubical_complex_persistence_example.py +++ b/src/cython/example/random_cubical_complex_persistence_example.py @@ -13,7 +13,7 @@ import operator Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ import operator """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='Random cubical complex.', diff --git a/src/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py b/src/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py index aa82ef71..4142fa99 100755 --- a/src/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py +++ b/src/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py @@ -10,7 +10,7 @@ import argparse Author(s): Vincent Rouvreau - Copyright (C) 2017 INRIA + Copyright (C) 2017 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ import argparse """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2017 INRIA" +__copyright__ = "Copyright (C) 2017 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='RipsComplex creation from ' diff --git a/src/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py b/src/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py index c8aac240..01d1f38a 100755 --- a/src/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py +++ b/src/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py @@ -9,7 +9,7 @@ import argparse Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import argparse """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='RipsComplex creation from ' diff --git a/src/cython/example/rips_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/rips_complex_diagram_persistence_from_off_file_example.py index 544b68c9..865c66b6 100755 --- a/src/cython/example/rips_complex_diagram_persistence_from_off_file_example.py +++ b/src/cython/example/rips_complex_diagram_persistence_from_off_file_example.py @@ -9,7 +9,7 @@ import argparse Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import argparse """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='RipsComplex creation from ' diff --git a/src/cython/example/rips_complex_from_points_example.py b/src/cython/example/rips_complex_from_points_example.py index 5d411b1a..ffa9d91f 100755 --- a/src/cython/example/rips_complex_from_points_example.py +++ b/src/cython/example/rips_complex_from_points_example.py @@ -8,7 +8,7 @@ import gudhi Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ import gudhi """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" print("#####################################################################") diff --git a/src/cython/example/rips_persistence_diagram.py b/src/cython/example/rips_persistence_diagram.py index 9bfea41c..7a6a9f46 100755 --- a/src/cython/example/rips_persistence_diagram.py +++ b/src/cython/example/rips_persistence_diagram.py @@ -8,7 +8,7 @@ import gudhi Author(s): Marc Glisse - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ import gudhi """ __author__ = "Marc Glisse" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" print("#####################################################################") diff --git a/src/cython/example/simplex_tree_example.py b/src/cython/example/simplex_tree_example.py index 51a60e73..28679015 100755 --- a/src/cython/example/simplex_tree_example.py +++ b/src/cython/example/simplex_tree_example.py @@ -8,7 +8,7 @@ import gudhi Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ import gudhi """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" print("#####################################################################") diff --git a/src/cython/example/tangential_complex_plain_homology_from_off_file_example.py b/src/cython/example/tangential_complex_plain_homology_from_off_file_example.py index 6145e7f2..680a8bf8 100755 --- a/src/cython/example/tangential_complex_plain_homology_from_off_file_example.py +++ b/src/cython/example/tangential_complex_plain_homology_from_off_file_example.py @@ -9,7 +9,7 @@ import argparse Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import argparse """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" parser = argparse.ArgumentParser(description='TangentialComplex creation from ' diff --git a/src/cython/example/witness_complex_from_nearest_landmark_table.py b/src/cython/example/witness_complex_from_nearest_landmark_table.py index 92ed970b..e6b295ee 100755 --- a/src/cython/example/witness_complex_from_nearest_landmark_table.py +++ b/src/cython/example/witness_complex_from_nearest_landmark_table.py @@ -8,7 +8,7 @@ from gudhi import StrongWitnessComplex, SimplexTree Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ from gudhi import StrongWitnessComplex, SimplexTree """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" print("#####################################################################") diff --git a/src/cython/gudhi.pyx.in b/src/cython/gudhi.pyx.in index a8dd9f80..b94f2251 100644 --- a/src/cython/gudhi.pyx.in +++ b/src/cython/gudhi.pyx.in @@ -4,7 +4,7 @@ Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" __version__ = "@GUDHI_VERSION@" # This variable is used by doctest to find files diff --git a/src/cython/include/Alpha_complex_interface.h b/src/cython/include/Alpha_complex_interface.h index d47db71f..8cf527fc 100644 --- a/src/cython/include/Alpha_complex_interface.h +++ b/src/cython/include/Alpha_complex_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Bottleneck_distance_interface.h b/src/cython/include/Bottleneck_distance_interface.h index d5fbf6ea..5ad9d77d 100644 --- a/src/cython/include/Bottleneck_distance_interface.h +++ b/src/cython/include/Bottleneck_distance_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Cubical_complex_interface.h b/src/cython/include/Cubical_complex_interface.h index fad92c2c..85b717b3 100644 --- a/src/cython/include/Cubical_complex_interface.h +++ b/src/cython/include/Cubical_complex_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Euclidean_strong_witness_complex_interface.h b/src/cython/include/Euclidean_strong_witness_complex_interface.h index b9dd8177..d86355d6 100644 --- a/src/cython/include/Euclidean_strong_witness_complex_interface.h +++ b/src/cython/include/Euclidean_strong_witness_complex_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Euclidean_witness_complex_interface.h b/src/cython/include/Euclidean_witness_complex_interface.h index 2a09b3b5..dc303533 100644 --- a/src/cython/include/Euclidean_witness_complex_interface.h +++ b/src/cython/include/Euclidean_witness_complex_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Off_reader_interface.h b/src/cython/include/Off_reader_interface.h index 0ca55500..f6b14f38 100644 --- a/src/cython/include/Off_reader_interface.h +++ b/src/cython/include/Off_reader_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Persistent_cohomology_interface.h b/src/cython/include/Persistent_cohomology_interface.h index 55028fd0..a86b1187 100644 --- a/src/cython/include/Persistent_cohomology_interface.h +++ b/src/cython/include/Persistent_cohomology_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Reader_utils_interface.h b/src/cython/include/Reader_utils_interface.h index 8ec34f61..5f7527d9 100644 --- a/src/cython/include/Reader_utils_interface.h +++ b/src/cython/include/Reader_utils_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2017 INRIA + * Copyright (C) 2017 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Rips_complex_interface.h b/src/cython/include/Rips_complex_interface.h index f26befbc..8b6c9c35 100644 --- a/src/cython/include/Rips_complex_interface.h +++ b/src/cython/include/Rips_complex_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Simplex_tree_interface.h b/src/cython/include/Simplex_tree_interface.h index 54a4f824..3481eeff 100644 --- a/src/cython/include/Simplex_tree_interface.h +++ b/src/cython/include/Simplex_tree_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Strong_witness_complex_interface.h b/src/cython/include/Strong_witness_complex_interface.h index d05eaac5..3c72c916 100644 --- a/src/cython/include/Strong_witness_complex_interface.h +++ b/src/cython/include/Strong_witness_complex_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Subsampling_interface.h b/src/cython/include/Subsampling_interface.h index b0f4a50a..f990da0c 100644 --- a/src/cython/include/Subsampling_interface.h +++ b/src/cython/include/Subsampling_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Tangential_complex_interface.h b/src/cython/include/Tangential_complex_interface.h index 0c3a510e..2772460a 100644 --- a/src/cython/include/Tangential_complex_interface.h +++ b/src/cython/include/Tangential_complex_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/include/Witness_complex_interface.h b/src/cython/include/Witness_complex_interface.h index 6501cc35..01b372e7 100644 --- a/src/cython/include/Witness_complex_interface.h +++ b/src/cython/include/Witness_complex_interface.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 Inria * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cython/setup.py.in b/src/cython/setup.py.in index c767e93d..b6ca4bcb 100644 --- a/src/cython/setup.py.in +++ b/src/cython/setup.py.in @@ -7,7 +7,7 @@ from Cython.Build import cythonize Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ from Cython.Build import cythonize """ __author__ = "GUDHI Editorial Board" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" gudhi = Extension( diff --git a/src/cython/test/test_alpha_complex.py b/src/cython/test/test_alpha_complex.py index 2c76d9d7..e97f2530 100755 --- a/src/cython/test/test_alpha_complex.py +++ b/src/cython/test/test_alpha_complex.py @@ -6,7 +6,7 @@ from gudhi import AlphaComplex, SimplexTree Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ from gudhi import AlphaComplex, SimplexTree """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_bottleneck_distance.py b/src/cython/test/test_bottleneck_distance.py index 3d982d34..4eb5848f 100755 --- a/src/cython/test/test_bottleneck_distance.py +++ b/src/cython/test/test_bottleneck_distance.py @@ -6,7 +6,7 @@ import gudhi Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ import gudhi """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_cubical_complex.py b/src/cython/test/test_cubical_complex.py index 0e81554d..79d39aa8 100755 --- a/src/cython/test/test_cubical_complex.py +++ b/src/cython/test/test_cubical_complex.py @@ -6,7 +6,7 @@ from gudhi import CubicalComplex Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ from gudhi import CubicalComplex """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_euclidean_witness_complex.py b/src/cython/test/test_euclidean_witness_complex.py index 737f1ef4..2f77210a 100755 --- a/src/cython/test/test_euclidean_witness_complex.py +++ b/src/cython/test/test_euclidean_witness_complex.py @@ -6,7 +6,7 @@ import gudhi Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ import gudhi """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_reader_utils.py b/src/cython/test/test_reader_utils.py index 25591fb3..b240c84f 100755 --- a/src/cython/test/test_reader_utils.py +++ b/src/cython/test/test_reader_utils.py @@ -6,7 +6,7 @@ import gudhi Author(s): Vincent Rouvreau - Copyright (C) 2017 INRIA + Copyright (C) 2017 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ import gudhi """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2017 INRIA" +__copyright__ = "Copyright (C) 2017 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_rips_complex.py b/src/cython/test/test_rips_complex.py index c7d2ead4..c37b5400 100755 --- a/src/cython/test/test_rips_complex.py +++ b/src/cython/test/test_rips_complex.py @@ -7,7 +7,7 @@ from math import sqrt Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ from math import sqrt """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_simplex_tree.py b/src/cython/test/test_simplex_tree.py index 6dec5d94..029e7729 100755 --- a/src/cython/test/test_simplex_tree.py +++ b/src/cython/test/test_simplex_tree.py @@ -6,7 +6,7 @@ from gudhi import SimplexTree Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ from gudhi import SimplexTree """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_subsampling.py b/src/cython/test/test_subsampling.py index 2caf4ddb..96906a6f 100755 --- a/src/cython/test/test_subsampling.py +++ b/src/cython/test/test_subsampling.py @@ -6,7 +6,7 @@ import gudhi Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ import gudhi """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_tangential_complex.py b/src/cython/test/test_tangential_complex.py index 8aa4023c..fe623c7b 100755 --- a/src/cython/test/test_tangential_complex.py +++ b/src/cython/test/test_tangential_complex.py @@ -6,7 +6,7 @@ from gudhi import TangentialComplex, SimplexTree Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ from gudhi import TangentialComplex, SimplexTree """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" diff --git a/src/cython/test/test_witness_complex.py b/src/cython/test/test_witness_complex.py index 7d1fb6be..bcbc521b 100755 --- a/src/cython/test/test_witness_complex.py +++ b/src/cython/test/test_witness_complex.py @@ -6,7 +6,7 @@ from gudhi import WitnessComplex, StrongWitnessComplex, SimplexTree Author(s): Vincent Rouvreau - Copyright (C) 2016 INRIA + Copyright (C) 2016 Inria This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ from gudhi import WitnessComplex, StrongWitnessComplex, SimplexTree """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" -- cgit v1.2.3 From 08ddc6dbbbb1cf01a05ab23ece47c3d8cf9957ea Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Thu, 13 Jun 2019 17:07:09 +0200 Subject: Change Copyright --- .../generator/aurelien_alvarez_surfaces_in_R8.py | 31 ++++++++-------------- .../concept/SimplicialComplexForAlpha.h | 20 +++----------- .../concept/SimplicialComplexForAlpha3d.h | 14 ++-------- src/Alpha_complex/doc/Intro_alpha_complex.h | 14 ++-------- src/Alpha_complex/include/gudhi/Alpha_complex.h | 14 ++-------- src/Alpha_complex/include/gudhi/Alpha_complex_3d.h | 14 ++-------- .../include/gudhi/Alpha_complex_options.h | 14 ++-------- .../test/Alpha_complex_3d_unit_test.cpp | 14 ++-------- src/Alpha_complex/test/Alpha_complex_unit_test.cpp | 14 ++-------- .../test/Periodic_alpha_complex_3d_unit_test.cpp | 14 ++-------- .../test/Weighted_alpha_complex_3d_unit_test.cpp | 14 ++-------- ...eighted_periodic_alpha_complex_3d_unit_test.cpp | 14 ++-------- .../utilities/alpha_complex_3d_persistence.cpp | 14 ++-------- .../utilities/alpha_complex_persistence.cpp | 14 ++-------- .../doc/Gudhi_Cubical_Complex_doc.h | 14 ++-------- .../example/Random_bitmap_cubical_complex.cpp | 14 ++-------- .../include/gudhi/Bitmap_cubical_complex.h | 14 ++-------- .../include/gudhi/Bitmap_cubical_complex/counter.h | 14 ++-------- .../include/gudhi/Bitmap_cubical_complex_base.h | 14 ++-------- ...cal_complex_periodic_boundary_conditions_base.h | 14 ++-------- src/Bitmap_cubical_complex/test/Bitmap_test.cpp | 14 ++-------- .../utilities/cubical_complex_persistence.cpp | 14 ++-------- .../periodic_cubical_complex_persistence.cpp | 14 ++-------- .../benchmark/bottleneck_chrono.cpp | 14 ++-------- .../concept/Persistence_diagram.h | 14 ++-------- .../doc/Intro_bottleneck_distance.h | 14 ++-------- .../alpha_rips_persistence_bottleneck_distance.cpp | 14 ++-------- .../example/bottleneck_basic_example.cpp | 14 ++-------- src/Bottleneck_distance/include/gudhi/Bottleneck.h | 14 ++-------- .../include/gudhi/Graph_matching.h | 14 ++-------- .../include/gudhi/Internal_point.h | 14 ++-------- .../include/gudhi/Neighbors_finder.h | 14 ++-------- .../include/gudhi/Persistence_graph.h | 14 ++-------- .../test/bottleneck_unit_test.cpp | 14 ++-------- .../utilities/bottleneck_distance.cpp | 14 ++-------- .../benchmark/cech_complex_benchmark.cpp | 14 ++-------- .../concept/SimplicialComplexForCech.h | 20 +++----------- src/Cech_complex/doc/Intro_cech_complex.h | 14 ++-------- .../example/cech_complex_step_by_step.cpp | 14 ++-------- src/Cech_complex/include/gudhi/Cech_complex.h | 14 ++-------- .../include/gudhi/Cech_complex_blocker.h | 14 ++-------- src/Cech_complex/test/test_cech_complex.cpp | 14 ++-------- src/Cech_complex/utilities/cech_persistence.cpp | 14 ++-------- src/Contraction/example/Garland_heckbert.cpp | 21 +++------------ .../example/Garland_heckbert/Error_quadric.h | 21 +++------------ src/Contraction/example/Rips_contraction.cpp | 14 ++-------- .../include/gudhi/Contraction/Edge_profile.h | 20 +++----------- .../Contraction/policies/Contraction_visitor.h | 20 +++----------- .../gudhi/Contraction/policies/Cost_policy.h | 20 +++----------- .../Contraction/policies/Dummy_valid_contraction.h | 20 +++----------- .../gudhi/Contraction/policies/Edge_length_cost.h | 20 +++----------- .../Contraction/policies/First_vertex_placement.h | 20 +++----------- .../policies/Link_condition_valid_contraction.h | 20 +++----------- .../gudhi/Contraction/policies/Middle_placement.h | 20 +++----------- .../gudhi/Contraction/policies/Placement_policy.h | 20 +++----------- .../policies/Valid_contraction_policy.h | 20 +++----------- src/Contraction/include/gudhi/Edge_contraction.h | 14 ++-------- .../include/gudhi/Skeleton_blocker_contractor.h | 14 ++-------- src/GudhUI/gui/MainWindow.cpp | 14 ++-------- src/GudhUI/gui/MainWindow.h | 14 ++-------- src/GudhUI/gui/Menu_edge_contraction.cpp | 14 ++-------- src/GudhUI/gui/Menu_edge_contraction.h | 14 ++-------- src/GudhUI/gui/Menu_k_nearest_neighbors.cpp | 14 ++-------- src/GudhUI/gui/Menu_k_nearest_neighbors.h | 14 ++-------- src/GudhUI/gui/Menu_persistence.cpp | 21 +++------------ src/GudhUI/gui/Menu_persistence.h | 21 +++------------ src/GudhUI/gui/Menu_uniform_neighbors.cpp | 21 +++------------ src/GudhUI/gui/Menu_uniform_neighbors.h | 21 +++------------ src/GudhUI/gui/gudhui.cpp | 21 +++------------ src/GudhUI/model/Complex_typedefs.h | 21 +++------------ src/GudhUI/model/Model.h | 21 +++------------ src/GudhUI/utils/Bar_code_persistence.h | 21 +++------------ src/GudhUI/utils/Critical_points.h | 21 +++------------ src/GudhUI/utils/Edge_collapsor.h | 21 +++------------ src/GudhUI/utils/Edge_contractor.h | 21 +++------------ src/GudhUI/utils/Furthest_point_epsilon_net.h | 21 +++------------ src/GudhUI/utils/Is_manifold.h | 15 ++--------- src/GudhUI/utils/K_nearest_builder.h | 21 +++------------ src/GudhUI/utils/Lloyd_builder.h | 21 +++------------ src/GudhUI/utils/MClock.h | 21 +++------------ src/GudhUI/utils/Persistence_compute.h | 21 +++------------ src/GudhUI/utils/Rips_builder.h | 21 +++------------ src/GudhUI/utils/UI_utils.h | 21 +++------------ src/GudhUI/utils/Vertex_collapsor.h | 21 +++------------ src/GudhUI/view/Color.h | 21 +++------------ src/GudhUI/view/FirstCoordProjector.h | 21 +++------------ src/GudhUI/view/Projector3D.h | 21 +++------------ src/GudhUI/view/View_parameter.h | 21 +++------------ src/GudhUI/view/Viewer.cpp | 21 +++------------ src/GudhUI/view/Viewer.h | 21 +++------------ src/GudhUI/view/Viewer_instructor.cpp | 21 +++------------ src/GudhUI/view/Viewer_instructor.h | 21 +++------------ src/Hasse_complex/include/gudhi/Hasse_complex.h | 20 +++----------- src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 14 ++-------- src/Nerve_GIC/example/CoordGIC.cpp | 14 ++-------- src/Nerve_GIC/example/FuncGIC.cpp | 14 ++-------- src/Nerve_GIC/include/gudhi/GIC.h | 14 ++-------- src/Nerve_GIC/test/test_GIC.cpp | 14 ++-------- .../utilities/KeplerMapperVisuFromTxtFile.py | 22 ++++----------- src/Nerve_GIC/utilities/Nerve.cpp | 14 ++-------- src/Nerve_GIC/utilities/VoronoiGIC.cpp | 14 ++-------- .../concept/Real_valued_topological_data.h | 14 ++-------- .../concept/Topological_data_with_averages.h | 14 ++-------- .../concept/Topological_data_with_distances.h | 14 ++-------- .../concept/Topological_data_with_scalar_product.h | 14 ++-------- .../concept/Vectorized_topological_data.h | 14 ++-------- .../doc/Persistence_representations_doc.h | 14 ++-------- .../example/persistence_heat_maps.cpp | 14 ++-------- .../example/persistence_intervals.cpp | 14 ++-------- .../example/persistence_landscape.cpp | 14 ++-------- .../example/persistence_landscape_on_grid.cpp | 14 ++-------- .../example/persistence_vectors.cpp | 14 ++-------- .../example/sliced_wasserstein.cpp | 14 ++-------- .../include/gudhi/PSSK.h | 14 ++-------- .../include/gudhi/Persistence_heat_maps.h | 14 ++-------- .../include/gudhi/Persistence_intervals.h | 14 ++-------- .../gudhi/Persistence_intervals_with_distances.h | 14 ++-------- .../include/gudhi/Persistence_landscape.h | 14 ++-------- .../include/gudhi/Persistence_landscape_on_grid.h | 23 ++++------------ .../include/gudhi/Persistence_vectors.h | 14 ++-------- .../include/gudhi/Sliced_Wasserstein.h | 14 ++-------- .../gudhi/common_persistence_representations.h | 14 ++-------- .../include/gudhi/read_persistence_from_file.h | 14 ++-------- src/Persistence_representations/test/kernels.cpp | 14 ++-------- .../test/persistence_heat_maps_test.cpp | 14 ++-------- .../test/persistence_intervals_test.cpp | 14 ++-------- .../persistence_intervals_with_distances_test.cpp | 14 ++-------- .../test/persistence_lanscapes_on_grid_test.cpp | 14 ++-------- .../test/persistence_lanscapes_test.cpp | 14 ++-------- .../test/read_persistence_from_file_test.cpp | 14 ++-------- .../test/vector_representation_test.cpp | 14 ++-------- .../average_persistence_heat_maps.cpp | 14 ++-------- .../compute_distance_of_persistence_heat_maps.cpp | 14 ++-------- ...ute_scalar_product_of_persistence_heat_maps.cpp | 14 ++-------- ...h_m_weighted_by_arctan_of_their_persistence.cpp | 30 +++++++-------------- ...te_p_h_m_weighted_by_distance_from_diagonal.cpp | 14 ++-------- ...ate_p_h_m_weighted_by_squared_diag_distance.cpp | 14 ++-------- .../create_persistence_heat_maps.cpp | 14 ++-------- .../persistence_heat_maps/create_pssk.cpp | 14 ++-------- .../plot_persistence_heat_map.cpp | 14 ++-------- ...te_birth_death_range_in_persistence_diagram.cpp | 14 ++-------- .../compute_bottleneck_distance.cpp | 14 ++-------- .../compute_number_of_dominant_intervals.cpp | 14 ++-------- .../plot_histogram_of_intervals_lengths.cpp | 14 ++-------- .../plot_persistence_Betti_numbers.cpp | 14 ++-------- .../plot_persistence_intervals.cpp | 14 ++-------- .../persistence_landscapes/average_landscapes.cpp | 14 ++-------- .../compute_distance_of_landscapes.cpp | 14 ++-------- .../compute_scalar_product_of_landscapes.cpp | 14 ++-------- .../persistence_landscapes/create_landscapes.cpp | 14 ++-------- .../persistence_landscapes/plot_landscapes.cpp | 14 ++-------- .../average_landscapes_on_grid.cpp | 14 ++-------- .../compute_distance_of_landscapes_on_grid.cpp | 14 ++-------- ...ompute_scalar_product_of_landscapes_on_grid.cpp | 14 ++-------- .../create_landscapes_on_grid.cpp | 14 ++-------- .../plot_landscapes_on_grid.cpp | 14 ++-------- .../average_persistence_vectors.cpp | 14 ++-------- .../compute_distance_of_persistence_vectors.cpp | 14 ++-------- ...mpute_scalar_product_of_persistence_vectors.cpp | 14 ++-------- .../create_persistence_vectors.cpp | 14 ++-------- .../plot_persistence_vectors.cpp | 14 ++-------- .../benchmark/performance_rips_persistence.cpp | 20 +++----------- .../concept/CoefficientField.h | 30 +++++++-------------- .../concept/FilteredComplex.h | 30 +++++++-------------- .../concept/PersistentHomology.h | 30 +++++++-------------- .../doc/Intro_persistent_cohomology.h | 14 ++-------- .../example/custom_persistence_sort.cpp | 14 ++-------- .../example/persistence_from_file.cpp | 20 +++----------- .../persistence_from_simple_simplex_tree.cpp | 14 ++-------- .../example/plain_homology.cpp | 14 ++-------- .../example/rips_multifield_persistence.cpp | 20 +++----------- .../example/rips_persistence_step_by_step.cpp | 20 +++----------- .../rips_persistence_via_boundary_matrix.cpp | 20 +++----------- .../include/gudhi/Persistent_cohomology.h | 14 ++-------- .../include/gudhi/Persistent_cohomology/Field_Zp.h | 14 ++-------- .../gudhi/Persistent_cohomology/Multi_field.h | 14 ++-------- .../Persistent_cohomology_column.h | 14 ++-------- .../concept/SimplicialComplexForRips.h | 20 +++----------- src/Rips_complex/doc/Intro_rips_complex.h | 14 ++-------- src/Rips_complex/include/gudhi/Rips_complex.h | 14 ++-------- .../include/gudhi/Sparse_rips_complex.h | 14 ++-------- src/Rips_complex/test/test_rips_complex.cpp | 14 ++-------- .../rips_correlation_matrix_persistence.cpp | 14 ++-------- .../utilities/rips_distance_matrix_persistence.cpp | 14 ++-------- src/Rips_complex/utilities/rips_persistence.cpp | 14 ++-------- .../utilities/sparse_rips_persistence.cpp | 14 ++-------- src/Simplex_tree/concept/FiltrationValue.h | 30 +++++++-------------- src/Simplex_tree/concept/IndexingTag.h | 30 +++++++-------------- src/Simplex_tree/concept/SimplexKey.h | 30 +++++++-------------- src/Simplex_tree/concept/SimplexTreeOptions.h | 30 +++++++-------------- src/Simplex_tree/concept/VertexHandle.h | 30 +++++++-------------- src/Simplex_tree/doc/Intro_simplex_tree.h | 14 ++-------- .../example/cech_complex_cgal_mini_sphere_3d.cpp | 14 ++-------- ...e_alpha_shapes_3_simplex_tree_from_off_file.cpp | 14 ++-------- .../example/graph_expansion_with_blocker.cpp | 14 ++-------- src/Simplex_tree/example/mini_simplex_tree.cpp | 14 ++-------- src/Simplex_tree/example/simple_simplex_tree.cpp | 14 ++-------- .../example/simplex_tree_from_cliques_of_graph.cpp | 14 ++-------- src/Simplex_tree/include/gudhi/Simplex_tree.h | 14 ++-------- .../gudhi/Simplex_tree/Simplex_tree_iterators.h | 14 ++-------- .../Simplex_tree_node_explicit_storage.h | 14 ++-------- .../gudhi/Simplex_tree/Simplex_tree_siblings.h | 14 ++-------- .../include/gudhi/Simplex_tree/indexing_tag.h | 14 ++-------- src/Skeleton_blocker/concept/SkeletonBlockerDS.h | 14 ++-------- .../concept/SkeletonBlockerGeometricDS.h | 14 ++-------- .../example/Skeleton_blocker_from_simplices.cpp | 20 +++----------- .../example/Skeleton_blocker_iteration.cpp | 20 +++----------- .../example/Skeleton_blocker_link.cpp | 20 +++----------- .../include/gudhi/Skeleton_blocker.h | 14 ++-------- .../Skeleton_blocker_complex_visitor.h | 14 ++-------- .../Skeleton_blocker_link_superior.h | 14 ++-------- .../Skeleton_blocker/Skeleton_blocker_off_io.h | 14 ++-------- .../Skeleton_blocker_simple_geometric_traits.h | 14 ++-------- .../Skeleton_blocker_simple_traits.h | 14 ++-------- .../Skeleton_blocker/Skeleton_blocker_simplex.h | 14 ++-------- .../Skeleton_blocker_sub_complex.h | 14 ++-------- .../gudhi/Skeleton_blocker/internal/Top_faces.h | 14 ++-------- .../include/gudhi/Skeleton_blocker/internal/Trie.h | 21 +++------------ .../Skeleton_blockers_blockers_iterators.h | 14 ++-------- .../iterators/Skeleton_blockers_edges_iterators.h | 14 ++-------- .../iterators/Skeleton_blockers_iterators.h | 30 +++++++-------------- .../Skeleton_blockers_simplices_iterators.h | 14 ++-------- .../Skeleton_blockers_triangles_iterators.h | 14 ++-------- .../Skeleton_blockers_vertices_iterators.h | 14 ++-------- .../include/gudhi/Skeleton_blocker_complex.h | 14 ++-------- .../gudhi/Skeleton_blocker_geometric_complex.h | 14 ++-------- .../include/gudhi/Skeleton_blocker_link_complex.h | 14 ++-------- .../gudhi/Skeleton_blocker_simplifiable_complex.h | 14 ++-------- .../test/test_skeleton_blocker_complex.cpp | 14 ++-------- .../test_skeleton_blocker_geometric_complex.cpp | 20 +++----------- .../test/test_skeleton_blocker_simplifiable.cpp | 20 +++----------- .../doc/Intro_spatial_searching.h | 14 ++-------- .../include/gudhi/Kd_tree_search.h | 14 ++-------- src/Spatial_searching/test/test_Kd_tree_search.cpp | 14 ++-------- src/Subsampling/doc/Intro_subsampling.h | 14 ++-------- .../include/gudhi/choose_n_farthest_points.h | 14 ++-------- .../include/gudhi/pick_n_random_points.h | 14 ++-------- src/Subsampling/include/gudhi/sparsify_point_set.h | 14 ++-------- .../test/test_choose_n_farthest_points.cpp | 14 ++-------- src/Subsampling/test/test_pick_n_random_points.cpp | 14 ++-------- src/Subsampling/test/test_sparsify_point_set.cpp | 14 ++-------- src/Tangential_complex/benchmark/RIB_exporter.h | 14 ++-------- src/Tangential_complex/benchmark/XML_exporter.h | 14 ++-------- .../doc/Intro_tangential_complex.h | 14 ++-------- .../include/gudhi/Tangential_complex.h | 14 ++-------- .../gudhi/Tangential_complex/Simplicial_complex.h | 14 ++-------- .../include/gudhi/Tangential_complex/config.h | 14 ++-------- .../include/gudhi/Tangential_complex/utilities.h | 14 ++-------- .../test/test_tangential_complex.cpp | 14 ++-------- src/Toplex_map/benchmark/benchmark_tm.cpp | 14 ++-------- src/Toplex_map/doc/Intro_Toplex_map.h | 14 ++-------- src/Toplex_map/example/simple_toplex_map.cpp | 14 ++-------- src/Toplex_map/include/gudhi/Lazy_toplex_map.h | 14 ++-------- src/Toplex_map/include/gudhi/Toplex_map.h | 14 ++-------- src/Toplex_map/test/lazy_toplex_map_unit_test.cpp | 14 ++-------- src/Toplex_map/test/toplex_map_unit_test.cpp | 14 ++-------- .../concept/SimplicialComplexForWitness.h | 20 +++----------- src/Witness_complex/example/generators.h | 14 ++-------- .../include/gudhi/Active_witness/Active_witness.h | 14 ++-------- .../gudhi/Active_witness/Active_witness_iterator.h | 14 ++-------- .../gudhi/Euclidean_strong_witness_complex.h | 14 ++-------- .../include/gudhi/Euclidean_witness_complex.h | 14 ++-------- .../include/gudhi/Strong_witness_complex.h | 14 ++-------- .../include/gudhi/Witness_complex.h | 14 ++-------- .../include/gudhi/Witness_complex/all_faces_in.h | 14 ++-------- .../utilities/strong_witness_persistence.cpp | 14 ++-------- .../utilities/weak_witness_persistence.cpp | 14 ++-------- .../Graph_simplicial_complex_benchmark.cpp | 14 ++-------- src/common/doc/file_formats.h | 30 +++++++-------------- src/common/include/gudhi/Clock.h | 20 +++----------- src/common/include/gudhi/Debug_utils.h | 14 ++-------- src/common/include/gudhi/Null_output_iterator.h | 14 ++-------- src/common/include/gudhi/Off_reader.h | 21 +++------------ src/common/include/gudhi/Point.h | 21 +++------------ src/common/include/gudhi/Points_3D_off_io.h | 14 ++-------- src/common/include/gudhi/Points_off_io.h | 14 ++-------- src/common/include/gudhi/Simple_object_pool.h | 14 ++-------- src/common/include/gudhi/Unitary_tests_utils.h | 14 ++-------- src/common/include/gudhi/allocator.h | 14 ++-------- src/common/include/gudhi/console_color.h | 14 ++-------- src/common/include/gudhi/distance_functions.h | 20 +++----------- .../include/gudhi/graph_simplicial_complex.h | 20 +++----------- src/common/include/gudhi/random_point_generators.h | 14 ++-------- src/common/include/gudhi/reader_utils.h | 14 ++-------- .../include/gudhi/writing_persistence_to_file.h | 14 ++-------- src/common/test/test_distance_matrix_reader.cpp | 14 ++-------- .../test/test_persistence_intervals_reader.cpp | 14 ++-------- src/common/test/test_points_off_reader.cpp | 14 ++-------- .../utilities/off_file_from_shape_generator.cpp | 14 ++-------- src/cython/cython/alpha_complex.pyx | 22 ++++----------- src/cython/cython/bottleneck_distance.pyx | 22 ++++----------- src/cython/cython/cubical_complex.pyx | 22 ++++----------- .../cython/euclidean_strong_witness_complex.pyx | 22 ++++----------- src/cython/cython/euclidean_witness_complex.pyx | 22 ++++----------- src/cython/cython/nerve_gic.pyx | 22 ++++----------- src/cython/cython/off_reader.pyx | 22 ++++----------- src/cython/cython/periodic_cubical_complex.pyx | 22 ++++----------- src/cython/cython/persistence_graphical_tools.py | 22 ++++----------- src/cython/cython/reader_utils.pyx | 22 ++++----------- src/cython/cython/rips_complex.pyx | 22 ++++----------- src/cython/cython/simplex_tree.pyx | 22 ++++----------- src/cython/cython/strong_witness_complex.pyx | 22 ++++----------- src/cython/cython/subsampling.pyx | 22 ++++----------- src/cython/cython/tangential_complex.pyx | 22 ++++----------- src/cython/cython/witness_complex.pyx | 22 ++++----------- ...ex_diagram_persistence_from_off_file_example.py | 22 ++++----------- .../example/alpha_complex_from_points_example.py | 22 ++++----------- .../alpha_rips_persistence_bottleneck_distance.py | 22 ++++----------- src/cython/example/bottleneck_basic_example.py | 22 ++++----------- .../example/coordinate_graph_induced_complex.py | 22 ++++----------- ...ex_diagram_persistence_from_off_file_example.py | 22 ++++----------- ...ex_diagram_persistence_from_off_file_example.py | 22 ++++----------- .../example/functional_graph_induced_complex.py | 22 ++++----------- .../example/gudhi_graphical_tools_example.py | 22 ++++----------- src/cython/example/nerve_of_a_covering.py | 22 ++++----------- ...arcode_persistence_from_perseus_file_example.py | 22 ++++----------- .../random_cubical_complex_persistence_example.py | 22 ++++----------- ...istence_from_correlation_matrix_file_example.py | 22 ++++----------- ...ersistence_from_distance_matrix_file_example.py | 22 ++++----------- ...ex_diagram_persistence_from_off_file_example.py | 22 ++++----------- .../example/rips_complex_from_points_example.py | 22 ++++----------- src/cython/example/rips_persistence_diagram.py | 22 ++++----------- src/cython/example/simplex_tree_example.py | 22 ++++----------- .../example/sparse_rips_persistence_diagram.py | 22 ++++----------- ...complex_plain_homology_from_off_file_example.py | 22 ++++----------- .../example/voronoi_graph_induced_complex.py | 22 ++++----------- .../witness_complex_from_nearest_landmark_table.py | 22 ++++----------- src/cython/gudhi.pyx.in | 22 ++++----------- src/cython/include/Alpha_complex_interface.h | 14 ++-------- src/cython/include/Bottleneck_distance_interface.h | 14 ++-------- src/cython/include/Cubical_complex_interface.h | 14 ++-------- .../Euclidean_strong_witness_complex_interface.h | 14 ++-------- .../include/Euclidean_witness_complex_interface.h | 14 ++-------- src/cython/include/Nerve_gic_interface.h | 14 ++-------- src/cython/include/Off_reader_interface.h | 14 ++-------- .../include/Persistent_cohomology_interface.h | 14 ++-------- src/cython/include/Reader_utils_interface.h | 14 ++-------- src/cython/include/Rips_complex_interface.h | 14 ++-------- src/cython/include/Simplex_tree_interface.h | 14 ++-------- .../include/Strong_witness_complex_interface.h | 14 ++-------- src/cython/include/Subsampling_interface.h | 14 ++-------- src/cython/include/Tangential_complex_interface.h | 14 ++-------- src/cython/include/Witness_complex_interface.h | 14 ++-------- src/cython/setup.py.in | 22 ++++----------- src/cython/test/test_alpha_complex.py | 22 ++++----------- src/cython/test/test_bottleneck_distance.py | 22 ++++----------- src/cython/test/test_cover_complex.py | 22 ++++----------- src/cython/test/test_cubical_complex.py | 22 ++++----------- src/cython/test/test_euclidean_witness_complex.py | 22 ++++----------- src/cython/test/test_reader_utils.py | 22 ++++----------- src/cython/test/test_rips_complex.py | 22 ++++----------- src/cython/test/test_simplex_tree.py | 22 ++++----------- src/cython/test/test_subsampling.py | 22 ++++----------- src/cython/test/test_tangential_complex.py | 22 ++++----------- src/cython/test/test_witness_complex.py | 22 ++++----------- 355 files changed, 1075 insertions(+), 4906 deletions(-) (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/data/points/generator/aurelien_alvarez_surfaces_in_R8.py b/data/points/generator/aurelien_alvarez_surfaces_in_R8.py index 57773c4c..cc23ca98 100755 --- a/data/points/generator/aurelien_alvarez_surfaces_in_R8.py +++ b/data/points/generator/aurelien_alvarez_surfaces_in_R8.py @@ -1,28 +1,19 @@ -# 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): Aurélien Alvarez -# -# Copyright (C) 2016 Université d'Orléans (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 . +#!/usr/bin/env python import numpy as np import random from math import factorial +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Aurélien Alvarez + + Copyright (C) 2016 Université d'Orléans (France) + + Modification(s): + - YYYY/MM Author: Description of the modification +""" + I = complex(0,1) ################################################# diff --git a/src/Alpha_complex/concept/SimplicialComplexForAlpha.h b/src/Alpha_complex/concept/SimplicialComplexForAlpha.h index ba97c802..1c6c3b0c 100644 --- a/src/Alpha_complex/concept/SimplicialComplexForAlpha.h +++ b/src/Alpha_complex/concept/SimplicialComplexForAlpha.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_ALPHA_COMPLEX_SIMPLICIAL_COMPLEX_FOR_ALPHA_H_ diff --git a/src/Alpha_complex/concept/SimplicialComplexForAlpha3d.h b/src/Alpha_complex/concept/SimplicialComplexForAlpha3d.h index 7acdf105..1dc8c037 100644 --- a/src/Alpha_complex/concept/SimplicialComplexForAlpha3d.h +++ b/src/Alpha_complex/concept/SimplicialComplexForAlpha3d.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_ALPHA_COMPLEX_SIMPLICIAL_COMPLEX_FOR_ALPHA_3D_H_ diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index ab7c4794..5b332e47 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_ALPHA_COMPLEX_INTRO_ALPHA_COMPLEX_H_ diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index af9f59ea..d5865671 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef ALPHA_COMPLEX_H_ diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h index 0bf12b1a..47407b38 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef ALPHA_COMPLEX_3D_H_ diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_options.h b/src/Alpha_complex/include/gudhi/Alpha_complex_options.h index 7a555fa1..bf29039b 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_options.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_options.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef ALPHA_COMPLEX_OPTIONS_H_ diff --git a/src/Alpha_complex/test/Alpha_complex_3d_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_3d_unit_test.cpp index ec905d5b..8e4121ae 100644 --- a/src/Alpha_complex/test/Alpha_complex_3d_unit_test.cpp +++ b/src/Alpha_complex/test/Alpha_complex_3d_unit_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp index b46b6da5..de0cf471 100644 --- a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp +++ b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Alpha_complex/test/Periodic_alpha_complex_3d_unit_test.cpp b/src/Alpha_complex/test/Periodic_alpha_complex_3d_unit_test.cpp index ed4cbff0..4449e5ed 100644 --- a/src/Alpha_complex/test/Periodic_alpha_complex_3d_unit_test.cpp +++ b/src/Alpha_complex/test/Periodic_alpha_complex_3d_unit_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Alpha_complex/test/Weighted_alpha_complex_3d_unit_test.cpp b/src/Alpha_complex/test/Weighted_alpha_complex_3d_unit_test.cpp index c16b3718..201dbce4 100644 --- a/src/Alpha_complex/test/Weighted_alpha_complex_3d_unit_test.cpp +++ b/src/Alpha_complex/test/Weighted_alpha_complex_3d_unit_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Alpha_complex/test/Weighted_periodic_alpha_complex_3d_unit_test.cpp b/src/Alpha_complex/test/Weighted_periodic_alpha_complex_3d_unit_test.cpp index e8ac83e5..9d711c41 100644 --- a/src/Alpha_complex/test/Weighted_periodic_alpha_complex_3d_unit_test.cpp +++ b/src/Alpha_complex/test/Weighted_periodic_alpha_complex_3d_unit_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index 09c84eb3..b9991b83 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Alpha_complex/utilities/alpha_complex_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_persistence.cpp index 8e6c40b7..12a8740e 100644 --- a/src/Alpha_complex/utilities/alpha_complex_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h b/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h index 5fa02a5e..237f79ad 100644 --- a/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h +++ b/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ diff --git a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp index 6eb24040..533aec91 100644 --- a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp +++ b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ // for persistence algorithm diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h index cc19b8b5..1954eb0c 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef BITMAP_CUBICAL_COMPLEX_H_ diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h index f82d4cc3..84d53778 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef BITMAP_CUBICAL_COMPLEX_COUNTER_H_ diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h index f5e005b2..a0ad40fc 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef BITMAP_CUBICAL_COMPLEX_BASE_H_ diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h index 8c35f590..4afed33c 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef BITMAP_CUBICAL_COMPLEX_PERIODIC_BOUNDARY_CONDITIONS_BASE_H_ diff --git a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp index 6a917c25..d3ed75d3 100644 --- a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp +++ b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp index 170aa684..6cf0889f 100644 --- a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp +++ b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp index e9ba5495..700d90f4 100644 --- a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp +++ b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp b/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp index acafb199..db3c9815 100644 --- a/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp +++ b/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Bottleneck_distance/concept/Persistence_diagram.h b/src/Bottleneck_distance/concept/Persistence_diagram.h index d016faf4..de8021cc 100644 --- a/src/Bottleneck_distance/concept/Persistence_diagram.h +++ b/src/Bottleneck_distance/concept/Persistence_diagram.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_BOTTLENECK_DISTANCE_PERSISTENCE_DIAGRAM_H_ diff --git a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h index 6fd058a8..48078903 100644 --- a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h +++ b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_BOTTLENECK_DISTANCE_INTRO_BOTTLENECK_DISTANCE_H_ diff --git a/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp b/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp index 2db1ef80..c5d66121 100644 --- a/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp +++ b/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Bottleneck_distance/example/bottleneck_basic_example.cpp b/src/Bottleneck_distance/example/bottleneck_basic_example.cpp index 3df7d12d..b74c8245 100644 --- a/src/Bottleneck_distance/example/bottleneck_basic_example.cpp +++ b/src/Bottleneck_distance/example/bottleneck_basic_example.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Bottleneck_distance/include/gudhi/Bottleneck.h b/src/Bottleneck_distance/include/gudhi/Bottleneck.h index 7a553006..c56dcb2d 100644 --- a/src/Bottleneck_distance/include/gudhi/Bottleneck.h +++ b/src/Bottleneck_distance/include/gudhi/Bottleneck.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef BOTTLENECK_H_ diff --git a/src/Bottleneck_distance/include/gudhi/Graph_matching.h b/src/Bottleneck_distance/include/gudhi/Graph_matching.h index 313e7d9c..6385ae30 100644 --- a/src/Bottleneck_distance/include/gudhi/Graph_matching.h +++ b/src/Bottleneck_distance/include/gudhi/Graph_matching.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GRAPH_MATCHING_H_ diff --git a/src/Bottleneck_distance/include/gudhi/Internal_point.h b/src/Bottleneck_distance/include/gudhi/Internal_point.h index 7f350f64..9d268af3 100644 --- a/src/Bottleneck_distance/include/gudhi/Internal_point.h +++ b/src/Bottleneck_distance/include/gudhi/Internal_point.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INTERNAL_POINT_H_ diff --git a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h index 8c12d353..8a75384c 100644 --- a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h +++ b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef NEIGHBORS_FINDER_H_ diff --git a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h index cb163623..3e82a4c9 100644 --- a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h +++ b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENCE_GRAPH_H_ diff --git a/src/Bottleneck_distance/test/bottleneck_unit_test.cpp b/src/Bottleneck_distance/test/bottleneck_unit_test.cpp index bce88e13..5f20892c 100644 --- a/src/Bottleneck_distance/test/bottleneck_unit_test.cpp +++ b/src/Bottleneck_distance/test/bottleneck_unit_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ diff --git a/src/Bottleneck_distance/utilities/bottleneck_distance.cpp b/src/Bottleneck_distance/utilities/bottleneck_distance.cpp index 8f724f95..fc03cb21 100644 --- a/src/Bottleneck_distance/utilities/bottleneck_distance.cpp +++ b/src/Bottleneck_distance/utilities/bottleneck_distance.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp index 86314930..df12e06d 100644 --- a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp +++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Cech_complex/concept/SimplicialComplexForCech.h b/src/Cech_complex/concept/SimplicialComplexForCech.h index 89231eec..00c7df3a 100644 --- a/src/Cech_complex/concept/SimplicialComplexForCech.h +++ b/src/Cech_complex/concept/SimplicialComplexForCech.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_CECH_COMPLEX_SIMPLICIAL_COMPLEX_FOR_CECH_H_ diff --git a/src/Cech_complex/doc/Intro_cech_complex.h b/src/Cech_complex/doc/Intro_cech_complex.h index 4483bcb9..250c91fa 100644 --- a/src/Cech_complex/doc/Intro_cech_complex.h +++ b/src/Cech_complex/doc/Intro_cech_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_CECH_COMPLEX_INTRO_CECH_COMPLEX_H_ diff --git a/src/Cech_complex/example/cech_complex_step_by_step.cpp b/src/Cech_complex/example/cech_complex_step_by_step.cpp index 6fbbde5b..d9d17b26 100644 --- a/src/Cech_complex/example/cech_complex_step_by_step.cpp +++ b/src/Cech_complex/example/cech_complex_step_by_step.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h index f9b8a269..cc69f35f 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex.h +++ b/src/Cech_complex/include/gudhi/Cech_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CECH_COMPLEX_H_ diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h index b0d347b1..c0c03bb0 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h +++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CECH_COMPLEX_BLOCKER_H_ diff --git a/src/Cech_complex/test/test_cech_complex.cpp b/src/Cech_complex/test/test_cech_complex.cpp index 9039169c..8df71b15 100644 --- a/src/Cech_complex/test/test_cech_complex.cpp +++ b/src/Cech_complex/test/test_cech_complex.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Cech_complex/utilities/cech_persistence.cpp b/src/Cech_complex/utilities/cech_persistence.cpp index 93e92695..78d47a5a 100644 --- a/src/Cech_complex/utilities/cech_persistence.cpp +++ b/src/Cech_complex/utilities/cech_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Contraction/example/Garland_heckbert.cpp b/src/Contraction/example/Garland_heckbert.cpp index 08dd932e..9c0b5205 100644 --- a/src/Contraction/example/Garland_heckbert.cpp +++ b/src/Contraction/example/Garland_heckbert.cpp @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ diff --git a/src/Contraction/example/Garland_heckbert/Error_quadric.h b/src/Contraction/example/Garland_heckbert/Error_quadric.h index 8bd9b545..49250d7a 100644 --- a/src/Contraction/example/Garland_heckbert/Error_quadric.h +++ b/src/Contraction/example/Garland_heckbert/Error_quadric.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GARLAND_HECKBERT_ERROR_QUADRIC_H_ diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp index 7f9b150a..c41a9d94 100644 --- a/src/Contraction/example/Rips_contraction.cpp +++ b/src/Contraction/example/Rips_contraction.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include #include diff --git a/src/Contraction/include/gudhi/Contraction/Edge_profile.h b/src/Contraction/include/gudhi/Contraction/Edge_profile.h index 30b1b80a..78a7afd1 100644 --- a/src/Contraction/include/gudhi/Contraction/Edge_profile.h +++ b/src/Contraction/include/gudhi/Contraction/Edge_profile.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_EDGE_PROFILE_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/Contraction_visitor.h b/src/Contraction/include/gudhi/Contraction/policies/Contraction_visitor.h index fa02308b..243bc51c 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Contraction_visitor.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Contraction_visitor.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_CONTRACTION_VISITOR_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/Cost_policy.h b/src/Contraction/include/gudhi/Contraction/policies/Cost_policy.h index 04ce36b6..97114794 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Cost_policy.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Cost_policy.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_COST_POLICY_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/Dummy_valid_contraction.h b/src/Contraction/include/gudhi/Contraction/policies/Dummy_valid_contraction.h index a5567454..27a4dc7a 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Dummy_valid_contraction.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Dummy_valid_contraction.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_DUMMY_VALID_CONTRACTION_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/Edge_length_cost.h b/src/Contraction/include/gudhi/Contraction/policies/Edge_length_cost.h index 1b7a825b..97589385 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Edge_length_cost.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Edge_length_cost.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_EDGE_LENGTH_COST_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/First_vertex_placement.h b/src/Contraction/include/gudhi/Contraction/policies/First_vertex_placement.h index 0b9f8775..005b80e0 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/First_vertex_placement.h +++ b/src/Contraction/include/gudhi/Contraction/policies/First_vertex_placement.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_FIRST_VERTEX_PLACEMENT_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/Link_condition_valid_contraction.h b/src/Contraction/include/gudhi/Contraction/policies/Link_condition_valid_contraction.h index 8c869830..2e7ea481 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Link_condition_valid_contraction.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Link_condition_valid_contraction.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_LINK_CONDITION_VALID_CONTRACTION_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/Middle_placement.h b/src/Contraction/include/gudhi/Contraction/policies/Middle_placement.h index 0ba23a35..7dcf708b 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Middle_placement.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Middle_placement.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_MIDDLE_PLACEMENT_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/Placement_policy.h b/src/Contraction/include/gudhi/Contraction/policies/Placement_policy.h index 19509fad..5f97d6a7 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Placement_policy.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Placement_policy.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_PLACEMENT_POLICY_H_ diff --git a/src/Contraction/include/gudhi/Contraction/policies/Valid_contraction_policy.h b/src/Contraction/include/gudhi/Contraction/policies/Valid_contraction_policy.h index 8a91f0b5..413c5bd6 100644 --- a/src/Contraction/include/gudhi/Contraction/policies/Valid_contraction_policy.h +++ b/src/Contraction/include/gudhi/Contraction/policies/Valid_contraction_policy.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONTRACTION_POLICIES_VALID_CONTRACTION_POLICY_H_ diff --git a/src/Contraction/include/gudhi/Edge_contraction.h b/src/Contraction/include/gudhi/Edge_contraction.h index fcd06996..5cd024bd 100644 --- a/src/Contraction/include/gudhi/Edge_contraction.h +++ b/src/Contraction/include/gudhi/Edge_contraction.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef EDGE_CONTRACTION_H_ diff --git a/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h b/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h index 13086161..e1f3b3c2 100644 --- a/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h +++ b/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_CONTRACTOR_H_ diff --git a/src/GudhUI/gui/MainWindow.cpp b/src/GudhUI/gui/MainWindow.cpp index b11b80e9..05bd42c8 100644 --- a/src/GudhUI/gui/MainWindow.cpp +++ b/src/GudhUI/gui/MainWindow.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include "MainWindow.h" diff --git a/src/GudhUI/gui/MainWindow.h b/src/GudhUI/gui/MainWindow.h index 6076c2ee..d9281e57 100644 --- a/src/GudhUI/gui/MainWindow.h +++ b/src/GudhUI/gui/MainWindow.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GUI_MAINWINDOW_H_ diff --git a/src/GudhUI/gui/Menu_edge_contraction.cpp b/src/GudhUI/gui/Menu_edge_contraction.cpp index 041bdf9e..5a517cef 100644 --- a/src/GudhUI/gui/Menu_edge_contraction.cpp +++ b/src/GudhUI/gui/Menu_edge_contraction.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GUI_MENU_EDGE_CONTRACTION_CPP_ diff --git a/src/GudhUI/gui/Menu_edge_contraction.h b/src/GudhUI/gui/Menu_edge_contraction.h index 0ef7b267..7cbf60ee 100644 --- a/src/GudhUI/gui/Menu_edge_contraction.h +++ b/src/GudhUI/gui/Menu_edge_contraction.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GUI_MENU_EDGE_CONTRACTION_H_ diff --git a/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp b/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp index b1ad15c8..69ed6c56 100644 --- a/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp +++ b/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include "Menu_k_nearest_neighbors.h" diff --git a/src/GudhUI/gui/Menu_k_nearest_neighbors.h b/src/GudhUI/gui/Menu_k_nearest_neighbors.h index 56b5b63d..e29ffc0b 100644 --- a/src/GudhUI/gui/Menu_k_nearest_neighbors.h +++ b/src/GudhUI/gui/Menu_k_nearest_neighbors.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GUI_MENU_K_NEAREST_NEIGHBORS_H_ diff --git a/src/GudhUI/gui/Menu_persistence.cpp b/src/GudhUI/gui/Menu_persistence.cpp index ec990559..58556cd1 100644 --- a/src/GudhUI/gui/Menu_persistence.cpp +++ b/src/GudhUI/gui/Menu_persistence.cpp @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ diff --git a/src/GudhUI/gui/Menu_persistence.h b/src/GudhUI/gui/Menu_persistence.h index 32f0c5ca..a4d94636 100644 --- a/src/GudhUI/gui/Menu_persistence.h +++ b/src/GudhUI/gui/Menu_persistence.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GUI_MENU_PERSISTENCE_H_ diff --git a/src/GudhUI/gui/Menu_uniform_neighbors.cpp b/src/GudhUI/gui/Menu_uniform_neighbors.cpp index 7f392b6c..f27a7e12 100644 --- a/src/GudhUI/gui/Menu_uniform_neighbors.cpp +++ b/src/GudhUI/gui/Menu_uniform_neighbors.cpp @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include "Menu_uniform_neighbors.h" diff --git a/src/GudhUI/gui/Menu_uniform_neighbors.h b/src/GudhUI/gui/Menu_uniform_neighbors.h index 88a3823b..131c8e29 100644 --- a/src/GudhUI/gui/Menu_uniform_neighbors.h +++ b/src/GudhUI/gui/Menu_uniform_neighbors.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GUI_MENU_UNIFORM_NEIGHBORS_H_ diff --git a/src/GudhUI/gui/gudhui.cpp b/src/GudhUI/gui/gudhui.cpp index 2a100fd5..0a7296f6 100644 --- a/src/GudhUI/gui/gudhui.cpp +++ b/src/GudhUI/gui/gudhui.cpp @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include "MainWindow.h" diff --git a/src/GudhUI/model/Complex_typedefs.h b/src/GudhUI/model/Complex_typedefs.h index 347db1e3..92578111 100644 --- a/src/GudhUI/model/Complex_typedefs.h +++ b/src/GudhUI/model/Complex_typedefs.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef MODEL_COMPLEX_TYPEDEFS_H_ diff --git a/src/GudhUI/model/Model.h b/src/GudhUI/model/Model.h index 1d5cc087..b17a5c8f 100644 --- a/src/GudhUI/model/Model.h +++ b/src/GudhUI/model/Model.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef MODEL_MODEL_H_ diff --git a/src/GudhUI/utils/Bar_code_persistence.h b/src/GudhUI/utils/Bar_code_persistence.h index 49c87b3c..cd9b009f 100644 --- a/src/GudhUI/utils/Bar_code_persistence.h +++ b/src/GudhUI/utils/Bar_code_persistence.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include // isfinite diff --git a/src/GudhUI/utils/Critical_points.h b/src/GudhUI/utils/Critical_points.h index fbd690f8..32fcf32e 100644 --- a/src/GudhUI/utils/Critical_points.h +++ b/src/GudhUI/utils/Critical_points.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_CRITICAL_POINTS_H_ diff --git a/src/GudhUI/utils/Edge_collapsor.h b/src/GudhUI/utils/Edge_collapsor.h index b3cc7df7..89e032f0 100644 --- a/src/GudhUI/utils/Edge_collapsor.h +++ b/src/GudhUI/utils/Edge_collapsor.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_EDGE_COLLAPSOR_H_ diff --git a/src/GudhUI/utils/Edge_contractor.h b/src/GudhUI/utils/Edge_contractor.h index 090baabe..0707b186 100644 --- a/src/GudhUI/utils/Edge_contractor.h +++ b/src/GudhUI/utils/Edge_contractor.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_EDGE_CONTRACTOR_H_ diff --git a/src/GudhUI/utils/Furthest_point_epsilon_net.h b/src/GudhUI/utils/Furthest_point_epsilon_net.h index dbb6661c..6eb71071 100644 --- a/src/GudhUI/utils/Furthest_point_epsilon_net.h +++ b/src/GudhUI/utils/Furthest_point_epsilon_net.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_FURTHEST_POINT_EPSILON_NET_H_ diff --git a/src/GudhUI/utils/Is_manifold.h b/src/GudhUI/utils/Is_manifold.h index 732df607..276f4332 100644 --- a/src/GudhUI/utils/Is_manifold.h +++ b/src/GudhUI/utils/Is_manifold.h @@ -9,19 +9,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ diff --git a/src/GudhUI/utils/K_nearest_builder.h b/src/GudhUI/utils/K_nearest_builder.h index 14851d96..34483e58 100644 --- a/src/GudhUI/utils/K_nearest_builder.h +++ b/src/GudhUI/utils/K_nearest_builder.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_K_NEAREST_BUILDER_H_ diff --git a/src/GudhUI/utils/Lloyd_builder.h b/src/GudhUI/utils/Lloyd_builder.h index 67595d33..c042564f 100644 --- a/src/GudhUI/utils/Lloyd_builder.h +++ b/src/GudhUI/utils/Lloyd_builder.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_LLOYD_BUILDER_H_ diff --git a/src/GudhUI/utils/MClock.h b/src/GudhUI/utils/MClock.h index 992f6fa5..54b28211 100644 --- a/src/GudhUI/utils/MClock.h +++ b/src/GudhUI/utils/MClock.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_MCLOCK_H_ diff --git a/src/GudhUI/utils/Persistence_compute.h b/src/GudhUI/utils/Persistence_compute.h index c8afded9..874f31cf 100644 --- a/src/GudhUI/utils/Persistence_compute.h +++ b/src/GudhUI/utils/Persistence_compute.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ diff --git a/src/GudhUI/utils/Rips_builder.h b/src/GudhUI/utils/Rips_builder.h index ed62c1c0..aba1a8e4 100644 --- a/src/GudhUI/utils/Rips_builder.h +++ b/src/GudhUI/utils/Rips_builder.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_RIPS_BUILDER_H_ diff --git a/src/GudhUI/utils/UI_utils.h b/src/GudhUI/utils/UI_utils.h index 67a02869..571a3cf2 100644 --- a/src/GudhUI/utils/UI_utils.h +++ b/src/GudhUI/utils/UI_utils.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_UI_UTILS_H_ diff --git a/src/GudhUI/utils/Vertex_collapsor.h b/src/GudhUI/utils/Vertex_collapsor.h index fca57f7d..030e4bb0 100644 --- a/src/GudhUI/utils/Vertex_collapsor.h +++ b/src/GudhUI/utils/Vertex_collapsor.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UTILS_VERTEX_COLLAPSOR_H_ diff --git a/src/GudhUI/view/Color.h b/src/GudhUI/view/Color.h index 808dc2d8..791cca51 100644 --- a/src/GudhUI/view/Color.h +++ b/src/GudhUI/view/Color.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef VIEW_COLOR_H_ diff --git a/src/GudhUI/view/FirstCoordProjector.h b/src/GudhUI/view/FirstCoordProjector.h index 3f8a6fd9..673485e3 100644 --- a/src/GudhUI/view/FirstCoordProjector.h +++ b/src/GudhUI/view/FirstCoordProjector.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef VIEW_FIRSTCOORDPROJECTOR_H_ diff --git a/src/GudhUI/view/Projector3D.h b/src/GudhUI/view/Projector3D.h index a1421f51..574756fd 100644 --- a/src/GudhUI/view/Projector3D.h +++ b/src/GudhUI/view/Projector3D.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef VIEW_PROJECTOR3D_H_ diff --git a/src/GudhUI/view/View_parameter.h b/src/GudhUI/view/View_parameter.h index 578a0268..dfd3aa41 100644 --- a/src/GudhUI/view/View_parameter.h +++ b/src/GudhUI/view/View_parameter.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef VIEW_VIEW_PARAMETER_H_ diff --git a/src/GudhUI/view/Viewer.cpp b/src/GudhUI/view/Viewer.cpp index 42e35d6c..6b17c833 100644 --- a/src/GudhUI/view/Viewer.cpp +++ b/src/GudhUI/view/Viewer.cpp @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include "Viewer.h" diff --git a/src/GudhUI/view/Viewer.h b/src/GudhUI/view/Viewer.h index 414044ef..ec165031 100644 --- a/src/GudhUI/view/Viewer.h +++ b/src/GudhUI/view/Viewer.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef VIEW_VIEWER_H_ diff --git a/src/GudhUI/view/Viewer_instructor.cpp b/src/GudhUI/view/Viewer_instructor.cpp index a9dc4525..9a0f1cd3 100644 --- a/src/GudhUI/view/Viewer_instructor.cpp +++ b/src/GudhUI/view/Viewer_instructor.cpp @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/GudhUI/view/Viewer_instructor.h b/src/GudhUI/view/Viewer_instructor.h index 4b06acb8..58cbcd31 100644 --- a/src/GudhUI/view/Viewer_instructor.h +++ b/src/GudhUI/view/Viewer_instructor.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef VIEW_VIEWER_INSTRUCTOR_H_ diff --git a/src/Hasse_complex/include/gudhi/Hasse_complex.h b/src/Hasse_complex/include/gudhi/Hasse_complex.h index efcaea55..209fd0b9 100644 --- a/src/Hasse_complex/include/gudhi/Hasse_complex.h +++ b/src/Hasse_complex/include/gudhi/Hasse_complex.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef HASSE_COMPLEX_H_ diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index e72d63dd..d709baec 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_COVER_COMPLEX_INTRO_COVER_COMPLEX_H_ diff --git a/src/Nerve_GIC/example/CoordGIC.cpp b/src/Nerve_GIC/example/CoordGIC.cpp index 9889b198..b3a79233 100644 --- a/src/Nerve_GIC/example/CoordGIC.cpp +++ b/src/Nerve_GIC/example/CoordGIC.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Nerve_GIC/example/FuncGIC.cpp b/src/Nerve_GIC/example/FuncGIC.cpp index 1f5de999..2f0b5f2b 100644 --- a/src/Nerve_GIC/example/FuncGIC.cpp +++ b/src/Nerve_GIC/example/FuncGIC.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index 11bb4e85..d98deeac 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GIC_H_ diff --git a/src/Nerve_GIC/test/test_GIC.cpp b/src/Nerve_GIC/test/test_GIC.cpp index 0db2cce2..06b3f832 100644 --- a/src/Nerve_GIC/test/test_GIC.cpp +++ b/src/Nerve_GIC/test/test_GIC.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py b/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py index 701e7a52..e3101549 100755 --- a/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py +++ b/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py @@ -5,26 +5,14 @@ import numpy as np from collections import defaultdict import argparse -"""This file is part of the Gudhi Library. The Gudhi library - (Geometric Understanding in Higher Dimensions) is a generic C++ - library for computational topology. - - Author(s): Mathieu Carriere +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Mathieu Carriere Copyright (C) 2017 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Mathieu Carriere" diff --git a/src/Nerve_GIC/utilities/Nerve.cpp b/src/Nerve_GIC/utilities/Nerve.cpp index 667129e0..ef8e2d7e 100644 --- a/src/Nerve_GIC/utilities/Nerve.cpp +++ b/src/Nerve_GIC/utilities/Nerve.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Nerve_GIC/utilities/VoronoiGIC.cpp b/src/Nerve_GIC/utilities/VoronoiGIC.cpp index 33deca40..fabe35c9 100644 --- a/src/Nerve_GIC/utilities/VoronoiGIC.cpp +++ b/src/Nerve_GIC/utilities/VoronoiGIC.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/concept/Real_valued_topological_data.h b/src/Persistence_representations/concept/Real_valued_topological_data.h index 22ef6d72..9b29a9bd 100644 --- a/src/Persistence_representations/concept/Real_valued_topological_data.h +++ b/src/Persistence_representations/concept/Real_valued_topological_data.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_REAL_VALUED_TOPOLOGICAL_DATA_H_ diff --git a/src/Persistence_representations/concept/Topological_data_with_averages.h b/src/Persistence_representations/concept/Topological_data_with_averages.h index aa64467f..b1b5ca80 100644 --- a/src/Persistence_representations/concept/Topological_data_with_averages.h +++ b/src/Persistence_representations/concept/Topological_data_with_averages.h @@ -7,18 +7,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_TOPOLOGICAL_DATA_WITH_AVERAGES_H_ diff --git a/src/Persistence_representations/concept/Topological_data_with_distances.h b/src/Persistence_representations/concept/Topological_data_with_distances.h index c8eb2b34..87c3d158 100644 --- a/src/Persistence_representations/concept/Topological_data_with_distances.h +++ b/src/Persistence_representations/concept/Topological_data_with_distances.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_TOPOLOGICAL_DATA_WITH_DISTANCES_H_ diff --git a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h index 0f08b8c6..063f37ed 100644 --- a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h +++ b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_TOPOLOGICAL_DATA_WITH_SCALAR_PRODUCT_H_ diff --git a/src/Persistence_representations/concept/Vectorized_topological_data.h b/src/Persistence_representations/concept/Vectorized_topological_data.h index 365105d6..dd1224d2 100644 --- a/src/Persistence_representations/concept/Vectorized_topological_data.h +++ b/src/Persistence_representations/concept/Vectorized_topological_data.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_VECTORIZED_TOPOLOGICAL_DATA_H_ diff --git a/src/Persistence_representations/doc/Persistence_representations_doc.h b/src/Persistence_representations/doc/Persistence_representations_doc.h index 668904c9..111e532b 100644 --- a/src/Persistence_representations/doc/Persistence_representations_doc.h +++ b/src/Persistence_representations/doc/Persistence_representations_doc.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_GUDHI_STAT_H_ diff --git a/src/Persistence_representations/example/persistence_heat_maps.cpp b/src/Persistence_representations/example/persistence_heat_maps.cpp index 45208b68..a7e64bb1 100644 --- a/src/Persistence_representations/example/persistence_heat_maps.cpp +++ b/src/Persistence_representations/example/persistence_heat_maps.cpp @@ -9,18 +9,8 @@ * Modifications: * - 2018/04 MC: Add persistence heat maps computation * - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/example/persistence_intervals.cpp b/src/Persistence_representations/example/persistence_intervals.cpp index b5dcf25c..c94f7fe0 100644 --- a/src/Persistence_representations/example/persistence_intervals.cpp +++ b/src/Persistence_representations/example/persistence_intervals.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/example/persistence_landscape.cpp b/src/Persistence_representations/example/persistence_landscape.cpp index 27542cf7..70aff546 100644 --- a/src/Persistence_representations/example/persistence_landscape.cpp +++ b/src/Persistence_representations/example/persistence_landscape.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp index 0f471a67..7df34ef9 100644 --- a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp +++ b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/example/persistence_vectors.cpp b/src/Persistence_representations/example/persistence_vectors.cpp index 072e530d..d0cf2fc8 100644 --- a/src/Persistence_representations/example/persistence_vectors.cpp +++ b/src/Persistence_representations/example/persistence_vectors.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/example/sliced_wasserstein.cpp b/src/Persistence_representations/example/sliced_wasserstein.cpp index 089172a0..6c01c3af 100644 --- a/src/Persistence_representations/example/sliced_wasserstein.cpp +++ b/src/Persistence_representations/example/sliced_wasserstein.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 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 - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/include/gudhi/PSSK.h b/src/Persistence_representations/include/gudhi/PSSK.h index e1174455..995d0ca2 100644 --- a/src/Persistence_representations/include/gudhi/PSSK.h +++ b/src/Persistence_representations/include/gudhi/PSSK.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PSSK_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index a8458bda..12cb04c2 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -9,18 +9,8 @@ * * Copyright (C) 2019 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENCE_HEAT_MAPS_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index 76eac7d7..47953596 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENCE_INTERVALS_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h index f48d1a3b..9f605d35 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENCE_INTERVALS_WITH_DISTANCES_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape.h b/src/Persistence_representations/include/gudhi/Persistence_landscape.h index 9cab0166..f949372b 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENCE_LANDSCAPE_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h index fd8a181c..68bce336 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h @@ -1,25 +1,12 @@ -/** This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - **/ + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ #ifndef PERSISTENCE_LANDSCAPE_ON_GRID_H_ #define PERSISTENCE_LANDSCAPE_ON_GRID_H_ diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index 9c04be1d..a8f07b3b 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENCE_VECTORS_H_ diff --git a/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h b/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h index 18165c5f..fbe12422 100644 --- a/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h +++ b/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SLICED_WASSERSTEIN_H_ diff --git a/src/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h index 6fed019a..488d4529 100644 --- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h +++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef COMMON_PERSISTENCE_REPRESENTATIONS_H_ diff --git a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h index 4a2b9d68..db21c714 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef READ_PERSISTENCE_FROM_FILE_H_ diff --git a/src/Persistence_representations/test/kernels.cpp b/src/Persistence_representations/test/kernels.cpp index b8d02d4c..eb27747c 100644 --- a/src/Persistence_representations/test/kernels.cpp +++ b/src/Persistence_representations/test/kernels.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 INRIA * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Persistence_representations/test/persistence_heat_maps_test.cpp b/src/Persistence_representations/test/persistence_heat_maps_test.cpp index 5fad8051..57e1b4b3 100644 --- a/src/Persistence_representations/test/persistence_heat_maps_test.cpp +++ b/src/Persistence_representations/test/persistence_heat_maps_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Persistence_representations/test/persistence_intervals_test.cpp b/src/Persistence_representations/test/persistence_intervals_test.cpp index a89db9e3..513e042d 100644 --- a/src/Persistence_representations/test/persistence_intervals_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp index 6ba9a470..3b334533 100644 --- a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp index 7eca413b..36e935ac 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Persistence_representations/test/persistence_lanscapes_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_test.cpp index 27ad0987..5b368462 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Persistence_representations/test/read_persistence_from_file_test.cpp b/src/Persistence_representations/test/read_persistence_from_file_test.cpp index c3e8cb4e..ac0438d7 100644 --- a/src/Persistence_representations/test/read_persistence_from_file_test.cpp +++ b/src/Persistence_representations/test/read_persistence_from_file_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Persistence_representations/test/vector_representation_test.cpp b/src/Persistence_representations/test/vector_representation_test.cpp index a6b9314e..9c038727 100644 --- a/src/Persistence_representations/test/vector_representation_test.cpp +++ b/src/Persistence_representations/test/vector_representation_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp index 2cbd812b..4edaffdc 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index 14d0db8f..e557e82d 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp index 12fceedc..a700724c 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp index 21c553b9..f82a39b0 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp @@ -1,24 +1,12 @@ -/* 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) 2016 Inria -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* 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 . -*/ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Pawel Dlotko + * + * Copyright (C) 2016 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp index 99b0bd17..66bf9416 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index a4b6e458..ac6ec212 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index 5960a89f..6a3cc2a9 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp index 04f33915..40ec56ce 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index e4402589..d351e3b6 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp index 3be3de8f..aa051497 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp index a6953b98..ca67c74f 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp index 4f052f42..e457c6f4 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index f283971b..b6b35fa1 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp index 1cacbcd0..d171d809 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp index f92d5782..656958cc 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp index 4048f508..06c61bbf 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index 253fa273..73d83de2 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp index 11fe2886..313d09f5 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp index 59aad2f3..9ae2e670 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp index f32a92a1..5c114f27 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp index 47102087..14c84d51 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index 6cf2739d..b732cb82 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp index 9417be6b..91643e2a 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index 46e229bc..0964eca3 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index 39e438d2..079bd76e 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp index 45199838..663555a6 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index 0db7dbec..a2e8b226 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp index 8e99251b..842c36c4 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp index 364284e5..5060ca8b 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp index 550e47c5..b449be3e 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/benchmark/performance_rips_persistence.cpp b/src/Persistent_cohomology/benchmark/performance_rips_persistence.cpp index 3b00d7a9..45757002 100644 --- a/src/Persistent_cohomology/benchmark/performance_rips_persistence.cpp +++ b/src/Persistent_cohomology/benchmark/performance_rips_persistence.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/concept/CoefficientField.h b/src/Persistent_cohomology/concept/CoefficientField.h index 9d066cca..916f49e2 100644 --- a/src/Persistent_cohomology/concept/CoefficientField.h +++ b/src/Persistent_cohomology/concept/CoefficientField.h @@ -1,24 +1,12 @@ - /* 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): Clément Maria - * - * Copyright (C) 2014 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Clément Maria + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ /** \brief Concept describing the requirements for a class to represent * a field of coefficients to compute persistent homology. diff --git a/src/Persistent_cohomology/concept/FilteredComplex.h b/src/Persistent_cohomology/concept/FilteredComplex.h index 7eb01b01..26ac7ac8 100644 --- a/src/Persistent_cohomology/concept/FilteredComplex.h +++ b/src/Persistent_cohomology/concept/FilteredComplex.h @@ -1,24 +1,12 @@ - /* 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): Clément Maria - * - * Copyright (C) 2014 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Clément Maria + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ /** \brief The concept FilteredComplex describes the requirements * for a type to implement a filtered cell complex, from which diff --git a/src/Persistent_cohomology/concept/PersistentHomology.h b/src/Persistent_cohomology/concept/PersistentHomology.h index f9a78763..373832af 100644 --- a/src/Persistent_cohomology/concept/PersistentHomology.h +++ b/src/Persistent_cohomology/concept/PersistentHomology.h @@ -1,24 +1,12 @@ - /* 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): Clément Maria - * - * Copyright (C) 2014 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Clément Maria + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ /** \brief Concept describing the requirements for a class to compute * persistent homology. */ diff --git a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h index 5fb9d4d2..a16591ce 100644 --- a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h +++ b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_PERSISTENT_COHOMOLOGY_INTRO_PERSISTENT_COHOMOLOGY_H_ diff --git a/src/Persistent_cohomology/example/custom_persistence_sort.cpp b/src/Persistent_cohomology/example/custom_persistence_sort.cpp index 35366144..b2aed37c 100644 --- a/src/Persistent_cohomology/example/custom_persistence_sort.cpp +++ b/src/Persistent_cohomology/example/custom_persistence_sort.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/example/persistence_from_file.cpp b/src/Persistent_cohomology/example/persistence_from_file.cpp index 0a05c193..d169cc63 100644 --- a/src/Persistent_cohomology/example/persistence_from_file.cpp +++ b/src/Persistent_cohomology/example/persistence_from_file.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp b/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp index ffccfd86..f95dfeeb 100644 --- a/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp +++ b/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/example/plain_homology.cpp b/src/Persistent_cohomology/example/plain_homology.cpp index a2256060..b8c8b1f9 100644 --- a/src/Persistent_cohomology/example/plain_homology.cpp +++ b/src/Persistent_cohomology/example/plain_homology.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/example/rips_multifield_persistence.cpp b/src/Persistent_cohomology/example/rips_multifield_persistence.cpp index d6a5bdad..9eb5ccfc 100644 --- a/src/Persistent_cohomology/example/rips_multifield_persistence.cpp +++ b/src/Persistent_cohomology/example/rips_multifield_persistence.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp b/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp index 796cfa3a..02db05ec 100644 --- a/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp +++ b/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/example/rips_persistence_via_boundary_matrix.cpp b/src/Persistent_cohomology/example/rips_persistence_via_boundary_matrix.cpp index 71fc0802..37fa5e93 100644 --- a/src/Persistent_cohomology/example/rips_persistence_via_boundary_matrix.cpp +++ b/src/Persistent_cohomology/example/rips_persistence_via_boundary_matrix.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria, Marc Glisse * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index c57174cb..e62ccbc8 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENT_COHOMOLOGY_H_ diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h index e98b4bb4..0d6c0f82 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENT_COHOMOLOGY_FIELD_ZP_H_ diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h index 2bae8654..716d91cd 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENT_COHOMOLOGY_MULTI_FIELD_H_ diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h index de6c0750..9d7edfe6 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PERSISTENT_COHOMOLOGY_PERSISTENT_COHOMOLOGY_COLUMN_H_ diff --git a/src/Rips_complex/concept/SimplicialComplexForRips.h b/src/Rips_complex/concept/SimplicialComplexForRips.h index 36ab1b0c..21771dcb 100644 --- a/src/Rips_complex/concept/SimplicialComplexForRips.h +++ b/src/Rips_complex/concept/SimplicialComplexForRips.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_RIPS_COMPLEX_SIMPLICIAL_COMPLEX_FOR_RIPS_H_ diff --git a/src/Rips_complex/doc/Intro_rips_complex.h b/src/Rips_complex/doc/Intro_rips_complex.h index 97d66fbd..6e5103ac 100644 --- a/src/Rips_complex/doc/Intro_rips_complex.h +++ b/src/Rips_complex/doc/Intro_rips_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_RIPS_COMPLEX_INTRO_RIPS_COMPLEX_H_ diff --git a/src/Rips_complex/include/gudhi/Rips_complex.h b/src/Rips_complex/include/gudhi/Rips_complex.h index ee100867..958abbe2 100644 --- a/src/Rips_complex/include/gudhi/Rips_complex.h +++ b/src/Rips_complex/include/gudhi/Rips_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef RIPS_COMPLEX_H_ diff --git a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h index 8df6e387..081a0233 100644 --- a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h +++ b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SPARSE_RIPS_COMPLEX_H_ diff --git a/src/Rips_complex/test/test_rips_complex.cpp b/src/Rips_complex/test/test_rips_complex.cpp index b8b444c9..cc8745cf 100644 --- a/src/Rips_complex/test/test_rips_complex.cpp +++ b/src/Rips_complex/test/test_rips_complex.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp index 287e8915..f634a2ea 100644 --- a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp index c73152cf..98bc6eba 100644 --- a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Rips_complex/utilities/rips_persistence.cpp b/src/Rips_complex/utilities/rips_persistence.cpp index 9410b9c2..a6357847 100644 --- a/src/Rips_complex/utilities/rips_persistence.cpp +++ b/src/Rips_complex/utilities/rips_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Rips_complex/utilities/sparse_rips_persistence.cpp b/src/Rips_complex/utilities/sparse_rips_persistence.cpp index 3840d9f7..a7db4ec6 100644 --- a/src/Rips_complex/utilities/sparse_rips_persistence.cpp +++ b/src/Rips_complex/utilities/sparse_rips_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Simplex_tree/concept/FiltrationValue.h b/src/Simplex_tree/concept/FiltrationValue.h index f4dcf985..6cf314fa 100644 --- a/src/Simplex_tree/concept/FiltrationValue.h +++ b/src/Simplex_tree/concept/FiltrationValue.h @@ -1,24 +1,12 @@ - /* 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): Clément Maria - * - * Copyright (C) 2014 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Clément Maria + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ /** \brief Value type for a filtration function on a cell complex. * diff --git a/src/Simplex_tree/concept/IndexingTag.h b/src/Simplex_tree/concept/IndexingTag.h index 37e7e294..5ab50f1c 100644 --- a/src/Simplex_tree/concept/IndexingTag.h +++ b/src/Simplex_tree/concept/IndexingTag.h @@ -1,24 +1,12 @@ - /* 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): Clément Maria - * - * Copyright (C) 2014 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Clément Maria + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ /** \brief Concept describing an indexing scheme (see FilteredComplex) * for applying diff --git a/src/Simplex_tree/concept/SimplexKey.h b/src/Simplex_tree/concept/SimplexKey.h index c03f7da1..838fc498 100644 --- a/src/Simplex_tree/concept/SimplexKey.h +++ b/src/Simplex_tree/concept/SimplexKey.h @@ -1,24 +1,12 @@ - /* 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): Clément Maria - * - * Copyright (C) 2014 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Clément Maria + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ /** \brief Key type used as simplex identifier. * diff --git a/src/Simplex_tree/concept/SimplexTreeOptions.h b/src/Simplex_tree/concept/SimplexTreeOptions.h index 6638da26..cee1a890 100644 --- a/src/Simplex_tree/concept/SimplexTreeOptions.h +++ b/src/Simplex_tree/concept/SimplexTreeOptions.h @@ -1,24 +1,12 @@ - /* 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): Marc Glisse - * - * Copyright (C) 2015 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Marc Glisse + * + * Copyright (C) 2015 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ /** \brief Concept of the template parameter for the class `Gudhi::Simplex_tree`. * diff --git a/src/Simplex_tree/concept/VertexHandle.h b/src/Simplex_tree/concept/VertexHandle.h index 9d0642c3..6dd3741b 100644 --- a/src/Simplex_tree/concept/VertexHandle.h +++ b/src/Simplex_tree/concept/VertexHandle.h @@ -1,24 +1,12 @@ - /* 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): Clément Maria - * - * Copyright (C) 2014 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Clément Maria + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ /** \brief Handle type for the vertices of a cell complex. * diff --git a/src/Simplex_tree/doc/Intro_simplex_tree.h b/src/Simplex_tree/doc/Intro_simplex_tree.h index db399489..b01e3e92 100644 --- a/src/Simplex_tree/doc/Intro_simplex_tree.h +++ b/src/Simplex_tree/doc/Intro_simplex_tree.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_SIMPLEX_TREE_INTRO_SIMPLEX_TREE_H_ diff --git a/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp b/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp index 6bab8adb..fb1a3a4c 100644 --- a/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp +++ b/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp b/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp index 290a9d9b..8803dbb2 100644 --- a/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp +++ b/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Simplex_tree/example/graph_expansion_with_blocker.cpp b/src/Simplex_tree/example/graph_expansion_with_blocker.cpp index f39de31f..34bfd77c 100644 --- a/src/Simplex_tree/example/graph_expansion_with_blocker.cpp +++ b/src/Simplex_tree/example/graph_expansion_with_blocker.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Simplex_tree/example/mini_simplex_tree.cpp b/src/Simplex_tree/example/mini_simplex_tree.cpp index e7c7177f..6370b508 100644 --- a/src/Simplex_tree/example/mini_simplex_tree.cpp +++ b/src/Simplex_tree/example/mini_simplex_tree.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Simplex_tree/example/simple_simplex_tree.cpp b/src/Simplex_tree/example/simple_simplex_tree.cpp index d71b5608..6a0a7fc0 100644 --- a/src/Simplex_tree/example/simple_simplex_tree.cpp +++ b/src/Simplex_tree/example/simple_simplex_tree.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp b/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp index 6d70f3d1..eb0282f2 100644 --- a/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp +++ b/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 343ed472..76b789c4 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SIMPLEX_TREE_H_ diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h index 02c8bb64..7b6dea0f 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SIMPLEX_TREE_SIMPLEX_TREE_ITERATORS_H_ diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h index 3a75ec72..26bf0569 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SIMPLEX_TREE_SIMPLEX_TREE_NODE_EXPLICIT_STORAGE_H_ diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h index ab2ca707..d2b7d8d9 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SIMPLEX_TREE_SIMPLEX_TREE_SIBLINGS_H_ diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h b/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h index ec4461f3..4df7833c 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SIMPLEX_TREE_INDEXING_TAG_H_ diff --git a/src/Skeleton_blocker/concept/SkeletonBlockerDS.h b/src/Skeleton_blocker/concept/SkeletonBlockerDS.h index fd806ff1..52db1766 100644 --- a/src/Skeleton_blocker/concept/SkeletonBlockerDS.h +++ b/src/Skeleton_blocker/concept/SkeletonBlockerDS.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_SKELETON_BLOCKER_SKELETONBLOCKERDS_H_ diff --git a/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h b/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h index d8521343..5987f6fb 100644 --- a/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h +++ b/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_SKELETON_BLOCKER_SKELETONBLOCKERGEOMETRICDS_H_ diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_from_simplices.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_from_simplices.cpp index f288e39c..486827eb 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_from_simplices.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_from_simplices.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp index 4d008450..7f301047 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_link.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_link.cpp index 2ec72128..e634b656 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_link.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_link.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h index e8b6fde8..169cd3b3 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h index 6c6a8638..533cc777 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_COMPLEX_VISITOR_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h index feab7b3f..c9ebd9ad 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_LINK_SUPERIOR_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h index 56009daf..90793843 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_OFF_IO_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h index 22c1668e..3d3d8425 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_GEOMETRIC_TRAITS_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h index 144f1fd0..a931ec98 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_TRAITS_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h index d7193157..115a3a84 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLEX_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h index dbfb4042..a9e50d11 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_SUB_COMPLEX_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h index f80ca4fe..d2aa59d3 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_INTERNAL_TOP_FACES_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h index 7a5d38eb..a43fa034 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_INTERNAL_TRIE_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h index 95c5f7ef..66371d0e 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h index 5c725aae..63b963dd 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_EDGES_ITERATORS_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_iterators.h index 8054e64f..7b43e05f 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_iterators.h @@ -1,24 +1,12 @@ - /* 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): David Salinas - * - * Copyright (C) 2014 Inria - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): David Salinas + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_ITERATORS_H_ #define SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_ITERATORS_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h index e2024652..1968f43b 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_SIMPLICES_ITERATORS_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h index a834fe1d..ca4d46f6 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_TRIANGLES_ITERATORS_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h index 3a638ae6..81c6e82b 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_VERTICES_ITERATORS_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h index addd8104..a8d2420d 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_COMPLEX_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h index 39b88ceb..c7946516 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_GEOMETRIC_COMPLEX_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h index 428d4e9b..38fd32fd 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_LINK_COMPLEX_H_ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h index d5adb39d..f8121fcc 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SKELETON_BLOCKER_SIMPLIFIABLE_COMPLEX_H_ diff --git a/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp b/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp index 9760c74d..8265d763 100644 --- a/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp +++ b/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include #include diff --git a/src/Skeleton_blocker/test/test_skeleton_blocker_geometric_complex.cpp b/src/Skeleton_blocker/test/test_skeleton_blocker_geometric_complex.cpp index f2d3bb27..8cad97a1 100644 --- a/src/Skeleton_blocker/test/test_skeleton_blocker_geometric_complex.cpp +++ b/src/Skeleton_blocker/test/test_skeleton_blocker_geometric_complex.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Skeleton_blocker/test/test_skeleton_blocker_simplifiable.cpp b/src/Skeleton_blocker/test/test_skeleton_blocker_simplifiable.cpp index 1f263c98..b714753d 100644 --- a/src/Skeleton_blocker/test/test_skeleton_blocker_simplifiable.cpp +++ b/src/Skeleton_blocker/test/test_skeleton_blocker_simplifiable.cpp @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Spatial_searching/doc/Intro_spatial_searching.h b/src/Spatial_searching/doc/Intro_spatial_searching.h index f387ab2f..5cc458e4 100644 --- a/src/Spatial_searching/doc/Intro_spatial_searching.h +++ b/src/Spatial_searching/doc/Intro_spatial_searching.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_SPATIAL_SEARCHING_INTRO_SPATIAL_SEARCHING_H_ diff --git a/src/Spatial_searching/include/gudhi/Kd_tree_search.h b/src/Spatial_searching/include/gudhi/Kd_tree_search.h index ad1054e5..92f3f11b 100644 --- a/src/Spatial_searching/include/gudhi/Kd_tree_search.h +++ b/src/Spatial_searching/include/gudhi/Kd_tree_search.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef KD_TREE_SEARCH_H_ diff --git a/src/Spatial_searching/test/test_Kd_tree_search.cpp b/src/Spatial_searching/test/test_Kd_tree_search.cpp index 981a5850..37d7c073 100644 --- a/src/Spatial_searching/test/test_Kd_tree_search.cpp +++ b/src/Spatial_searching/test/test_Kd_tree_search.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Subsampling/doc/Intro_subsampling.h b/src/Subsampling/doc/Intro_subsampling.h index d88f6bf6..927e2b72 100644 --- a/src/Subsampling/doc/Intro_subsampling.h +++ b/src/Subsampling/doc/Intro_subsampling.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_SUBSAMPLING_INTRO_SUBSAMPLING_H_ diff --git a/src/Subsampling/include/gudhi/choose_n_farthest_points.h b/src/Subsampling/include/gudhi/choose_n_farthest_points.h index ab1c4c73..f99df0fa 100644 --- a/src/Subsampling/include/gudhi/choose_n_farthest_points.h +++ b/src/Subsampling/include/gudhi/choose_n_farthest_points.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CHOOSE_N_FARTHEST_POINTS_H_ diff --git a/src/Subsampling/include/gudhi/pick_n_random_points.h b/src/Subsampling/include/gudhi/pick_n_random_points.h index 64821e5d..f7734238 100644 --- a/src/Subsampling/include/gudhi/pick_n_random_points.h +++ b/src/Subsampling/include/gudhi/pick_n_random_points.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef PICK_N_RANDOM_POINTS_H_ diff --git a/src/Subsampling/include/gudhi/sparsify_point_set.h b/src/Subsampling/include/gudhi/sparsify_point_set.h index db10e0b1..d39d3906 100644 --- a/src/Subsampling/include/gudhi/sparsify_point_set.h +++ b/src/Subsampling/include/gudhi/sparsify_point_set.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SPARSIFY_POINT_SET_H_ diff --git a/src/Subsampling/test/test_choose_n_farthest_points.cpp b/src/Subsampling/test/test_choose_n_farthest_points.cpp index 0e0eb29c..7e3dfb21 100644 --- a/src/Subsampling/test/test_choose_n_farthest_points.cpp +++ b/src/Subsampling/test/test_choose_n_farthest_points.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ // #ifdef _DEBUG diff --git a/src/Subsampling/test/test_pick_n_random_points.cpp b/src/Subsampling/test/test_pick_n_random_points.cpp index 4baf4a5d..49138ab4 100644 --- a/src/Subsampling/test/test_pick_n_random_points.cpp +++ b/src/Subsampling/test/test_pick_n_random_points.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ // #ifdef _DEBUG diff --git a/src/Subsampling/test/test_sparsify_point_set.cpp b/src/Subsampling/test/test_sparsify_point_set.cpp index f414dda3..b2a55663 100644 --- a/src/Subsampling/test/test_sparsify_point_set.cpp +++ b/src/Subsampling/test/test_sparsify_point_set.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Tangential_complex/benchmark/RIB_exporter.h b/src/Tangential_complex/benchmark/RIB_exporter.h index 59ca138a..7e8a8ed9 100644 --- a/src/Tangential_complex/benchmark/RIB_exporter.h +++ b/src/Tangential_complex/benchmark/RIB_exporter.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GUDHI_TC_RIB_EXPORTER_H diff --git a/src/Tangential_complex/benchmark/XML_exporter.h b/src/Tangential_complex/benchmark/XML_exporter.h index 4db5687f..afa67288 100644 --- a/src/Tangential_complex/benchmark/XML_exporter.h +++ b/src/Tangential_complex/benchmark/XML_exporter.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Tangential_complex/doc/Intro_tangential_complex.h b/src/Tangential_complex/doc/Intro_tangential_complex.h index 501f4a8b..3bd84aa8 100644 --- a/src/Tangential_complex/doc/Intro_tangential_complex.h +++ b/src/Tangential_complex/doc/Intro_tangential_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_TANGENTIAL_COMPLEX_INTRO_TANGENTIAL_COMPLEX_H_ diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h index 4a78127c..7fdd68ee 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef TANGENTIAL_COMPLEX_H_ diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h index f79186b0..8f008236 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef TANGENTIAL_COMPLEX_SIMPLICIAL_COMPLEX_H_ diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/config.h b/src/Tangential_complex/include/gudhi/Tangential_complex/config.h index e1af1ea6..6de698ab 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/config.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/config.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef TANGENTIAL_COMPLEX_CONFIG_H_ diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h b/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h index 2dd46118..14e71797 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef TANGENTIAL_COMPLEX_UTILITIES_H_ diff --git a/src/Tangential_complex/test/test_tangential_complex.cpp b/src/Tangential_complex/test/test_tangential_complex.cpp index 103b8b30..94038c29 100644 --- a/src/Tangential_complex/test/test_tangential_complex.cpp +++ b/src/Tangential_complex/test/test_tangential_complex.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #define BOOST_TEST_DYN_LINK diff --git a/src/Toplex_map/benchmark/benchmark_tm.cpp b/src/Toplex_map/benchmark/benchmark_tm.cpp index eedb442b..f132b783 100644 --- a/src/Toplex_map/benchmark/benchmark_tm.cpp +++ b/src/Toplex_map/benchmark/benchmark_tm.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 INRIA * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Toplex_map/doc/Intro_Toplex_map.h b/src/Toplex_map/doc/Intro_Toplex_map.h index a925dc2b..58c22f64 100644 --- a/src/Toplex_map/doc/Intro_Toplex_map.h +++ b/src/Toplex_map/doc/Intro_Toplex_map.h @@ -6,18 +6,8 @@ * * Copyright (C) 2017 INRIA * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DOC_TOPLEX_MAP_INTRO_TOPLEX_MAP_H_ diff --git a/src/Toplex_map/example/simple_toplex_map.cpp b/src/Toplex_map/example/simple_toplex_map.cpp index e1c12ed6..27ce0fbe 100644 --- a/src/Toplex_map/example/simple_toplex_map.cpp +++ b/src/Toplex_map/example/simple_toplex_map.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 * - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Toplex_map/include/gudhi/Lazy_toplex_map.h b/src/Toplex_map/include/gudhi/Lazy_toplex_map.h index d7bccdff..c328e43b 100644 --- a/src/Toplex_map/include/gudhi/Lazy_toplex_map.h +++ b/src/Toplex_map/include/gudhi/Lazy_toplex_map.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 INRIA * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef LAZY_TOPLEX_MAP_H diff --git a/src/Toplex_map/include/gudhi/Toplex_map.h b/src/Toplex_map/include/gudhi/Toplex_map.h index 4dc2331f..7deebef7 100644 --- a/src/Toplex_map/include/gudhi/Toplex_map.h +++ b/src/Toplex_map/include/gudhi/Toplex_map.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 INRIA * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef TOPLEX_MAP_H diff --git a/src/Toplex_map/test/lazy_toplex_map_unit_test.cpp b/src/Toplex_map/test/lazy_toplex_map_unit_test.cpp index a050cc92..2cca9c46 100644 --- a/src/Toplex_map/test/lazy_toplex_map_unit_test.cpp +++ b/src/Toplex_map/test/lazy_toplex_map_unit_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 INRIA * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Toplex_map/test/toplex_map_unit_test.cpp b/src/Toplex_map/test/toplex_map_unit_test.cpp index 2bd27936..c4c37bb3 100644 --- a/src/Toplex_map/test/toplex_map_unit_test.cpp +++ b/src/Toplex_map/test/toplex_map_unit_test.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 INRIA * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Witness_complex/concept/SimplicialComplexForWitness.h b/src/Witness_complex/concept/SimplicialComplexForWitness.h index 8b85f4e4..609b59ae 100644 --- a/src/Witness_complex/concept/SimplicialComplexForWitness.h +++ b/src/Witness_complex/concept/SimplicialComplexForWitness.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONCEPT_WITNESS_COMPLEX_SIMPLICIAL_COMPLEX_FOR_WITNESS_H_ diff --git a/src/Witness_complex/example/generators.h b/src/Witness_complex/example/generators.h index 4b755daa..214cd059 100644 --- a/src/Witness_complex/example/generators.h +++ b/src/Witness_complex/example/generators.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GENERATORS_H_ diff --git a/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h b/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h index 8cb8662b..56b3e808 100644 --- a/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h +++ b/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef ACTIVE_WITNESS_ACTIVE_WITNESS_H_ diff --git a/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h b/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h index 10d2ec52..6aa9c0dd 100644 --- a/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h +++ b/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef ACTIVE_WITNESS_ACTIVE_WITNESS_ITERATOR_H_ diff --git a/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h b/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h index ea97cd3f..d2bf00ce 100644 --- a/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef EUCLIDEAN_STRONG_WITNESS_COMPLEX_H_ diff --git a/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h b/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h index 1dacefa5..a4430301 100644 --- a/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef EUCLIDEAN_WITNESS_COMPLEX_H_ diff --git a/src/Witness_complex/include/gudhi/Strong_witness_complex.h b/src/Witness_complex/include/gudhi/Strong_witness_complex.h index 03d6d2e7..5861ec62 100644 --- a/src/Witness_complex/include/gudhi/Strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Strong_witness_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef STRONG_WITNESS_COMPLEX_H_ diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index 1f61f8f2..375a79ac 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef WITNESS_COMPLEX_H_ diff --git a/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h b/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h index c7b732b9..ae7ad0f3 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h +++ b/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef WITNESS_COMPLEX_ALL_FACES_IN_H_ diff --git a/src/Witness_complex/utilities/strong_witness_persistence.cpp b/src/Witness_complex/utilities/strong_witness_persistence.cpp index f386e992..a06bb1fa 100644 --- a/src/Witness_complex/utilities/strong_witness_persistence.cpp +++ b/src/Witness_complex/utilities/strong_witness_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/Witness_complex/utilities/weak_witness_persistence.cpp b/src/Witness_complex/utilities/weak_witness_persistence.cpp index ea00cfe7..35d09f95 100644 --- a/src/Witness_complex/utilities/weak_witness_persistence.cpp +++ b/src/Witness_complex/utilities/weak_witness_persistence.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/common/benchmark/Graph_simplicial_complex_benchmark.cpp b/src/common/benchmark/Graph_simplicial_complex_benchmark.cpp index 825d6cb5..a03d1757 100644 --- a/src/common/benchmark/Graph_simplicial_complex_benchmark.cpp +++ b/src/common/benchmark/Graph_simplicial_complex_benchmark.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h index 235296d3..4af5d45c 100644 --- a/src/common/doc/file_formats.h +++ b/src/common/doc/file_formats.h @@ -1,24 +1,12 @@ -/* 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): Clément Jamin -* -* Copyright (C) 2017 Inria -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* 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 . -*/ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Clément Jamin + * + * Copyright (C) 2017 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ #ifndef DOC_COMMON_FILE_FORMAT_H_ #define DOC_COMMON_FILE_FORMAT_H_ diff --git a/src/common/include/gudhi/Clock.h b/src/common/include/gudhi/Clock.h index cdf18cb2..00ab2f27 100644 --- a/src/common/include/gudhi/Clock.h +++ b/src/common/include/gudhi/Clock.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CLOCK_H_ diff --git a/src/common/include/gudhi/Debug_utils.h b/src/common/include/gudhi/Debug_utils.h index 3f5cb04f..826cbc3e 100644 --- a/src/common/include/gudhi/Debug_utils.h +++ b/src/common/include/gudhi/Debug_utils.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DEBUG_UTILS_H_ #define DEBUG_UTILS_H_ diff --git a/src/common/include/gudhi/Null_output_iterator.h b/src/common/include/gudhi/Null_output_iterator.h index c700af5f..81309080 100644 --- a/src/common/include/gudhi/Null_output_iterator.h +++ b/src/common/include/gudhi/Null_output_iterator.h @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef NULL_OUTPUT_ITERATOR_H_ diff --git a/src/common/include/gudhi/Off_reader.h b/src/common/include/gudhi/Off_reader.h index fc951fe7..aaff95b8 100644 --- a/src/common/include/gudhi/Off_reader.h +++ b/src/common/include/gudhi/Off_reader.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ diff --git a/src/common/include/gudhi/Point.h b/src/common/include/gudhi/Point.h index 345a8465..e85277e9 100644 --- a/src/common/include/gudhi/Point.h +++ b/src/common/include/gudhi/Point.h @@ -1,24 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - * + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef POINT_H_ diff --git a/src/common/include/gudhi/Points_3D_off_io.h b/src/common/include/gudhi/Points_3D_off_io.h index 704f73a7..2112cc05 100644 --- a/src/common/include/gudhi/Points_3D_off_io.h +++ b/src/common/include/gudhi/Points_3D_off_io.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef POINTS_3D_OFF_IO_H_ #define POINTS_3D_OFF_IO_H_ diff --git a/src/common/include/gudhi/Points_off_io.h b/src/common/include/gudhi/Points_off_io.h index 38029658..a0fca77e 100644 --- a/src/common/include/gudhi/Points_off_io.h +++ b/src/common/include/gudhi/Points_off_io.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef POINTS_OFF_IO_H_ #define POINTS_OFF_IO_H_ diff --git a/src/common/include/gudhi/Simple_object_pool.h b/src/common/include/gudhi/Simple_object_pool.h index 47283521..164849e1 100644 --- a/src/common/include/gudhi/Simple_object_pool.h +++ b/src/common/include/gudhi/Simple_object_pool.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef SIMPLE_OBJECT_POOL_H_ diff --git a/src/common/include/gudhi/Unitary_tests_utils.h b/src/common/include/gudhi/Unitary_tests_utils.h index 22f00212..5ab20af8 100644 --- a/src/common/include/gudhi/Unitary_tests_utils.h +++ b/src/common/include/gudhi/Unitary_tests_utils.h @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef UNITARY_TESTS_UTILS_H_ #define UNITARY_TESTS_UTILS_H_ diff --git a/src/common/include/gudhi/allocator.h b/src/common/include/gudhi/allocator.h index 3de16a49..e828f441 100644 --- a/src/common/include/gudhi/allocator.h +++ b/src/common/include/gudhi/allocator.h @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef ALLOCATOR_H_ diff --git a/src/common/include/gudhi/console_color.h b/src/common/include/gudhi/console_color.h index a493e0d0..7681ae66 100644 --- a/src/common/include/gudhi/console_color.h +++ b/src/common/include/gudhi/console_color.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef CONSOLE_COLOR_H_ diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 5ef12f2e..94cf9ccc 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef DISTANCE_FUNCTIONS_H_ diff --git a/src/common/include/gudhi/graph_simplicial_complex.h b/src/common/include/gudhi/graph_simplicial_complex.h index 0d81ca71..b8508697 100644 --- a/src/common/include/gudhi/graph_simplicial_complex.h +++ b/src/common/include/gudhi/graph_simplicial_complex.h @@ -1,23 +1,11 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef GRAPH_SIMPLICIAL_COMPLEX_H_ diff --git a/src/common/include/gudhi/random_point_generators.h b/src/common/include/gudhi/random_point_generators.h index f8107c8b..dbaf0ab1 100644 --- a/src/common/include/gudhi/random_point_generators.h +++ b/src/common/include/gudhi/random_point_generators.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef RANDOM_POINT_GENERATORS_H_ diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h index 0ee7649d..1365b560 100644 --- a/src/common/include/gudhi/reader_utils.h +++ b/src/common/include/gudhi/reader_utils.h @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef READER_UTILS_H_ diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index 34448576..c0d4929e 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Swansea University, UK * - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef WRITING_PERSISTENCE_TO_FILE_H_ diff --git a/src/common/test/test_distance_matrix_reader.cpp b/src/common/test/test_distance_matrix_reader.cpp index 6fee86e2..c25b2f53 100644 --- a/src/common/test/test_distance_matrix_reader.cpp +++ b/src/common/test/test_distance_matrix_reader.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/common/test/test_persistence_intervals_reader.cpp b/src/common/test/test_persistence_intervals_reader.cpp index b7ece9bd..0d0f515e 100644 --- a/src/common/test/test_persistence_intervals_reader.cpp +++ b/src/common/test/test_persistence_intervals_reader.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/common/test/test_points_off_reader.cpp b/src/common/test/test_points_off_reader.cpp index e4b76ed7..49fa1ec2 100644 --- a/src/common/test/test_points_off_reader.cpp +++ b/src/common/test/test_points_off_reader.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2015 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/common/utilities/off_file_from_shape_generator.cpp b/src/common/utilities/off_file_from_shape_generator.cpp index 5e3da7f7..eb31e8bc 100644 --- a/src/common/utilities/off_file_from_shape_generator.cpp +++ b/src/common/utilities/off_file_from_shape_generator.cpp @@ -6,18 +6,8 @@ * * Copyright (C) 2014 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #include diff --git a/src/cython/cython/alpha_complex.pyx b/src/cython/cython/alpha_complex.pyx index 4f772e31..3861ae65 100644 --- a/src/cython/cython/alpha_complex.pyx +++ b/src/cython/cython/alpha_complex.pyx @@ -5,26 +5,14 @@ from libcpp.string cimport string from libcpp cimport bool import os -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/bottleneck_distance.pyx b/src/cython/cython/bottleneck_distance.pyx index 76ef81f4..1af027be 100644 --- a/src/cython/cython/bottleneck_distance.pyx +++ b/src/cython/cython/bottleneck_distance.pyx @@ -3,26 +3,14 @@ from libcpp.vector cimport vector from libcpp.utility cimport pair import os -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/cubical_complex.pyx b/src/cython/cython/cubical_complex.pyx index 53d79b92..8f6c84eb 100644 --- a/src/cython/cython/cubical_complex.pyx +++ b/src/cython/cython/cubical_complex.pyx @@ -7,26 +7,14 @@ import os from numpy import array as np_array -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2019 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/euclidean_strong_witness_complex.pyx b/src/cython/cython/euclidean_strong_witness_complex.pyx index 62b7cf71..101b06c9 100644 --- a/src/cython/cython/euclidean_strong_witness_complex.pyx +++ b/src/cython/cython/euclidean_strong_witness_complex.pyx @@ -2,26 +2,14 @@ from cython cimport numeric from libcpp.vector cimport vector from libcpp.utility cimport pair -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/euclidean_witness_complex.pyx b/src/cython/cython/euclidean_witness_complex.pyx index c10ca73d..ff27f157 100644 --- a/src/cython/cython/euclidean_witness_complex.pyx +++ b/src/cython/cython/euclidean_witness_complex.pyx @@ -2,26 +2,14 @@ from cython cimport numeric from libcpp.vector cimport vector from libcpp.utility cimport pair -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/nerve_gic.pyx b/src/cython/cython/nerve_gic.pyx index 5f01b379..6eeaf5fe 100644 --- a/src/cython/cython/nerve_gic.pyx +++ b/src/cython/cython/nerve_gic.pyx @@ -5,26 +5,14 @@ from libcpp.string cimport string from libcpp cimport bool import os -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2018 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/off_reader.pyx b/src/cython/cython/off_reader.pyx index b939013f..f1e97532 100644 --- a/src/cython/cython/off_reader.pyx +++ b/src/cython/cython/off_reader.pyx @@ -3,26 +3,14 @@ from libcpp.vector cimport vector from libcpp.string cimport string import os -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/periodic_cubical_complex.pyx b/src/cython/cython/periodic_cubical_complex.pyx index 3866f53b..3b50163e 100644 --- a/src/cython/cython/periodic_cubical_complex.pyx +++ b/src/cython/cython/periodic_cubical_complex.pyx @@ -7,26 +7,14 @@ import os from numpy import array as np_array -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2019 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/persistence_graphical_tools.py b/src/cython/cython/persistence_graphical_tools.py index 7bb69840..638d4d35 100644 --- a/src/cython/cython/persistence_graphical_tools.py +++ b/src/cython/cython/persistence_graphical_tools.py @@ -2,26 +2,14 @@ from os import path from math import isfinite import numpy as np -"""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): Vincent Rouvreau, Bertrand Michel +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau, Bertrand Michel Copyright (C) 2019 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau, Bertrand Michel" diff --git a/src/cython/cython/reader_utils.pyx b/src/cython/cython/reader_utils.pyx index 6dde5286..87239b29 100644 --- a/src/cython/cython/reader_utils.pyx +++ b/src/cython/cython/reader_utils.pyx @@ -7,26 +7,14 @@ from libcpp.pair cimport pair from os import path from numpy import array as np_array -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2019 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/rips_complex.pyx b/src/cython/cython/rips_complex.pyx index 7c83241c..a6f4c0a4 100644 --- a/src/cython/cython/rips_complex.pyx +++ b/src/cython/cython/rips_complex.pyx @@ -5,26 +5,14 @@ from libcpp.string cimport string from libcpp cimport bool import os -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/simplex_tree.pyx b/src/cython/cython/simplex_tree.pyx index 43bc11c9..2947a766 100644 --- a/src/cython/cython/simplex_tree.pyx +++ b/src/cython/cython/simplex_tree.pyx @@ -6,26 +6,14 @@ from libcpp.string cimport string from numpy import array as np_array -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2019 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/strong_witness_complex.pyx b/src/cython/cython/strong_witness_complex.pyx index 4b7bff34..afb22ef3 100644 --- a/src/cython/cython/strong_witness_complex.pyx +++ b/src/cython/cython/strong_witness_complex.pyx @@ -2,26 +2,14 @@ from cython cimport numeric from libcpp.vector cimport vector from libcpp.utility cimport pair -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/subsampling.pyx b/src/cython/cython/subsampling.pyx index e9d61a37..21419168 100644 --- a/src/cython/cython/subsampling.pyx +++ b/src/cython/cython/subsampling.pyx @@ -4,26 +4,14 @@ from libcpp.string cimport string from libcpp cimport bool import os -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/tangential_complex.pyx b/src/cython/cython/tangential_complex.pyx index 293ef8cb..f5d88898 100644 --- a/src/cython/cython/tangential_complex.pyx +++ b/src/cython/cython/tangential_complex.pyx @@ -5,26 +5,14 @@ from libcpp.string cimport string from libcpp cimport bool import os -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/cython/witness_complex.pyx b/src/cython/cython/witness_complex.pyx index b1cce83f..82aa4bae 100644 --- a/src/cython/cython/witness_complex.pyx +++ b/src/cython/cython/witness_complex.pyx @@ -2,26 +2,14 @@ from cython cimport numeric from libcpp.vector cimport vector from libcpp.utility cimport pair -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py index 4abe22d4..0957175a 100755 --- a/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py +++ b/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/alpha_complex_from_points_example.py b/src/cython/example/alpha_complex_from_points_example.py index ad73c744..4338ed87 100755 --- a/src/cython/example/alpha_complex_from_points_example.py +++ b/src/cython/example/alpha_complex_from_points_example.py @@ -2,26 +2,14 @@ from gudhi import AlphaComplex, SimplexTree -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/alpha_rips_persistence_bottleneck_distance.py b/src/cython/example/alpha_rips_persistence_bottleneck_distance.py index b51fa7a8..b5d6c0a7 100755 --- a/src/cython/example/alpha_rips_persistence_bottleneck_distance.py +++ b/src/cython/example/alpha_rips_persistence_bottleneck_distance.py @@ -4,26 +4,14 @@ import gudhi import argparse import math -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/bottleneck_basic_example.py b/src/cython/example/bottleneck_basic_example.py index 287956e7..4adc0785 100755 --- a/src/cython/example/bottleneck_basic_example.py +++ b/src/cython/example/bottleneck_basic_example.py @@ -2,26 +2,14 @@ import gudhi -"""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): Francois Godi, Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Francois Godi, Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Francois Godi, Vincent Rouvreau" diff --git a/src/cython/example/coordinate_graph_induced_complex.py b/src/cython/example/coordinate_graph_induced_complex.py index 9e93109a..d066b20a 100755 --- a/src/cython/example/coordinate_graph_induced_complex.py +++ b/src/cython/example/coordinate_graph_induced_complex.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2018 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py index 3b29781f..604d52c9 100755 --- a/src/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py +++ b/src/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py index db34962d..cd949dc4 100755 --- a/src/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py +++ b/src/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/functional_graph_induced_complex.py b/src/cython/example/functional_graph_induced_complex.py index 6ad7c2ec..fcc4373d 100755 --- a/src/cython/example/functional_graph_induced_complex.py +++ b/src/cython/example/functional_graph_induced_complex.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2018 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/gudhi_graphical_tools_example.py b/src/cython/example/gudhi_graphical_tools_example.py index ac3d146c..a031b0d0 100755 --- a/src/cython/example/gudhi_graphical_tools_example.py +++ b/src/cython/example/gudhi_graphical_tools_example.py @@ -2,26 +2,14 @@ import gudhi -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/nerve_of_a_covering.py b/src/cython/example/nerve_of_a_covering.py index c5577cb1..97042865 100755 --- a/src/cython/example/nerve_of_a_covering.py +++ b/src/cython/example/nerve_of_a_covering.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2018 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py b/src/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py index 5f968bf1..0c9bf242 100755 --- a/src/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py +++ b/src/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/random_cubical_complex_persistence_example.py b/src/cython/example/random_cubical_complex_persistence_example.py index 80ff2452..efbfcdf8 100755 --- a/src/cython/example/random_cubical_complex_persistence_example.py +++ b/src/cython/example/random_cubical_complex_persistence_example.py @@ -7,26 +7,14 @@ import argparse import operator -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py b/src/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py index 0c9dfc43..5621f4a1 100755 --- a/src/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py +++ b/src/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py @@ -4,26 +4,14 @@ import gudhi import sys import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2017 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py b/src/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py index 4d2ed577..d298de9a 100755 --- a/src/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py +++ b/src/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/rips_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/rips_complex_diagram_persistence_from_off_file_example.py index d15d5eb0..39537e41 100755 --- a/src/cython/example/rips_complex_diagram_persistence_from_off_file_example.py +++ b/src/cython/example/rips_complex_diagram_persistence_from_off_file_example.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/rips_complex_from_points_example.py b/src/cython/example/rips_complex_from_points_example.py index ffa9d91f..26df89ac 100755 --- a/src/cython/example/rips_complex_from_points_example.py +++ b/src/cython/example/rips_complex_from_points_example.py @@ -2,26 +2,14 @@ import gudhi -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/rips_persistence_diagram.py b/src/cython/example/rips_persistence_diagram.py index 7a6a9f46..9e6d7a3f 100755 --- a/src/cython/example/rips_persistence_diagram.py +++ b/src/cython/example/rips_persistence_diagram.py @@ -2,26 +2,14 @@ import gudhi -"""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): Marc Glisse +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Marc Glisse Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Marc Glisse" diff --git a/src/cython/example/simplex_tree_example.py b/src/cython/example/simplex_tree_example.py index 28679015..51b8bfc7 100755 --- a/src/cython/example/simplex_tree_example.py +++ b/src/cython/example/simplex_tree_example.py @@ -2,26 +2,14 @@ import gudhi -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/sparse_rips_persistence_diagram.py b/src/cython/example/sparse_rips_persistence_diagram.py index d58c244c..9dc26f08 100755 --- a/src/cython/example/sparse_rips_persistence_diagram.py +++ b/src/cython/example/sparse_rips_persistence_diagram.py @@ -2,26 +2,14 @@ import gudhi -"""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): Marc Glisse +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Marc Glisse Copyright (C) 2018 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Marc Glisse" diff --git a/src/cython/example/tangential_complex_plain_homology_from_off_file_example.py b/src/cython/example/tangential_complex_plain_homology_from_off_file_example.py index 536517d1..49fd7026 100755 --- a/src/cython/example/tangential_complex_plain_homology_from_off_file_example.py +++ b/src/cython/example/tangential_complex_plain_homology_from_off_file_example.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/voronoi_graph_induced_complex.py b/src/cython/example/voronoi_graph_induced_complex.py index 8266a0e4..623601d6 100755 --- a/src/cython/example/voronoi_graph_induced_complex.py +++ b/src/cython/example/voronoi_graph_induced_complex.py @@ -3,26 +3,14 @@ import gudhi import argparse -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2018 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/example/witness_complex_from_nearest_landmark_table.py b/src/cython/example/witness_complex_from_nearest_landmark_table.py index 1b79d9b2..9a358fb1 100755 --- a/src/cython/example/witness_complex_from_nearest_landmark_table.py +++ b/src/cython/example/witness_complex_from_nearest_landmark_table.py @@ -2,26 +2,14 @@ from gudhi import StrongWitnessComplex, SimplexTree -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/gudhi.pyx.in b/src/cython/gudhi.pyx.in index 0d4b966b..723a31ad 100644 --- a/src/cython/gudhi.pyx.in +++ b/src/cython/gudhi.pyx.in @@ -1,23 +1,11 @@ -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/include/Alpha_complex_interface.h b/src/cython/include/Alpha_complex_interface.h index faa059d1..1199b741 100644 --- a/src/cython/include/Alpha_complex_interface.h +++ b/src/cython/include/Alpha_complex_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_ALPHA_COMPLEX_INTERFACE_H_ diff --git a/src/cython/include/Bottleneck_distance_interface.h b/src/cython/include/Bottleneck_distance_interface.h index 5ad9d77d..22c9a97a 100644 --- a/src/cython/include/Bottleneck_distance_interface.h +++ b/src/cython/include/Bottleneck_distance_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_BOTTLENECK_DISTANCE_INTERFACE_H_ diff --git a/src/cython/include/Cubical_complex_interface.h b/src/cython/include/Cubical_complex_interface.h index 85b717b3..7d32914c 100644 --- a/src/cython/include/Cubical_complex_interface.h +++ b/src/cython/include/Cubical_complex_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_CUBICAL_COMPLEX_INTERFACE_H_ diff --git a/src/cython/include/Euclidean_strong_witness_complex_interface.h b/src/cython/include/Euclidean_strong_witness_complex_interface.h index d86355d6..90bd54ac 100644 --- a/src/cython/include/Euclidean_strong_witness_complex_interface.h +++ b/src/cython/include/Euclidean_strong_witness_complex_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_EUCLIDEAN_STRONG_WITNESS_COMPLEX_INTERFACE_H_ diff --git a/src/cython/include/Euclidean_witness_complex_interface.h b/src/cython/include/Euclidean_witness_complex_interface.h index dc303533..0c01a741 100644 --- a/src/cython/include/Euclidean_witness_complex_interface.h +++ b/src/cython/include/Euclidean_witness_complex_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_EUCLIDEAN_WITNESS_COMPLEX_INTERFACE_H_ diff --git a/src/cython/include/Nerve_gic_interface.h b/src/cython/include/Nerve_gic_interface.h index aa71e2a6..729b39fb 100644 --- a/src/cython/include/Nerve_gic_interface.h +++ b/src/cython/include/Nerve_gic_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2018 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_NERVE_GIC_INTERFACE_H_ diff --git a/src/cython/include/Off_reader_interface.h b/src/cython/include/Off_reader_interface.h index f6b14f38..4b3643be 100644 --- a/src/cython/include/Off_reader_interface.h +++ b/src/cython/include/Off_reader_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_OFF_READER_INTERFACE_H_ diff --git a/src/cython/include/Persistent_cohomology_interface.h b/src/cython/include/Persistent_cohomology_interface.h index 8cf71a4e..64e2ddc8 100644 --- a/src/cython/include/Persistent_cohomology_interface.h +++ b/src/cython/include/Persistent_cohomology_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_PERSISTENT_COHOMOLOGY_INTERFACE_H_ diff --git a/src/cython/include/Reader_utils_interface.h b/src/cython/include/Reader_utils_interface.h index 5f7527d9..5bddf9ce 100644 --- a/src/cython/include/Reader_utils_interface.h +++ b/src/cython/include/Reader_utils_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2017 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_READER_UTILS_INTERFACE_H_ diff --git a/src/cython/include/Rips_complex_interface.h b/src/cython/include/Rips_complex_interface.h index 40aff299..f818a2ed 100644 --- a/src/cython/include/Rips_complex_interface.h +++ b/src/cython/include/Rips_complex_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_RIPS_COMPLEX_INTERFACE_H_ diff --git a/src/cython/include/Simplex_tree_interface.h b/src/cython/include/Simplex_tree_interface.h index ca98517d..c15a44a5 100644 --- a/src/cython/include/Simplex_tree_interface.h +++ b/src/cython/include/Simplex_tree_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_SIMPLEX_TREE_INTERFACE_H_ diff --git a/src/cython/include/Strong_witness_complex_interface.h b/src/cython/include/Strong_witness_complex_interface.h index 3c72c916..4c333da8 100644 --- a/src/cython/include/Strong_witness_complex_interface.h +++ b/src/cython/include/Strong_witness_complex_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_STRONG_WITNESS_COMPLEX_INTERFACE_H_ diff --git a/src/cython/include/Subsampling_interface.h b/src/cython/include/Subsampling_interface.h index f990da0c..bc390485 100644 --- a/src/cython/include/Subsampling_interface.h +++ b/src/cython/include/Subsampling_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_SUBSAMPLING_INTERFACE_H_ diff --git a/src/cython/include/Tangential_complex_interface.h b/src/cython/include/Tangential_complex_interface.h index c4ddbdbe..7c3f2789 100644 --- a/src/cython/include/Tangential_complex_interface.h +++ b/src/cython/include/Tangential_complex_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_TANGENTIAL_COMPLEX_INTERFACE_H_ diff --git a/src/cython/include/Witness_complex_interface.h b/src/cython/include/Witness_complex_interface.h index 01b372e7..609277d6 100644 --- a/src/cython/include/Witness_complex_interface.h +++ b/src/cython/include/Witness_complex_interface.h @@ -6,18 +6,8 @@ * * Copyright (C) 2016 Inria * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . + * Modification(s): + * - YYYY/MM Author: Description of the modification */ #ifndef INCLUDE_WITNESS_COMPLEX_INTERFACE_H_ diff --git a/src/cython/setup.py.in b/src/cython/setup.py.in index c66905ac..70c85852 100644 --- a/src/cython/setup.py.in +++ b/src/cython/setup.py.in @@ -2,26 +2,14 @@ from distutils.core import setup, Extension from Cython.Build import cythonize from numpy import get_include as numpy_get_include -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2019 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "GUDHI Editorial Board" diff --git a/src/cython/test/test_alpha_complex.py b/src/cython/test/test_alpha_complex.py index e97f2530..aac4c22a 100755 --- a/src/cython/test/test_alpha_complex.py +++ b/src/cython/test/test_alpha_complex.py @@ -1,25 +1,13 @@ from gudhi import AlphaComplex, SimplexTree -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_bottleneck_distance.py b/src/cython/test/test_bottleneck_distance.py index 4eb5848f..5be1da5a 100755 --- a/src/cython/test/test_bottleneck_distance.py +++ b/src/cython/test/test_bottleneck_distance.py @@ -1,25 +1,13 @@ import gudhi -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_cover_complex.py b/src/cython/test/test_cover_complex.py index 58935264..7e99946d 100755 --- a/src/cython/test/test_cover_complex.py +++ b/src/cython/test/test_cover_complex.py @@ -1,25 +1,13 @@ from gudhi import CoverComplex -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2018 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_cubical_complex.py b/src/cython/test/test_cubical_complex.py index 92e591e9..e06b3c07 100755 --- a/src/cython/test/test_cubical_complex.py +++ b/src/cython/test/test_cubical_complex.py @@ -1,25 +1,13 @@ from gudhi import CubicalComplex -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_euclidean_witness_complex.py b/src/cython/test/test_euclidean_witness_complex.py index 2f77210a..04c73409 100755 --- a/src/cython/test/test_euclidean_witness_complex.py +++ b/src/cython/test/test_euclidean_witness_complex.py @@ -1,25 +1,13 @@ import gudhi -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_reader_utils.py b/src/cython/test/test_reader_utils.py index 36e927b0..2166bb05 100755 --- a/src/cython/test/test_reader_utils.py +++ b/src/cython/test/test_reader_utils.py @@ -1,26 +1,14 @@ import gudhi import numpy as np -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2017 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_rips_complex.py b/src/cython/test/test_rips_complex.py index 05dfcaf7..4443fac5 100755 --- a/src/cython/test/test_rips_complex.py +++ b/src/cython/test/test_rips_complex.py @@ -1,26 +1,14 @@ from gudhi import RipsComplex from math import sqrt -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_simplex_tree.py b/src/cython/test/test_simplex_tree.py index cb701c9a..8310566b 100755 --- a/src/cython/test/test_simplex_tree.py +++ b/src/cython/test/test_simplex_tree.py @@ -1,25 +1,13 @@ from gudhi import SimplexTree -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_subsampling.py b/src/cython/test/test_subsampling.py index 96906a6f..eecb290a 100755 --- a/src/cython/test/test_subsampling.py +++ b/src/cython/test/test_subsampling.py @@ -1,25 +1,13 @@ import gudhi -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_tangential_complex.py b/src/cython/test/test_tangential_complex.py index 5c62f278..ce05b05f 100755 --- a/src/cython/test/test_tangential_complex.py +++ b/src/cython/test/test_tangential_complex.py @@ -1,25 +1,13 @@ from gudhi import TangentialComplex, SimplexTree -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" diff --git a/src/cython/test/test_witness_complex.py b/src/cython/test/test_witness_complex.py index bcbc521b..abc3b3b9 100755 --- a/src/cython/test/test_witness_complex.py +++ b/src/cython/test/test_witness_complex.py @@ -1,25 +1,13 @@ from gudhi import WitnessComplex, StrongWitnessComplex, SimplexTree -"""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): Vincent Rouvreau +"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Vincent Rouvreau Copyright (C) 2016 Inria - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - 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 . + Modification(s): + - YYYY/MM Author: Description of the modification """ __author__ = "Vincent Rouvreau" -- cgit v1.2.3 From 331fee1010245f487abfa0381dd9e9936654a016 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Wed, 14 Aug 2019 08:21:22 +0200 Subject: Fix #35 Modify Copyright as GUDHI is not only a C++ library --- .../concept/SimplicialComplexForAlpha3d.h | 6 ++---- src/Alpha_complex/doc/COPYRIGHT | 19 ++++++------------ src/Alpha_complex/doc/Intro_alpha_complex.h | 6 ++---- src/Alpha_complex/include/gudhi/Alpha_complex.h | 6 ++---- src/Alpha_complex/include/gudhi/Alpha_complex_3d.h | 6 ++---- .../include/gudhi/Alpha_complex_options.h | 6 ++---- .../test/Alpha_complex_3d_unit_test.cpp | 6 ++---- src/Alpha_complex/test/Alpha_complex_unit_test.cpp | 6 ++---- .../test/Periodic_alpha_complex_3d_unit_test.cpp | 6 ++---- .../test/Weighted_alpha_complex_3d_unit_test.cpp | 6 ++---- ...eighted_periodic_alpha_complex_3d_unit_test.cpp | 6 ++---- .../utilities/alpha_complex_3d_persistence.cpp | 6 ++---- .../utilities/alpha_complex_persistence.cpp | 6 ++---- src/Bitmap_cubical_complex/doc/COPYRIGHT | 21 +++++++------------- .../doc/Gudhi_Cubical_Complex_doc.h | 6 ++---- .../example/Random_bitmap_cubical_complex.cpp | 6 ++---- .../include/gudhi/Bitmap_cubical_complex.h | 6 ++---- .../include/gudhi/Bitmap_cubical_complex/counter.h | 6 ++---- .../include/gudhi/Bitmap_cubical_complex_base.h | 6 ++---- ...cal_complex_periodic_boundary_conditions_base.h | 6 ++---- src/Bitmap_cubical_complex/test/Bitmap_test.cpp | 6 ++---- .../utilities/cubical_complex_persistence.cpp | 6 ++---- .../periodic_cubical_complex_persistence.cpp | 6 ++---- .../benchmark/bottleneck_chrono.cpp | 6 ++---- .../concept/Persistence_diagram.h | 6 ++---- src/Bottleneck_distance/doc/COPYRIGHT | 21 +++++++------------- .../doc/Intro_bottleneck_distance.h | 6 ++---- .../alpha_rips_persistence_bottleneck_distance.cpp | 6 ++---- src/Bottleneck_distance/include/gudhi/Bottleneck.h | 6 ++---- .../include/gudhi/Graph_matching.h | 6 ++---- .../include/gudhi/Internal_point.h | 6 ++---- .../include/gudhi/Neighbors_finder.h | 6 ++---- .../include/gudhi/Persistence_graph.h | 6 ++---- .../test/bottleneck_unit_test.cpp | 6 ++---- .../utilities/bottleneck_distance.cpp | 6 ++---- .../benchmark/cech_complex_benchmark.cpp | 6 ++---- src/Cech_complex/doc/COPYRIGHT | 19 ++++++------------ src/Cech_complex/doc/Intro_cech_complex.h | 6 ++---- .../example/cech_complex_step_by_step.cpp | 6 ++---- src/Cech_complex/include/gudhi/Cech_complex.h | 6 ++---- .../include/gudhi/Cech_complex_blocker.h | 6 ++---- src/Cech_complex/test/test_cech_complex.cpp | 6 ++---- src/Cech_complex/utilities/cech_persistence.cpp | 6 ++---- src/Contraction/doc/COPYRIGHT | 22 ++++++++------------- src/Contraction/example/Rips_contraction.cpp | 6 ++---- src/Contraction/include/gudhi/Edge_contraction.h | 6 ++---- .../include/gudhi/Skeleton_blocker_contractor.h | 6 ++---- src/GudhUI/gui/MainWindow.cpp | 6 ++---- src/GudhUI/gui/MainWindow.h | 6 ++---- src/GudhUI/gui/Menu_edge_contraction.cpp | 6 ++---- src/GudhUI/gui/Menu_edge_contraction.h | 6 ++---- src/GudhUI/gui/Menu_k_nearest_neighbors.cpp | 6 ++---- src/GudhUI/gui/Menu_k_nearest_neighbors.h | 6 ++---- src/GudhUI/utils/Is_manifold.h | 9 ++------- src/Nerve_GIC/doc/COPYRIGHT | 23 ++++++++-------------- src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 6 ++---- src/Nerve_GIC/example/CoordGIC.cpp | 6 ++---- src/Nerve_GIC/example/FuncGIC.cpp | 6 ++---- src/Nerve_GIC/include/gudhi/GIC.h | 6 ++---- src/Nerve_GIC/test/test_GIC.cpp | 6 ++---- src/Nerve_GIC/utilities/Nerve.cpp | 6 ++---- src/Nerve_GIC/utilities/VoronoiGIC.cpp | 6 ++---- .../concept/Real_valued_topological_data.h | 6 ++---- .../concept/Topological_data_with_averages.h | 6 ++---- .../concept/Topological_data_with_distances.h | 6 ++---- .../concept/Topological_data_with_scalar_product.h | 6 ++---- .../concept/Vectorized_topological_data.h | 6 ++---- .../doc/Persistence_representations_doc.h | 6 ++---- .../example/persistence_heat_maps.cpp | 6 ++---- .../example/persistence_intervals.cpp | 6 ++---- .../example/persistence_landscape.cpp | 6 ++---- .../example/persistence_landscape_on_grid.cpp | 6 ++---- .../example/persistence_vectors.cpp | 6 ++---- .../example/sliced_wasserstein.cpp | 6 ++---- .../include/gudhi/PSSK.h | 6 ++---- .../include/gudhi/Persistence_heat_maps.h | 6 ++---- .../include/gudhi/Persistence_intervals.h | 6 ++---- .../gudhi/Persistence_intervals_with_distances.h | 6 ++---- .../include/gudhi/Persistence_landscape.h | 6 ++---- .../include/gudhi/Persistence_vectors.h | 6 ++---- .../include/gudhi/Sliced_Wasserstein.h | 6 ++---- .../gudhi/common_persistence_representations.h | 6 ++---- .../include/gudhi/read_persistence_from_file.h | 6 ++---- src/Persistence_representations/test/kernels.cpp | 6 ++---- .../test/persistence_heat_maps_test.cpp | 6 ++---- .../test/persistence_intervals_test.cpp | 6 ++---- .../persistence_intervals_with_distances_test.cpp | 6 ++---- .../test/persistence_lanscapes_on_grid_test.cpp | 6 ++---- .../test/persistence_lanscapes_test.cpp | 6 ++---- .../test/read_persistence_from_file_test.cpp | 6 ++---- .../test/vector_representation_test.cpp | 6 ++---- .../average_persistence_heat_maps.cpp | 6 ++---- .../compute_distance_of_persistence_heat_maps.cpp | 6 ++---- ...ute_scalar_product_of_persistence_heat_maps.cpp | 6 ++---- ...te_p_h_m_weighted_by_distance_from_diagonal.cpp | 6 ++---- ...ate_p_h_m_weighted_by_squared_diag_distance.cpp | 6 ++---- .../create_persistence_heat_maps.cpp | 6 ++---- .../persistence_heat_maps/create_pssk.cpp | 6 ++---- .../plot_persistence_heat_map.cpp | 6 ++---- ...te_birth_death_range_in_persistence_diagram.cpp | 6 ++---- .../compute_bottleneck_distance.cpp | 6 ++---- .../compute_number_of_dominant_intervals.cpp | 6 ++---- .../plot_histogram_of_intervals_lengths.cpp | 6 ++---- .../plot_persistence_Betti_numbers.cpp | 6 ++---- .../plot_persistence_intervals.cpp | 6 ++---- .../persistence_landscapes/average_landscapes.cpp | 6 ++---- .../compute_distance_of_landscapes.cpp | 6 ++---- .../compute_scalar_product_of_landscapes.cpp | 6 ++---- .../persistence_landscapes/create_landscapes.cpp | 6 ++---- .../persistence_landscapes/plot_landscapes.cpp | 6 ++---- .../average_landscapes_on_grid.cpp | 6 ++---- .../compute_distance_of_landscapes_on_grid.cpp | 6 ++---- ...ompute_scalar_product_of_landscapes_on_grid.cpp | 6 ++---- .../create_landscapes_on_grid.cpp | 6 ++---- .../plot_landscapes_on_grid.cpp | 6 ++---- .../average_persistence_vectors.cpp | 6 ++---- .../compute_distance_of_persistence_vectors.cpp | 6 ++---- ...mpute_scalar_product_of_persistence_vectors.cpp | 6 ++---- .../create_persistence_vectors.cpp | 6 ++---- .../plot_persistence_vectors.cpp | 6 ++---- src/Persistent_cohomology/doc/COPYRIGHT | 21 +++++++------------- .../doc/Intro_persistent_cohomology.h | 6 ++---- .../example/custom_persistence_sort.cpp | 6 ++---- .../persistence_from_simple_simplex_tree.cpp | 6 ++---- .../example/plain_homology.cpp | 6 ++---- .../include/gudhi/Persistent_cohomology.h | 6 ++---- .../include/gudhi/Persistent_cohomology/Field_Zp.h | 6 ++---- .../gudhi/Persistent_cohomology/Multi_field.h | 6 ++---- .../Persistent_cohomology_column.h | 6 ++---- src/Rips_complex/doc/COPYRIGHT | 21 +++++++------------- src/Rips_complex/doc/Intro_rips_complex.h | 6 ++---- src/Rips_complex/include/gudhi/Rips_complex.h | 6 ++---- .../include/gudhi/Sparse_rips_complex.h | 6 ++---- src/Rips_complex/test/test_rips_complex.cpp | 6 ++---- .../rips_correlation_matrix_persistence.cpp | 6 ++---- .../utilities/rips_distance_matrix_persistence.cpp | 6 ++---- src/Rips_complex/utilities/rips_persistence.cpp | 6 ++---- .../utilities/sparse_rips_persistence.cpp | 6 ++---- src/Simplex_tree/doc/COPYRIGHT | 21 +++++++------------- src/Simplex_tree/doc/Intro_simplex_tree.h | 6 ++---- .../example/cech_complex_cgal_mini_sphere_3d.cpp | 6 ++---- ...e_alpha_shapes_3_simplex_tree_from_off_file.cpp | 6 ++---- .../example/graph_expansion_with_blocker.cpp | 6 ++---- src/Simplex_tree/example/mini_simplex_tree.cpp | 6 ++---- src/Simplex_tree/example/simple_simplex_tree.cpp | 6 ++---- .../example/simplex_tree_from_cliques_of_graph.cpp | 6 ++---- src/Simplex_tree/include/gudhi/Simplex_tree.h | 6 ++---- .../gudhi/Simplex_tree/Simplex_tree_iterators.h | 6 ++---- .../Simplex_tree_node_explicit_storage.h | 6 ++---- .../gudhi/Simplex_tree/Simplex_tree_siblings.h | 6 ++---- .../include/gudhi/Simplex_tree/indexing_tag.h | 6 ++---- .../test/simplex_tree_ctor_and_move_unit_test.cpp | 10 ++++++++++ .../simplex_tree_graph_expansion_unit_test.cpp | 10 ++++++++++ .../simplex_tree_iostream_operator_unit_test.cpp | 10 ++++++++++ .../test/simplex_tree_remove_unit_test.cpp | 10 ++++++++++ src/Simplex_tree/test/simplex_tree_unit_test.cpp | 10 ++++++++++ src/Skeleton_blocker/concept/SkeletonBlockerDS.h | 6 ++---- .../concept/SkeletonBlockerGeometricDS.h | 6 ++---- src/Skeleton_blocker/doc/COPYRIGHT | 22 ++++++++------------- .../include/gudhi/Skeleton_blocker.h | 6 ++---- .../Skeleton_blocker_complex_visitor.h | 6 ++---- .../Skeleton_blocker_link_superior.h | 6 ++---- .../Skeleton_blocker/Skeleton_blocker_off_io.h | 6 ++---- .../Skeleton_blocker_simple_geometric_traits.h | 6 ++---- .../Skeleton_blocker_simple_traits.h | 6 ++---- .../Skeleton_blocker/Skeleton_blocker_simplex.h | 6 ++---- .../Skeleton_blocker_sub_complex.h | 6 ++---- .../gudhi/Skeleton_blocker/internal/Top_faces.h | 6 ++---- .../Skeleton_blockers_blockers_iterators.h | 6 ++---- .../iterators/Skeleton_blockers_edges_iterators.h | 6 ++---- .../Skeleton_blockers_simplices_iterators.h | 6 ++---- .../Skeleton_blockers_triangles_iterators.h | 6 ++---- .../Skeleton_blockers_vertices_iterators.h | 6 ++---- .../include/gudhi/Skeleton_blocker_complex.h | 6 ++---- .../gudhi/Skeleton_blocker_geometric_complex.h | 6 ++---- .../include/gudhi/Skeleton_blocker_link_complex.h | 6 ++---- .../gudhi/Skeleton_blocker_simplifiable_complex.h | 6 ++---- .../test/test_skeleton_blocker_complex.cpp | 7 +++---- .../doc/Intro_spatial_searching.h | 6 ++---- .../include/gudhi/Kd_tree_search.h | 6 ++---- src/Spatial_searching/test/test_Kd_tree_search.cpp | 6 ++---- src/Subsampling/doc/Intro_subsampling.h | 6 ++---- .../include/gudhi/choose_n_farthest_points.h | 6 ++---- .../include/gudhi/pick_n_random_points.h | 6 ++---- src/Subsampling/include/gudhi/sparsify_point_set.h | 6 ++---- .../test/test_choose_n_farthest_points.cpp | 6 ++---- src/Subsampling/test/test_pick_n_random_points.cpp | 6 ++---- src/Subsampling/test/test_sparsify_point_set.cpp | 6 ++---- src/Tangential_complex/benchmark/RIB_exporter.h | 6 ++---- src/Tangential_complex/benchmark/XML_exporter.h | 6 ++---- src/Tangential_complex/doc/COPYRIGHT | 21 +++++++------------- .../doc/Intro_tangential_complex.h | 6 ++---- .../include/gudhi/Tangential_complex.h | 6 ++---- .../gudhi/Tangential_complex/Simplicial_complex.h | 6 ++---- .../include/gudhi/Tangential_complex/config.h | 6 ++---- .../include/gudhi/Tangential_complex/utilities.h | 6 ++---- .../test/test_tangential_complex.cpp | 6 ++---- src/Toplex_map/benchmark/benchmark_tm.cpp | 6 ++---- src/Toplex_map/doc/Intro_Toplex_map.h | 6 ++---- src/Toplex_map/example/simple_toplex_map.cpp | 6 ++---- src/Toplex_map/include/gudhi/Lazy_toplex_map.h | 6 ++---- src/Toplex_map/include/gudhi/Toplex_map.h | 6 ++---- src/Toplex_map/test/lazy_toplex_map_unit_test.cpp | 6 ++---- src/Toplex_map/test/toplex_map_unit_test.cpp | 6 ++---- src/Witness_complex/doc/COPYRIGHT | 21 +++++++------------- src/Witness_complex/example/generators.h | 6 ++---- .../include/gudhi/Active_witness/Active_witness.h | 6 ++---- .../gudhi/Active_witness/Active_witness_iterator.h | 6 ++---- .../gudhi/Euclidean_strong_witness_complex.h | 6 ++---- .../include/gudhi/Euclidean_witness_complex.h | 6 ++---- .../include/gudhi/Strong_witness_complex.h | 6 ++---- .../include/gudhi/Witness_complex.h | 6 ++---- .../include/gudhi/Witness_complex/all_faces_in.h | 6 ++---- .../utilities/strong_witness_persistence.cpp | 6 ++---- .../utilities/weak_witness_persistence.cpp | 6 ++---- .../Graph_simplicial_complex_benchmark.cpp | 6 ++---- src/common/include/gudhi/Debug_utils.h | 6 ++---- src/common/include/gudhi/Null_output_iterator.h | 6 ++---- src/common/include/gudhi/Points_3D_off_io.h | 6 ++---- src/common/include/gudhi/Points_off_io.h | 6 ++---- src/common/include/gudhi/Simple_object_pool.h | 6 ++---- src/common/include/gudhi/Unitary_tests_utils.h | 6 ++---- src/common/include/gudhi/allocator.h | 6 ++---- src/common/include/gudhi/console_color.h | 6 ++---- src/common/include/gudhi/random_point_generators.h | 6 ++---- src/common/include/gudhi/reader_utils.h | 6 ++---- .../include/gudhi/writing_persistence_to_file.h | 6 ++---- src/common/test/test_distance_matrix_reader.cpp | 6 ++---- .../test/test_persistence_intervals_reader.cpp | 6 ++---- src/common/test/test_points_off_reader.cpp | 6 ++---- .../utilities/off_file_from_shape_generator.cpp | 6 ++---- src/cython/include/Alpha_complex_interface.h | 6 ++---- src/cython/include/Bottleneck_distance_interface.h | 6 ++---- src/cython/include/Cubical_complex_interface.h | 6 ++---- .../Euclidean_strong_witness_complex_interface.h | 6 ++---- .../include/Euclidean_witness_complex_interface.h | 6 ++---- src/cython/include/Nerve_gic_interface.h | 6 ++---- src/cython/include/Off_reader_interface.h | 6 ++---- .../include/Persistent_cohomology_interface.h | 6 ++---- src/cython/include/Reader_utils_interface.h | 6 ++---- src/cython/include/Rips_complex_interface.h | 6 ++---- src/cython/include/Simplex_tree_interface.h | 6 ++---- .../include/Strong_witness_complex_interface.h | 6 ++---- src/cython/include/Subsampling_interface.h | 6 ++---- src/cython/include/Tangential_complex_interface.h | 6 ++---- src/cython/include/Witness_complex_interface.h | 6 ++---- 246 files changed, 594 insertions(+), 1086 deletions(-) (limited to 'src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp') diff --git a/src/Alpha_complex/concept/SimplicialComplexForAlpha3d.h b/src/Alpha_complex/concept/SimplicialComplexForAlpha3d.h index 1dc8c037..3a6830ff 100644 --- a/src/Alpha_complex/concept/SimplicialComplexForAlpha3d.h +++ b/src/Alpha_complex/concept/SimplicialComplexForAlpha3d.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Alpha_complex/doc/COPYRIGHT b/src/Alpha_complex/doc/COPYRIGHT index 5f1d97cc..61f17f6d 100644 --- a/src/Alpha_complex/doc/COPYRIGHT +++ b/src/Alpha_complex/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index 5b332e47..b075d1fc 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index d5865671..cdc1ed1d 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h index 47407b38..9bff42b5 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_options.h b/src/Alpha_complex/include/gudhi/Alpha_complex_options.h index bf29039b..85c83672 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_options.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_options.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Alpha_complex/test/Alpha_complex_3d_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_3d_unit_test.cpp index 8e4121ae..1102838a 100644 --- a/src/Alpha_complex/test/Alpha_complex_3d_unit_test.cpp +++ b/src/Alpha_complex/test/Alpha_complex_3d_unit_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp index de0cf471..01e4cee3 100644 --- a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp +++ b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/Alpha_complex/test/Periodic_alpha_complex_3d_unit_test.cpp b/src/Alpha_complex/test/Periodic_alpha_complex_3d_unit_test.cpp index 4449e5ed..ac3791a4 100644 --- a/src/Alpha_complex/test/Periodic_alpha_complex_3d_unit_test.cpp +++ b/src/Alpha_complex/test/Periodic_alpha_complex_3d_unit_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/Alpha_complex/test/Weighted_alpha_complex_3d_unit_test.cpp b/src/Alpha_complex/test/Weighted_alpha_complex_3d_unit_test.cpp index 201dbce4..44deb930 100644 --- a/src/Alpha_complex/test/Weighted_alpha_complex_3d_unit_test.cpp +++ b/src/Alpha_complex/test/Weighted_alpha_complex_3d_unit_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/Alpha_complex/test/Weighted_periodic_alpha_complex_3d_unit_test.cpp b/src/Alpha_complex/test/Weighted_periodic_alpha_complex_3d_unit_test.cpp index 9d711c41..670c7799 100644 --- a/src/Alpha_complex/test/Weighted_periodic_alpha_complex_3d_unit_test.cpp +++ b/src/Alpha_complex/test/Weighted_periodic_alpha_complex_3d_unit_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index b9991b83..2272576e 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2014 Inria diff --git a/src/Alpha_complex/utilities/alpha_complex_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_persistence.cpp index 12a8740e..fab7bd30 100644 --- a/src/Alpha_complex/utilities/alpha_complex_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/Bitmap_cubical_complex/doc/COPYRIGHT b/src/Bitmap_cubical_complex/doc/COPYRIGHT index 2b14dcb9..61f17f6d 100644 --- a/src/Bitmap_cubical_complex/doc/COPYRIGHT +++ b/src/Bitmap_cubical_complex/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): Pawel Dlotko +Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h b/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h index 237f79ad..d2b9ccd6 100644 --- a/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h +++ b/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp index 533aec91..46ea8f2e 100644 --- a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp +++ b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h index 1954eb0c..37514dee 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h index 84d53778..fdcea230 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h index a0ad40fc..0d6299d2 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h index 4afed33c..edd794fe 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp index d3ed75d3..f18adb36 100644 --- a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp +++ b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp index 6cf0889f..a9792c2d 100644 --- a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp +++ b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp index 700d90f4..fa97bac0 100644 --- a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp +++ b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp b/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp index db3c9815..576d510b 100644 --- a/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp +++ b/src/Bottleneck_distance/benchmark/bottleneck_chrono.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: Francois Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/concept/Persistence_diagram.h b/src/Bottleneck_distance/concept/Persistence_diagram.h index de8021cc..8c8761cb 100644 --- a/src/Bottleneck_distance/concept/Persistence_diagram.h +++ b/src/Bottleneck_distance/concept/Persistence_diagram.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: François Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/doc/COPYRIGHT b/src/Bottleneck_distance/doc/COPYRIGHT index 1c2016b1..61f17f6d 100644 --- a/src/Bottleneck_distance/doc/COPYRIGHT +++ b/src/Bottleneck_distance/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): François Godi +Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h index d58392ae..bbc952e1 100644 --- a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h +++ b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: François Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp b/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp index c5d66121..6c0dc9bf 100644 --- a/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp +++ b/src/Bottleneck_distance/example/alpha_rips_persistence_bottleneck_distance.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2017 Inria diff --git a/src/Bottleneck_distance/include/gudhi/Bottleneck.h b/src/Bottleneck_distance/include/gudhi/Bottleneck.h index 105f1a93..d31c82ee 100644 --- a/src/Bottleneck_distance/include/gudhi/Bottleneck.h +++ b/src/Bottleneck_distance/include/gudhi/Bottleneck.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: Francois Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/include/gudhi/Graph_matching.h b/src/Bottleneck_distance/include/gudhi/Graph_matching.h index 6385ae30..7b7623ce 100644 --- a/src/Bottleneck_distance/include/gudhi/Graph_matching.h +++ b/src/Bottleneck_distance/include/gudhi/Graph_matching.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: Francois Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/include/gudhi/Internal_point.h b/src/Bottleneck_distance/include/gudhi/Internal_point.h index 9d268af3..f829943e 100644 --- a/src/Bottleneck_distance/include/gudhi/Internal_point.h +++ b/src/Bottleneck_distance/include/gudhi/Internal_point.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: Francois Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h index 8a75384c..c65e6082 100644 --- a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h +++ b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: Francois Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h index 3e82a4c9..f791e37c 100644 --- a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h +++ b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: Francois Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/test/bottleneck_unit_test.cpp b/src/Bottleneck_distance/test/bottleneck_unit_test.cpp index 5f20892c..3fc6fc7b 100644 --- a/src/Bottleneck_distance/test/bottleneck_unit_test.cpp +++ b/src/Bottleneck_distance/test/bottleneck_unit_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: Francois Godi * * Copyright (C) 2015 Inria diff --git a/src/Bottleneck_distance/utilities/bottleneck_distance.cpp b/src/Bottleneck_distance/utilities/bottleneck_distance.cpp index fc03cb21..d88a8a0b 100644 --- a/src/Bottleneck_distance/utilities/bottleneck_distance.cpp +++ b/src/Bottleneck_distance/utilities/bottleneck_distance.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Authors: Francois Godi, small modifications by Pawel Dlotko * * Copyright (C) 2015 Inria diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp index df12e06d..d2d71dbf 100644 --- a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp +++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Cech_complex/doc/COPYRIGHT b/src/Cech_complex/doc/COPYRIGHT index 5f1d97cc..61f17f6d 100644 --- a/src/Cech_complex/doc/COPYRIGHT +++ b/src/Cech_complex/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Cech_complex/doc/Intro_cech_complex.h b/src/Cech_complex/doc/Intro_cech_complex.h index 250c91fa..90086de7 100644 --- a/src/Cech_complex/doc/Intro_cech_complex.h +++ b/src/Cech_complex/doc/Intro_cech_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Cech_complex/example/cech_complex_step_by_step.cpp b/src/Cech_complex/example/cech_complex_step_by_step.cpp index d9d17b26..b3d05697 100644 --- a/src/Cech_complex/example/cech_complex_step_by_step.cpp +++ b/src/Cech_complex/example/cech_complex_step_by_step.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h index cc69f35f..b0871e10 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex.h +++ b/src/Cech_complex/include/gudhi/Cech_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h index c0c03bb0..068cdde3 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h +++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Cech_complex/test/test_cech_complex.cpp b/src/Cech_complex/test/test_cech_complex.cpp index 8df71b15..c6b15d7f 100644 --- a/src/Cech_complex/test/test_cech_complex.cpp +++ b/src/Cech_complex/test/test_cech_complex.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Cech_complex/utilities/cech_persistence.cpp b/src/Cech_complex/utilities/cech_persistence.cpp index 78d47a5a..8cfe018b 100644 --- a/src/Cech_complex/utilities/cech_persistence.cpp +++ b/src/Cech_complex/utilities/cech_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/Contraction/doc/COPYRIGHT b/src/Contraction/doc/COPYRIGHT index 5b606ac2..61f17f6d 100644 --- a/src/Contraction/doc/COPYRIGHT +++ b/src/Contraction/doc/COPYRIGHT @@ -1,18 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): David Salinas -Copyright (C) 2015 Inria +Author(s): Vincent Rouvreau -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. +Copyright (C) 2015 Inria -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. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -You should have received a copy of the GNU General Public License along with -this program. If not, see . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp index c41a9d94..b5ce06c1 100644 --- a/src/Contraction/example/Rips_contraction.cpp +++ b/src/Contraction/example/Rips_contraction.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Contraction/include/gudhi/Edge_contraction.h b/src/Contraction/include/gudhi/Edge_contraction.h index 5cd024bd..6058d64b 100644 --- a/src/Contraction/include/gudhi/Edge_contraction.h +++ b/src/Contraction/include/gudhi/Edge_contraction.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h b/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h index 7a99548d..d9f8d9f4 100644 --- a/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h +++ b/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/GudhUI/gui/MainWindow.cpp b/src/GudhUI/gui/MainWindow.cpp index 05bd42c8..54415e6a 100644 --- a/src/GudhUI/gui/MainWindow.cpp +++ b/src/GudhUI/gui/MainWindow.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/GudhUI/gui/MainWindow.h b/src/GudhUI/gui/MainWindow.h index d9281e57..5f9ab2fc 100644 --- a/src/GudhUI/gui/MainWindow.h +++ b/src/GudhUI/gui/MainWindow.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/GudhUI/gui/Menu_edge_contraction.cpp b/src/GudhUI/gui/Menu_edge_contraction.cpp index 5a517cef..f2938d61 100644 --- a/src/GudhUI/gui/Menu_edge_contraction.cpp +++ b/src/GudhUI/gui/Menu_edge_contraction.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/GudhUI/gui/Menu_edge_contraction.h b/src/GudhUI/gui/Menu_edge_contraction.h index 7cbf60ee..f44da8d3 100644 --- a/src/GudhUI/gui/Menu_edge_contraction.h +++ b/src/GudhUI/gui/Menu_edge_contraction.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp b/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp index 69ed6c56..d050ee34 100644 --- a/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp +++ b/src/GudhUI/gui/Menu_k_nearest_neighbors.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/GudhUI/gui/Menu_k_nearest_neighbors.h b/src/GudhUI/gui/Menu_k_nearest_neighbors.h index e29ffc0b..cfefde48 100644 --- a/src/GudhUI/gui/Menu_k_nearest_neighbors.h +++ b/src/GudhUI/gui/Menu_k_nearest_neighbors.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/GudhUI/utils/Is_manifold.h b/src/GudhUI/utils/Is_manifold.h index 276f4332..2eb79d21 100644 --- a/src/GudhUI/utils/Is_manifold.h +++ b/src/GudhUI/utils/Is_manifold.h @@ -1,10 +1,5 @@ -/* - * Is_manifold.h - * Created on: Jan 28, 2015 - * This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Nerve_GIC/doc/COPYRIGHT b/src/Nerve_GIC/doc/COPYRIGHT index 6b33053e..61f17f6d 100644 --- a/src/Nerve_GIC/doc/COPYRIGHT +++ b/src/Nerve_GIC/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): Mathieu Carrière +Author(s): Vincent Rouvreau -Copyright (C) 2017 Inria +Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index d709baec..f9441b24 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carriere * * Copyright (C) 2017 Inria diff --git a/src/Nerve_GIC/example/CoordGIC.cpp b/src/Nerve_GIC/example/CoordGIC.cpp index b3a79233..fd9c224a 100644 --- a/src/Nerve_GIC/example/CoordGIC.cpp +++ b/src/Nerve_GIC/example/CoordGIC.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carrière * * Copyright (C) 2017 Inria diff --git a/src/Nerve_GIC/example/FuncGIC.cpp b/src/Nerve_GIC/example/FuncGIC.cpp index 2f0b5f2b..5a323795 100644 --- a/src/Nerve_GIC/example/FuncGIC.cpp +++ b/src/Nerve_GIC/example/FuncGIC.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carrière * * Copyright (C) 2017 Inria diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index d98deeac..a1621ad9 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: Mathieu Carriere * * Copyright (C) 2017 Inria diff --git a/src/Nerve_GIC/test/test_GIC.cpp b/src/Nerve_GIC/test/test_GIC.cpp index 06b3f832..9d326234 100644 --- a/src/Nerve_GIC/test/test_GIC.cpp +++ b/src/Nerve_GIC/test/test_GIC.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carrière * * Copyright (C) 2017 Inria diff --git a/src/Nerve_GIC/utilities/Nerve.cpp b/src/Nerve_GIC/utilities/Nerve.cpp index ef8e2d7e..d34e922c 100644 --- a/src/Nerve_GIC/utilities/Nerve.cpp +++ b/src/Nerve_GIC/utilities/Nerve.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carrière * * Copyright (C) 2017 Inria diff --git a/src/Nerve_GIC/utilities/VoronoiGIC.cpp b/src/Nerve_GIC/utilities/VoronoiGIC.cpp index fabe35c9..0182c948 100644 --- a/src/Nerve_GIC/utilities/VoronoiGIC.cpp +++ b/src/Nerve_GIC/utilities/VoronoiGIC.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carrière * * Copyright (C) 2017 Inria diff --git a/src/Persistence_representations/concept/Real_valued_topological_data.h b/src/Persistence_representations/concept/Real_valued_topological_data.h index 9b29a9bd..12aceab4 100644 --- a/src/Persistence_representations/concept/Real_valued_topological_data.h +++ b/src/Persistence_representations/concept/Real_valued_topological_data.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/concept/Topological_data_with_averages.h b/src/Persistence_representations/concept/Topological_data_with_averages.h index b1b5ca80..d8fe98b7 100644 --- a/src/Persistence_representations/concept/Topological_data_with_averages.h +++ b/src/Persistence_representations/concept/Topological_data_with_averages.h @@ -1,8 +1,6 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/concept/Topological_data_with_distances.h b/src/Persistence_representations/concept/Topological_data_with_distances.h index 87c3d158..8efebf7c 100644 --- a/src/Persistence_representations/concept/Topological_data_with_distances.h +++ b/src/Persistence_representations/concept/Topological_data_with_distances.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h index 063f37ed..0b43b4f7 100644 --- a/src/Persistence_representations/concept/Topological_data_with_scalar_product.h +++ b/src/Persistence_representations/concept/Topological_data_with_scalar_product.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/concept/Vectorized_topological_data.h b/src/Persistence_representations/concept/Vectorized_topological_data.h index dd1224d2..b8a16102 100644 --- a/src/Persistence_representations/concept/Vectorized_topological_data.h +++ b/src/Persistence_representations/concept/Vectorized_topological_data.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/doc/Persistence_representations_doc.h b/src/Persistence_representations/doc/Persistence_representations_doc.h index 111e532b..3a5b9c89 100644 --- a/src/Persistence_representations/doc/Persistence_representations_doc.h +++ b/src/Persistence_representations/doc/Persistence_representations_doc.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/example/persistence_heat_maps.cpp b/src/Persistence_representations/example/persistence_heat_maps.cpp index a7e64bb1..1bf3a637 100644 --- a/src/Persistence_representations/example/persistence_heat_maps.cpp +++ b/src/Persistence_representations/example/persistence_heat_maps.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko and Mathieu Carriere * * Copyright (C) 2019 Inria diff --git a/src/Persistence_representations/example/persistence_intervals.cpp b/src/Persistence_representations/example/persistence_intervals.cpp index c94f7fe0..c908581c 100644 --- a/src/Persistence_representations/example/persistence_intervals.cpp +++ b/src/Persistence_representations/example/persistence_intervals.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/example/persistence_landscape.cpp b/src/Persistence_representations/example/persistence_landscape.cpp index 70aff546..ff18d105 100644 --- a/src/Persistence_representations/example/persistence_landscape.cpp +++ b/src/Persistence_representations/example/persistence_landscape.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp index 7df34ef9..16a58e1d 100644 --- a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp +++ b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/example/persistence_vectors.cpp b/src/Persistence_representations/example/persistence_vectors.cpp index d0cf2fc8..b27e52d2 100644 --- a/src/Persistence_representations/example/persistence_vectors.cpp +++ b/src/Persistence_representations/example/persistence_vectors.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/example/sliced_wasserstein.cpp b/src/Persistence_representations/example/sliced_wasserstein.cpp index 6c01c3af..d5414d00 100644 --- a/src/Persistence_representations/example/sliced_wasserstein.cpp +++ b/src/Persistence_representations/example/sliced_wasserstein.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carriere * * Copyright (C) 2018 INRIA (France) diff --git a/src/Persistence_representations/include/gudhi/PSSK.h b/src/Persistence_representations/include/gudhi/PSSK.h index 995d0ca2..fc90d0f4 100644 --- a/src/Persistence_representations/include/gudhi/PSSK.h +++ b/src/Persistence_representations/include/gudhi/PSSK.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index 12cb04c2..b1af3503 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko and Mathieu Carriere * * Modifications: diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index 47953596..e2db4572 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi hiLibrary. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h index 9f605d35..98543f2f 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi hiLibrary. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape.h b/src/Persistence_representations/include/gudhi/Persistence_landscape.h index f949372b..b819ccb6 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index a8f07b3b..6776f4a3 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h b/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h index fbe12422..e3ed2f6a 100644 --- a/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h +++ b/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carriere * * Copyright (C) 2018 Inria diff --git a/src/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h index 488d4529..5eff0192 100644 --- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h +++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h index db21c714..5c2d2038 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/test/kernels.cpp b/src/Persistence_representations/test/kernels.cpp index eb27747c..63089538 100644 --- a/src/Persistence_representations/test/kernels.cpp +++ b/src/Persistence_representations/test/kernels.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Mathieu Carrière * * Copyright (C) 2018 INRIA diff --git a/src/Persistence_representations/test/persistence_heat_maps_test.cpp b/src/Persistence_representations/test/persistence_heat_maps_test.cpp index 57e1b4b3..b3240758 100644 --- a/src/Persistence_representations/test/persistence_heat_maps_test.cpp +++ b/src/Persistence_representations/test/persistence_heat_maps_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/test/persistence_intervals_test.cpp b/src/Persistence_representations/test/persistence_intervals_test.cpp index 513e042d..3b7a2049 100644 --- a/src/Persistence_representations/test/persistence_intervals_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp index 3b334533..48d6e8ed 100644 --- a/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp +++ b/src/Persistence_representations/test/persistence_intervals_with_distances_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp index 36e935ac..f73da751 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_on_grid_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/test/persistence_lanscapes_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_test.cpp index 5b368462..21ef18a0 100644 --- a/src/Persistence_representations/test/persistence_lanscapes_test.cpp +++ b/src/Persistence_representations/test/persistence_lanscapes_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/test/read_persistence_from_file_test.cpp b/src/Persistence_representations/test/read_persistence_from_file_test.cpp index ac0438d7..88b686f1 100644 --- a/src/Persistence_representations/test/read_persistence_from_file_test.cpp +++ b/src/Persistence_representations/test/read_persistence_from_file_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/test/vector_representation_test.cpp b/src/Persistence_representations/test/vector_representation_test.cpp index 9c038727..568727a5 100644 --- a/src/Persistence_representations/test/vector_representation_test.cpp +++ b/src/Persistence_representations/test/vector_representation_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp index 4edaffdc..3d088b58 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index e557e82d..48000bb1 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp index a700724c..8a96f1b0 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp index 66bf9416..5a657b13 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index ac6ec212..8d67a54d 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index 6a3cc2a9..29170c32 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp index 40ec56ce..995771b9 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index d351e3b6..cf6e07cb 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp index aa051497..519cc47d 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp index ca67c74f..6155727a 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp index e457c6f4..dd6e1a5b 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index b6b35fa1..13d2133f 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp index d171d809..451be77f 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp index 656958cc..09a56869 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp index 06c61bbf..04a0ada4 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index 73d83de2..1093c1aa 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp index 313d09f5..16b76497 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp index 9ae2e670..4d772086 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp index 5c114f27..1fe03640 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp index 14c84d51..f92cde72 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index b732cb82..baec6aeb 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp index 91643e2a..e94dacdb 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index 0964eca3..d510c3df 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index 079bd76e..4e20f37f 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp index 663555a6..89e42f0f 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index a2e8b226..541dd25f 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp index 842c36c4..bbc50c98 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp index 5060ca8b..f974c3d3 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp index b449be3e..de08fcfe 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2016 Inria diff --git a/src/Persistent_cohomology/doc/COPYRIGHT b/src/Persistent_cohomology/doc/COPYRIGHT index 6cde9520..61f17f6d 100644 --- a/src/Persistent_cohomology/doc/COPYRIGHT +++ b/src/Persistent_cohomology/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): Clément Maria +Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h index 6fd19706..46b784d8 100644 --- a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h +++ b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Persistent_cohomology/example/custom_persistence_sort.cpp b/src/Persistent_cohomology/example/custom_persistence_sort.cpp index b2aed37c..be74cf50 100644 --- a/src/Persistent_cohomology/example/custom_persistence_sort.cpp +++ b/src/Persistent_cohomology/example/custom_persistence_sort.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2014 Inria diff --git a/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp b/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp index f95dfeeb..3c91662f 100644 --- a/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp +++ b/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2014 Inria diff --git a/src/Persistent_cohomology/example/plain_homology.cpp b/src/Persistent_cohomology/example/plain_homology.cpp index fbb25cea..84333e46 100644 --- a/src/Persistent_cohomology/example/plain_homology.cpp +++ b/src/Persistent_cohomology/example/plain_homology.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Marc Glisse * * Copyright (C) 2015 Inria diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index bee54ded..944b6d35 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h index 0d6c0f82..0673625c 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h index 716d91cd..1754a2ec 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h index 9d7edfe6..480be389 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Rips_complex/doc/COPYRIGHT b/src/Rips_complex/doc/COPYRIGHT index 2c31a0d6..61f17f6d 100644 --- a/src/Rips_complex/doc/COPYRIGHT +++ b/src/Rips_complex/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): Clément Maria, Pawel Dlotko, Vincent Rouvreau +Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Rips_complex/doc/Intro_rips_complex.h b/src/Rips_complex/doc/Intro_rips_complex.h index 6e5103ac..b2840686 100644 --- a/src/Rips_complex/doc/Intro_rips_complex.h +++ b/src/Rips_complex/doc/Intro_rips_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria, Pawel Dlotko, Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/Rips_complex/include/gudhi/Rips_complex.h b/src/Rips_complex/include/gudhi/Rips_complex.h index 958abbe2..d767dc1b 100644 --- a/src/Rips_complex/include/gudhi/Rips_complex.h +++ b/src/Rips_complex/include/gudhi/Rips_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria, Pawel Dlotko, Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h index 081a0233..1b250818 100644 --- a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h +++ b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Marc Glisse * * Copyright (C) 2018 Inria diff --git a/src/Rips_complex/test/test_rips_complex.cpp b/src/Rips_complex/test/test_rips_complex.cpp index cc8745cf..1225f8df 100644 --- a/src/Rips_complex/test/test_rips_complex.cpp +++ b/src/Rips_complex/test/test_rips_complex.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp index f634a2ea..585de4a0 100644 --- a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko, Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp index 98bc6eba..ad429e11 100644 --- a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko, Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/Rips_complex/utilities/rips_persistence.cpp b/src/Rips_complex/utilities/rips_persistence.cpp index a6357847..daa7e1db 100644 --- a/src/Rips_complex/utilities/rips_persistence.cpp +++ b/src/Rips_complex/utilities/rips_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Rips_complex/utilities/sparse_rips_persistence.cpp b/src/Rips_complex/utilities/sparse_rips_persistence.cpp index a7db4ec6..1a86eafe 100644 --- a/src/Rips_complex/utilities/sparse_rips_persistence.cpp +++ b/src/Rips_complex/utilities/sparse_rips_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Marc Glisse, Clément Maria * * Copyright (C) 2018 Inria diff --git a/src/Simplex_tree/doc/COPYRIGHT b/src/Simplex_tree/doc/COPYRIGHT index 6cde9520..61f17f6d 100644 --- a/src/Simplex_tree/doc/COPYRIGHT +++ b/src/Simplex_tree/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): Clément Maria +Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Simplex_tree/doc/Intro_simplex_tree.h b/src/Simplex_tree/doc/Intro_simplex_tree.h index b01e3e92..800879fe 100644 --- a/src/Simplex_tree/doc/Intro_simplex_tree.h +++ b/src/Simplex_tree/doc/Intro_simplex_tree.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp b/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp index fb1a3a4c..d716fb1f 100644 --- a/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp +++ b/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2017 Inria diff --git a/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp b/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp index 8803dbb2..e455c426 100644 --- a/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp +++ b/src/Simplex_tree/example/example_alpha_shapes_3_simplex_tree_from_off_file.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/example/graph_expansion_with_blocker.cpp b/src/Simplex_tree/example/graph_expansion_with_blocker.cpp index 34bfd77c..494f8b1d 100644 --- a/src/Simplex_tree/example/graph_expansion_with_blocker.cpp +++ b/src/Simplex_tree/example/graph_expansion_with_blocker.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/example/mini_simplex_tree.cpp b/src/Simplex_tree/example/mini_simplex_tree.cpp index 6370b508..bbc582c7 100644 --- a/src/Simplex_tree/example/mini_simplex_tree.cpp +++ b/src/Simplex_tree/example/mini_simplex_tree.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Marc Glisse * * Copyright (C) 2015 Inria diff --git a/src/Simplex_tree/example/simple_simplex_tree.cpp b/src/Simplex_tree/example/simple_simplex_tree.cpp index 6a0a7fc0..4353939f 100644 --- a/src/Simplex_tree/example/simple_simplex_tree.cpp +++ b/src/Simplex_tree/example/simple_simplex_tree.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp b/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp index eb0282f2..f6dfa53c 100644 --- a/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp +++ b/src/Simplex_tree/example/simplex_tree_from_cliques_of_graph.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 14b27610..fafdb01c 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h index 7b6dea0f..efccf2f2 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h index 26bf0569..ae140859 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h index d2b7d8d9..b53bad29 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h b/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h index 4df7833c..3e395ae2 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clément Maria * * Copyright (C) 2014 Inria diff --git a/src/Simplex_tree/test/simplex_tree_ctor_and_move_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_ctor_and_move_unit_test.cpp index e729cf00..c0615b12 100644 --- a/src/Simplex_tree/test/simplex_tree_ctor_and_move_unit_test.cpp +++ b/src/Simplex_tree/test/simplex_tree_ctor_and_move_unit_test.cpp @@ -1,3 +1,13 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + #include #include #include diff --git a/src/Simplex_tree/test/simplex_tree_graph_expansion_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_graph_expansion_unit_test.cpp index 19ce3321..fab25eb8 100644 --- a/src/Simplex_tree/test/simplex_tree_graph_expansion_unit_test.cpp +++ b/src/Simplex_tree/test/simplex_tree_graph_expansion_unit_test.cpp @@ -1,3 +1,13 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + #include #include #include diff --git a/src/Simplex_tree/test/simplex_tree_iostream_operator_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_iostream_operator_unit_test.cpp index ecb9f025..28c29489 100644 --- a/src/Simplex_tree/test/simplex_tree_iostream_operator_unit_test.cpp +++ b/src/Simplex_tree/test/simplex_tree_iostream_operator_unit_test.cpp @@ -1,3 +1,13 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + #include #define BOOST_TEST_DYN_LINK diff --git a/src/Simplex_tree/test/simplex_tree_remove_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_remove_unit_test.cpp index dc37375c..97347992 100644 --- a/src/Simplex_tree/test/simplex_tree_remove_unit_test.cpp +++ b/src/Simplex_tree/test/simplex_tree_remove_unit_test.cpp @@ -1,3 +1,13 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + #include #define BOOST_TEST_DYN_LINK diff --git a/src/Simplex_tree/test/simplex_tree_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_unit_test.cpp index f2a5d54d..58bfa8db 100644 --- a/src/Simplex_tree/test/simplex_tree_unit_test.cpp +++ b/src/Simplex_tree/test/simplex_tree_unit_test.cpp @@ -1,3 +1,13 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2014 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + #include #include #include diff --git a/src/Skeleton_blocker/concept/SkeletonBlockerDS.h b/src/Skeleton_blocker/concept/SkeletonBlockerDS.h index 52db1766..0c2014bd 100644 --- a/src/Skeleton_blocker/concept/SkeletonBlockerDS.h +++ b/src/Skeleton_blocker/concept/SkeletonBlockerDS.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h b/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h index 5987f6fb..9a81b79c 100644 --- a/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h +++ b/src/Skeleton_blocker/concept/SkeletonBlockerGeometricDS.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/doc/COPYRIGHT b/src/Skeleton_blocker/doc/COPYRIGHT index 5b606ac2..61f17f6d 100644 --- a/src/Skeleton_blocker/doc/COPYRIGHT +++ b/src/Skeleton_blocker/doc/COPYRIGHT @@ -1,18 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): David Salinas -Copyright (C) 2015 Inria +Author(s): Vincent Rouvreau -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. +Copyright (C) 2015 Inria -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. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -You should have received a copy of the GNU General Public License along with -this program. If not, see . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h index 169cd3b3..bcca851f 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h index 533cc777..9f145013 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_complex_visitor.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h index c9ebd9ad..d348b696 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_link_superior.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h index 90793843..52300493 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h index 3d3d8425..772e33aa 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h index a931ec98..0c0cc624 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h index 115a3a84..12fe6469 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h index a9e50d11..4c48ff31 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h index d2aa59d3..91e79b42 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Top_faces.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h index 66371d0e..4f51f572 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_blockers_iterators.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h index 63b963dd..154388a1 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_edges_iterators.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h index 1968f43b..920f8cb6 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h index ca4d46f6..37c0b4d3 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_triangles_iterators.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h index 81c6e82b..49e94256 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_vertices_iterators.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h index a8d2420d..125c6387 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h index c7946516..b8f75e0f 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h index 38fd32fd..a2637da3 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_link_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h index f8121fcc..404f04f9 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp b/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp index 8265d763..4336e33b 100644 --- a/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp +++ b/src/Skeleton_blocker/test/test_skeleton_blocker_complex.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria @@ -9,6 +7,7 @@ * Modification(s): * - YYYY/MM Author: Description of the modification */ + #include #include #include diff --git a/src/Spatial_searching/doc/Intro_spatial_searching.h b/src/Spatial_searching/doc/Intro_spatial_searching.h index 5cc458e4..30805570 100644 --- a/src/Spatial_searching/doc/Intro_spatial_searching.h +++ b/src/Spatial_searching/doc/Intro_spatial_searching.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Spatial_searching/include/gudhi/Kd_tree_search.h b/src/Spatial_searching/include/gudhi/Kd_tree_search.h index 92f3f11b..9e4666bb 100644 --- a/src/Spatial_searching/include/gudhi/Kd_tree_search.h +++ b/src/Spatial_searching/include/gudhi/Kd_tree_search.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Spatial_searching/test/test_Kd_tree_search.cpp b/src/Spatial_searching/test/test_Kd_tree_search.cpp index 37d7c073..d6c6fba3 100644 --- a/src/Spatial_searching/test/test_Kd_tree_search.cpp +++ b/src/Spatial_searching/test/test_Kd_tree_search.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Subsampling/doc/Intro_subsampling.h b/src/Subsampling/doc/Intro_subsampling.h index 927e2b72..1c84fb2e 100644 --- a/src/Subsampling/doc/Intro_subsampling.h +++ b/src/Subsampling/doc/Intro_subsampling.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Subsampling/include/gudhi/choose_n_farthest_points.h b/src/Subsampling/include/gudhi/choose_n_farthest_points.h index f99df0fa..66421a69 100644 --- a/src/Subsampling/include/gudhi/choose_n_farthest_points.h +++ b/src/Subsampling/include/gudhi/choose_n_farthest_points.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2016 Inria diff --git a/src/Subsampling/include/gudhi/pick_n_random_points.h b/src/Subsampling/include/gudhi/pick_n_random_points.h index f7734238..a67b2b84 100644 --- a/src/Subsampling/include/gudhi/pick_n_random_points.h +++ b/src/Subsampling/include/gudhi/pick_n_random_points.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2016 Inria diff --git a/src/Subsampling/include/gudhi/sparsify_point_set.h b/src/Subsampling/include/gudhi/sparsify_point_set.h index d39d3906..b30cec80 100644 --- a/src/Subsampling/include/gudhi/sparsify_point_set.h +++ b/src/Subsampling/include/gudhi/sparsify_point_set.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Subsampling/test/test_choose_n_farthest_points.cpp b/src/Subsampling/test/test_choose_n_farthest_points.cpp index 7e3dfb21..5c4bd4cb 100644 --- a/src/Subsampling/test/test_choose_n_farthest_points.cpp +++ b/src/Subsampling/test/test_choose_n_farthest_points.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2016 Inria diff --git a/src/Subsampling/test/test_pick_n_random_points.cpp b/src/Subsampling/test/test_pick_n_random_points.cpp index 49138ab4..018fb8d2 100644 --- a/src/Subsampling/test/test_pick_n_random_points.cpp +++ b/src/Subsampling/test/test_pick_n_random_points.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2016 Inria diff --git a/src/Subsampling/test/test_sparsify_point_set.cpp b/src/Subsampling/test/test_sparsify_point_set.cpp index b2a55663..587ab3ad 100644 --- a/src/Subsampling/test/test_sparsify_point_set.cpp +++ b/src/Subsampling/test/test_sparsify_point_set.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Tangential_complex/benchmark/RIB_exporter.h b/src/Tangential_complex/benchmark/RIB_exporter.h index 7e8a8ed9..4cec0603 100644 --- a/src/Tangential_complex/benchmark/RIB_exporter.h +++ b/src/Tangential_complex/benchmark/RIB_exporter.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Tangential_complex/benchmark/XML_exporter.h b/src/Tangential_complex/benchmark/XML_exporter.h index afa67288..16b62eb6 100644 --- a/src/Tangential_complex/benchmark/XML_exporter.h +++ b/src/Tangential_complex/benchmark/XML_exporter.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Tangential_complex/doc/COPYRIGHT b/src/Tangential_complex/doc/COPYRIGHT index f9f92471..61f17f6d 100644 --- a/src/Tangential_complex/doc/COPYRIGHT +++ b/src/Tangential_complex/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): Clement Jamin +Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Tangential_complex/doc/Intro_tangential_complex.h b/src/Tangential_complex/doc/Intro_tangential_complex.h index 3bd84aa8..ce277185 100644 --- a/src/Tangential_complex/doc/Intro_tangential_complex.h +++ b/src/Tangential_complex/doc/Intro_tangential_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h index 7fdd68ee..b3bac58e 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h index 8f008236..4881bdd5 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/Simplicial_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/config.h b/src/Tangential_complex/include/gudhi/Tangential_complex/config.h index 6de698ab..352531da 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/config.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/config.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h b/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h index 14e71797..ee6ed9ba 100644 --- a/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h +++ b/src/Tangential_complex/include/gudhi/Tangential_complex/utilities.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Tangential_complex/test/test_tangential_complex.cpp b/src/Tangential_complex/test/test_tangential_complex.cpp index 94038c29..46caec54 100644 --- a/src/Tangential_complex/test/test_tangential_complex.cpp +++ b/src/Tangential_complex/test/test_tangential_complex.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/Toplex_map/benchmark/benchmark_tm.cpp b/src/Toplex_map/benchmark/benchmark_tm.cpp index f132b783..feb5d01c 100644 --- a/src/Toplex_map/benchmark/benchmark_tm.cpp +++ b/src/Toplex_map/benchmark/benchmark_tm.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: François Godi, Vincent Rouvreau * * Copyright (C) 2018 INRIA diff --git a/src/Toplex_map/doc/Intro_Toplex_map.h b/src/Toplex_map/doc/Intro_Toplex_map.h index 58c22f64..cd7705b6 100644 --- a/src/Toplex_map/doc/Intro_Toplex_map.h +++ b/src/Toplex_map/doc/Intro_Toplex_map.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: François Godi, Vincent Rouvreau * * Copyright (C) 2017 INRIA diff --git a/src/Toplex_map/example/simple_toplex_map.cpp b/src/Toplex_map/example/simple_toplex_map.cpp index 27ce0fbe..7538c989 100644 --- a/src/Toplex_map/example/simple_toplex_map.cpp +++ b/src/Toplex_map/example/simple_toplex_map.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 diff --git a/src/Toplex_map/include/gudhi/Lazy_toplex_map.h b/src/Toplex_map/include/gudhi/Lazy_toplex_map.h index c328e43b..dcc128fa 100644 --- a/src/Toplex_map/include/gudhi/Lazy_toplex_map.h +++ b/src/Toplex_map/include/gudhi/Lazy_toplex_map.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: François Godi, Vincent Rouvreau * * Copyright (C) 2018 INRIA diff --git a/src/Toplex_map/include/gudhi/Toplex_map.h b/src/Toplex_map/include/gudhi/Toplex_map.h index 7deebef7..95e94938 100644 --- a/src/Toplex_map/include/gudhi/Toplex_map.h +++ b/src/Toplex_map/include/gudhi/Toplex_map.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: François Godi, Vincent Rouvreau * * Copyright (C) 2018 INRIA diff --git a/src/Toplex_map/test/lazy_toplex_map_unit_test.cpp b/src/Toplex_map/test/lazy_toplex_map_unit_test.cpp index 2cca9c46..639bf35a 100644 --- a/src/Toplex_map/test/lazy_toplex_map_unit_test.cpp +++ b/src/Toplex_map/test/lazy_toplex_map_unit_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: François Godi, Vincent Rouvreau * * Copyright (C) 2018 INRIA diff --git a/src/Toplex_map/test/toplex_map_unit_test.cpp b/src/Toplex_map/test/toplex_map_unit_test.cpp index c4c37bb3..24ec679b 100644 --- a/src/Toplex_map/test/toplex_map_unit_test.cpp +++ b/src/Toplex_map/test/toplex_map_unit_test.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author: François Godi, Vincent Rouvreau * * Copyright (C) 2018 INRIA diff --git a/src/Witness_complex/doc/COPYRIGHT b/src/Witness_complex/doc/COPYRIGHT index 25a700cf..61f17f6d 100644 --- a/src/Witness_complex/doc/COPYRIGHT +++ b/src/Witness_complex/doc/COPYRIGHT @@ -1,19 +1,12 @@ -The files of this directory are part of the Gudhi Library. The Gudhi library -(Geometric Understanding in Higher Dimensions) is a generic C++ library for -computational topology. +The files of this directory are part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. +See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. -Author(s): Siargey Kachanovich +Author(s): Vincent Rouvreau Copyright (C) 2015 Inria -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. +This gives everyone the freedoms to use openFrameworks in any context: +commercial or non-commercial, public or private, open or closed source. -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 . +You should have received a copy of the MIT License along with this program. +If not, see https://opensource.org/licenses/MIT. \ No newline at end of file diff --git a/src/Witness_complex/example/generators.h b/src/Witness_complex/example/generators.h index 214cd059..1900e1e4 100644 --- a/src/Witness_complex/example/generators.h +++ b/src/Witness_complex/example/generators.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2015 Inria diff --git a/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h b/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h index 56b3e808..2ae1d6e0 100644 --- a/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h +++ b/src/Witness_complex/include/gudhi/Active_witness/Active_witness.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2016 Inria diff --git a/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h b/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h index 6aa9c0dd..4f8fddba 100644 --- a/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h +++ b/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2016 Inria diff --git a/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h b/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h index d2bf00ce..c9767982 100644 --- a/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2015 Inria diff --git a/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h b/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h index a4430301..75ea38e9 100644 --- a/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Euclidean_witness_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2015 Inria diff --git a/src/Witness_complex/include/gudhi/Strong_witness_complex.h b/src/Witness_complex/include/gudhi/Strong_witness_complex.h index 5861ec62..b3699f77 100644 --- a/src/Witness_complex/include/gudhi/Strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Strong_witness_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2015 Inria diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index 375a79ac..d655c7f6 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2015 Inria diff --git a/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h b/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h index ae7ad0f3..5845728a 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h +++ b/src/Witness_complex/include/gudhi/Witness_complex/all_faces_in.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2015 Inria diff --git a/src/Witness_complex/utilities/strong_witness_persistence.cpp b/src/Witness_complex/utilities/strong_witness_persistence.cpp index a06bb1fa..75ba1f4b 100644 --- a/src/Witness_complex/utilities/strong_witness_persistence.cpp +++ b/src/Witness_complex/utilities/strong_witness_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2016 Inria diff --git a/src/Witness_complex/utilities/weak_witness_persistence.cpp b/src/Witness_complex/utilities/weak_witness_persistence.cpp index 35d09f95..0e5b9cc1 100644 --- a/src/Witness_complex/utilities/weak_witness_persistence.cpp +++ b/src/Witness_complex/utilities/weak_witness_persistence.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Siargey Kachanovich * * Copyright (C) 2016 Inria diff --git a/src/common/benchmark/Graph_simplicial_complex_benchmark.cpp b/src/common/benchmark/Graph_simplicial_complex_benchmark.cpp index a03d1757..0fc145fd 100644 --- a/src/common/benchmark/Graph_simplicial_complex_benchmark.cpp +++ b/src/common/benchmark/Graph_simplicial_complex_benchmark.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/common/include/gudhi/Debug_utils.h b/src/common/include/gudhi/Debug_utils.h index 826cbc3e..38abc06d 100644 --- a/src/common/include/gudhi/Debug_utils.h +++ b/src/common/include/gudhi/Debug_utils.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): David Salinas * * Copyright (C) 2014 Inria diff --git a/src/common/include/gudhi/Null_output_iterator.h b/src/common/include/gudhi/Null_output_iterator.h index 81309080..3d03bca6 100644 --- a/src/common/include/gudhi/Null_output_iterator.h +++ b/src/common/include/gudhi/Null_output_iterator.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Marc Glisse * * Copyright (C) 2017 Inria diff --git a/src/common/include/gudhi/Points_3D_off_io.h b/src/common/include/gudhi/Points_3D_off_io.h index 2112cc05..2d110af3 100644 --- a/src/common/include/gudhi/Points_3D_off_io.h +++ b/src/common/include/gudhi/Points_3D_off_io.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/common/include/gudhi/Points_off_io.h b/src/common/include/gudhi/Points_off_io.h index a0fca77e..99371d56 100644 --- a/src/common/include/gudhi/Points_off_io.h +++ b/src/common/include/gudhi/Points_off_io.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/common/include/gudhi/Simple_object_pool.h b/src/common/include/gudhi/Simple_object_pool.h index 164849e1..d1482b44 100644 --- a/src/common/include/gudhi/Simple_object_pool.h +++ b/src/common/include/gudhi/Simple_object_pool.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Marc Glisse * * Copyright (C) 2015 Inria diff --git a/src/common/include/gudhi/Unitary_tests_utils.h b/src/common/include/gudhi/Unitary_tests_utils.h index 5ab20af8..4ad4dae8 100644 --- a/src/common/include/gudhi/Unitary_tests_utils.h +++ b/src/common/include/gudhi/Unitary_tests_utils.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2017 Inria diff --git a/src/common/include/gudhi/allocator.h b/src/common/include/gudhi/allocator.h index e828f441..b7ccd180 100644 --- a/src/common/include/gudhi/allocator.h +++ b/src/common/include/gudhi/allocator.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Marc Glisse * * Copyright (C) 2015 Inria diff --git a/src/common/include/gudhi/console_color.h b/src/common/include/gudhi/console_color.h index 7681ae66..f9167119 100644 --- a/src/common/include/gudhi/console_color.h +++ b/src/common/include/gudhi/console_color.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/common/include/gudhi/random_point_generators.h b/src/common/include/gudhi/random_point_generators.h index dbaf0ab1..7889b9ca 100644 --- a/src/common/include/gudhi/random_point_generators.h +++ b/src/common/include/gudhi/random_point_generators.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Jamin * * Copyright (C) 2016 Inria diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h index 1365b560..98335552 100644 --- a/src/common/include/gudhi/reader_utils.h +++ b/src/common/include/gudhi/reader_utils.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Clement Maria, Pawel Dlotko, Clement Jamin * * Copyright (C) 2014 Inria diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index c0d4929e..2e36b831 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Pawel Dlotko * * Copyright (C) 2017 Swansea University, UK diff --git a/src/common/test/test_distance_matrix_reader.cpp b/src/common/test/test_distance_matrix_reader.cpp index c25b2f53..bb619a29 100644 --- a/src/common/test/test_distance_matrix_reader.cpp +++ b/src/common/test/test_distance_matrix_reader.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/common/test/test_persistence_intervals_reader.cpp b/src/common/test/test_persistence_intervals_reader.cpp index 0d0f515e..8fb4377d 100644 --- a/src/common/test/test_persistence_intervals_reader.cpp +++ b/src/common/test/test_persistence_intervals_reader.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2017 Inria diff --git a/src/common/test/test_points_off_reader.cpp b/src/common/test/test_points_off_reader.cpp index 49fa1ec2..f190a13e 100644 --- a/src/common/test/test_points_off_reader.cpp +++ b/src/common/test/test_points_off_reader.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2015 Inria diff --git a/src/common/utilities/off_file_from_shape_generator.cpp b/src/common/utilities/off_file_from_shape_generator.cpp index eb31e8bc..6efef4fc 100644 --- a/src/common/utilities/off_file_from_shape_generator.cpp +++ b/src/common/utilities/off_file_from_shape_generator.cpp @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2014 Inria diff --git a/src/cython/include/Alpha_complex_interface.h b/src/cython/include/Alpha_complex_interface.h index 1199b741..b3553d32 100644 --- a/src/cython/include/Alpha_complex_interface.h +++ b/src/cython/include/Alpha_complex_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Bottleneck_distance_interface.h b/src/cython/include/Bottleneck_distance_interface.h index 22c9a97a..a4f3eaf1 100644 --- a/src/cython/include/Bottleneck_distance_interface.h +++ b/src/cython/include/Bottleneck_distance_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Cubical_complex_interface.h b/src/cython/include/Cubical_complex_interface.h index 7d32914c..648598e1 100644 --- a/src/cython/include/Cubical_complex_interface.h +++ b/src/cython/include/Cubical_complex_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Euclidean_strong_witness_complex_interface.h b/src/cython/include/Euclidean_strong_witness_complex_interface.h index 90bd54ac..c1c72737 100644 --- a/src/cython/include/Euclidean_strong_witness_complex_interface.h +++ b/src/cython/include/Euclidean_strong_witness_complex_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Euclidean_witness_complex_interface.h b/src/cython/include/Euclidean_witness_complex_interface.h index 0c01a741..5d7dbdc2 100644 --- a/src/cython/include/Euclidean_witness_complex_interface.h +++ b/src/cython/include/Euclidean_witness_complex_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Nerve_gic_interface.h b/src/cython/include/Nerve_gic_interface.h index 729b39fb..5e7f8ae6 100644 --- a/src/cython/include/Nerve_gic_interface.h +++ b/src/cython/include/Nerve_gic_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2018 Inria diff --git a/src/cython/include/Off_reader_interface.h b/src/cython/include/Off_reader_interface.h index 4b3643be..e6e1f931 100644 --- a/src/cython/include/Off_reader_interface.h +++ b/src/cython/include/Off_reader_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Persistent_cohomology_interface.h b/src/cython/include/Persistent_cohomology_interface.h index 64e2ddc8..8c79e6f3 100644 --- a/src/cython/include/Persistent_cohomology_interface.h +++ b/src/cython/include/Persistent_cohomology_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Reader_utils_interface.h b/src/cython/include/Reader_utils_interface.h index 5bddf9ce..5f0deb87 100644 --- a/src/cython/include/Reader_utils_interface.h +++ b/src/cython/include/Reader_utils_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2017 Inria diff --git a/src/cython/include/Rips_complex_interface.h b/src/cython/include/Rips_complex_interface.h index f818a2ed..a66b0e5b 100644 --- a/src/cython/include/Rips_complex_interface.h +++ b/src/cython/include/Rips_complex_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Simplex_tree_interface.h b/src/cython/include/Simplex_tree_interface.h index c15a44a5..06f31341 100644 --- a/src/cython/include/Simplex_tree_interface.h +++ b/src/cython/include/Simplex_tree_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Strong_witness_complex_interface.h b/src/cython/include/Strong_witness_complex_interface.h index 4c333da8..cda5b514 100644 --- a/src/cython/include/Strong_witness_complex_interface.h +++ b/src/cython/include/Strong_witness_complex_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Subsampling_interface.h b/src/cython/include/Subsampling_interface.h index bc390485..cdda851f 100644 --- a/src/cython/include/Subsampling_interface.h +++ b/src/cython/include/Subsampling_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Tangential_complex_interface.h b/src/cython/include/Tangential_complex_interface.h index 7c3f2789..698226cc 100644 --- a/src/cython/include/Tangential_complex_interface.h +++ b/src/cython/include/Tangential_complex_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria diff --git a/src/cython/include/Witness_complex_interface.h b/src/cython/include/Witness_complex_interface.h index 609277d6..45e14253 100644 --- a/src/cython/include/Witness_complex_interface.h +++ b/src/cython/include/Witness_complex_interface.h @@ -1,7 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): Vincent Rouvreau * * Copyright (C) 2016 Inria -- cgit v1.2.3
Author: Pawel Dlotko
- Introduced in: GUDHI 2.0.0
+ Introduced in: GUDHI 2.1.0
Copyright: GPL v3
- This is a statistical library for gudhi. It contain implementation of various representations of persistence diagrams; diagrams themselves, persistence landscapes (rigorous and grid version), - persistence heath maps, vectors and others. It implements basic functionalities which are neccessary to use persistence in statistics and machine learning. - User manual: \ref Gudhi_stat + It contain implementation of various representations of persistence diagrams; diagrams themselves, persistence + landscapes (rigorous and grid version), persistence heath maps, vectors and others. It implements basic + functionalities which are neccessary to use persistence in statistics and machine learning.
+ User manual: \ref Persistence_representations