From 8252d6eb78c9fe355a2167ad68e9106fcaa8fcdb Mon Sep 17 00:00:00 2001 From: pdlotko Date: Thu, 6 Apr 2017 15:36:53 +0000 Subject: Answering MG3 comments. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2313 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 3bae7a55d05831af55a5b1c3e0d2695383af325f --- src/common/include/gudhi/distance_functions.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 22747637..7f33a804 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -35,7 +35,7 @@ * have the same dimension. */ class Euclidean_distance { public: - template< typename Point > + template< typename Point > auto operator()(const Point& p1, const Point& p2) const -> typename std::decay::type { auto it1 = p1.begin(); auto it2 = p2.begin(); @@ -46,6 +46,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) ); + } }; #endif // DISTANCE_FUNCTIONS_H_ -- cgit v1.2.3 From ca2ad986b9925ab7006597f0f7045f7be47a42b2 Mon Sep 17 00:00:00 2001 From: pdlotko Date: Fri, 7 Apr 2017 09:10:52 +0000 Subject: Answers to Marc's comments git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2317 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: f941a6b20210282408d0ef95b84daa973add2513 --- biblio/bibliography.bib | 16 ++++++++-------- .../Persistence_landscape_on_grid.h | 8 +++++--- src/cmake/modules/GUDHI_user_version_target.txt | 2 +- src/common/doc/main_page.h | 17 +++++++++++++++++ src/cython/doc/img/average_landscape.png | Bin 0 -> 14917 bytes 5 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 src/cython/doc/img/average_landscape.png (limited to 'src/common') diff --git a/biblio/bibliography.bib b/biblio/bibliography.bib index dbd0cb42..37aa8198 100644 --- a/biblio/bibliography.bib +++ b/biblio/bibliography.bib @@ -988,14 +988,14 @@ language={English} } @ARTICLE{bubenik_dlotko_landscapes_2016, - author = {P. Bubenik, P. Dlotko}, + author = {P. Bubenik and P. Dlotko}, title = {A persistence landscapes toolbox for topological statistics.}, journal = {Journal of Symbolic Computation.}, year = {2016} } @ARTICLE{Fasy_Kim_Lecci_Maria_tda, - author = {B. Fasy, J. Kim, F. Lecci, C. Maria}, + author = {B. Fasy and J. Kim and F. Lecci and C. Maria}, title = {Introduction to the R package TDA.}, journal = {arXiv:1411.1830.}, year = {2016} @@ -1003,7 +1003,7 @@ language={English} @ARTICLE{Ferri_Frosini_comparision_sheme_1, - author = {P. Donatini, P. Frosini, A. Lovato}, + author = {P. Donatini and P. Frosini and A. Lovato}, title = {Size functions for signature recognition.}, journal = {Proceedings of SPIE, Vision Geometry VII, vol. 3454}, year = {1998} @@ -1011,14 +1011,14 @@ language={English} @ARTICLE{Ferri_Frosini_comparision_sheme_2, - author = {M. Ferri, P. Frosini, A. Lovato, C. Zambelli}, + author = {M. Ferri and P. Frosini and A. Lovato and C. Zambelli}, title = {Point selection: A new comparison scheme for size functions (With an application to monogram recognition).}, journal = {Proceedings Third Asian Conference on Computer Vision, Lecture Notes in Computer Science 1351.}, year = {1998} } @ARTICLE{Persistence_Images_2017, - author = {H. Adams, S. Chepushtanova, T. Emerson, E. Hanson, M. Kirby, F. Motta, R. Neville, C. Peterson, P. Shipman, L. Ziegelmeier}, + author = {H. Adams and S. Chepushtanova and T. Emerson and E. Hanson and M. Kirby and F. Motta and R. Neville and C. Peterson and P. Shipman and L. Ziegelmeier}, title = {Persistence Images: A Stable Vector Representation of Persistent Homology.}, journal = {Journal of Machine Learning Research}, year = {2017} @@ -1026,21 +1026,21 @@ language={English} @ARTICLE{Kusano_Fukumizu_Hiraoka_PWGK, - author = {G. Kusano, K. Fukumizu, Y. Hiraoka}, + author = {G. Kusano and K. Fukumizu and Y. Hiraoka}, title = {Persistence weighted Gaussian kernel for topological data analysis.}, journal = {ICML'16 Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48}, year = {2016} } @ARTICLE{Reininghaus_Huber_ALL_PSSK, - author = {J. Reininghaus, S. Huber, U. Bauer, R. Kwitt}, + author = {J. Reininghaus and S. Huber and U. Bauer and R. Kwitt}, title = {A Stable Multi-Scale Kernel for Topological Machine Learning.}, journal = {Proc. 2015 IEEE Conf. Comp. Vision & Pat. Rec. (CVPR '15)}, year = {2015} } @ARTICLE{Carriere_Oudot_Ovsjanikov_top_signatures_3d, - author = {M. Carrière, S. Oudot, M. Ovsjanikov}, + author = {M. Carrière and S. Oudot and M. Ovsjanikov}, title = {Stable Topological Signatures for Points on 3D Shapes.}, journal = {Proc. Sympos. on Geometry Processing}, year = {2015} diff --git a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape_on_grid.h b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape_on_grid.h index 422699ef..b70ef1d9 100644 --- a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape_on_grid.h +++ b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape_on_grid.h @@ -313,8 +313,11 @@ public: //compute the value of the linear function parametrized by line on a point x: return line.first*x+line.second; } + + protected: + 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 ); - + public: /** *\private A function that compute sum of two landscapes. **/ @@ -1024,8 +1027,7 @@ protected: 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_ ); - 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 ); + 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_ ); Persistence_landscape_on_grid multiply_lanscape_by_real_number_not_overwrite( double x )const; }; diff --git a/src/cmake/modules/GUDHI_user_version_target.txt b/src/cmake/modules/GUDHI_user_version_target.txt index b6a60dd1..a971f1d9 100644 --- a/src/cmake/modules/GUDHI_user_version_target.txt +++ b/src/cmake/modules/GUDHI_user_version_target.txt @@ -50,7 +50,7 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.11) 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_DIRECTORIES "doc;example;concept") + set(GUDHI_DIRECTORIES "doc;example;concept;utilities") set(GUDHI_INCLUDE_DIRECTORIES "include/gudhi;include/gudhi_patches") foreach(GUDHI_MODULE ${GUDHI_MODULES}) diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index e6f29fa8..55673f60 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -151,6 +151,23 @@ + + \subsection Gudhi_stat Gudhi statistical sublibrary + \image html "average_landscape.png" "Gudhi statistical sublibrary" + + + + + +
+ Author: Pawel Dlotko
+ Introduced in: GUDHI 2.0.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 - Reference manual: Gudhi::Gudhi_stat +
\section Toolbox Toolbox \subsection BottleneckDistanceToolbox Bottleneck distance diff --git a/src/cython/doc/img/average_landscape.png b/src/cython/doc/img/average_landscape.png new file mode 100644 index 00000000..ea59926b Binary files /dev/null and b/src/cython/doc/img/average_landscape.png differ -- cgit v1.2.3 From aecf253b150fcaf0a9e2a41686de7dfea91fa4d8 Mon Sep 17 00:00:00 2001 From: pdlotko Date: Thu, 13 Apr 2017 12:42:19 +0000 Subject: Answer to Vincent's comments. At the moment I need to discuss how to correct the doc. At the moment make doxygen generate some errors. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2342 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4bb5c3b30bca852045fb414eacf59936975a3855 --- .../Persistence_landscape.h | 6 ++-- .../Persistence_landscape_on_grid.h | 6 ++-- src/Gudhi_stat/utilities/Landscape_bootstrap.cpp | 2 +- .../create_persistence_heat_maps.cpp | 2 +- ...aps_weighted_by_arctan_of_their_persistence.cpp | 2 +- ...eat_maps_weighted_by_distance_from_diagonal.cpp | 2 +- ..._weighted_by_squared_distance_from_diagonal.cpp | 2 +- .../persistence_heat_maps/create_pssk.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/create_landscapes.cpp | 2 +- .../create_landscapes_on_grid.cpp | 2 +- .../create_persistence_vectors.cpp | 2 +- src/common/doc/main_page.h | 34 ++++++++++++---------- 18 files changed, 39 insertions(+), 37 deletions(-) (limited to 'src/common') diff --git a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h index 681f5d8d..925d784f 100644 --- a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h +++ b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h @@ -270,7 +270,7 @@ public: } /** - *\private Computations of a L^i norm of landscape, where i is the input parameter. + *\private Computations of a \f$L^i\f$ norm of landscape, where i is the input parameter. **/ double compute_norm_of_landscape( double i ) { @@ -291,14 +291,14 @@ public: double operator()(unsigned level,double x)const{return this->compute_value_at_a_given_point(level,x);} /** - *\private Computations of L^{\infty} distance between two landscapes. + *\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 ); /** - *\private Computations of L^{p} distance between two landscapes. p is the parameter of the procedure. + *\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 ); diff --git a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape_on_grid.h b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape_on_grid.h index 1f4cb3ff..3103172d 100644 --- a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape_on_grid.h +++ b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape_on_grid.h @@ -595,7 +595,7 @@ public: } /** - * Computations of a L^i norm of landscape, where i is the input parameter. + * Computations of a \f$L^i\f$ norm of landscape, where i is the input parameter. **/ double compute_norm_of_landscape( double i )const { @@ -618,7 +618,7 @@ public: double operator()(unsigned level,double x)const{return this->compute_value_at_a_given_point(level,x);} /** - * Computations of L^{\infty} distance between two landscapes. + * 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 ); @@ -765,7 +765,7 @@ public: /** - * Computations of L^{p} distance between two landscapes on a grid. p is the parameter of the procedure. + * 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 * function to fix that inaccuracy. diff --git a/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp b/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp index d67bb820..9bd6c89e 100644 --- a/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp @@ -38,7 +38,7 @@ using Persistence_landscape = Gudhi::Gudhi_stat::Persistence_landscape; typedef int Vertex_handle; -typedef double Filtration_value; +//typedef double Filtration_value; //if this variable is -1, then the infinite interals are ignored. If not, they infinite values are replaced with what_to_replace_infinite_intervals_with: diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index d9c7aded..e99b829a 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -57,7 +57,7 @@ int main( int argc , char** argv ) unsigned dimension = std::numeric_limits::max(); int dim = atoi( argv[5] ); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp index 7cb7eeb7..b98fc3f7 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp @@ -58,7 +58,7 @@ int main( int argc , char** argv ) unsigned dimension = std::numeric_limits::max(); int dim = atoi( argv[5] ); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp index 3242e106..ecef449a 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp @@ -57,7 +57,7 @@ int main( int argc , char** argv ) unsigned dimension = std::numeric_limits::max(); int dim = atoi( argv[5] ); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp index 27846a99..59966855 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp @@ -57,7 +57,7 @@ int main( int argc , char** argv ) unsigned dimension = std::numeric_limits::max(); int dim = atoi( argv[5] ); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp index 404a4be3..78989ccc 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp @@ -57,7 +57,7 @@ int main( int argc , char** argv ) unsigned dimension = std::numeric_limits::max(); int dim = atoi( argv[5] ); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Gudhi_stat/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp index 426a9b7b..a3e19400 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp @@ -45,7 +45,7 @@ int main( int argc , char** argv ) int dim = atoi( argv[1] ); unsigned dimension = std::numeric_limits::max(); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp index 6f0ba635..d8b533cf 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -48,7 +48,7 @@ int main( int argc , char** argv ) int dim = atoi(argv[1]); unsigned dimension = std::numeric_limits::max(); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Gudhi_stat/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp index 0a7f7c2b..281902fe 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp @@ -43,7 +43,7 @@ int main( int argc , char** argv ) } int dim = atoi( argv[2] ); unsigned dimension = std::numeric_limits::max(); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index 11876a0d..acfb0eed 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -48,7 +48,7 @@ int main( int argc , char** argv ) { dim = atoi( argv[2] ); } - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp index 09c6cc22..21ba06f4 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp @@ -48,7 +48,7 @@ int main( int argc , char** argv ) { dim = atoi( argv[2] ); } - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp index 4315abb9..95c0cf1f 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -51,7 +51,7 @@ int main( int argc , char** argv ) { dim = atoi( argv[2] ); } - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_landscapes/create_landscapes.cpp b/src/Gudhi_stat/utilities/persistence_landscapes/create_landscapes.cpp index f36e313a..040ccc95 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes/create_landscapes.cpp @@ -40,7 +40,7 @@ int main( int argc , char** argv ) std::vector< const char* > filenames; int dim = atoi(argv[1]); unsigned dimension = std::numeric_limits::max(); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index eb534bf1..6dbb70c4 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -52,7 +52,7 @@ int main( int argc , char** argv ) double max_ = atof( argv[3] ); int dim = atoi( argv[4] ); unsigned dimension = std::numeric_limits::max(); - if ( (dim != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/Gudhi_stat/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Gudhi_stat/utilities/persistence_vectors/create_persistence_vectors.cpp index 40f5e81f..7f0492c6 100644 --- a/src/Gudhi_stat/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Gudhi_stat/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -39,7 +39,7 @@ int main( int argc , char** argv ) 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 != -1) && (dim >= 0) ) + if ( dim >= 0 ) { dimension = (unsigned)dim; } diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 55673f60..f3816238 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -151,22 +151,6 @@ - - \subsection Gudhi_stat Gudhi statistical sublibrary - \image html "average_landscape.png" "Gudhi statistical sublibrary" - - - - -
- Author: Pawel Dlotko
- Introduced in: GUDHI 2.0.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 - Reference manual: Gudhi::Gudhi_stat -
\section Toolbox Toolbox @@ -227,9 +211,27 @@ \cite DBLP:journals/corr/abs-1208-5018 and the Compressed Annotation Matrix implementation of \cite DBLP:conf/esa/BoissonnatDM13 .
User manual: \ref persistent_cohomology - Reference manual: Gudhi::persistent_cohomology::Persistent_cohomology + + + + \subsection Gudhi_stat_sublibrary Gudhi statistical sublibrary + \image html "average_landscape.png" "Gudhi statistical sublibrary" + + + +
+ Author: Pawel Dlotko
+ Introduced in: GUDHI 2.0.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 +
+ */ /*! \page installation GUDHI installation -- cgit v1.2.3 From 6adf87fe0a609443962238200e877c60d90f6a2d Mon Sep 17 00:00:00 2001 From: mcarrier Date: Fri, 12 May 2017 15:37:55 +0000 Subject: git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Nerve_GIC@2413 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a0a65ae49ca0bb6e5ed614f44cabb060fa0e7490 --- CMakeLists.txt | 3 + data/points/COIL_database/asian_mug.off | 2 + data/points/COIL_database/lucky_cat_PCA1 | 72 +++++++++++++++ src/CMakeLists.txt | 1 + src/Nerve_GIC/example/CMakeLists.txt | 6 ++ src/Nerve_GIC/example/GIC.cpp | 15 ++-- src/Nerve_GIC/example/GICvoronoi.cpp | 59 ++++++++++++ src/Nerve_GIC/example/MapperDeltaCoord.cpp | 13 ++- src/Nerve_GIC/example/MapperDeltaFunc.cpp | 13 ++- src/Nerve_GIC/example/Nerve.cpp | 13 ++- src/Nerve_GIC/include/gudhi/GIC.h | 139 +++++++++++++++++++++-------- src/Nerve_GIC/test/CMakeLists.txt | 23 +++++ src/common/doc/main_page.h | 18 ++++ 13 files changed, 309 insertions(+), 68 deletions(-) create mode 100644 data/points/COIL_database/lucky_cat_PCA1 create mode 100644 src/Nerve_GIC/example/GICvoronoi.cpp create mode 100644 src/Nerve_GIC/test/CMakeLists.txt (limited to 'src/common') diff --git a/CMakeLists.txt b/CMakeLists.txt index aef771d0..f9029bb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,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/Nerve_GIC/include/) add_subdirectory(src/common/example) add_subdirectory(src/common/test) @@ -83,6 +84,8 @@ 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/Nerve_GIC/example) +add_subdirectory(src/Nerve_GIC/test) # data points generator add_subdirectory(data/points/generator) diff --git a/data/points/COIL_database/asian_mug.off b/data/points/COIL_database/asian_mug.off index 93d2ab00..f6a9a972 100644 --- a/data/points/COIL_database/asian_mug.off +++ b/data/points/COIL_database/asian_mug.off @@ -1,3 +1,5 @@ +OFF +72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0117647 0.0352941 0.0588235 0.101961 0.133333 0.152941 0.180392 0.211765 0.227451 0.219608 0.215686 0.196078 0.160784 0.145098 0.101961 0.0666667 0.0392157 0.0117647 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0313725 0.0745098 0.117647 0.219608 0.341176 0.439216 0.505882 0.552941 0.592157 0.6 0.611765 0.639216 0.639216 0.635294 0.647059 0.658824 0.654902 0.662745 0.647059 0.662745 0.690196 0.756863 0.72549 0.717647 0.713725 0.682353 0.662745 0.662745 0.647059 0.639216 0.627451 0.623529 0.588235 0.552941 0.482353 0.372549 0.266667 0.172549 0.101961 0.0392157 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.113725 0.258824 0.364706 0.466667 0.541176 0.564706 0.580392 0.588235 0.6 0.611765 0.611765 0.603922 0.592157 0.6 0.580392 0.584314 0.584314 0.576471 0.560784 0.560784 0.572549 0.560784 0.564706 0.552941 0.568627 0.698039 0.831373 0.854902 0.862745 0.8 0.72549 0.647059 0.647059 0.647059 0.631373 0.635294 0.65098 0.654902 0.65098 0.662745 0.65098 0.635294 0.647059 0.631373 0.623529 0.576471 0.509804 0.403922 0.27451 0.133333 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.211765 0.396078 0.490196 0.52549 0.556863 0.568627 0.564706 0.564706 0.568627 0.568627 0.541176 0.52549 0.486275 0.47451 0.454902 0.439216 0.415686 0.392157 0.372549 0.352941 0.360784 0.360784 0.337255 0.341176 0.34902 0.329412 0.321569 0.341176 0.329412 0.368627 0.482353 0.462745 0.352941 0.356863 0.364706 0.372549 0.380392 0.384314 0.403922 0.435294 0.443137 0.454902 0.494118 0.529412 0.623529 0.74902 0.894118 0.964706 0.835294 0.682353 0.666667 0.662745 0.647059 0.627451 0.603922 0.545098 0.447059 0.243137 0.0588235 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.14902 0.376471 0.478431 0.517647 0.533333 0.541176 0.541176 0.521569 0.521569 0.494118 0.470588 0.443137 0.4 0.368627 0.337255 0.301961 0.294118 0.282353 0.286275 0.282353 0.278431 0.262745 0.262745 0.278431 0.317647 0.294118 0.254902 0.270588 0.270588 0.278431 0.290196 0.329412 0.478431 0.545098 0.341176 0.309804 0.313725 0.298039 0.282353 0.286275 0.290196 0.290196 0.290196 0.294118 0.298039 0.294118 0.309804 0.313725 0.313725 0.321569 0.356863 0.368627 0.403922 0.443137 0.470588 0.529412 0.556863 0.584314 0.603922 0.619608 0.627451 0.607843 0.592157 0.552941 0.419608 0.184314 0.0627451 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0313725 0.235294 0.415686 0.482353 0.505882 0.517647 0.517647 0.505882 0.470588 0.443137 0.396078 0.360784 0.317647 0.298039 0.27451 0.270588 0.262745 0.254902 0.243137 0.227451 0.227451 0.247059 0.25098 0.25098 0.235294 0.243137 0.243137 0.266667 0.305882 0.286275 0.243137 0.333333 0.329412 0.25098 0.282353 0.290196 0.972549 0.992157 0.356863 0.317647 0.345098 0.294118 0.262745 0.282353 0.266667 0.270588 0.270588 0.254902 0.25098 0.270588 0.270588 0.286275 0.290196 0.286275 0.301961 0.290196 0.301961 0.313725 0.32549 0.333333 0.34902 0.372549 0.411765 0.454902 0.521569 0.54902 0.580392 0.603922 0.592157 0.584314 0.54902 0.435294 0.227451 0.0313725 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.137255 0.388235 0.447059 0.470588 0.498039 0.482353 0.45098 0.435294 0.388235 0.329412 0.290196 0.262745 0.25098 0.239216 0.231373 0.231373 0.227451 0.239216 0.227451 0.235294 0.227451 0.215686 0.215686 0.231373 0.235294 0.239216 0.239216 0.239216 0.231373 0.25098 0.278431 0.266667 0.235294 0.247059 0.286275 0.243137 0.254902 0.282353 0.423529 0.576471 0.282353 0.27451 0.278431 0.266667 0.247059 0.25098 0.254902 0.243137 0.25098 0.243137 0.247059 0.243137 0.235294 0.266667 0.270588 0.278431 0.278431 0.282353 0.282353 0.301961 0.290196 0.290196 0.290196 0.294118 0.301961 0.313725 0.329412 0.34902 0.396078 0.45098 0.513725 0.552941 0.572549 0.584314 0.552941 0.517647 0.396078 0.121569 0.0156863 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00392157 0.196078 0.435294 0.447059 0.443137 0.45098 0.435294 0.415686 0.341176 0.309804 0.258824 0.227451 0.211765 0.215686 0.219608 0.203922 0.207843 0.207843 0.219608 0.211765 0.219608 0.219608 0.223529 0.219608 0.188235 0.207843 0.215686 0.227451 0.235294 0.227451 0.231373 0.211765 0.235294 0.278431 0.270588 0.223529 0.231373 0.235294 0.231373 0.243137 0.290196 0.286275 0.294118 0.27451 0.247059 0.25098 0.254902 0.247059 0.243137 0.258824 0.247059 0.231373 0.235294 0.243137 0.243137 0.254902 0.25098 0.243137 0.25098 0.258824 0.266667 0.270588 0.270588 0.262745 0.266667 0.258824 0.262745 0.27451 0.254902 0.266667 0.25098 0.270588 0.27451 0.317647 0.368627 0.439216 0.494118 0.541176 0.552941 0.545098 0.541176 0.443137 0.172549 0.0235294 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.160784 0.403922 0.431373 0.415686 0.411765 0.4 0.352941 0.305882 0.247059 0.215686 0.192157 0.192157 0.192157 0.180392 0.192157 0.188235 0.2 0.196078 0.192157 0.196078 0.211765 0.215686 0.211765 0.207843 0.203922 0.192157 0.192157 0.211765 0.227451 0.231373 0.223529 0.219608 0.207843 0.219608 0.247059 0.262745 0.223529 0.219608 0.227451 0.219608 0.235294 0.258824 0.282353 0.282353 0.258824 0.235294 0.247059 0.247059 0.223529 0.235294 0.243137 0.235294 0.227451 0.223529 0.231373 0.247059 0.235294 0.231373 0.219608 0.239216 0.258824 0.258824 0.25098 0.243137 0.25098 0.270588 0.258824 0.25098 0.247059 0.243137 0.235294 0.247059 0.235294 0.239216 0.25098 0.258824 0.270588 0.317647 0.372549 0.447059 0.501961 0.521569 0.533333 0.513725 0.427451 0.188235 0.0196078 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.329412 0.407843 0.388235 0.368627 0.345098 0.298039 0.262745 0.231373 0.196078 0.180392 0.168627 0.14902 0.168627 0.176471 0.180392 0.176471 0.176471 0.188235 0.184314 0.2 0.196078 0.2 0.211765 0.2 0.219608 0.219608 0.184314 0.180392 0.203922 0.227451 0.227451 0.227451 0.215686 0.207843 0.203922 0.243137 0.266667 0.219608 0.211765 0.219608 0.235294 0.231373 0.258824 0.278431 0.258824 0.258824 0.243137 0.243137 0.239216 0.235294 0.231373 0.223529 0.239216 0.243137 0.227451 0.247059 0.235294 0.231373 0.219608 0.219608 0.227451 0.262745 0.25098 0.262745 0.258824 0.219608 0.262745 0.247059 0.235294 0.25098 0.231373 0.231373 0.223529 0.215686 0.223529 0.227451 0.239216 0.243137 0.239216 0.247059 0.278431 0.329412 0.419608 0.466667 0.498039 0.513725 0.490196 0.384314 0.0784314 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0823529 0.388235 0.376471 0.352941 0.321569 0.278431 0.215686 0.196078 0.188235 0.164706 0.160784 0.160784 0.14902 0.152941 0.164706 0.168627 0.184314 0.196078 0.180392 0.172549 0.184314 0.184314 0.188235 0.184314 0.188235 0.188235 0.203922 0.192157 0.176471 0.188235 0.203922 0.215686 0.219608 0.211765 0.215686 0.207843 0.215686 0.239216 0.239216 0.223529 0.219608 0.215686 0.219608 0.219608 0.235294 0.247059 0.247059 0.247059 0.243137 0.235294 0.231373 0.243137 0.231373 0.239216 0.219608 0.223529 0.219608 0.227451 0.227451 0.219608 0.219608 0.219608 0.231373 0.25098 0.239216 0.25098 0.25098 0.231373 0.243137 0.227451 0.235294 0.231373 0.243137 0.227451 0.231373 0.25098 0.262745 0.270588 0.247059 0.247059 0.231373 0.243137 0.270588 0.247059 0.262745 0.305882 0.4 0.45098 0.478431 0.490196 0.435294 0.188235 0.0156863 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0862745 0.388235 0.360784 0.317647 0.282353 0.254902 0.196078 0.164706 0.141176 0.145098 0.141176 0.133333 0.141176 0.141176 0.137255 0.152941 0.156863 0.14902 0.145098 0.156863 0.168627 0.176471 0.2 0.215686 0.196078 0.172549 0.172549 0.180392 0.172549 0.176471 0.188235 0.172549 0.192157 0.2 0.192157 0.188235 0.196078 0.203922 0.207843 0.2 0.219608 0.211765 0.203922 0.207843 0.211765 0.219608 0.219608 0.219608 0.223529 0.219608 0.215686 0.219608 0.207843 0.215686 0.219608 0.215686 0.219608 0.215686 0.211765 0.211765 0.211765 0.215686 0.219608 0.219608 0.215686 0.215686 0.219608 0.223529 0.223529 0.215686 0.215686 0.223529 0.219608 0.207843 0.215686 0.215686 0.219608 0.215686 0.215686 0.235294 0.215686 0.219608 0.223529 0.227451 0.219608 0.227451 0.235294 0.270588 0.337255 0.423529 0.443137 0.443137 0.427451 0.192157 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.360784 0.352941 0.282353 0.258824 0.219608 0.156863 0.14902 0.137255 0.121569 0.12549 0.129412 0.121569 0.137255 0.129412 0.141176 0.141176 0.156863 0.145098 0.145098 0.145098 0.160784 0.168627 0.164706 0.164706 0.160784 0.172549 0.172549 0.164706 0.176471 0.180392 0.184314 0.176471 0.188235 0.180392 0.192157 0.192157 0.196078 0.188235 0.192157 0.188235 0.196078 0.203922 0.188235 0.215686 0.203922 0.207843 0.211765 0.207843 0.219608 0.207843 0.207843 0.215686 0.215686 0.207843 0.219608 0.207843 0.219608 0.219608 0.219608 0.219608 0.219608 0.215686 0.219608 0.211765 0.215686 0.203922 0.215686 0.207843 0.203922 0.219608 0.211765 0.207843 0.207843 0.211765 0.211765 0.188235 0.196078 0.211765 0.196078 0.227451 0.203922 0.215686 0.215686 0.2 0.207843 0.211765 0.215686 0.219608 0.231373 0.309804 0.380392 0.415686 0.435294 0.396078 0.152941 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.262745 0.364706 0.286275 0.25098 0.207843 0.152941 0.12549 0.121569 0.121569 0.113725 0.117647 0.121569 0.117647 0.12549 0.12549 0.12549 0.133333 0.137255 0.152941 0.141176 0.137255 0.152941 0.141176 0.164706 0.156863 0.160784 0.156863 0.168627 0.168627 0.172549 0.172549 0.172549 0.176471 0.172549 0.172549 0.188235 0.2 0.180392 0.188235 0.196078 0.2 0.196078 0.203922 0.188235 0.203922 0.203922 0.2 0.196078 0.203922 0.203922 0.203922 0.207843 0.211765 0.203922 0.207843 0.203922 0.211765 0.219608 0.203922 0.219608 0.211765 0.219608 0.203922 0.219608 0.207843 0.203922 0.207843 0.211765 0.219608 0.211765 0.207843 0.219608 0.211765 0.207843 0.2 0.211765 0.203922 0.219608 0.2 0.2 0.223529 0.215686 0.2 0.192157 0.196078 0.203922 0.196078 0.196078 0.2 0.184314 0.219608 0.270588 0.360784 0.384314 0.403922 0.337255 0.0588235 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.372549 0.329412 0.25098 0.196078 0.137255 0.113725 0.109804 0.109804 0.113725 0.109804 0.117647 0.113725 0.12549 0.121569 0.12549 0.129412 0.141176 0.145098 0.145098 0.145098 0.137255 0.145098 0.14902 0.156863 0.152941 0.156863 0.156863 0.160784 0.160784 0.152941 0.176471 0.164706 0.172549 0.168627 0.184314 0.176471 0.180392 0.192157 0.188235 0.192157 0.196078 0.2 0.2 0.2 0.203922 0.207843 0.207843 0.207843 0.211765 0.211765 0.207843 0.203922 0.207843 0.215686 0.203922 0.207843 0.203922 0.207843 0.203922 0.207843 0.211765 0.203922 0.211765 0.203922 0.207843 0.203922 0.2 0.2 0.203922 0.2 0.196078 0.203922 0.211765 0.207843 0.219608 0.196078 0.203922 0.192157 0.203922 0.207843 0.215686 0.203922 0.2 0.192157 0.188235 0.196078 0.196078 0.192157 0.196078 0.184314 0.192157 0.203922 0.27451 0.356863 0.372549 0.380392 0.219608 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0823529 0.396078 0.309804 0.215686 0.14902 0.113725 0.105882 0.0980392 0.109804 0.109804 0.109804 0.109804 0.113725 0.121569 0.113725 0.12549 0.12549 0.133333 0.133333 0.133333 0.137255 0.145098 0.14902 0.141176 0.145098 0.156863 0.160784 0.156863 0.164706 0.168627 0.164706 0.168627 0.172549 0.164706 0.176471 0.176471 0.180392 0.188235 0.192157 0.176471 0.2 0.188235 0.2 0.207843 0.192157 0.2 0.2 0.203922 0.211765 0.203922 0.203922 0.211765 0.203922 0.2 0.203922 0.203922 0.211765 0.219608 0.219608 0.203922 0.207843 0.211765 0.207843 0.207843 0.219608 0.207843 0.203922 0.207843 0.211765 0.211765 0.203922 0.211765 0.2 0.207843 0.203922 0.196078 0.211765 0.203922 0.188235 0.211765 0.215686 0.192157 0.188235 0.192157 0.184314 0.184314 0.188235 0.196078 0.176471 0.180392 0.172549 0.176471 0.184314 0.196078 0.305882 0.333333 0.364706 0.305882 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.109804 0.411765 0.317647 0.2 0.121569 0.101961 0.0941176 0.101961 0.0941176 0.0980392 0.101961 0.109804 0.105882 0.109804 0.117647 0.12549 0.121569 0.137255 0.137255 0.133333 0.137255 0.141176 0.141176 0.137255 0.141176 0.160784 0.160784 0.160784 0.164706 0.160784 0.172549 0.176471 0.180392 0.164706 0.172549 0.184314 0.172549 0.180392 0.188235 0.192157 0.196078 0.184314 0.176471 0.196078 0.207843 0.2 0.203922 0.215686 0.207843 0.207843 0.196078 0.211765 0.211765 0.196078 0.207843 0.2 0.215686 0.203922 0.184314 0.203922 0.203922 0.203922 0.207843 0.203922 0.196078 0.207843 0.196078 0.207843 0.196078 0.215686 0.188235 0.203922 0.207843 0.207843 0.196078 0.196078 0.2 0.203922 0.196078 0.196078 0.2 0.180392 0.196078 0.196078 0.188235 0.192157 0.188235 0.184314 0.180392 0.176471 0.168627 0.164706 0.156863 0.176471 0.227451 0.329412 0.360784 0.329412 0.0666667 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.101961 0.4 0.368627 0.215686 0.113725 0.105882 0.0862745 0.0862745 0.0823529 0.101961 0.0980392 0.0980392 0.109804 0.105882 0.113725 0.121569 0.117647 0.117647 0.133333 0.121569 0.129412 0.133333 0.145098 0.141176 0.137255 0.156863 0.152941 0.137255 0.152941 0.160784 0.164706 0.14902 0.164706 0.180392 0.168627 0.172549 0.176471 0.184314 0.180392 0.180392 0.176471 0.176471 0.176471 0.184314 0.188235 0.196078 0.2 0.203922 0.207843 0.188235 0.211765 0.192157 0.196078 0.196078 0.192157 0.2 0.203922 0.2 0.2 0.2 0.207843 0.211765 0.203922 0.196078 0.203922 0.2 0.207843 0.203922 0.2 0.196078 0.196078 0.196078 0.192157 0.184314 0.196078 0.196078 0.192157 0.2 0.180392 0.203922 0.188235 0.180392 0.184314 0.172549 0.172549 0.168627 0.176471 0.176471 0.168627 0.164706 0.164706 0.160784 0.152941 0.164706 0.215686 0.317647 0.368627 0.313725 0.0784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0705882 0.352941 0.447059 0.317647 0.117647 0.101961 0.0941176 0.0862745 0.0784314 0.0862745 0.0941176 0.0980392 0.0941176 0.101961 0.105882 0.0980392 0.101961 0.117647 0.105882 0.105882 0.109804 0.117647 0.12549 0.129412 0.133333 0.133333 0.12549 0.137255 0.133333 0.14902 0.137255 0.156863 0.156863 0.14902 0.14902 0.164706 0.164706 0.172549 0.160784 0.172549 0.172549 0.168627 0.172549 0.172549 0.164706 0.180392 0.188235 0.184314 0.188235 0.184314 0.188235 0.196078 0.184314 0.184314 0.180392 0.188235 0.188235 0.188235 0.192157 0.184314 0.184314 0.188235 0.184314 0.192157 0.180392 0.180392 0.188235 0.180392 0.184314 0.184314 0.192157 0.188235 0.188235 0.192157 0.180392 0.160784 0.176471 0.180392 0.168627 0.176471 0.176471 0.160784 0.176471 0.160784 0.172549 0.164706 0.160784 0.172549 0.160784 0.164706 0.156863 0.141176 0.14902 0.152941 0.223529 0.321569 0.360784 0.258824 0.0588235 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.054902 0.278431 0.454902 0.470588 0.290196 0.105882 0.109804 0.109804 0.0823529 0.0784314 0.0862745 0.0980392 0.0901961 0.0941176 0.0941176 0.0941176 0.101961 0.109804 0.0941176 0.113725 0.117647 0.117647 0.121569 0.113725 0.121569 0.129412 0.12549 0.133333 0.137255 0.137255 0.133333 0.145098 0.14902 0.156863 0.141176 0.160784 0.145098 0.160784 0.160784 0.160784 0.168627 0.164706 0.164706 0.168627 0.176471 0.172549 0.176471 0.168627 0.184314 0.180392 0.172549 0.192157 0.184314 0.164706 0.192157 0.172549 0.176471 0.172549 0.188235 0.168627 0.176471 0.188235 0.188235 0.184314 0.196078 0.184314 0.184314 0.176471 0.188235 0.184314 0.172549 0.180392 0.176471 0.176471 0.184314 0.168627 0.180392 0.184314 0.168627 0.172549 0.180392 0.176471 0.160784 0.164706 0.172549 0.156863 0.156863 0.160784 0.168627 0.160784 0.160784 0.14902 0.14902 0.168627 0.309804 0.392157 0.333333 0.211765 0.054902 0 0 0 0 0 0 0 0 0 0 0 0.00392157 0.00392157 0.00392157 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0509804 0.243137 0.380392 0.505882 0.505882 0.305882 0.117647 0.0980392 0.0980392 0.0823529 0.0941176 0.0941176 0.0901961 0.0745098 0.0901961 0.101961 0.0941176 0.101961 0.0980392 0.109804 0.105882 0.109804 0.113725 0.109804 0.117647 0.137255 0.129412 0.133333 0.129412 0.141176 0.141176 0.14902 0.14902 0.137255 0.137255 0.156863 0.156863 0.14902 0.168627 0.168627 0.160784 0.168627 0.168627 0.172549 0.176471 0.172549 0.184314 0.172549 0.168627 0.172549 0.184314 0.180392 0.180392 0.184314 0.176471 0.188235 0.184314 0.188235 0.180392 0.188235 0.188235 0.176471 0.184314 0.180392 0.192157 0.172549 0.188235 0.192157 0.188235 0.176471 0.180392 0.176471 0.188235 0.176471 0.180392 0.172549 0.180392 0.180392 0.172549 0.164706 0.160784 0.164706 0.160784 0.164706 0.164706 0.14902 0.14902 0.168627 0.156863 0.152941 0.152941 0.137255 0.168627 0.329412 0.411765 0.360784 0.258824 0.172549 0.0509804 0 0 0 0 0 0 0.0627451 0.168627 0.278431 0.329412 0.356863 0.360784 0.372549 0.368627 0.356863 0.329412 0.298039 0.188235 0.0784314 0 0 0 0 0 0 0 0 0 0 0.00784314 0.192157 0.305882 0.411765 0.517647 0.552941 0.435294 0.180392 0.109804 0.109804 0.0941176 0.0823529 0.0941176 0.0901961 0.0941176 0.0941176 0.105882 0.101961 0.101961 0.109804 0.109804 0.105882 0.117647 0.109804 0.109804 0.129412 0.121569 0.133333 0.129412 0.133333 0.133333 0.145098 0.137255 0.133333 0.145098 0.14902 0.152941 0.152941 0.156863 0.156863 0.156863 0.176471 0.164706 0.172549 0.168627 0.168627 0.172549 0.172549 0.176471 0.172549 0.188235 0.184314 0.184314 0.176471 0.180392 0.180392 0.176471 0.180392 0.180392 0.180392 0.180392 0.172549 0.184314 0.192157 0.180392 0.180392 0.168627 0.176471 0.180392 0.184314 0.176471 0.176471 0.184314 0.180392 0.176471 0.180392 0.180392 0.168627 0.172549 0.180392 0.168627 0.172549 0.152941 0.152941 0.156863 0.152941 0.141176 0.152941 0.152941 0.152941 0.137255 0.211765 0.380392 0.435294 0.380392 0.301961 0.290196 0.235294 0.0352941 0 0 0 0.0352941 0.207843 0.329412 0.376471 0.423529 0.443137 0.470588 0.478431 0.498039 0.494118 0.486275 0.486275 0.470588 0.443137 0.423529 0.364706 0.294118 0.14902 0.00784314 0 0 0 0 0 0 0 0.00392157 0.156863 0.270588 0.337255 0.435294 0.560784 0.619608 0.576471 0.407843 0.152941 0.113725 0.109804 0.0941176 0.0901961 0.105882 0.0980392 0.0941176 0.105882 0.101961 0.109804 0.101961 0.109804 0.105882 0.113725 0.113725 0.12549 0.117647 0.12549 0.12549 0.141176 0.141176 0.133333 0.137255 0.14902 0.141176 0.160784 0.152941 0.160784 0.164706 0.164706 0.152941 0.176471 0.168627 0.164706 0.152941 0.164706 0.188235 0.188235 0.184314 0.180392 0.184314 0.180392 0.188235 0.192157 0.192157 0.192157 0.188235 0.180392 0.196078 0.184314 0.176471 0.188235 0.196078 0.188235 0.188235 0.176471 0.184314 0.188235 0.180392 0.180392 0.176471 0.180392 0.176471 0.192157 0.180392 0.172549 0.180392 0.176471 0.164706 0.160784 0.160784 0.164706 0.160784 0.164706 0.168627 0.156863 0.156863 0.156863 0.156863 0.192157 0.356863 0.447059 0.447059 0.392157 0.329412 0.32549 0.294118 0.254902 0.0509804 0 0.0627451 0.219608 0.305882 0.392157 0.466667 0.494118 0.521569 0.537255 0.545098 0.556863 0.576471 0.568627 0.572549 0.572549 0.545098 0.541176 0.505882 0.482353 0.435294 0.368627 0.282353 0.0980392 0.0117647 0.00392157 0 0 0 0 0 0.12549 0.235294 0.305882 0.380392 0.439216 0.529412 0.596078 0.643137 0.607843 0.431373 0.207843 0.12549 0.109804 0.109804 0.101961 0.101961 0.105882 0.101961 0.101961 0.105882 0.105882 0.109804 0.109804 0.109804 0.121569 0.121569 0.129412 0.12549 0.133333 0.137255 0.133333 0.145098 0.145098 0.133333 0.160784 0.14902 0.156863 0.160784 0.160784 0.152941 0.172549 0.176471 0.172549 0.176471 0.180392 0.176471 0.184314 0.192157 0.180392 0.176471 0.168627 0.176471 0.184314 0.180392 0.184314 0.188235 0.180392 0.188235 0.176471 0.176471 0.188235 0.184314 0.176471 0.184314 0.188235 0.172549 0.188235 0.188235 0.184314 0.180392 0.188235 0.180392 0.180392 0.188235 0.176471 0.172549 0.168627 0.164706 0.168627 0.164706 0.160784 0.160784 0.152941 0.160784 0.156863 0.156863 0.243137 0.4 0.470588 0.478431 0.443137 0.380392 0.337255 0.329412 0.313725 0.286275 0.266667 0.207843 0.290196 0.329412 0.364706 0.423529 0.498039 0.54902 0.580392 0.588235 0.603922 0.627451 0.627451 0.627451 0.627451 0.627451 0.619608 0.607843 0.588235 0.576471 0.552941 0.509804 0.466667 0.415686 0.32549 0.168627 0.0196078 0 0 0 0 0 0.109804 0.207843 0.27451 0.329412 0.4 0.447059 0.498039 0.556863 0.619608 0.662745 0.662745 0.560784 0.368627 0.176471 0.121569 0.113725 0.109804 0.101961 0.105882 0.101961 0.109804 0.109804 0.117647 0.109804 0.121569 0.113725 0.121569 0.12549 0.133333 0.137255 0.129412 0.141176 0.14902 0.14902 0.152941 0.168627 0.156863 0.156863 0.168627 0.168627 0.160784 0.180392 0.168627 0.168627 0.176471 0.184314 0.172549 0.176471 0.180392 0.184314 0.192157 0.188235 0.184314 0.196078 0.192157 0.188235 0.184314 0.184314 0.184314 0.192157 0.184314 0.180392 0.188235 0.180392 0.168627 0.192157 0.184314 0.188235 0.176471 0.192157 0.184314 0.196078 0.176471 0.180392 0.180392 0.168627 0.164706 0.176471 0.168627 0.168627 0.168627 0.160784 0.164706 0.231373 0.380392 0.486275 0.513725 0.498039 0.447059 0.403922 0.356863 0.317647 0.305882 0.298039 0.305882 0.286275 0.27451 0.301961 0.392157 0.403922 0.427451 0.47451 0.541176 0.6 0.631373 0.65098 0.647059 0.662745 0.686275 0.886275 0.882353 0.858824 0.670588 0.666667 0.647059 0.619608 0.596078 0.572549 0.545098 0.482353 0.415686 0.337255 0.192157 0.0117647 0 0 0 0 0.0784314 0.192157 0.25098 0.305882 0.352941 0.403922 0.45098 0.478431 0.517647 0.572549 0.627451 0.670588 0.701961 0.694118 0.615686 0.431373 0.219608 0.156863 0.137255 0.121569 0.117647 0.121569 0.117647 0.109804 0.117647 0.12549 0.121569 0.129412 0.133333 0.145098 0.137255 0.145098 0.14902 0.14902 0.152941 0.152941 0.164706 0.156863 0.164706 0.156863 0.160784 0.168627 0.180392 0.172549 0.176471 0.184314 0.180392 0.192157 0.184314 0.176471 0.184314 0.188235 0.184314 0.192157 0.188235 0.196078 0.188235 0.192157 0.188235 0.184314 0.188235 0.180392 0.192157 0.196078 0.184314 0.188235 0.180392 0.180392 0.188235 0.188235 0.176471 0.176471 0.184314 0.192157 0.188235 0.188235 0.184314 0.184314 0.176471 0.192157 0.298039 0.45098 0.529412 0.54902 0.533333 0.501961 0.470588 0.415686 0.364706 0.321569 0.301961 0.290196 0.239216 0.219608 0.286275 0.290196 0.278431 0.380392 0.447059 0.45098 0.466667 0.505882 0.556863 0.635294 0.65098 0.658824 0.670588 0.658824 0.647059 0.670588 0.72549 0.701961 0.631373 0.65098 0.631373 0.627451 0.619608 0.596078 0.572549 0.541176 0.501961 0.427451 0.329412 0.164706 0.0117647 0 0 0 0.0588235 0.184314 0.231373 0.294118 0.337255 0.376471 0.411765 0.45098 0.47451 0.498039 0.541176 0.568627 0.607843 0.65098 0.682353 0.72549 0.733333 0.698039 0.592157 0.431373 0.286275 0.211765 0.14902 0.133333 0.12549 0.117647 0.133333 0.129412 0.137255 0.137255 0.141176 0.145098 0.152941 0.152941 0.152941 0.156863 0.164706 0.160784 0.164706 0.168627 0.168627 0.172549 0.164706 0.168627 0.176471 0.172549 0.184314 0.176471 0.176471 0.188235 0.180392 0.188235 0.180392 0.192157 0.184314 0.2 0.188235 0.192157 0.188235 0.196078 0.192157 0.192157 0.192157 0.180392 0.184314 0.184314 0.184314 0.196078 0.184314 0.176471 0.180392 0.184314 0.180392 0.184314 0.196078 0.25098 0.333333 0.45098 0.545098 0.572549 0.576471 0.545098 0.521569 0.494118 0.447059 0.411765 0.376471 0.341176 0.321569 0.294118 0.27451 0.247059 0.211765 0.184314 0.313725 0.309804 0.294118 0.431373 0.478431 0.482353 0.501961 0.537255 0.670588 0.619608 0.619608 0.596078 0.568627 0.533333 0.513725 0.498039 0.470588 0.470588 0.494118 0.509804 0.568627 0.596078 0.588235 0.588235 0.584314 0.572549 0.533333 0.494118 0.403922 0.290196 0.0941176 0.0117647 0 0 0.0156863 0.168627 0.227451 0.278431 0.329412 0.356863 0.396078 0.415686 0.443137 0.47451 0.494118 0.517647 0.537255 0.568627 0.596078 0.623529 0.670588 0.690196 0.705882 0.74902 0.74902 0.741176 0.701961 0.607843 0.501961 0.388235 0.278431 0.184314 0.145098 0.145098 0.141176 0.141176 0.156863 0.141176 0.160784 0.160784 0.164706 0.160784 0.172549 0.156863 0.168627 0.172549 0.180392 0.176471 0.176471 0.176471 0.180392 0.188235 0.184314 0.192157 0.176471 0.188235 0.184314 0.203922 0.184314 0.192157 0.188235 0.192157 0.184314 0.188235 0.184314 0.188235 0.184314 0.188235 0.196078 0.188235 0.184314 0.188235 0.2 0.25098 0.333333 0.411765 0.498039 0.572549 0.603922 0.607843 0.619608 0.580392 0.560784 0.52549 0.486275 0.470588 0.439216 0.415686 0.380392 0.364706 0.329412 0.305882 0.286275 0.266667 0.254902 0.227451 0.184314 0.152941 0.258824 0.309804 0.313725 0.572549 0.52549 0.494118 0.517647 0.545098 0.545098 0.533333 0.498039 0.415686 0.337255 0.231373 0.152941 0.109804 0.0784314 0.0941176 0.121569 0.152941 0.266667 0.392157 0.482353 0.552941 0.564706 0.564706 0.552941 0.517647 0.47451 0.372549 0.235294 0.027451 0 0 0.00392157 0.137255 0.219608 0.270588 0.313725 0.34902 0.372549 0.4 0.419608 0.45098 0.470588 0.498039 0.509804 0.529412 0.533333 0.54902 0.572549 0.592157 0.619608 0.65098 0.666667 0.713725 0.705882 0.737255 0.741176 0.784314 0.866667 0.886275 0.760784 0.705882 0.639216 0.564706 0.454902 0.364706 0.282353 0.231373 0.215686 0.188235 0.180392 0.180392 0.180392 0.184314 0.192157 0.184314 0.184314 0.188235 0.176471 0.192157 0.184314 0.207843 0.192157 0.196078 0.192157 0.2 0.184314 0.196078 0.196078 0.215686 0.192157 0.211765 0.239216 0.290196 0.34902 0.435294 0.513725 0.560784 0.611765 0.654902 0.662745 0.666667 0.65098 0.635294 0.619608 0.607843 0.584314 0.552941 0.521569 0.490196 0.458824 0.443137 0.411765 0.392157 0.376471 0.364706 0.345098 0.317647 0.301961 0.282353 0.262745 0.239216 0.25098 0.215686 0.172549 0.156863 0.258824 0.262745 0.360784 0.552941 0.513725 0.509804 0.54902 0.490196 0.423529 0.329412 0.196078 0.054902 0 0 0 0 0 0 0 0 0 0.0627451 0.247059 0.392157 0.486275 0.54902 0.545098 0.52549 0.482353 0.427451 0.305882 0.105882 0.00784314 0 0 0.101961 0.203922 0.254902 0.298039 0.329412 0.356863 0.384314 0.403922 0.423529 0.443137 0.454902 0.470588 0.494118 0.498039 0.521569 0.537255 0.552941 0.564706 0.576471 0.592157 0.603922 0.619608 0.643137 0.662745 0.678431 0.705882 0.72549 0.713725 0.72549 0.745098 0.796078 0.823529 0.815686 0.8 0.776471 0.792157 0.776471 0.760784 0.756863 0.74902 0.752941 0.752941 0.745098 0.737255 0.72549 0.721569 0.701961 0.67451 0.666667 0.662745 0.662745 0.682353 0.694118 0.686275 0.686275 0.717647 0.717647 0.72549 0.709804 0.72549 0.709804 0.698039 0.686275 0.678431 0.647059 0.639216 0.627451 0.592157 0.576471 0.54902 0.541176 0.517647 0.494118 0.482353 0.470588 0.447059 0.431373 0.411765 0.392157 0.380392 0.360784 0.337255 0.329412 0.317647 0.298039 0.27451 0.254902 0.239216 0.243137 0.239216 0.211765 0.156863 0.145098 0.243137 0.247059 0.372549 0.509804 0.498039 0.490196 0.447059 0.34902 0.192157 0.0352941 0 0 0 0 0 0 0 0 0 0 0 0 0 0.133333 0.356863 0.482353 0.521569 0.521569 0.501961 0.45098 0.376471 0.2 0.0196078 0 0 0.0666667 0.184314 0.239216 0.278431 0.329412 0.356863 0.384314 0.4 0.419608 0.431373 0.443137 0.466667 0.47451 0.478431 0.501961 0.513725 0.52549 0.533333 0.552941 0.568627 0.580392 0.580392 0.580392 0.596078 0.596078 0.615686 0.619608 0.631373 0.643137 0.639216 0.654902 0.662745 0.670588 0.670588 0.666667 0.690196 0.709804 0.717647 0.72549 0.713725 0.709804 0.733333 0.717647 0.752941 0.780392 0.807843 0.976471 1 0.756863 0.756863 0.752941 0.721569 0.729412 0.709804 0.678431 0.686275 0.67451 0.658824 0.631373 0.623529 0.607843 0.584314 0.572549 0.560784 0.552941 0.541176 0.52549 0.517647 0.501961 0.486275 0.478431 0.470588 0.45098 0.435294 0.427451 0.407843 0.392157 0.384314 0.368627 0.345098 0.333333 0.329412 0.317647 0.286275 0.278431 0.254902 0.243137 0.223529 0.247059 0.227451 0.203922 0.156863 0.137255 0.227451 0.243137 0.384314 0.513725 0.466667 0.423529 0.294118 0.0941176 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12549 0.356863 0.47451 0.501961 0.505882 0.45098 0.388235 0.270588 0.0666667 0 0 0.027451 0.156863 0.219608 0.266667 0.313725 0.341176 0.376471 0.4 0.411765 0.423529 0.439216 0.454902 0.466667 0.458824 0.486275 0.494118 0.501961 0.513725 0.529412 0.537255 0.545098 0.552941 0.560784 0.560784 0.564706 0.588235 0.592157 0.584314 0.592157 0.603922 0.607843 0.615686 0.623529 0.635294 0.619608 0.623529 0.615686 0.623529 0.631373 0.615686 0.619608 0.619608 0.603922 0.615686 0.623529 0.607843 0.611765 0.615686 0.615686 0.607843 0.592157 0.588235 0.576471 0.615686 0.607843 0.580392 0.568627 0.560784 0.545098 0.545098 0.54902 0.529412 0.529412 0.521569 0.513725 0.498039 0.482353 0.458824 0.458824 0.443137 0.443137 0.45098 0.423529 0.431373 0.4 0.384314 0.376471 0.360784 0.341176 0.337255 0.321569 0.301961 0.286275 0.27451 0.262745 0.247059 0.235294 0.219608 0.247059 0.223529 0.196078 0.14902 0.133333 0.227451 0.254902 0.380392 0.423529 0.4 0.266667 0.0588235 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.188235 0.407843 0.498039 0.501961 0.466667 0.415686 0.321569 0.113725 0 0 0 0.137255 0.207843 0.247059 0.301961 0.329412 0.368627 0.388235 0.411765 0.423529 0.439216 0.45098 0.466667 0.454902 0.478431 0.486275 0.494118 0.494118 0.505882 0.509804 0.521569 0.517647 0.529412 0.54902 0.552941 0.552941 0.556863 0.564706 0.572549 0.572549 0.576471 0.584314 0.576471 0.592157 0.576471 0.584314 0.596078 0.584314 0.592157 0.584314 0.572549 0.584314 0.572549 0.580392 0.568627 0.588235 0.584314 0.584314 0.580392 0.576471 0.576471 0.560784 0.552941 0.54902 0.54902 0.54902 0.537255 0.52549 0.529412 0.513725 0.513725 0.498039 0.498039 0.470588 0.466667 0.466667 0.443137 0.431373 0.431373 0.419608 0.415686 0.419608 0.396078 0.380392 0.368627 0.356863 0.345098 0.333333 0.329412 0.317647 0.298039 0.298039 0.290196 0.266667 0.262745 0.239216 0.227451 0.227451 0.258824 0.227451 0.192157 0.145098 0.137255 0.215686 0.258824 0.360784 0.352941 0.25098 0.054902 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.054902 0.309804 0.462745 0.486275 0.462745 0.427451 0.341176 0.164706 0 0 0 0.105882 0.188235 0.235294 0.290196 0.313725 0.345098 0.376471 0.396078 0.415686 0.431373 0.443137 0.462745 0.462745 0.478431 0.486275 0.490196 0.490196 0.494118 0.498039 0.498039 0.466667 0.490196 0.52549 0.52549 0.52549 0.533333 0.537255 0.552941 0.54902 0.560784 0.556863 0.552941 0.564706 0.556863 0.572549 0.564706 0.568627 0.572549 0.568627 0.564706 0.560784 0.568627 0.564706 0.584314 0.584314 0.615686 0.611765 0.572549 0.552941 0.552941 0.545098 0.537255 0.52549 0.52549 0.513725 0.509804 0.505882 0.498039 0.482353 0.47451 0.466667 0.478431 0.466667 0.458824 0.443137 0.435294 0.431373 0.415686 0.403922 0.4 0.384314 0.376471 0.364706 0.356863 0.345098 0.337255 0.32549 0.317647 0.298039 0.298039 0.282353 0.266667 0.262745 0.254902 0.235294 0.227451 0.219608 0.254902 0.215686 0.176471 0.133333 0.121569 0.196078 0.25098 0.317647 0.258824 0.0784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.207843 0.431373 0.490196 0.462745 0.407843 0.337255 0.180392 0 0 0 0.0784314 0.168627 0.235294 0.27451 0.309804 0.341176 0.368627 0.392157 0.407843 0.423529 0.439216 0.447059 0.458824 0.470588 0.478431 0.490196 0.494118 0.486275 0.498039 0.498039 0.494118 0.505882 0.529412 0.517647 0.533333 0.517647 0.529412 0.533333 0.541176 0.533333 0.529412 0.545098 0.54902 0.541176 0.54902 0.537255 0.552941 0.54902 0.537255 0.552941 0.537255 0.552941 0.556863 0.552941 0.568627 0.560784 0.560784 0.541176 0.537255 0.533333 0.52549 0.521569 0.505882 0.498039 0.490196 0.482353 0.478431 0.486275 0.466667 0.466667 0.454902 0.443137 0.431373 0.435294 0.435294 0.423529 0.403922 0.4 0.4 0.376471 0.372549 0.364706 0.345098 0.352941 0.329412 0.329412 0.32549 0.309804 0.294118 0.290196 0.286275 0.27451 0.254902 0.243137 0.223529 0.211765 0.227451 0.247059 0.215686 0.156863 0.12549 0.129412 0.176471 0.243137 0.231373 0.0784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0.407843 0.486275 0.447059 0.396078 0.317647 0.160784 0 0 0 0.027451 0.152941 0.211765 0.25098 0.298039 0.329412 0.356863 0.376471 0.403922 0.419608 0.431373 0.439216 0.45098 0.470588 0.466667 0.478431 0.494118 0.490196 0.498039 0.505882 0.505882 0.513725 0.509804 0.509804 0.513725 0.52549 0.521569 0.529412 0.533333 0.521569 0.533333 0.533333 0.529412 0.529412 0.541176 0.533333 0.529412 0.537255 0.533333 0.529412 0.533333 0.533333 0.529412 0.52549 0.52549 0.52549 0.509804 0.501961 0.513725 0.498039 0.501961 0.498039 0.490196 0.478431 0.482353 0.478431 0.458824 0.458824 0.454902 0.447059 0.443137 0.435294 0.427451 0.435294 0.415686 0.407843 0.4 0.392157 0.384314 0.380392 0.364706 0.356863 0.345098 0.341176 0.337255 0.329412 0.321569 0.301961 0.309804 0.282353 0.282353 0.278431 0.247059 0.235294 0.231373 0.219608 0.235294 0.231373 0.2 0.145098 0.113725 0.109804 0.14902 0.223529 0.113725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.172549 0.380392 0.47451 0.447059 0.388235 0.305882 0.156863 0 0 0 0 0.113725 0.192157 0.239216 0.27451 0.317647 0.337255 0.372549 0.388235 0.411765 0.419608 0.435294 0.45098 0.447059 0.47451 0.47451 0.482353 0.482353 0.490196 0.501961 0.498039 0.505882 0.513725 0.513725 0.517647 0.529412 0.521569 0.52549 0.529412 0.52549 0.533333 0.529412 0.529412 0.529412 0.52549 0.529412 0.529412 0.521569 0.521569 0.521569 0.529412 0.517647 0.517647 0.509804 0.513725 0.505882 0.509804 0.498039 0.501961 0.490196 0.490196 0.486275 0.486275 0.486275 0.47451 0.466667 0.462745 0.45098 0.447059 0.443137 0.443137 0.439216 0.427451 0.415686 0.415686 0.403922 0.407843 0.392157 0.372549 0.364706 0.360784 0.364706 0.333333 0.341176 0.333333 0.329412 0.321569 0.301961 0.294118 0.286275 0.27451 0.258824 0.243137 0.231373 0.219608 0.211765 0.239216 0.223529 0.192157 0.137255 0.109804 0.0862745 0.121569 0.109804 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.192157 0.372549 0.486275 0.45098 0.376471 0.298039 0.156863 0 0 0 0 0.0745098 0.168627 0.235294 0.270588 0.305882 0.329412 0.356863 0.368627 0.392157 0.419608 0.423529 0.439216 0.443137 0.45098 0.466667 0.470588 0.470588 0.490196 0.494118 0.486275 0.509804 0.505882 0.509804 0.521569 0.517647 0.52549 0.533333 0.529412 0.541176 0.537255 0.529412 0.529412 0.52549 0.529412 0.537255 0.529412 0.529412 0.533333 0.521569 0.517647 0.513725 0.509804 0.517647 0.509804 0.509804 0.513725 0.505882 0.498039 0.498039 0.501961 0.478431 0.470588 0.470588 0.470588 0.466667 0.458824 0.454902 0.443137 0.443137 0.447059 0.415686 0.427451 0.415686 0.411765 0.396078 0.396078 0.388235 0.384314 0.372549 0.364706 0.34902 0.352941 0.333333 0.329412 0.317647 0.305882 0.298039 0.290196 0.27451 0.266667 0.258824 0.231373 0.223529 0.211765 0.207843 0.266667 0.211765 0.180392 0.12549 0.0941176 0.0784314 0.0509804 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.247059 0.403922 0.494118 0.443137 0.352941 0.27451 0.121569 0 0 0 0 0.0352941 0.14902 0.207843 0.25098 0.286275 0.329412 0.337255 0.364706 0.388235 0.396078 0.427451 0.431373 0.423529 0.443137 0.466667 0.478431 0.466667 0.486275 0.494118 0.486275 0.505882 0.505882 0.509804 0.517647 0.521569 0.52549 0.52549 0.529412 0.521569 0.517647 0.517647 0.521569 0.521569 0.513725 0.533333 0.517647 0.529412 0.517647 0.501961 0.517647 0.513725 0.513725 0.505882 0.501961 0.501961 0.509804 0.501961 0.490196 0.482353 0.494118 0.486275 0.47451 0.47451 0.462745 0.462745 0.458824 0.443137 0.443137 0.439216 0.431373 0.431373 0.419608 0.419608 0.396078 0.396078 0.388235 0.376471 0.380392 0.364706 0.360784 0.34902 0.34902 0.329412 0.329412 0.313725 0.309804 0.298039 0.278431 0.27451 0.25098 0.25098 0.227451 0.215686 0.203922 0.176471 0.239216 0.203922 0.168627 0.113725 0.0862745 0.0431373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.133333 0.301961 0.431373 0.509804 0.443137 0.345098 0.25098 0.0862745 0 0 0 0 0 0.113725 0.188235 0.231373 0.27451 0.305882 0.329412 0.352941 0.380392 0.388235 0.415686 0.415686 0.431373 0.439216 0.45098 0.458824 0.466667 0.478431 0.486275 0.47451 0.490196 0.486275 0.498039 0.498039 0.505882 0.509804 0.521569 0.501961 0.52549 0.517647 0.509804 0.513725 0.521569 0.501961 0.509804 0.513725 0.521569 0.501961 0.513725 0.52549 0.509804 0.501961 0.505882 0.498039 0.509804 0.490196 0.498039 0.494118 0.486275 0.478431 0.478431 0.470588 0.462745 0.458824 0.45098 0.45098 0.443137 0.447059 0.435294 0.431373 0.423529 0.411765 0.403922 0.4 0.388235 0.384314 0.368627 0.360784 0.356863 0.34902 0.341176 0.329412 0.329412 0.317647 0.305882 0.294118 0.286275 0.27451 0.262745 0.25098 0.235294 0.219608 0.211765 0.188235 0.196078 0.235294 0.2 0.156863 0.109804 0.0666667 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.247059 0.372549 0.482353 0.505882 0.415686 0.305882 0.2 0.0392157 0 0 0 0 0 0.0745098 0.164706 0.215686 0.25098 0.294118 0.317647 0.341176 0.360784 0.392157 0.411765 0.392157 0.423529 0.439216 0.443137 0.458824 0.454902 0.47451 0.470588 0.482353 0.494118 0.486275 0.498039 0.501961 0.494118 0.521569 0.501961 0.505882 0.509804 0.509804 0.513725 0.501961 0.513725 0.513725 0.517647 0.505882 0.52549 0.501961 0.509804 0.513725 0.494118 0.501961 0.486275 0.494118 0.509804 0.486275 0.478431 0.478431 0.470588 0.482353 0.470588 0.466667 0.466667 0.45098 0.454902 0.443137 0.443137 0.443137 0.431373 0.439216 0.411765 0.411765 0.396078 0.4 0.392157 0.376471 0.368627 0.356863 0.352941 0.34902 0.32549 0.329412 0.321569 0.313725 0.298039 0.286275 0.27451 0.266667 0.258824 0.235294 0.231373 0.227451 0.211765 0.180392 0.192157 0.223529 0.188235 0.137255 0.0941176 0.0352941 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.211765 0.337255 0.443137 0.521569 0.498039 0.376471 0.266667 0.137255 0 0 0 0 0 0 0.0196078 0.137255 0.2 0.239216 0.278431 0.313725 0.329412 0.34902 0.364706 0.388235 0.392157 0.415686 0.431373 0.427451 0.443137 0.447059 0.454902 0.462745 0.470588 0.466667 0.478431 0.482353 0.490196 0.490196 0.498039 0.490196 0.501961 0.505882 0.501961 0.505882 0.513725 0.501961 0.513725 0.505882 0.509804 0.513725 0.498039 0.498039 0.501961 0.509804 0.501961 0.482353 0.494118 0.494118 0.478431 0.47451 0.478431 0.470588 0.466667 0.458824 0.466667 0.45098 0.443137 0.443137 0.439216 0.431373 0.419608 0.427451 0.415686 0.403922 0.396078 0.392157 0.392157 0.384314 0.368627 0.360784 0.345098 0.345098 0.345098 0.329412 0.321569 0.317647 0.301961 0.294118 0.27451 0.270588 0.258824 0.25098 0.239216 0.227451 0.211765 0.192157 0.172549 0.203922 0.215686 0.176471 0.121569 0.0784314 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.184314 0.32549 0.419608 0.513725 0.560784 0.454902 0.337255 0.223529 0.0666667 0 0 0 0 0 0 0 0.109804 0.172549 0.219608 0.262745 0.298039 0.32549 0.341176 0.360784 0.380392 0.384314 0.4 0.415686 0.427451 0.435294 0.443137 0.447059 0.454902 0.466667 0.466667 0.466667 0.482353 0.486275 0.490196 0.490196 0.498039 0.490196 0.501961 0.501961 0.509804 0.490196 0.490196 0.501961 0.509804 0.498039 0.498039 0.498039 0.494118 0.494118 0.486275 0.494118 0.490196 0.482353 0.478431 0.470588 0.482353 0.47451 0.462745 0.462745 0.443137 0.454902 0.45098 0.443137 0.439216 0.439216 0.431373 0.419608 0.419608 0.415686 0.407843 0.392157 0.388235 0.380392 0.368627 0.360784 0.356863 0.34902 0.341176 0.337255 0.317647 0.309804 0.305882 0.294118 0.290196 0.27451 0.266667 0.258824 0.235294 0.231373 0.215686 0.211765 0.188235 0.172549 0.211765 0.203922 0.168627 0.105882 0.0588235 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.188235 0.305882 0.411765 0.494118 0.564706 0.529412 0.396078 0.266667 0.160784 0.0156863 0 0 0 0 0 0 0 0.0627451 0.14902 0.196078 0.239216 0.27451 0.309804 0.333333 0.352941 0.368627 0.388235 0.4 0.415686 0.415686 0.435294 0.443137 0.443137 0.458824 0.458824 0.458824 0.466667 0.447059 0.47451 0.47451 0.482353 0.490196 0.482353 0.494118 0.494118 0.490196 0.494118 0.490196 0.482353 0.498039 0.490196 0.505882 0.494118 0.490196 0.490196 0.47451 0.486275 0.482353 0.47451 0.478431 0.486275 0.47451 0.458824 0.462745 0.458824 0.443137 0.443137 0.447059 0.443137 0.431373 0.443137 0.419608 0.415686 0.407843 0.392157 0.392157 0.392157 0.384314 0.384314 0.360784 0.360784 0.352941 0.345098 0.329412 0.32549 0.309804 0.305882 0.298039 0.290196 0.278431 0.266667 0.254902 0.25098 0.231373 0.219608 0.211765 0.192157 0.176471 0.160784 0.203922 0.192157 0.160784 0.101961 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0588235 0.2 0.301961 0.392157 0.490196 0.560784 0.580392 0.470588 0.317647 0.211765 0.0745098 0.00392157 0 0 0 0 0 0 0 0.0156863 0.113725 0.184314 0.219608 0.266667 0.294118 0.317647 0.341176 0.356863 0.376471 0.376471 0.403922 0.411765 0.411765 0.427451 0.439216 0.443137 0.443137 0.454902 0.45098 0.454902 0.454902 0.466667 0.470588 0.47451 0.470588 0.482353 0.490196 0.47451 0.490196 0.47451 0.486275 0.482353 0.494118 0.47451 0.490196 0.486275 0.47451 0.478431 0.486275 0.47451 0.478431 0.470588 0.458824 0.458824 0.466667 0.45098 0.443137 0.439216 0.443137 0.443137 0.427451 0.423529 0.415686 0.407843 0.411765 0.380392 0.403922 0.4 0.384314 0.388235 0.364706 0.356863 0.341176 0.337255 0.337255 0.32549 0.321569 0.305882 0.298039 0.290196 0.278431 0.266667 0.25098 0.254902 0.235294 0.219608 0.215686 0.203922 0.180392 0.164706 0.152941 0.211765 0.176471 0.14902 0.0705882 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.129412 0.223529 0.305882 0.403922 0.486275 0.572549 0.596078 0.517647 0.368627 0.239216 0.117647 0.00784314 0 0 0 0 0 0 0 0 0 0.0862745 0.168627 0.207843 0.243137 0.286275 0.305882 0.32549 0.341176 0.356863 0.372549 0.388235 0.4 0.411765 0.415686 0.419608 0.443137 0.435294 0.454902 0.443137 0.454902 0.447059 0.458824 0.466667 0.466667 0.470588 0.482353 0.470588 0.470588 0.466667 0.470588 0.482353 0.490196 0.478431 0.478431 0.466667 0.478431 0.47451 0.466667 0.47451 0.458824 0.458824 0.466667 0.458824 0.458824 0.454902 0.447059 0.443137 0.431373 0.435294 0.427451 0.427451 0.423529 0.407843 0.411765 0.4 0.396078 0.388235 0.380392 0.376471 0.356863 0.356863 0.345098 0.337255 0.333333 0.329412 0.317647 0.305882 0.301961 0.294118 0.294118 0.27451 0.258824 0.239216 0.239216 0.235294 0.211765 0.2 0.2 0.164706 0.156863 0.164706 0.215686 0.184314 0.137255 0.0509804 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00392157 0.0862745 0.196078 0.254902 0.341176 0.431373 0.513725 0.584314 0.611765 0.533333 0.380392 0.25098 0.145098 0.0196078 0 0 0 0 0 0 0 0 0 0 0.027451 0.12549 0.192157 0.219608 0.262745 0.298039 0.305882 0.329412 0.34902 0.368627 0.384314 0.392157 0.407843 0.419608 0.419608 0.431373 0.439216 0.435294 0.447059 0.447059 0.454902 0.462745 0.458824 0.458824 0.462745 0.470588 0.462745 0.466667 0.47451 0.466667 0.470588 0.47451 0.478431 0.466667 0.478431 0.462745 0.47451 0.466667 0.462745 0.462745 0.462745 0.458824 0.45098 0.443137 0.443137 0.447059 0.431373 0.443137 0.427451 0.427451 0.415686 0.411765 0.403922 0.403922 0.388235 0.388235 0.388235 0.368627 0.356863 0.356863 0.352941 0.337255 0.329412 0.329412 0.321569 0.305882 0.298039 0.298039 0.286275 0.270588 0.262745 0.258824 0.239216 0.227451 0.219608 0.203922 0.2 0.172549 0.164706 0.145098 0.156863 0.2 0.180392 0.12549 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.101961 0.180392 0.227451 0.290196 0.380392 0.454902 0.537255 0.596078 0.619608 0.545098 0.396078 0.25098 0.152941 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0.0980392 0.156863 0.2 0.243137 0.266667 0.286275 0.317647 0.333333 0.34902 0.356863 0.384314 0.388235 0.4 0.415686 0.427451 0.427451 0.419608 0.45098 0.447059 0.443137 0.45098 0.447059 0.45098 0.447059 0.458824 0.458824 0.466667 0.466667 0.458824 0.458824 0.470588 0.458824 0.458824 0.454902 0.454902 0.454902 0.447059 0.462745 0.462745 0.443137 0.447059 0.443137 0.439216 0.443137 0.419608 0.411765 0.419608 0.427451 0.419608 0.415686 0.403922 0.388235 0.396078 0.388235 0.388235 0.368627 0.364706 0.368627 0.34902 0.345098 0.333333 0.32549 0.313725 0.317647 0.294118 0.290196 0.286275 0.278431 0.254902 0.25098 0.243137 0.235294 0.219608 0.215686 0.188235 0.180392 0.168627 0.14902 0.133333 0.180392 0.196078 0.180392 0.0784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.141176 0.203922 0.227451 0.290196 0.356863 0.427451 0.501961 0.564706 0.635294 0.619608 0.52549 0.380392 0.247059 0.133333 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0509804 0.133333 0.180392 0.223529 0.25098 0.278431 0.301961 0.329412 0.345098 0.360784 0.364706 0.384314 0.396078 0.411765 0.411765 0.419608 0.423529 0.439216 0.439216 0.439216 0.443137 0.443137 0.443137 0.443137 0.458824 0.45098 0.462745 0.447059 0.45098 0.462745 0.454902 0.462745 0.462745 0.462745 0.454902 0.45098 0.45098 0.443137 0.443137 0.447059 0.45098 0.443137 0.443137 0.431373 0.431373 0.431373 0.415686 0.415686 0.407843 0.4 0.376471 0.396078 0.380392 0.376471 0.368627 0.360784 0.352941 0.352941 0.345098 0.329412 0.329412 0.317647 0.309804 0.309804 0.290196 0.286275 0.278431 0.258824 0.25098 0.25098 0.231373 0.219608 0.219608 0.2 0.188235 0.172549 0.160784 0.141176 0.133333 0.2 0.196078 0.160784 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0313725 0.109804 0.184314 0.219608 0.25098 0.294118 0.356863 0.407843 0.470588 0.545098 0.596078 0.643137 0.6 0.482353 0.345098 0.223529 0.117647 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.101961 0.160784 0.203922 0.231373 0.258824 0.294118 0.313725 0.329412 0.345098 0.360784 0.364706 0.372549 0.392157 0.407843 0.411765 0.411765 0.415686 0.431373 0.435294 0.439216 0.439216 0.439216 0.443137 0.443137 0.45098 0.443137 0.447059 0.447059 0.439216 0.458824 0.458824 0.462745 0.447059 0.443137 0.443137 0.447059 0.443137 0.443137 0.435294 0.443137 0.427451 0.435294 0.427451 0.419608 0.415686 0.411765 0.407843 0.403922 0.392157 0.396078 0.376471 0.388235 0.372549 0.364706 0.360784 0.345098 0.352941 0.337255 0.321569 0.313725 0.305882 0.301961 0.301961 0.286275 0.27451 0.266667 0.258824 0.239216 0.231373 0.219608 0.215686 0.2 0.192157 0.180392 0.164706 0.152941 0.137255 0.129412 0.203922 0.192157 0.133333 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.133333 0.184314 0.219608 0.247059 0.282353 0.32549 0.368627 0.411765 0.478431 0.52549 0.576471 0.854902 0.670588 0.54902 0.443137 0.309804 0.188235 0.0980392 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0627451 0.137255 0.176471 0.223529 0.25098 0.270588 0.294118 0.321569 0.337255 0.345098 0.364706 0.368627 0.380392 0.396078 0.392157 0.396078 0.415686 0.411765 0.423529 0.411765 0.431373 0.435294 0.439216 0.435294 0.447059 0.439216 0.447059 0.435294 0.443137 0.439216 0.443137 0.439216 0.439216 0.439216 0.435294 0.435294 0.439216 0.435294 0.423529 0.435294 0.427451 0.415686 0.423529 0.407843 0.396078 0.403922 0.396078 0.4 0.388235 0.376471 0.376471 0.356863 0.356863 0.352941 0.356863 0.337255 0.337255 0.329412 0.313725 0.313725 0.286275 0.294118 0.286275 0.266667 0.262745 0.247059 0.247059 0.231373 0.223529 0.219608 0.2 0.188235 0.188235 0.168627 0.152941 0.145098 0.121569 0.133333 0.211765 0.176471 0.054902 0 0 0 0 0 0 0 0.0666667 0.14902 0.192157 0.215686 0.239216 0.262745 0.290196 0.329412 0.356863 0.403922 0.443137 0.482353 0.541176 0.588235 0.807843 0.647059 0.54902 0.454902 0.341176 0.223529 0.133333 0.0352941 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.105882 0.164706 0.196078 0.219608 0.266667 0.282353 0.305882 0.317647 0.337255 0.345098 0.364706 0.364706 0.384314 0.380392 0.4 0.407843 0.407843 0.415686 0.403922 0.423529 0.427451 0.431373 0.427451 0.431373 0.439216 0.439216 0.427451 0.431373 0.435294 0.443137 0.443137 0.423529 0.435294 0.427451 0.427451 0.427451 0.427451 0.423529 0.427451 0.419608 0.415686 0.403922 0.403922 0.403922 0.392157 0.392157 0.380392 0.376471 0.376471 0.360784 0.360784 0.356863 0.345098 0.333333 0.333333 0.32549 0.321569 0.309804 0.294118 0.294118 0.282353 0.27451 0.262745 0.254902 0.25098 0.235294 0.227451 0.219608 0.215686 0.203922 0.188235 0.180392 0.156863 0.137255 0.12549 0.117647 0.129412 0.219608 0.152941 0.0117647 0 0.00392157 0.0117647 0.0666667 0.129412 0.172549 0.2 0.235294 0.258824 0.290196 0.309804 0.345098 0.364706 0.396078 0.427451 0.466667 0.517647 0.568627 0.611765 0.654902 0.619608 0.537255 0.45098 0.341176 0.235294 0.145098 0.0705882 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.054902 0.133333 0.172549 0.215686 0.239216 0.270588 0.282353 0.305882 0.321569 0.333333 0.345098 0.356863 0.368627 0.376471 0.388235 0.396078 0.392157 0.4 0.4 0.411765 0.419608 0.415686 0.423529 0.427451 0.427451 0.423529 0.431373 0.419608 0.427451 0.431373 0.431373 0.423529 0.427451 0.415686 0.419608 0.419608 0.411765 0.407843 0.403922 0.419608 0.4 0.396078 0.4 0.392157 0.384314 0.372549 0.372549 0.360784 0.372549 0.34902 0.352941 0.341176 0.329412 0.329412 0.321569 0.313725 0.313725 0.298039 0.298039 0.278431 0.278431 0.266667 0.254902 0.25098 0.235294 0.235294 0.219608 0.215686 0.2 0.192157 0.176471 0.164706 0.156863 0.133333 0.117647 0.101961 0.141176 0.203922 0.129412 0.0784314 0.0705882 0.0823529 0.109804 0.168627 0.219608 0.262745 0.298039 0.329412 0.364706 0.396078 0.423529 0.447059 0.486275 0.517647 0.54902 0.603922 0.619608 0.603922 0.552941 0.470588 0.388235 0.298039 0.219608 0.137255 0.0705882 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.101961 0.160784 0.203922 0.227451 0.254902 0.282353 0.301961 0.309804 0.329412 0.337255 0.34902 0.372549 0.364706 0.384314 0.376471 0.396078 0.403922 0.396078 0.407843 0.415686 0.407843 0.403922 0.415686 0.419608 0.415686 0.419608 0.423529 0.419608 0.427451 0.419608 0.427451 0.419608 0.4 0.411765 0.419608 0.407843 0.407843 0.411765 0.396078 0.403922 0.396078 0.384314 0.384314 0.372549 0.376471 0.360784 0.360784 0.356863 0.352941 0.337255 0.337255 0.329412 0.333333 0.317647 0.321569 0.313725 0.294118 0.282353 0.27451 0.27451 0.270588 0.239216 0.25098 0.231373 0.219608 0.215686 0.2 0.192157 0.180392 0.168627 0.152941 0.141176 0.117647 0.129412 0.101961 0.160784 0.196078 0.14902 0.129412 0.129412 0.164706 0.227451 0.290196 0.341176 0.364706 0.415686 0.45098 0.478431 0.501961 0.533333 0.552941 0.607843 0.611765 0.592157 0.533333 0.478431 0.411765 0.313725 0.235294 0.168627 0.105882 0.054902 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0509804 0.121569 0.168627 0.207843 0.235294 0.254902 0.27451 0.294118 0.317647 0.321569 0.341176 0.356863 0.356863 0.372549 0.372549 0.384314 0.388235 0.396078 0.392157 0.415686 0.392157 0.403922 0.411765 0.415686 0.427451 0.415686 0.415686 0.407843 0.419608 0.415686 0.415686 0.407843 0.407843 0.403922 0.4 0.396078 0.407843 0.388235 0.392157 0.376471 0.388235 0.372549 0.388235 0.364706 0.364706 0.372549 0.352941 0.352941 0.352941 0.337255 0.329412 0.321569 0.313725 0.313725 0.317647 0.298039 0.286275 0.278431 0.27451 0.258824 0.25098 0.239216 0.231373 0.227451 0.207843 0.203922 0.196078 0.176471 0.172549 0.152941 0.141176 0.129412 0.109804 0.101961 0.0901961 0.180392 0.176471 0.2 0.215686 0.235294 0.301961 0.368627 0.419608 0.462745 0.490196 0.52549 0.556863 0.572549 0.603922 0.584314 0.552941 0.517647 0.454902 0.396078 0.317647 0.243137 0.180392 0.121569 0.0745098 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.105882 0.152941 0.184314 0.219608 0.247059 0.262745 0.282353 0.298039 0.321569 0.329412 0.337255 0.345098 0.34902 0.368627 0.368627 0.372549 0.380392 0.388235 0.392157 0.396078 0.392157 0.392157 0.407843 0.407843 0.407843 0.407843 0.4 0.407843 0.407843 0.403922 0.4 0.407843 0.4 0.403922 0.403922 0.396078 0.407843 0.384314 0.388235 0.388235 0.372549 0.372549 0.360784 0.360784 0.352941 0.34902 0.345098 0.329412 0.32549 0.321569 0.317647 0.313725 0.301961 0.294118 0.282353 0.282353 0.278431 0.258824 0.25098 0.25098 0.239216 0.223529 0.211765 0.203922 0.2 0.188235 0.176471 0.156863 0.14902 0.133333 0.121569 0.109804 0.101961 0.0901961 0.168627 0.180392 0.247059 0.301961 0.372549 0.435294 0.490196 0.541176 0.556863 0.545098 0.54902 0.541176 0.494118 0.45098 0.392157 0.345098 0.290196 0.219608 0.160784 0.117647 0.0745098 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.054902 0.121569 0.164706 0.211765 0.227451 0.254902 0.262745 0.294118 0.290196 0.317647 0.337255 0.333333 0.345098 0.34902 0.34902 0.368627 0.364706 0.364706 0.388235 0.384314 0.396078 0.384314 0.392157 0.403922 0.396078 0.407843 0.4 0.4 0.415686 0.403922 0.396078 0.403922 0.380392 0.403922 0.384314 0.392157 0.384314 0.380392 0.372549 0.364706 0.364706 0.360784 0.360784 0.341176 0.356863 0.345098 0.341176 0.321569 0.32549 0.321569 0.309804 0.305882 0.290196 0.290196 0.27451 0.270588 0.270588 0.247059 0.239216 0.227451 0.219608 0.223529 0.207843 0.192157 0.188235 0.180392 0.176471 0.152941 0.137255 0.129412 0.113725 0.105882 0.0941176 0.0980392 0.145098 0.203922 0.34902 0.411765 0.454902 0.482353 0.482353 0.47451 0.458824 0.415686 0.368627 0.329412 0.278431 0.227451 0.184314 0.141176 0.105882 0.0666667 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0901961 0.141176 0.180392 0.219608 0.247059 0.247059 0.27451 0.286275 0.298039 0.317647 0.32549 0.329412 0.352941 0.345098 0.360784 0.356863 0.376471 0.376471 0.380392 0.384314 0.380392 0.388235 0.388235 0.392157 0.384314 0.388235 0.392157 0.388235 0.392157 0.384314 0.388235 0.384314 0.380392 0.376471 0.384314 0.380392 0.360784 0.376471 0.376471 0.360784 0.356863 0.345098 0.341176 0.337255 0.329412 0.32549 0.321569 0.317647 0.317647 0.301961 0.290196 0.290196 0.282353 0.266667 0.254902 0.258824 0.243137 0.239216 0.231373 0.227451 0.203922 0.203922 0.184314 0.180392 0.164706 0.156863 0.137255 0.129412 0.121569 0.105882 0.0941176 0.0823529 0.0941176 0.129412 0.207843 0.278431 0.329412 0.345098 0.333333 0.32549 0.27451 0.243137 0.207843 0.168627 0.117647 0.0980392 0.0745098 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.117647 0.160784 0.2 0.227451 0.235294 0.27451 0.278431 0.294118 0.317647 0.321569 0.329412 0.329412 0.337255 0.34902 0.352941 0.352941 0.364706 0.372549 0.372549 0.376471 0.384314 0.384314 0.380392 0.380392 0.384314 0.380392 0.376471 0.372549 0.384314 0.380392 0.372549 0.368627 0.372549 0.360784 0.364706 0.368627 0.352941 0.352941 0.34902 0.345098 0.329412 0.337255 0.329412 0.321569 0.309804 0.313725 0.305882 0.298039 0.294118 0.282353 0.270588 0.262745 0.254902 0.254902 0.243137 0.231373 0.223529 0.219608 0.215686 0.203922 0.192157 0.180392 0.172549 0.160784 0.141176 0.137255 0.117647 0.113725 0.0941176 0.0745098 0.0627451 0.0823529 0.129412 0.168627 0.192157 0.196078 0.176471 0.160784 0.133333 0.0980392 0.0823529 0.0470588 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.121569 0.172549 0.2 0.227451 0.243137 0.270588 0.282353 0.286275 0.305882 0.317647 0.337255 0.329412 0.341176 0.341176 0.352941 0.34902 0.356863 0.368627 0.341176 0.360784 0.372549 0.376471 0.376471 0.380392 0.364706 0.368627 0.372549 0.368627 0.372549 0.364706 0.356863 0.368627 0.364706 0.376471 0.360784 0.34902 0.345098 0.337255 0.329412 0.345098 0.329412 0.329412 0.321569 0.313725 0.309804 0.298039 0.290196 0.286275 0.278431 0.27451 0.254902 0.266667 0.247059 0.235294 0.239216 0.219608 0.219608 0.196078 0.192157 0.184314 0.168627 0.160784 0.14902 0.137255 0.12549 0.121569 0.109804 0.101961 0.0745098 0.0392157 0.0784314 0.101961 0.101961 0.0823529 0.0627451 0.054902 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.105882 0.152941 0.188235 0.215686 0.235294 0.254902 0.27451 0.282353 0.294118 0.305882 0.317647 0.329412 0.329412 0.305882 0.337255 0.34902 0.345098 0.356863 0.364706 0.364706 0.360784 0.360784 0.368627 0.364706 0.360784 0.364706 0.364706 0.356863 0.360784 0.360784 0.360784 0.360784 0.356863 0.356863 0.352941 0.341176 0.341176 0.337255 0.337255 0.317647 0.321569 0.313725 0.317647 0.305882 0.294118 0.294118 0.286275 0.282353 0.278431 0.258824 0.258824 0.247059 0.235294 0.223529 0.219608 0.211765 0.203922 0.196078 0.192157 0.172549 0.14902 0.152941 0.133333 0.12549 0.109804 0.105882 0.0901961 0.0745098 0.0352941 0.027451 0.0392157 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0588235 0.121569 0.152941 0.196078 0.215686 0.235294 0.254902 0.270588 0.286275 0.294118 0.313725 0.321569 0.321569 0.329412 0.337255 0.341176 0.341176 0.352941 0.352941 0.345098 0.34902 0.360784 0.360784 0.352941 0.356863 0.356863 0.364706 0.360784 0.364706 0.352941 0.356863 0.34902 0.345098 0.345098 0.337255 0.341176 0.337255 0.329412 0.32549 0.321569 0.317647 0.309804 0.298039 0.294118 0.294118 0.278431 0.270588 0.258824 0.266667 0.254902 0.239216 0.231373 0.227451 0.223529 0.215686 0.207843 0.2 0.184314 0.176471 0.168627 0.14902 0.145098 0.129412 0.117647 0.109804 0.0980392 0.0862745 0.0509804 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0862745 0.129412 0.168627 0.196078 0.219608 0.243137 0.262745 0.27451 0.278431 0.294118 0.309804 0.309804 0.321569 0.32549 0.333333 0.333333 0.352941 0.341176 0.341176 0.352941 0.34902 0.345098 0.352941 0.34902 0.356863 0.352941 0.352941 0.352941 0.345098 0.34902 0.345098 0.345098 0.341176 0.32549 0.329412 0.337255 0.317647 0.32549 0.321569 0.309804 0.301961 0.290196 0.294118 0.278431 0.27451 0.270588 0.266667 0.25098 0.243137 0.235294 0.227451 0.223529 0.223529 0.207843 0.196078 0.192157 0.172549 0.164706 0.152941 0.145098 0.141176 0.121569 0.113725 0.101961 0.0901961 0.0588235 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.0941176 0.145098 0.176471 0.203922 0.219608 0.247059 0.258824 0.262745 0.286275 0.294118 0.301961 0.305882 0.321569 0.329412 0.329412 0.329412 0.329412 0.337255 0.337255 0.345098 0.34902 0.341176 0.34902 0.34902 0.34902 0.341176 0.345098 0.333333 0.337255 0.341176 0.333333 0.329412 0.32549 0.333333 0.317647 0.313725 0.305882 0.301961 0.309804 0.286275 0.286275 0.286275 0.27451 0.262745 0.258824 0.25098 0.25098 0.231373 0.231373 0.219608 0.215686 0.203922 0.192157 0.188235 0.168627 0.168627 0.14902 0.141176 0.12549 0.12549 0.113725 0.109804 0.0901961 0.0627451 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.0941176 0.141176 0.172549 0.203922 0.227451 0.231373 0.262745 0.270588 0.282353 0.290196 0.294118 0.305882 0.309804 0.32549 0.321569 0.32549 0.333333 0.337255 0.329412 0.341176 0.341176 0.337255 0.337255 0.341176 0.341176 0.337255 0.329412 0.337255 0.329412 0.329412 0.329412 0.317647 0.321569 0.313725 0.305882 0.301961 0.301961 0.290196 0.282353 0.282353 0.270588 0.262745 0.258824 0.254902 0.247059 0.235294 0.235294 0.223529 0.219608 0.203922 0.2 0.192157 0.172549 0.168627 0.160784 0.152941 0.137255 0.12549 0.113725 0.109804 0.0941176 0.0666667 0.0352941 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0352941 0.0901961 0.137255 0.164706 0.2 0.215686 0.243137 0.25098 0.270588 0.27451 0.286275 0.298039 0.305882 0.313725 0.317647 0.313725 0.321569 0.329412 0.32549 0.329412 0.333333 0.329412 0.329412 0.329412 0.329412 0.329412 0.313725 0.317647 0.321569 0.32549 0.309804 0.313725 0.309804 0.309804 0.290196 0.290196 0.301961 0.27451 0.286275 0.266667 0.266667 0.262745 0.258824 0.247059 0.243137 0.243137 0.223529 0.215686 0.203922 0.192157 0.184314 0.184314 0.164706 0.160784 0.14902 0.137255 0.129412 0.117647 0.105882 0.0901961 0.0705882 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0588235 0.0901961 0.121569 0.164706 0.188235 0.215686 0.231373 0.254902 0.266667 0.278431 0.282353 0.294118 0.286275 0.301961 0.309804 0.309804 0.321569 0.321569 0.313725 0.32549 0.321569 0.317647 0.32549 0.321569 0.317647 0.321569 0.317647 0.313725 0.305882 0.32549 0.301961 0.298039 0.294118 0.294118 0.294118 0.270588 0.282353 0.266667 0.270588 0.247059 0.239216 0.231373 0.235294 0.227451 0.223529 0.211765 0.211765 0.192157 0.184314 0.188235 0.160784 0.160784 0.156863 0.137255 0.117647 0.12549 0.0901961 0.0862745 0.0705882 0.0313725 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.0941176 0.113725 0.141176 0.172549 0.2 0.215686 0.231373 0.243137 0.266667 0.270588 0.278431 0.294118 0.286275 0.305882 0.298039 0.301961 0.309804 0.301961 0.313725 0.321569 0.309804 0.313725 0.301961 0.305882 0.309804 0.305882 0.294118 0.301961 0.294118 0.298039 0.286275 0.282353 0.278431 0.270588 0.262745 0.258824 0.25098 0.243137 0.235294 0.231373 0.227451 0.219608 0.211765 0.203922 0.192157 0.180392 0.176471 0.168627 0.156863 0.141176 0.133333 0.121569 0.101961 0.101961 0.0784314 0.0627451 0.0392157 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.0705882 0.113725 0.121569 0.129412 0.160784 0.180392 0.211765 0.207843 0.227451 0.243137 0.25098 0.27451 0.278431 0.282353 0.294118 0.294118 0.301961 0.301961 0.298039 0.309804 0.301961 0.298039 0.305882 0.301961 0.301961 0.298039 0.298039 0.298039 0.290196 0.286275 0.278431 0.270588 0.266667 0.258824 0.25098 0.25098 0.239216 0.239216 0.231373 0.219608 0.219608 0.203922 0.196078 0.184314 0.188235 0.172549 0.156863 0.14902 0.145098 0.129412 0.109804 0.0980392 0.0862745 0.0745098 0.0705882 0.0509804 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0784314 0.0980392 0.141176 0.156863 0.152941 0.145098 0.168627 0.188235 0.207843 0.219608 0.231373 0.239216 0.258824 0.262745 0.266667 0.266667 0.278431 0.290196 0.286275 0.282353 0.27451 0.282353 0.282353 0.290196 0.278431 0.282353 0.27451 0.27451 0.262745 0.266667 0.262745 0.258824 0.239216 0.235294 0.231373 0.223529 0.219608 0.223529 0.207843 0.188235 0.188235 0.172549 0.168627 0.152941 0.14902 0.12549 0.117647 0.117647 0.0980392 0.0862745 0.0901961 0.0941176 0.0784314 0.0431373 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0509804 0.105882 0.109804 0.141176 0.188235 0.207843 0.188235 0.176471 0.172549 0.192157 0.196078 0.207843 0.223529 0.223529 0.231373 0.235294 0.25098 0.254902 0.254902 0.254902 0.25098 0.258824 0.258824 0.243137 0.25098 0.247059 0.243137 0.247059 0.235294 0.231373 0.227451 0.219608 0.211765 0.211765 0.192157 0.188235 0.184314 0.176471 0.164706 0.160784 0.14902 0.137255 0.12549 0.113725 0.109804 0.113725 0.113725 0.113725 0.109804 0.0901961 0.0666667 0.0509804 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.113725 0.14902 0.145098 0.168627 0.211765 0.219608 0.219608 0.215686 0.211765 0.192157 0.180392 0.184314 0.2 0.2 0.211765 0.211765 0.215686 0.215686 0.215686 0.219608 0.215686 0.219608 0.211765 0.203922 0.207843 0.207843 0.188235 0.192157 0.184314 0.188235 0.176471 0.172549 0.152941 0.156863 0.145098 0.137255 0.129412 0.12549 0.137255 0.141176 0.145098 0.129412 0.113725 0.0980392 0.0901961 0.0784314 0.0627451 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.0588235 0.113725 0.156863 0.168627 0.172549 0.156863 0.192157 0.203922 0.219608 0.223529 0.235294 0.247059 0.235294 0.235294 0.227451 0.219608 0.211765 0.2 0.180392 0.192157 0.176471 0.184314 0.168627 0.180392 0.172549 0.176471 0.172549 0.168627 0.180392 0.176471 0.160784 0.172549 0.188235 0.188235 0.176471 0.160784 0.14902 0.133333 0.121569 0.12549 0.129412 0.109804 0.109804 0.0784314 0.0352941 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0431373 0.0470588 0.0509804 0.0901961 0.121569 0.160784 0.184314 0.196078 0.2 0.188235 0.192157 0.196078 0.192157 0.196078 0.207843 0.219608 0.227451 0.223529 0.235294 0.235294 0.231373 0.231373 0.219608 0.219608 0.215686 0.215686 0.207843 0.196078 0.192157 0.164706 0.164706 0.168627 0.152941 0.141176 0.137255 0.12549 0.117647 0.129412 0.12549 0.164706 0.164706 0.145098 0.0980392 0.0509804 0.0352941 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.137255 0.141176 0.0784314 0.0784314 0.0980392 0.109804 0.129412 0.152941 0.180392 0.192157 0.207843 0.207843 0.207843 0.203922 0.215686 0.2 0.2 0.192157 0.192157 0.188235 0.180392 0.180392 0.180392 0.172549 0.184314 0.168627 0.164706 0.168627 0.156863 0.160784 0.145098 0.14902 0.129412 0.105882 0.109804 0.137255 0.164706 0.172549 0.101961 0.0901961 0.0901961 0.0509804 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.145098 0.121569 0.0588235 0.0470588 0.0705882 0.0784314 0.0823529 0.0941176 0.101961 0.105882 0.109804 0.117647 0.133333 0.133333 0.152941 0.14902 0.156863 0.14902 0.156863 0.137255 0.137255 0.141176 0.133333 0.121569 0.117647 0.101961 0.0941176 0.0784314 0.0823529 0.0745098 0.0901961 0.105882 0.12549 0.12549 0.0901961 0.12549 0.0352941 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0117647 0.0745098 0.0745098 0.0705882 0.0666667 0.0627451 0.0627451 0.0705882 0.0666667 0.0745098 0.0784314 0.0784314 0.0784314 0.0862745 0.0901961 0.0862745 0.0862745 0.0862745 0.0784314 0.0745098 0.0705882 0.0588235 0.0588235 0.0588235 0.0823529 0.105882 0.109804 0.113725 0.0980392 0.0784314 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.0313725 0.0352941 0.0627451 0.0901961 0.109804 0.109804 0.105882 0.0980392 0.109804 0.0980392 0.0941176 0.0941176 0.101961 0.0901961 0.0941176 0.0823529 0.0705882 0.0941176 0.105882 0.0431373 0.027451 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.027451 0.054902 0.0862745 0.133333 0.172549 0.2 0.239216 0.235294 0.254902 0.239216 0.235294 0.231373 0.196078 0.160784 0.121569 0.0823529 0.0509804 0.0156863 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0117647 0.0627451 0.113725 0.192157 0.305882 0.415686 0.494118 0.54902 0.588235 0.6 0.611765 0.631373 0.643137 0.643137 0.639216 0.647059 0.654902 0.662745 0.654902 0.658824 0.678431 0.717647 0.776471 0.752941 0.745098 0.72549 0.701961 0.678431 0.658824 0.658824 0.658824 0.647059 0.619608 0.603922 0.564706 0.494118 0.376471 0.258824 0.168627 0.109804 0.0352941 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0705882 0.203922 0.321569 0.423529 0.521569 0.572549 0.592157 0.603922 0.603922 0.619608 0.619608 0.611765 0.611765 0.596078 0.607843 0.596078 0.588235 0.584314 0.580392 0.560784 0.564706 0.576471 0.564706 0.572549 0.556863 0.572549 0.698039 0.803922 0.831373 0.847059 0.796078 0.74902 0.65098 0.647059 0.643137 0.643137 0.647059 0.658824 0.666667 0.662745 0.654902 0.654902 0.643137 0.65098 0.635294 0.615686 0.576471 0.501961 0.388235 0.270588 0.113725 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.156863 0.360784 0.458824 0.517647 0.556863 0.580392 0.572549 0.584314 0.584314 0.568627 0.552941 0.552941 0.517647 0.498039 0.466667 0.45098 0.427451 0.392157 0.392157 0.372549 0.360784 0.368627 0.360784 0.345098 0.341176 0.34902 0.345098 0.337255 0.337255 0.333333 0.380392 0.47451 0.439216 0.356863 0.372549 0.372549 0.372549 0.388235 0.396078 0.423529 0.435294 0.454902 0.482353 0.513725 0.572549 0.639216 0.764706 0.929412 0.972549 0.807843 0.682353 0.670588 0.666667 0.647059 0.627451 0.588235 0.529412 0.415686 0.196078 0.0392157 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.0784314 0.309804 0.47451 0.505882 0.541176 0.552941 0.552941 0.537255 0.52549 0.501961 0.490196 0.458824 0.415686 0.392157 0.360784 0.333333 0.298039 0.286275 0.290196 0.290196 0.27451 0.266667 0.278431 0.270588 0.301961 0.305882 0.305882 0.254902 0.278431 0.278431 0.262745 0.298039 0.341176 0.647059 0.596078 0.34902 0.32549 0.317647 0.298039 0.286275 0.298039 0.294118 0.290196 0.298039 0.305882 0.298039 0.313725 0.305882 0.305882 0.321569 0.337255 0.368627 0.376471 0.403922 0.454902 0.494118 0.545098 0.576471 0.588235 0.615686 0.635294 0.639216 0.615686 0.603922 0.541176 0.376471 0.141176 0.027451 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.145098 0.341176 0.470588 0.501961 0.537255 0.52549 0.513725 0.490196 0.47451 0.427451 0.384314 0.34902 0.313725 0.290196 0.278431 0.262745 0.254902 0.254902 0.231373 0.243137 0.239216 0.258824 0.247059 0.258824 0.25098 0.247059 0.247059 0.270588 0.294118 0.27451 0.235294 0.447059 0.341176 0.254902 0.290196 0.309804 0.980392 1 0.423529 0.352941 0.356863 0.294118 0.266667 0.278431 0.262745 0.266667 0.270588 0.262745 0.266667 0.278431 0.27451 0.286275 0.294118 0.294118 0.309804 0.305882 0.305882 0.321569 0.321569 0.337255 0.360784 0.396078 0.435294 0.482353 0.541176 0.568627 0.592157 0.603922 0.603922 0.580392 0.552941 0.4 0.192157 0.0156863 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.298039 0.447059 0.470588 0.478431 0.498039 0.482353 0.454902 0.411765 0.360784 0.337255 0.282353 0.258824 0.25098 0.231373 0.239216 0.227451 0.235294 0.239216 0.243137 0.239216 0.223529 0.223529 0.227451 0.239216 0.243137 0.239216 0.231373 0.235294 0.235294 0.25098 0.282353 0.278431 0.247059 0.290196 0.258824 0.243137 0.262745 0.305882 0.462745 0.454902 0.298039 0.270588 0.278431 0.258824 0.25098 0.262745 0.247059 0.258824 0.247059 0.247059 0.243137 0.27451 0.266667 0.278431 0.270588 0.282353 0.294118 0.298039 0.298039 0.290196 0.278431 0.313725 0.298039 0.298039 0.309804 0.321569 0.341176 0.384314 0.4 0.466667 0.529412 0.572549 0.588235 0.584314 0.560784 0.509804 0.356863 0.0705882 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0352941 0.329412 0.458824 0.45098 0.447059 0.462745 0.419608 0.396078 0.341176 0.294118 0.243137 0.215686 0.207843 0.211765 0.203922 0.215686 0.211765 0.211765 0.207843 0.219608 0.215686 0.215686 0.219608 0.215686 0.203922 0.2 0.211765 0.239216 0.231373 0.243137 0.223529 0.211765 0.227451 0.27451 0.262745 0.235294 0.231373 0.235294 0.239216 0.243137 0.266667 0.305882 0.278431 0.286275 0.247059 0.254902 0.254902 0.247059 0.254902 0.243137 0.247059 0.243137 0.247059 0.231373 0.258824 0.25098 0.254902 0.25098 0.247059 0.27451 0.262745 0.270588 0.262745 0.278431 0.286275 0.286275 0.266667 0.278431 0.27451 0.262745 0.27451 0.282353 0.305882 0.32549 0.380392 0.45098 0.509804 0.54902 0.568627 0.552941 0.529412 0.415686 0.137255 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.266667 0.431373 0.415686 0.411765 0.396078 0.392157 0.345098 0.278431 0.243137 0.215686 0.203922 0.2 0.188235 0.192157 0.196078 0.192157 0.2 0.188235 0.196078 0.203922 0.207843 0.215686 0.211765 0.211765 0.207843 0.192157 0.203922 0.219608 0.231373 0.235294 0.219608 0.215686 0.215686 0.223529 0.25098 0.266667 0.223529 0.223529 0.227451 0.227451 0.247059 0.270588 0.301961 0.294118 0.258824 0.239216 0.25098 0.25098 0.231373 0.243137 0.239216 0.231373 0.227451 0.239216 0.239216 0.254902 0.25098 0.247059 0.227451 0.243137 0.270588 0.270588 0.266667 0.262745 0.247059 0.266667 0.27451 0.243137 0.247059 0.25098 0.25098 0.247059 0.247059 0.254902 0.266667 0.270588 0.282353 0.317647 0.392157 0.458824 0.517647 0.533333 0.537255 0.517647 0.407843 0.152941 0.0117647 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.137255 0.388235 0.407843 0.384314 0.364706 0.321569 0.290196 0.243137 0.207843 0.196078 0.184314 0.172549 0.184314 0.180392 0.168627 0.188235 0.196078 0.192157 0.184314 0.188235 0.196078 0.192157 0.196078 0.203922 0.203922 0.207843 0.196078 0.196078 0.207843 0.196078 0.215686 0.235294 0.215686 0.223529 0.203922 0.2 0.247059 0.254902 0.219608 0.219608 0.227451 0.215686 0.231373 0.258824 0.278431 0.266667 0.254902 0.25098 0.254902 0.235294 0.247059 0.235294 0.247059 0.227451 0.219608 0.227451 0.235294 0.243137 0.243137 0.227451 0.239216 0.239216 0.258824 0.270588 0.266667 0.247059 0.227451 0.258824 0.254902 0.235294 0.258824 0.247059 0.223529 0.235294 0.231373 0.239216 0.227451 0.239216 0.25098 0.239216 0.262745 0.282353 0.352941 0.443137 0.490196 0.513725 0.509804 0.478431 0.32549 0.0392157 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.164706 0.396078 0.380392 0.34902 0.321569 0.270588 0.215686 0.2 0.172549 0.160784 0.145098 0.156863 0.152941 0.141176 0.172549 0.176471 0.172549 0.172549 0.172549 0.184314 0.184314 0.192157 0.2 0.188235 0.188235 0.203922 0.2 0.203922 0.184314 0.196078 0.2 0.223529 0.215686 0.215686 0.211765 0.2 0.203922 0.25098 0.247059 0.207843 0.219608 0.215686 0.211765 0.227451 0.243137 0.254902 0.25098 0.25098 0.239216 0.235294 0.243137 0.243137 0.231373 0.239216 0.219608 0.219608 0.235294 0.231373 0.227451 0.223529 0.235294 0.239216 0.235294 0.254902 0.254902 0.254902 0.239216 0.243137 0.235294 0.243137 0.239216 0.235294 0.227451 0.231373 0.243137 0.258824 0.270588 0.286275 0.25098 0.243137 0.262745 0.25098 0.266667 0.254902 0.278431 0.321569 0.427451 0.470588 0.490196 0.498039 0.435294 0.156863 0.0156863 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.231373 0.384314 0.341176 0.298039 0.282353 0.231373 0.180392 0.156863 0.141176 0.145098 0.141176 0.145098 0.14902 0.145098 0.156863 0.145098 0.168627 0.156863 0.156863 0.156863 0.168627 0.184314 0.2 0.215686 0.192157 0.192157 0.180392 0.184314 0.188235 0.188235 0.188235 0.180392 0.188235 0.196078 0.192157 0.192157 0.196078 0.207843 0.2 0.207843 0.203922 0.207843 0.2 0.219608 0.231373 0.223529 0.211765 0.223529 0.215686 0.227451 0.219608 0.215686 0.215686 0.203922 0.215686 0.215686 0.215686 0.215686 0.211765 0.223529 0.223529 0.219608 0.215686 0.219608 0.215686 0.219608 0.223529 0.215686 0.219608 0.227451 0.219608 0.219608 0.223529 0.223529 0.223529 0.219608 0.231373 0.215686 0.219608 0.239216 0.227451 0.215686 0.235294 0.231373 0.231373 0.243137 0.254902 0.290196 0.376471 0.435294 0.462745 0.470588 0.423529 0.152941 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.117647 0.380392 0.337255 0.27451 0.258824 0.2 0.145098 0.141176 0.137255 0.12549 0.129412 0.129412 0.137255 0.133333 0.133333 0.145098 0.145098 0.152941 0.145098 0.152941 0.160784 0.172549 0.164706 0.152941 0.164706 0.164706 0.168627 0.164706 0.172549 0.172549 0.184314 0.180392 0.188235 0.192157 0.192157 0.176471 0.2 0.203922 0.2 0.196078 0.192157 0.207843 0.207843 0.196078 0.2 0.2 0.203922 0.215686 0.211765 0.211765 0.196078 0.223529 0.211765 0.211765 0.223529 0.223529 0.219608 0.227451 0.215686 0.215686 0.211765 0.227451 0.219608 0.219608 0.219608 0.219608 0.211765 0.215686 0.223529 0.219608 0.223529 0.211765 0.215686 0.211765 0.203922 0.231373 0.207843 0.207843 0.219608 0.211765 0.215686 0.211765 0.203922 0.211765 0.196078 0.211765 0.215686 0.223529 0.227451 0.243137 0.333333 0.396078 0.431373 0.447059 0.4 0.129412 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.352941 0.345098 0.270588 0.25098 0.188235 0.133333 0.129412 0.121569 0.117647 0.12549 0.121569 0.121569 0.129412 0.141176 0.133333 0.137255 0.145098 0.145098 0.156863 0.152941 0.160784 0.164706 0.14902 0.160784 0.156863 0.176471 0.156863 0.180392 0.176471 0.164706 0.168627 0.180392 0.184314 0.180392 0.188235 0.180392 0.180392 0.192157 0.192157 0.203922 0.2 0.2 0.196078 0.196078 0.211765 0.196078 0.207843 0.203922 0.2 0.215686 0.207843 0.211765 0.211765 0.203922 0.203922 0.215686 0.196078 0.219608 0.211765 0.203922 0.219608 0.211765 0.211765 0.227451 0.203922 0.207843 0.219608 0.219608 0.215686 0.203922 0.215686 0.207843 0.203922 0.207843 0.2 0.223529 0.196078 0.207843 0.207843 0.211765 0.223529 0.196078 0.207843 0.211765 0.196078 0.196078 0.207843 0.203922 0.215686 0.211765 0.219608 0.301961 0.392157 0.407843 0.411765 0.34902 0.0509804 0 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0980392 0.396078 0.309804 0.243137 0.176471 0.133333 0.121569 0.101961 0.109804 0.117647 0.113725 0.113725 0.12549 0.133333 0.129412 0.129412 0.137255 0.133333 0.14902 0.141176 0.14902 0.14902 0.160784 0.14902 0.152941 0.160784 0.160784 0.168627 0.176471 0.176471 0.172549 0.172549 0.176471 0.180392 0.180392 0.196078 0.188235 0.188235 0.196078 0.196078 0.196078 0.188235 0.196078 0.2 0.2 0.203922 0.2 0.196078 0.219608 0.203922 0.211765 0.203922 0.215686 0.211765 0.203922 0.207843 0.203922 0.2 0.215686 0.207843 0.2 0.207843 0.207843 0.215686 0.211765 0.203922 0.207843 0.211765 0.203922 0.207843 0.2 0.215686 0.203922 0.207843 0.207843 0.196078 0.203922 0.207843 0.2 0.203922 0.211765 0.211765 0.203922 0.196078 0.2 0.196078 0.196078 0.196078 0.196078 0.203922 0.196078 0.188235 0.207843 0.286275 0.368627 0.392157 0.396078 0.219608 0.00392157 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.176471 0.396078 0.290196 0.203922 0.133333 0.113725 0.109804 0.0980392 0.113725 0.101961 0.105882 0.12549 0.12549 0.109804 0.12549 0.12549 0.133333 0.133333 0.14902 0.14902 0.152941 0.145098 0.152941 0.145098 0.156863 0.152941 0.156863 0.168627 0.164706 0.176471 0.168627 0.164706 0.184314 0.180392 0.180392 0.188235 0.192157 0.192157 0.188235 0.180392 0.196078 0.2 0.192157 0.203922 0.196078 0.203922 0.2 0.207843 0.211765 0.203922 0.211765 0.203922 0.2 0.2 0.207843 0.207843 0.203922 0.211765 0.207843 0.2 0.207843 0.223529 0.207843 0.207843 0.203922 0.215686 0.215686 0.203922 0.207843 0.207843 0.207843 0.2 0.196078 0.2 0.196078 0.2 0.203922 0.2 0.203922 0.2 0.192157 0.196078 0.192157 0.196078 0.196078 0.196078 0.196078 0.196078 0.196078 0.184314 0.184314 0.184314 0.180392 0.207843 0.313725 0.345098 0.380392 0.317647 0.0352941 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0.407843 0.301961 0.176471 0.117647 0.109804 0.0941176 0.101961 0.0941176 0.105882 0.101961 0.101961 0.121569 0.113725 0.117647 0.129412 0.133333 0.129412 0.14902 0.137255 0.137255 0.152941 0.145098 0.141176 0.156863 0.164706 0.156863 0.168627 0.172549 0.168627 0.176471 0.176471 0.172549 0.172549 0.192157 0.188235 0.184314 0.180392 0.196078 0.192157 0.2 0.192157 0.196078 0.196078 0.203922 0.211765 0.203922 0.207843 0.219608 0.215686 0.215686 0.207843 0.203922 0.207843 0.207843 0.2 0.211765 0.211765 0.203922 0.2 0.207843 0.2 0.2 0.207843 0.227451 0.215686 0.207843 0.207843 0.2 0.203922 0.207843 0.207843 0.2 0.196078 0.2 0.2 0.2 0.207843 0.196078 0.2 0.211765 0.2 0.196078 0.196078 0.196078 0.192157 0.188235 0.184314 0.188235 0.176471 0.172549 0.164706 0.172549 0.188235 0.258824 0.337255 0.368627 0.333333 0.0745098 0.00392157 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.176471 0.427451 0.356863 0.188235 0.105882 0.0980392 0.0980392 0.0745098 0.0941176 0.0980392 0.0980392 0.0941176 0.101961 0.0980392 0.117647 0.113725 0.113725 0.12549 0.137255 0.133333 0.121569 0.141176 0.145098 0.141176 0.14902 0.156863 0.156863 0.14902 0.160784 0.160784 0.164706 0.168627 0.176471 0.172549 0.164706 0.176471 0.192157 0.192157 0.176471 0.192157 0.192157 0.2 0.184314 0.2 0.192157 0.196078 0.196078 0.203922 0.203922 0.203922 0.2 0.203922 0.203922 0.211765 0.207843 0.2 0.2 0.203922 0.203922 0.203922 0.2 0.203922 0.2 0.2 0.211765 0.2 0.207843 0.196078 0.203922 0.196078 0.203922 0.196078 0.196078 0.192157 0.196078 0.203922 0.2 0.184314 0.2 0.196078 0.207843 0.184314 0.184314 0.180392 0.184314 0.192157 0.180392 0.172549 0.180392 0.164706 0.164706 0.160784 0.176471 0.164706 0.215686 0.32549 0.368627 0.333333 0.0745098 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.145098 0.4 0.45098 0.282353 0.109804 0.101961 0.101961 0.0862745 0.0941176 0.0980392 0.0941176 0.0901961 0.0941176 0.0941176 0.101961 0.0941176 0.109804 0.109804 0.113725 0.117647 0.129412 0.117647 0.12549 0.129412 0.129412 0.129412 0.129412 0.14902 0.145098 0.141176 0.152941 0.14902 0.168627 0.156863 0.168627 0.168627 0.156863 0.164706 0.180392 0.176471 0.180392 0.172549 0.180392 0.176471 0.184314 0.188235 0.188235 0.180392 0.196078 0.180392 0.188235 0.188235 0.184314 0.188235 0.192157 0.184314 0.188235 0.196078 0.196078 0.188235 0.196078 0.196078 0.192157 0.203922 0.192157 0.188235 0.196078 0.203922 0.188235 0.188235 0.184314 0.184314 0.188235 0.188235 0.192157 0.188235 0.188235 0.184314 0.168627 0.188235 0.176471 0.180392 0.180392 0.172549 0.176471 0.164706 0.164706 0.164706 0.172549 0.152941 0.168627 0.160784 0.160784 0.160784 0.215686 0.329412 0.384314 0.290196 0.0705882 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.113725 0.32549 0.470588 0.466667 0.262745 0.101961 0.101961 0.0980392 0.0823529 0.0980392 0.0901961 0.0862745 0.0980392 0.101961 0.0901961 0.105882 0.105882 0.101961 0.101961 0.121569 0.105882 0.109804 0.121569 0.12549 0.12549 0.129412 0.129412 0.129412 0.141176 0.133333 0.145098 0.152941 0.14902 0.156863 0.152941 0.14902 0.160784 0.168627 0.160784 0.160784 0.168627 0.172549 0.176471 0.180392 0.184314 0.180392 0.180392 0.180392 0.188235 0.192157 0.180392 0.188235 0.180392 0.192157 0.188235 0.172549 0.188235 0.184314 0.180392 0.2 0.184314 0.196078 0.180392 0.192157 0.196078 0.192157 0.196078 0.192157 0.192157 0.180392 0.196078 0.192157 0.188235 0.188235 0.184314 0.188235 0.188235 0.176471 0.176471 0.176471 0.172549 0.168627 0.172549 0.176471 0.176471 0.160784 0.156863 0.164706 0.152941 0.168627 0.156863 0.14902 0.156863 0.160784 0.278431 0.388235 0.372549 0.235294 0.0784314 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.254902 0.396078 0.521569 0.513725 0.305882 0.117647 0.109804 0.101961 0.0901961 0.0862745 0.101961 0.0901961 0.0823529 0.101961 0.0980392 0.101961 0.105882 0.105882 0.109804 0.105882 0.129412 0.12549 0.113725 0.129412 0.12549 0.129412 0.137255 0.137255 0.137255 0.152941 0.137255 0.145098 0.156863 0.156863 0.168627 0.152941 0.164706 0.168627 0.164706 0.172549 0.168627 0.172549 0.176471 0.172549 0.176471 0.184314 0.172549 0.180392 0.188235 0.188235 0.188235 0.188235 0.188235 0.184314 0.180392 0.196078 0.184314 0.196078 0.188235 0.196078 0.196078 0.192157 0.188235 0.196078 0.192157 0.184314 0.180392 0.196078 0.196078 0.188235 0.196078 0.180392 0.184314 0.180392 0.172549 0.176471 0.172549 0.184314 0.172549 0.168627 0.172549 0.172549 0.172549 0.160784 0.172549 0.172549 0.164706 0.152941 0.145098 0.145098 0.152941 0.160784 0.239216 0.380392 0.392157 0.305882 0.203922 0.0627451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.054902 0.227451 0.329412 0.431373 0.552941 0.572549 0.427451 0.180392 0.117647 0.105882 0.0862745 0.0862745 0.0862745 0.0941176 0.0980392 0.0901961 0.105882 0.101961 0.101961 0.105882 0.109804 0.105882 0.121569 0.117647 0.12549 0.12549 0.12549 0.133333 0.133333 0.141176 0.14902 0.14902 0.152941 0.152941 0.14902 0.156863 0.160784 0.160784 0.160784 0.168627 0.176471 0.164706 0.172549 0.176471 0.176471 0.176471 0.168627 0.176471 0.192157 0.180392 0.180392 0.188235 0.188235 0.192157 0.176471 0.188235 0.192157 0.184314 0.188235 0.188235 0.180392 0.192157 0.196078 0.196078 0.188235 0.180392 0.192157 0.192157 0.184314 0.184314 0.184314 0.188235 0.176471 0.176471 0.176471 0.184314 0.184314 0.172549 0.172549 0.176471 0.176471 0.168627 0.168627 0.160784 0.164706 0.156863 0.156863 0.152941 0.156863 0.14902 0.14902 0.164706 0.305882 0.415686 0.407843 0.321569 0.239216 0.176471 0.0431373 0 0 0 0 0 0 0 0 0 0 0.027451 0.0588235 0.0666667 0.054902 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.027451 0.192157 0.286275 0.364706 0.454902 0.588235 0.619608 0.580392 0.388235 0.156863 0.117647 0.117647 0.0980392 0.0823529 0.0941176 0.0823529 0.109804 0.105882 0.101961 0.101961 0.0980392 0.117647 0.105882 0.117647 0.12549 0.121569 0.129412 0.133333 0.137255 0.141176 0.141176 0.141176 0.141176 0.137255 0.152941 0.156863 0.152941 0.172549 0.160784 0.168627 0.168627 0.168627 0.160784 0.168627 0.176471 0.188235 0.164706 0.180392 0.184314 0.184314 0.192157 0.184314 0.192157 0.192157 0.180392 0.188235 0.192157 0.203922 0.192157 0.188235 0.192157 0.192157 0.188235 0.196078 0.188235 0.176471 0.196078 0.196078 0.176471 0.192157 0.188235 0.188235 0.184314 0.180392 0.188235 0.180392 0.184314 0.164706 0.172549 0.176471 0.180392 0.176471 0.176471 0.164706 0.168627 0.160784 0.156863 0.152941 0.141176 0.145098 0.247059 0.407843 0.45098 0.415686 0.34902 0.290196 0.278431 0.160784 0.0117647 0 0 0 0 0 0.027451 0.196078 0.27451 0.32549 0.356863 0.380392 0.396078 0.388235 0.396078 0.376471 0.345098 0.313725 0.223529 0.0666667 0 0 0 0 0 0 0 0 0 0 0.0117647 0.156863 0.247059 0.329412 0.392157 0.454902 0.541176 0.607843 0.654902 0.615686 0.443137 0.203922 0.12549 0.117647 0.109804 0.101961 0.109804 0.101961 0.105882 0.109804 0.101961 0.101961 0.121569 0.105882 0.113725 0.12549 0.121569 0.129412 0.129412 0.137255 0.141176 0.137255 0.160784 0.145098 0.156863 0.160784 0.160784 0.164706 0.152941 0.160784 0.156863 0.168627 0.168627 0.164706 0.164706 0.184314 0.176471 0.184314 0.180392 0.192157 0.196078 0.188235 0.184314 0.188235 0.188235 0.188235 0.184314 0.180392 0.184314 0.192157 0.188235 0.192157 0.184314 0.184314 0.196078 0.188235 0.192157 0.180392 0.188235 0.196078 0.188235 0.184314 0.176471 0.192157 0.180392 0.184314 0.184314 0.160784 0.172549 0.176471 0.164706 0.164706 0.156863 0.172549 0.164706 0.172549 0.168627 0.176471 0.270588 0.431373 0.486275 0.470588 0.415686 0.368627 0.337255 0.313725 0.27451 0.160784 0.00784314 0 0 0.0117647 0.168627 0.333333 0.392157 0.427451 0.458824 0.486275 0.498039 0.498039 0.513725 0.501961 0.513725 0.490196 0.47451 0.454902 0.411765 0.372549 0.309804 0.121569 0.0117647 0 0 0 0 0 0 0 0 0.141176 0.227451 0.294118 0.356863 0.407843 0.470588 0.513725 0.572549 0.643137 0.666667 0.67451 0.584314 0.364706 0.196078 0.133333 0.121569 0.113725 0.105882 0.113725 0.105882 0.109804 0.121569 0.105882 0.113725 0.12549 0.12549 0.137255 0.137255 0.141176 0.14902 0.137255 0.160784 0.152941 0.14902 0.145098 0.152941 0.168627 0.156863 0.168627 0.176471 0.164706 0.168627 0.172549 0.172549 0.188235 0.184314 0.180392 0.192157 0.188235 0.180392 0.180392 0.192157 0.196078 0.180392 0.192157 0.192157 0.196078 0.196078 0.188235 0.196078 0.192157 0.196078 0.188235 0.180392 0.188235 0.192157 0.188235 0.196078 0.188235 0.188235 0.188235 0.176471 0.188235 0.188235 0.176471 0.176471 0.180392 0.176471 0.176471 0.172549 0.172549 0.172549 0.160784 0.156863 0.231373 0.364706 0.498039 0.517647 0.498039 0.45098 0.396078 0.360784 0.345098 0.32549 0.298039 0.27451 0.223529 0.141176 0.109804 0.196078 0.305882 0.392157 0.478431 0.517647 0.533333 0.560784 0.568627 0.580392 0.588235 0.596078 0.6 0.572549 0.580392 0.560784 0.54902 0.517647 0.482353 0.435294 0.376471 0.278431 0.0901961 0.00392157 0 0 0 0 0 0 0.117647 0.211765 0.270588 0.333333 0.384314 0.419608 0.462745 0.498039 0.517647 0.580392 0.631373 0.678431 0.713725 0.705882 0.611765 0.454902 0.243137 0.14902 0.133333 0.129412 0.109804 0.133333 0.12549 0.12549 0.12549 0.129412 0.129412 0.12549 0.137255 0.152941 0.145098 0.164706 0.152941 0.172549 0.156863 0.164706 0.156863 0.164706 0.176471 0.168627 0.168627 0.168627 0.176471 0.184314 0.176471 0.184314 0.184314 0.192157 0.188235 0.180392 0.188235 0.196078 0.184314 0.188235 0.192157 0.196078 0.192157 0.184314 0.188235 0.192157 0.2 0.196078 0.192157 0.196078 0.192157 0.176471 0.184314 0.180392 0.184314 0.180392 0.188235 0.184314 0.180392 0.184314 0.176471 0.184314 0.192157 0.172549 0.164706 0.180392 0.176471 0.27451 0.419608 0.509804 0.552941 0.537255 0.490196 0.45098 0.407843 0.364706 0.333333 0.337255 0.313725 0.305882 0.282353 0.286275 0.270588 0.337255 0.360784 0.384314 0.415686 0.494118 0.560784 0.588235 0.607843 0.623529 0.635294 0.635294 0.654902 0.654902 0.647059 0.635294 0.635294 0.619608 0.611765 0.592157 0.556863 0.513725 0.478431 0.407843 0.337255 0.172549 0.0156863 0 0 0 0 0 0.0901961 0.2 0.25098 0.305882 0.352941 0.388235 0.427451 0.462745 0.490196 0.517647 0.541176 0.584314 0.623529 0.666667 0.705882 0.741176 0.745098 0.713725 0.627451 0.458824 0.27451 0.196078 0.164706 0.145098 0.133333 0.129412 0.141176 0.129412 0.141176 0.145098 0.141176 0.152941 0.152941 0.156863 0.168627 0.164706 0.160784 0.176471 0.172549 0.172549 0.168627 0.180392 0.180392 0.176471 0.184314 0.176471 0.176471 0.176471 0.188235 0.184314 0.192157 0.184314 0.196078 0.180392 0.188235 0.184314 0.184314 0.188235 0.203922 0.188235 0.196078 0.184314 0.192157 0.196078 0.184314 0.196078 0.196078 0.192157 0.188235 0.184314 0.184314 0.192157 0.196078 0.188235 0.188235 0.203922 0.203922 0.282353 0.423529 0.529412 0.572549 0.580392 0.560784 0.537255 0.490196 0.447059 0.403922 0.376471 0.345098 0.317647 0.298039 0.262745 0.258824 0.313725 0.278431 0.294118 0.333333 0.423529 0.439216 0.439216 0.486275 0.552941 0.615686 0.635294 0.658824 0.654902 0.662745 0.678431 0.682353 0.678431 0.764706 0.764706 0.717647 0.666667 0.65098 0.631373 0.615686 0.576471 0.541176 0.486275 0.423529 0.333333 0.192157 0.0117647 0 0 0 0 0.054902 0.180392 0.247059 0.286275 0.333333 0.372549 0.396078 0.427451 0.462745 0.486275 0.509804 0.52549 0.517647 0.576471 0.6 0.639216 0.682353 0.709804 0.729412 0.760784 0.764706 0.756863 0.721569 0.631373 0.486275 0.360784 0.266667 0.188235 0.156863 0.14902 0.152941 0.160784 0.152941 0.156863 0.164706 0.156863 0.156863 0.172549 0.168627 0.168627 0.172549 0.180392 0.180392 0.180392 0.184314 0.180392 0.192157 0.188235 0.180392 0.192157 0.192157 0.184314 0.184314 0.184314 0.196078 0.192157 0.192157 0.192157 0.192157 0.2 0.192157 0.196078 0.188235 0.196078 0.196078 0.192157 0.184314 0.192157 0.188235 0.192157 0.231373 0.290196 0.345098 0.439216 0.537255 0.588235 0.611765 0.611765 0.588235 0.576471 0.537255 0.509804 0.470588 0.443137 0.411765 0.388235 0.356863 0.32549 0.305882 0.294118 0.262745 0.227451 0.211765 0.27451 0.290196 0.294118 0.392157 0.482353 0.470588 0.482353 0.533333 0.596078 0.768627 0.796078 0.72549 0.690196 0.690196 0.662745 0.647059 0.647059 0.635294 0.756863 0.862745 0.701961 0.658824 0.662745 0.647059 0.615686 0.580392 0.556863 0.498039 0.415686 0.32549 0.14902 0.0117647 0 0 0 0.0235294 0.164706 0.227451 0.278431 0.321569 0.356863 0.380392 0.403922 0.431373 0.458824 0.47451 0.482353 0.513725 0.537255 0.556863 0.572549 0.596078 0.615686 0.623529 0.658824 0.694118 0.713725 0.72549 0.760784 0.772549 0.780392 0.839216 0.890196 0.776471 0.686275 0.607843 0.545098 0.462745 0.364706 0.294118 0.219608 0.196078 0.180392 0.164706 0.176471 0.180392 0.180392 0.172549 0.176471 0.192157 0.188235 0.184314 0.192157 0.196078 0.196078 0.192157 0.192157 0.196078 0.196078 0.188235 0.192157 0.192157 0.192157 0.192157 0.196078 0.2 0.211765 0.247059 0.317647 0.376471 0.447059 0.505882 0.552941 0.611765 0.639216 0.654902 0.658824 0.65098 0.643137 0.615686 0.6 0.564706 0.521569 0.505882 0.466667 0.458824 0.419608 0.4 0.388235 0.364706 0.337255 0.313725 0.290196 0.282353 0.286275 0.235294 0.203922 0.196078 0.258824 0.321569 0.301961 0.447059 0.501961 0.490196 0.521569 0.552941 0.639216 0.729412 0.65098 0.603922 0.580392 0.54902 0.513725 0.490196 0.478431 0.478431 0.513725 0.545098 0.576471 0.631373 0.686275 0.6 0.596078 0.603922 0.568627 0.529412 0.486275 0.396078 0.282353 0.0705882 0.00784314 0 0 0 0.137255 0.215686 0.27451 0.313725 0.34902 0.368627 0.4 0.407843 0.435294 0.458824 0.462745 0.490196 0.509804 0.529412 0.545098 0.545098 0.564706 0.576471 0.596078 0.6 0.623529 0.643137 0.662745 0.658824 0.701961 0.709804 0.737255 0.741176 0.74902 0.756863 0.811765 0.811765 0.835294 0.815686 0.784314 0.788235 0.764706 0.752941 0.745098 0.729412 0.721569 0.690196 0.678431 0.643137 0.639216 0.623529 0.603922 0.603922 0.603922 0.596078 0.592157 0.607843 0.623529 0.631373 0.654902 0.666667 0.694118 0.694118 0.717647 0.698039 0.721569 0.717647 0.705882 0.705882 0.678431 0.670588 0.65098 0.631373 0.619608 0.6 0.568627 0.556863 0.541176 0.521569 0.498039 0.47451 0.447059 0.435294 0.415686 0.388235 0.376471 0.364706 0.341176 0.32549 0.313725 0.27451 0.262745 0.278431 0.254902 0.219608 0.192157 0.180392 0.254902 0.270588 0.345098 0.596078 0.623529 0.521569 0.52549 0.564706 0.568627 0.52549 0.501961 0.407843 0.317647 0.227451 0.152941 0.0901961 0.0588235 0.0784314 0.141176 0.192157 0.231373 0.4 0.509804 0.623529 0.592157 0.592157 0.584314 0.564706 0.513725 0.462745 0.352941 0.211765 0.0235294 0.00392157 0 0 0.0980392 0.2 0.247059 0.298039 0.341176 0.364706 0.392157 0.403922 0.427451 0.443137 0.439216 0.478431 0.490196 0.509804 0.509804 0.533333 0.537255 0.545098 0.560784 0.568627 0.596078 0.596078 0.6 0.596078 0.619608 0.619608 0.635294 0.639216 0.65098 0.654902 0.67451 0.686275 0.694118 0.698039 0.705882 0.705882 0.713725 0.733333 0.733333 0.745098 0.737255 0.752941 0.776471 0.8 0.831373 0.858824 0.996078 0.976471 0.8 0.784314 0.780392 0.74902 0.745098 0.756863 0.709804 0.717647 0.709804 0.694118 0.666667 0.654902 0.643137 0.631373 0.611765 0.603922 0.588235 0.572549 0.54902 0.541176 0.517647 0.509804 0.498039 0.494118 0.47451 0.462745 0.431373 0.419608 0.419608 0.396078 0.384314 0.368627 0.356863 0.337255 0.329412 0.305882 0.294118 0.270588 0.254902 0.266667 0.243137 0.215686 0.192157 0.176471 0.262745 0.286275 0.368627 0.517647 0.513725 0.509804 0.517647 0.490196 0.435294 0.345098 0.196078 0.0588235 0 0 0 0 0 0 0 0 0 0.0509804 0.211765 0.380392 0.505882 0.572549 0.580392 0.564706 0.537255 0.482353 0.419608 0.298039 0.101961 0.00784314 0 0 0.0666667 0.176471 0.243137 0.286275 0.321569 0.360784 0.392157 0.407843 0.411765 0.443137 0.443137 0.454902 0.47451 0.47451 0.486275 0.505882 0.509804 0.521569 0.537255 0.541176 0.54902 0.568627 0.580392 0.584314 0.588235 0.596078 0.603922 0.596078 0.603922 0.603922 0.631373 0.615686 0.635294 0.627451 0.643137 0.627451 0.654902 0.643137 0.647059 0.639216 0.631373 0.635294 0.639216 0.639216 0.647059 0.635294 0.639216 0.631373 0.639216 0.627451 0.619608 0.611765 0.607843 0.623529 0.619608 0.603922 0.588235 0.584314 0.568627 0.564706 0.560784 0.54902 0.533333 0.537255 0.521569 0.517647 0.501961 0.498039 0.482353 0.470588 0.45098 0.454902 0.447059 0.423529 0.411765 0.403922 0.384314 0.364706 0.360784 0.34902 0.32549 0.313725 0.301961 0.282353 0.27451 0.262745 0.239216 0.266667 0.239216 0.219608 0.180392 0.160784 0.235294 0.258824 0.376471 0.6 0.509804 0.494118 0.470588 0.372549 0.207843 0.054902 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0.0627451 0.317647 0.462745 0.545098 0.560784 0.545098 0.517647 0.447059 0.376471 0.211765 0.0313725 0 0 0.0235294 0.160784 0.227451 0.266667 0.317647 0.34902 0.384314 0.4 0.423529 0.431373 0.462745 0.454902 0.462745 0.482353 0.498039 0.490196 0.498039 0.470588 0.501961 0.521569 0.52549 0.545098 0.545098 0.564706 0.572549 0.568627 0.572549 0.588235 0.592157 0.592157 0.596078 0.6 0.603922 0.6 0.603922 0.6 0.6 0.611765 0.596078 0.596078 0.596078 0.607843 0.592157 0.6 0.592157 0.596078 0.603922 0.6 0.596078 0.603922 0.6 0.576471 0.580392 0.576471 0.564706 0.560784 0.556863 0.537255 0.537255 0.537255 0.533333 0.509804 0.513725 0.490196 0.490196 0.478431 0.462745 0.454902 0.447059 0.439216 0.435294 0.427451 0.411765 0.392157 0.392157 0.392157 0.364706 0.352941 0.337255 0.32549 0.321569 0.301961 0.294118 0.282353 0.262745 0.247059 0.235294 0.254902 0.239216 0.211765 0.176471 0.164706 0.231373 0.266667 0.388235 0.47451 0.470588 0.439216 0.32549 0.137255 0.0117647 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.290196 0.470588 0.541176 0.537255 0.517647 0.470588 0.411765 0.294118 0.0823529 0 0 0.00392157 0.129412 0.2 0.254902 0.309804 0.341176 0.360784 0.388235 0.407843 0.427451 0.447059 0.454902 0.466667 0.478431 0.486275 0.494118 0.494118 0.494118 0.501961 0.505882 0.517647 0.52549 0.529412 0.537255 0.545098 0.552941 0.552941 0.560784 0.568627 0.560784 0.580392 0.568627 0.568627 0.580392 0.580392 0.580392 0.580392 0.572549 0.576471 0.584314 0.568627 0.580392 0.588235 0.584314 0.596078 0.596078 0.611765 0.623529 0.596078 0.572549 0.564706 0.552941 0.560784 0.545098 0.537255 0.52549 0.52549 0.52549 0.509804 0.505882 0.498039 0.486275 0.490196 0.470588 0.458824 0.454902 0.447059 0.443137 0.439216 0.423529 0.407843 0.403922 0.396078 0.380392 0.364706 0.356863 0.34902 0.337255 0.329412 0.313725 0.301961 0.301961 0.282353 0.266667 0.262745 0.247059 0.243137 0.262745 0.227451 0.2 0.172549 0.160784 0.215686 0.270588 0.384314 0.435294 0.407843 0.294118 0.109804 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.054902 0.356863 0.498039 0.529412 0.505882 0.470588 0.411765 0.333333 0.133333 0 0 0 0.0980392 0.188235 0.235294 0.290196 0.317647 0.356863 0.372549 0.396078 0.411765 0.431373 0.45098 0.45098 0.470588 0.482353 0.490196 0.498039 0.501961 0.505882 0.509804 0.509804 0.517647 0.529412 0.533333 0.529412 0.545098 0.545098 0.537255 0.545098 0.541176 0.556863 0.552941 0.545098 0.556863 0.552941 0.556863 0.560784 0.560784 0.560784 0.564706 0.564706 0.568627 0.560784 0.560784 0.564706 0.576471 0.576471 0.572549 0.560784 0.552941 0.533333 0.529412 0.529412 0.513725 0.517647 0.498039 0.498039 0.501961 0.490196 0.482353 0.470588 0.462745 0.462745 0.447059 0.447059 0.443137 0.427451 0.419608 0.403922 0.4 0.396078 0.376471 0.376471 0.368627 0.356863 0.345098 0.337255 0.329412 0.32549 0.305882 0.301961 0.286275 0.27451 0.266667 0.25098 0.243137 0.254902 0.262745 0.231373 0.192157 0.164706 0.145098 0.207843 0.27451 0.368627 0.364706 0.266667 0.0980392 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.203922 0.447059 0.498039 0.498039 0.47451 0.411765 0.34902 0.156863 0 0 0 0.0509804 0.164706 0.231373 0.270588 0.317647 0.337255 0.380392 0.396078 0.403922 0.423529 0.439216 0.447059 0.462745 0.470588 0.47451 0.486275 0.498039 0.498039 0.501961 0.505882 0.529412 0.517647 0.517647 0.537255 0.537255 0.529412 0.533333 0.545098 0.541176 0.52549 0.545098 0.541176 0.541176 0.541176 0.541176 0.552941 0.541176 0.545098 0.541176 0.545098 0.537255 0.533333 0.529412 0.537255 0.529412 0.533333 0.52549 0.505882 0.513725 0.509804 0.505882 0.505882 0.513725 0.490196 0.498039 0.490196 0.478431 0.47451 0.47451 0.458824 0.45098 0.447059 0.443137 0.435294 0.419608 0.411765 0.411765 0.407843 0.396078 0.392157 0.380392 0.368627 0.360784 0.34902 0.341176 0.333333 0.333333 0.317647 0.298039 0.298039 0.282353 0.27451 0.258824 0.247059 0.231373 0.25098 0.247059 0.215686 0.176471 0.152941 0.133333 0.196078 0.262745 0.317647 0.270588 0.109804 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0784314 0.376471 0.490196 0.494118 0.470588 0.415686 0.333333 0.172549 0 0 0 0.00392157 0.145098 0.211765 0.254902 0.294118 0.321569 0.360784 0.376471 0.396078 0.415686 0.423529 0.443137 0.458824 0.462745 0.466667 0.482353 0.486275 0.501961 0.498039 0.509804 0.505882 0.517647 0.52549 0.517647 0.533333 0.537255 0.541176 0.545098 0.537255 0.537255 0.537255 0.533333 0.537255 0.541176 0.541176 0.552941 0.533333 0.521569 0.541176 0.537255 0.529412 0.517647 0.537255 0.517647 0.521569 0.517647 0.52549 0.509804 0.513725 0.486275 0.494118 0.498039 0.482353 0.482353 0.482353 0.466667 0.47451 0.470588 0.462745 0.45098 0.45098 0.439216 0.435294 0.415686 0.423529 0.407843 0.411765 0.392157 0.392157 0.392157 0.368627 0.364706 0.352941 0.352941 0.329412 0.329412 0.305882 0.329412 0.301961 0.290196 0.286275 0.270588 0.25098 0.243137 0.227451 0.262745 0.243137 0.215686 0.164706 0.141176 0.129412 0.172549 0.243137 0.231373 0.141176 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.290196 0.482353 0.498039 0.458824 0.403922 0.329412 0.188235 0 0 0 0 0.109804 0.192157 0.239216 0.282353 0.317647 0.341176 0.376471 0.392157 0.4 0.419608 0.439216 0.45098 0.462745 0.466667 0.490196 0.490196 0.486275 0.505882 0.509804 0.517647 0.513725 0.52549 0.529412 0.529412 0.529412 0.533333 0.533333 0.533333 0.533333 0.537255 0.533333 0.52549 0.537255 0.537255 0.52549 0.529412 0.529412 0.529412 0.533333 0.529412 0.517647 0.521569 0.52549 0.521569 0.513725 0.521569 0.501961 0.501961 0.498039 0.505882 0.486275 0.486275 0.486275 0.478431 0.47451 0.458824 0.462745 0.462745 0.443137 0.435294 0.439216 0.423529 0.423529 0.419608 0.407843 0.4 0.388235 0.380392 0.368627 0.372549 0.364706 0.345098 0.333333 0.329412 0.329412 0.317647 0.305882 0.301961 0.290196 0.266667 0.258824 0.25098 0.235294 0.231373 0.254902 0.231373 0.2 0.156863 0.137255 0.109804 0.152941 0.196078 0.14902 0.0352941 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00392157 0.243137 0.462745 0.490196 0.435294 0.396078 0.317647 0.176471 0 0 0 0 0.0627451 0.164706 0.211765 0.266667 0.298039 0.333333 0.356863 0.384314 0.396078 0.407843 0.427451 0.423529 0.454902 0.454902 0.478431 0.478431 0.486275 0.494118 0.498039 0.498039 0.513725 0.517647 0.509804 0.513725 0.521569 0.533333 0.529412 0.513725 0.533333 0.52549 0.52549 0.529412 0.537255 0.517647 0.529412 0.533333 0.533333 0.529412 0.517647 0.513725 0.521569 0.521569 0.517647 0.521569 0.521569 0.501961 0.501961 0.505882 0.490196 0.501961 0.490196 0.486275 0.486275 0.470588 0.470588 0.462745 0.458824 0.458824 0.435294 0.443137 0.431373 0.423529 0.415686 0.407843 0.4 0.403922 0.388235 0.384314 0.376471 0.372549 0.360784 0.345098 0.345098 0.333333 0.321569 0.317647 0.298039 0.290196 0.278431 0.270588 0.254902 0.247059 0.231373 0.219608 0.258824 0.219608 0.196078 0.152941 0.12549 0.101961 0.117647 0.113725 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.227451 0.447059 0.494118 0.439216 0.384314 0.313725 0.172549 0 0 0 0 0.0196078 0.141176 0.2 0.247059 0.278431 0.317647 0.345098 0.376471 0.384314 0.4 0.407843 0.423529 0.447059 0.454902 0.454902 0.462745 0.482353 0.490196 0.490196 0.498039 0.513725 0.513725 0.513725 0.513725 0.509804 0.517647 0.521569 0.533333 0.533333 0.52549 0.517647 0.52549 0.52549 0.517647 0.529412 0.533333 0.521569 0.513725 0.513725 0.521569 0.517647 0.52549 0.521569 0.513725 0.517647 0.505882 0.498039 0.505882 0.501961 0.486275 0.482353 0.478431 0.478431 0.466667 0.458824 0.466667 0.454902 0.458824 0.439216 0.435294 0.435294 0.411765 0.419608 0.411765 0.392157 0.396078 0.384314 0.372549 0.372549 0.372549 0.352941 0.345098 0.329412 0.32549 0.313725 0.301961 0.286275 0.27451 0.270588 0.266667 0.243137 0.235294 0.203922 0.227451 0.258824 0.211765 0.188235 0.145098 0.113725 0.0941176 0.0627451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.258824 0.447059 0.494118 0.423529 0.352941 0.278431 0.141176 0 0 0 0 0 0.0980392 0.188235 0.219608 0.262745 0.309804 0.329412 0.34902 0.372549 0.396078 0.411765 0.411765 0.435294 0.443137 0.454902 0.462745 0.466667 0.47451 0.486275 0.478431 0.501961 0.505882 0.501961 0.505882 0.505882 0.517647 0.521569 0.509804 0.517647 0.52549 0.509804 0.521569 0.513725 0.521569 0.529412 0.513725 0.517647 0.513725 0.513725 0.517647 0.517647 0.501961 0.501961 0.509804 0.498039 0.498039 0.498039 0.501961 0.482353 0.486275 0.486275 0.470588 0.458824 0.470588 0.466667 0.454902 0.447059 0.435294 0.427451 0.423529 0.427451 0.415686 0.407843 0.4 0.388235 0.384314 0.384314 0.368627 0.360784 0.352941 0.34902 0.337255 0.321569 0.317647 0.305882 0.298039 0.282353 0.266667 0.262745 0.25098 0.235294 0.227451 0.207843 0.231373 0.25098 0.211765 0.184314 0.133333 0.105882 0.0745098 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0862745 0.313725 0.470588 0.501961 0.419608 0.337255 0.243137 0.105882 0 0 0 0 0 0.054902 0.160784 0.211765 0.25098 0.294118 0.313725 0.352941 0.364706 0.376471 0.407843 0.396078 0.419608 0.439216 0.439216 0.454902 0.462745 0.47451 0.47451 0.47451 0.486275 0.498039 0.498039 0.490196 0.509804 0.521569 0.509804 0.52549 0.509804 0.521569 0.513725 0.517647 0.517647 0.513725 0.505882 0.517647 0.505882 0.505882 0.509804 0.517647 0.505882 0.498039 0.494118 0.498039 0.498039 0.494118 0.482353 0.490196 0.478431 0.47451 0.47451 0.462745 0.466667 0.45098 0.45098 0.443137 0.443137 0.443137 0.431373 0.419608 0.427451 0.411765 0.396078 0.396078 0.384314 0.388235 0.368627 0.368627 0.34902 0.34902 0.337255 0.317647 0.313725 0.301961 0.290196 0.282353 0.282353 0.262745 0.254902 0.235294 0.231373 0.215686 0.2 0.239216 0.235294 0.196078 0.168627 0.117647 0.0941176 0.0392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0.396078 0.501961 0.486275 0.396078 0.309804 0.215686 0.0588235 0 0 0 0 0 0.0117647 0.137255 0.192157 0.243137 0.278431 0.309804 0.333333 0.360784 0.372549 0.388235 0.403922 0.411765 0.423529 0.431373 0.439216 0.443137 0.45098 0.466667 0.462745 0.478431 0.490196 0.498039 0.498039 0.498039 0.498039 0.501961 0.509804 0.509804 0.513725 0.505882 0.521569 0.509804 0.501961 0.505882 0.517647 0.501961 0.490196 0.513725 0.505882 0.490196 0.501961 0.494118 0.494118 0.498039 0.47451 0.478431 0.486275 0.470588 0.462745 0.462745 0.462745 0.462745 0.447059 0.45098 0.439216 0.431373 0.443137 0.423529 0.419608 0.419608 0.396078 0.403922 0.396078 0.380392 0.384314 0.364706 0.360784 0.34902 0.333333 0.341176 0.317647 0.313725 0.294118 0.294118 0.278431 0.266667 0.258824 0.239216 0.227451 0.223529 0.2 0.192157 0.239216 0.215686 0.196078 0.14902 0.101961 0.0823529 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.121569 0.321569 0.45098 0.537255 0.458824 0.364706 0.270588 0.168627 0.0156863 0 0 0 0 0 0 0.0901961 0.172549 0.207843 0.254902 0.298039 0.32549 0.341176 0.368627 0.376471 0.396078 0.407843 0.415686 0.423529 0.443137 0.443137 0.443137 0.466667 0.466667 0.470588 0.466667 0.47451 0.482353 0.494118 0.494118 0.494118 0.501961 0.490196 0.501961 0.501961 0.509804 0.505882 0.494118 0.509804 0.498039 0.509804 0.501961 0.505882 0.498039 0.494118 0.486275 0.505882 0.482353 0.490196 0.486275 0.47451 0.470588 0.470588 0.470588 0.466667 0.45098 0.454902 0.447059 0.439216 0.431373 0.427451 0.427451 0.411765 0.407843 0.4 0.392157 0.380392 0.384314 0.364706 0.368627 0.360784 0.34902 0.356863 0.333333 0.321569 0.309804 0.305882 0.294118 0.286275 0.27451 0.258824 0.25098 0.239216 0.231373 0.215686 0.2 0.192157 0.239216 0.203922 0.184314 0.141176 0.0980392 0.0470588 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0941176 0.27451 0.411765 0.52549 0.541176 0.443137 0.32549 0.235294 0.0941176 0 0 0 0 0 0 0 0.0431373 0.137255 0.196078 0.243137 0.27451 0.301961 0.329412 0.352941 0.372549 0.392157 0.4 0.407843 0.415686 0.423529 0.435294 0.443137 0.454902 0.439216 0.458824 0.47451 0.458824 0.466667 0.478431 0.478431 0.494118 0.490196 0.501961 0.486275 0.486275 0.494118 0.486275 0.498039 0.494118 0.490196 0.494118 0.498039 0.494118 0.498039 0.490196 0.490196 0.482353 0.494118 0.490196 0.47451 0.470588 0.478431 0.462745 0.466667 0.454902 0.454902 0.45098 0.439216 0.427451 0.435294 0.419608 0.411765 0.403922 0.407843 0.396078 0.384314 0.380392 0.368627 0.368627 0.368627 0.34902 0.337255 0.313725 0.317647 0.309804 0.305882 0.290196 0.278431 0.27451 0.266667 0.258824 0.239216 0.235294 0.223529 0.203922 0.184314 0.180392 0.235294 0.196078 0.180392 0.12549 0.0862745 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0941176 0.258824 0.392157 0.490196 0.572549 0.517647 0.392157 0.278431 0.188235 0.0431373 0 0 0 0 0 0 0 0 0.109804 0.172549 0.211765 0.25098 0.278431 0.309804 0.341176 0.360784 0.364706 0.392157 0.396078 0.407843 0.411765 0.427451 0.435294 0.443137 0.454902 0.458824 0.458824 0.462745 0.470588 0.466667 0.478431 0.482353 0.482353 0.482353 0.486275 0.494118 0.486275 0.482353 0.482353 0.486275 0.490196 0.490196 0.486275 0.478431 0.478431 0.478431 0.466667 0.478431 0.470588 0.454902 0.466667 0.466667 0.462745 0.45098 0.45098 0.45098 0.439216 0.427451 0.439216 0.431373 0.423529 0.407843 0.423529 0.396078 0.396078 0.380392 0.372549 0.372549 0.360784 0.34902 0.34902 0.345098 0.321569 0.32549 0.309804 0.305882 0.298039 0.27451 0.270588 0.262745 0.266667 0.239216 0.235294 0.227451 0.215686 0.188235 0.184314 0.184314 0.227451 0.196078 0.172549 0.117647 0.0705882 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.129412 0.262745 0.392157 0.47451 0.564706 0.576471 0.443137 0.321569 0.227451 0.101961 0.00392157 0 0 0 0 0 0 0 0 0.054902 0.152941 0.196078 0.231373 0.266667 0.301961 0.329412 0.356863 0.360784 0.384314 0.388235 0.396078 0.407843 0.419608 0.419608 0.435294 0.447059 0.454902 0.443137 0.458824 0.466667 0.462745 0.470588 0.466667 0.47451 0.478431 0.47451 0.47451 0.478431 0.47451 0.47451 0.494118 0.482353 0.478431 0.478431 0.482353 0.478431 0.47451 0.47451 0.47451 0.466667 0.47451 0.458824 0.45098 0.458824 0.447059 0.439216 0.443137 0.439216 0.439216 0.419608 0.423529 0.419608 0.415686 0.407843 0.396078 0.392157 0.384314 0.384314 0.368627 0.356863 0.356863 0.352941 0.333333 0.32549 0.329412 0.305882 0.313725 0.294118 0.282353 0.266667 0.262745 0.247059 0.235294 0.227451 0.207843 0.196078 0.188235 0.164706 0.180392 0.219608 0.192157 0.164706 0.105882 0.0392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.196078 0.294118 0.392157 0.494118 0.584314 0.603922 0.501961 0.368627 0.25098 0.145098 0.0235294 0 0 0 0 0 0 0 0 0 0.00392157 0.121569 0.172549 0.211765 0.243137 0.286275 0.305882 0.329412 0.356863 0.360784 0.384314 0.392157 0.396078 0.403922 0.423529 0.427451 0.439216 0.439216 0.447059 0.435294 0.45098 0.458824 0.462745 0.470588 0.470588 0.466667 0.47451 0.47451 0.470588 0.478431 0.47451 0.478431 0.470588 0.47451 0.47451 0.462745 0.47451 0.470588 0.454902 0.462745 0.462745 0.458824 0.435294 0.447059 0.439216 0.439216 0.447059 0.427451 0.427451 0.427451 0.423529 0.415686 0.403922 0.4 0.392157 0.392157 0.384314 0.384314 0.372549 0.364706 0.352941 0.352941 0.337255 0.32549 0.32549 0.313725 0.294118 0.282353 0.286275 0.262745 0.258824 0.247059 0.239216 0.227451 0.215686 0.203922 0.188235 0.180392 0.160784 0.196078 0.215686 0.184314 0.168627 0.0862745 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0117647 0.156863 0.239216 0.32549 0.427451 0.517647 0.580392 0.611765 0.52549 0.396078 0.266667 0.176471 0.0431373 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.156863 0.196078 0.235294 0.262745 0.294118 0.309804 0.341176 0.352941 0.368627 0.372549 0.388235 0.407843 0.407843 0.411765 0.427451 0.427451 0.45098 0.443137 0.45098 0.454902 0.454902 0.458824 0.470588 0.458824 0.47451 0.470588 0.462745 0.458824 0.478431 0.462745 0.462745 0.458824 0.458824 0.470588 0.458824 0.466667 0.462745 0.45098 0.454902 0.454902 0.439216 0.439216 0.45098 0.443137 0.419608 0.431373 0.423529 0.419608 0.419608 0.407843 0.403922 0.4 0.388235 0.384314 0.376471 0.388235 0.364706 0.34902 0.356863 0.341176 0.333333 0.321569 0.317647 0.301961 0.298039 0.294118 0.278431 0.254902 0.25098 0.243137 0.235294 0.223529 0.207843 0.192157 0.180392 0.164706 0.164706 0.207843 0.207843 0.180392 0.164706 0.0588235 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0117647 0.156863 0.215686 0.294118 0.380392 0.470588 0.541176 0.611765 0.627451 0.54902 0.411765 0.278431 0.168627 0.0705882 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.121569 0.176471 0.207843 0.247059 0.278431 0.305882 0.32549 0.337255 0.352941 0.372549 0.384314 0.388235 0.396078 0.407843 0.411765 0.423529 0.431373 0.431373 0.439216 0.443137 0.45098 0.458824 0.45098 0.462745 0.454902 0.45098 0.462745 0.466667 0.462745 0.470588 0.458824 0.454902 0.462745 0.45098 0.458824 0.462745 0.45098 0.439216 0.439216 0.439216 0.435294 0.431373 0.431373 0.419608 0.423529 0.403922 0.415686 0.419608 0.4 0.388235 0.396078 0.376471 0.380392 0.380392 0.360784 0.34902 0.345098 0.345098 0.329412 0.32549 0.309804 0.298039 0.301961 0.290196 0.286275 0.27451 0.262745 0.247059 0.247059 0.227451 0.227451 0.2 0.196078 0.188235 0.168627 0.152941 0.156863 0.196078 0.196078 0.184314 0.121569 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.0901961 0.184314 0.231373 0.290196 0.368627 0.443137 0.517647 0.592157 0.643137 0.623529 0.533333 0.396078 0.266667 0.168627 0.0627451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.156863 0.192157 0.227451 0.258824 0.282353 0.305882 0.329412 0.34902 0.356863 0.364706 0.380392 0.388235 0.396078 0.403922 0.4 0.415686 0.423529 0.431373 0.431373 0.439216 0.447059 0.439216 0.45098 0.454902 0.454902 0.458824 0.454902 0.45098 0.466667 0.45098 0.439216 0.45098 0.439216 0.45098 0.439216 0.443137 0.443137 0.447059 0.435294 0.423529 0.435294 0.435294 0.419608 0.407843 0.396078 0.396078 0.4 0.384314 0.388235 0.388235 0.368627 0.372549 0.364706 0.34902 0.34902 0.341176 0.341176 0.32549 0.313725 0.305882 0.290196 0.298039 0.282353 0.270588 0.270588 0.247059 0.231373 0.231373 0.227451 0.215686 0.2 0.184314 0.176471 0.160784 0.152941 0.152941 0.2 0.196078 0.172549 0.0745098 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0313725 0.101961 0.168627 0.215686 0.266667 0.317647 0.380392 0.454902 0.509804 0.584314 0.627451 0.654902 0.611765 0.505882 0.372549 0.239216 0.152941 0.0509804 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0352941 0.12549 0.176471 0.207843 0.247059 0.27451 0.298039 0.321569 0.341176 0.352941 0.372549 0.368627 0.380392 0.388235 0.396078 0.403922 0.415686 0.411765 0.427451 0.431373 0.435294 0.443137 0.439216 0.443137 0.439216 0.427451 0.439216 0.443137 0.447059 0.439216 0.439216 0.454902 0.439216 0.435294 0.439216 0.447059 0.431373 0.423529 0.431373 0.443137 0.423529 0.427451 0.415686 0.4 0.407843 0.4 0.392157 0.396078 0.384314 0.380392 0.376471 0.360784 0.352941 0.352941 0.34902 0.356863 0.333333 0.321569 0.321569 0.298039 0.301961 0.294118 0.290196 0.27451 0.258824 0.247059 0.247059 0.235294 0.223529 0.215686 0.2 0.192157 0.180392 0.176471 0.164706 0.137255 0.14902 0.211765 0.196078 0.145098 0.00392157 0 0 0 0 0 0 0 0 0 0 0.00784314 0.0980392 0.164706 0.196078 0.235294 0.270588 0.309804 0.360784 0.403922 0.470588 0.533333 0.584314 0.639216 0.670588 0.631373 0.564706 0.431373 0.313725 0.2 0.121569 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0784314 0.14902 0.184314 0.211765 0.258824 0.27451 0.305882 0.317647 0.341176 0.352941 0.360784 0.372549 0.392157 0.396078 0.403922 0.396078 0.396078 0.423529 0.411765 0.407843 0.423529 0.423529 0.423529 0.427451 0.435294 0.435294 0.427451 0.435294 0.439216 0.435294 0.419608 0.427451 0.427451 0.423529 0.427451 0.423529 0.431373 0.423529 0.423529 0.415686 0.415686 0.403922 0.403922 0.403922 0.396078 0.388235 0.392157 0.376471 0.376471 0.368627 0.34902 0.356863 0.345098 0.337255 0.333333 0.329412 0.317647 0.313725 0.294118 0.294118 0.282353 0.270588 0.258824 0.254902 0.254902 0.227451 0.211765 0.219608 0.203922 0.196078 0.188235 0.180392 0.164706 0.14902 0.133333 0.152941 0.211765 0.192157 0.113725 0 0 0 0 0 0.0117647 0.0235294 0.0823529 0.14902 0.188235 0.203922 0.235294 0.258824 0.290196 0.313725 0.356863 0.4 0.439216 0.501961 0.537255 0.607843 0.658824 0.694118 0.647059 0.580392 0.470588 0.356863 0.243137 0.168627 0.0823529 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0313725 0.121569 0.168627 0.2 0.235294 0.254902 0.286275 0.305882 0.321569 0.333333 0.360784 0.360784 0.372549 0.380392 0.384314 0.396078 0.403922 0.4 0.4 0.411765 0.423529 0.415686 0.415686 0.419608 0.419608 0.435294 0.427451 0.423529 0.427451 0.427451 0.427451 0.423529 0.427451 0.423529 0.431373 0.419608 0.419608 0.411765 0.415686 0.411765 0.403922 0.396078 0.396078 0.388235 0.388235 0.392157 0.372549 0.368627 0.364706 0.356863 0.341176 0.341176 0.333333 0.333333 0.337255 0.317647 0.305882 0.298039 0.298039 0.282353 0.27451 0.262745 0.258824 0.247059 0.235294 0.235294 0.207843 0.207843 0.2 0.184314 0.180392 0.160784 0.14902 0.141176 0.117647 0.156863 0.219608 0.176471 0.12549 0.0627451 0.0431373 0.0627451 0.109804 0.164706 0.196078 0.231373 0.231373 0.266667 0.305882 0.321569 0.34902 0.380392 0.407843 0.447059 0.494118 0.537255 0.580392 0.635294 0.85098 0.807843 0.65098 0.576471 0.47451 0.364706 0.254902 0.172549 0.105882 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0862745 0.145098 0.188235 0.207843 0.247059 0.270588 0.294118 0.309804 0.317647 0.345098 0.352941 0.368627 0.356863 0.364706 0.396078 0.396078 0.4 0.396078 0.407843 0.415686 0.411765 0.419608 0.419608 0.415686 0.419608 0.415686 0.419608 0.419608 0.415686 0.415686 0.431373 0.407843 0.415686 0.411765 0.419608 0.407843 0.407843 0.415686 0.4 0.396078 0.392157 0.396078 0.388235 0.380392 0.364706 0.372549 0.364706 0.360784 0.352941 0.341176 0.341176 0.333333 0.321569 0.321569 0.309804 0.294118 0.286275 0.282353 0.270588 0.266667 0.262745 0.258824 0.243137 0.231373 0.223529 0.211765 0.2 0.184314 0.188235 0.168627 0.156863 0.14902 0.129412 0.121569 0.164706 0.215686 0.172549 0.156863 0.12549 0.133333 0.172549 0.219608 0.270588 0.301961 0.317647 0.356863 0.392157 0.419608 0.435294 0.47451 0.509804 0.54902 0.576471 0.607843 0.784314 0.847059 0.670588 0.596078 0.517647 0.415686 0.321569 0.231373 0.152941 0.101961 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.027451 0.113725 0.164706 0.196078 0.227451 0.247059 0.27451 0.294118 0.309804 0.333333 0.337255 0.356863 0.356863 0.360784 0.376471 0.376471 0.384314 0.396078 0.4 0.392157 0.396078 0.4 0.415686 0.411765 0.407843 0.415686 0.411765 0.407843 0.411765 0.419608 0.415686 0.411765 0.407843 0.411765 0.4 0.403922 0.396078 0.392157 0.403922 0.392157 0.380392 0.384314 0.380392 0.376471 0.360784 0.360784 0.352941 0.345098 0.34902 0.329412 0.341176 0.317647 0.313725 0.309804 0.294118 0.290196 0.290196 0.270588 0.266667 0.258824 0.247059 0.247059 0.231373 0.215686 0.203922 0.196078 0.184314 0.176471 0.168627 0.152941 0.141176 0.137255 0.121569 0.105882 0.211765 0.247059 0.192157 0.239216 0.239216 0.27451 0.32549 0.368627 0.396078 0.419608 0.454902 0.482353 0.509804 0.541176 0.556863 0.6 0.631373 0.701961 0.721569 0.6 0.552941 0.482353 0.411765 0.32549 0.247059 0.176471 0.121569 0.0627451 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0823529 0.145098 0.184314 0.207843 0.235294 0.258824 0.282353 0.298039 0.301961 0.333333 0.337255 0.352941 0.360784 0.360784 0.376471 0.388235 0.380392 0.388235 0.396078 0.396078 0.4 0.396078 0.403922 0.407843 0.407843 0.411765 0.415686 0.4 0.415686 0.407843 0.4 0.411765 0.396078 0.4 0.4 0.4 0.4 0.388235 0.380392 0.384314 0.380392 0.364706 0.372549 0.360784 0.360784 0.34902 0.341176 0.337255 0.32549 0.321569 0.313725 0.309804 0.309804 0.290196 0.286275 0.278431 0.266667 0.262745 0.25098 0.239216 0.227451 0.227451 0.215686 0.203922 0.196078 0.180392 0.168627 0.156863 0.152941 0.133333 0.12549 0.109804 0.101961 0.192157 0.180392 0.254902 0.309804 0.368627 0.411765 0.462745 0.490196 0.52549 0.545098 0.556863 0.584314 0.615686 0.623529 0.627451 0.6 0.533333 0.494118 0.431373 0.368627 0.290196 0.223529 0.172549 0.121569 0.0666667 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.113725 0.160784 0.192157 0.223529 0.247059 0.254902 0.282353 0.301961 0.313725 0.333333 0.329412 0.352941 0.360784 0.360784 0.372549 0.384314 0.384314 0.380392 0.392157 0.392157 0.396078 0.396078 0.396078 0.396078 0.411765 0.396078 0.388235 0.4 0.396078 0.388235 0.396078 0.403922 0.384314 0.388235 0.384314 0.396078 0.384314 0.376471 0.360784 0.368627 0.368627 0.364706 0.34902 0.352941 0.337255 0.333333 0.32549 0.329412 0.329412 0.309804 0.298039 0.294118 0.282353 0.27451 0.262745 0.258824 0.25098 0.243137 0.235294 0.231373 0.211765 0.207843 0.196078 0.184314 0.176471 0.156863 0.152941 0.145098 0.121569 0.113725 0.0941176 0.113725 0.160784 0.196078 0.345098 0.470588 0.478431 0.517647 0.560784 0.580392 0.580392 0.560784 0.541176 0.52549 0.482353 0.454902 0.403922 0.352941 0.301961 0.239216 0.196078 0.14902 0.109804 0.0666667 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0705882 0.141176 0.172549 0.203922 0.231373 0.25098 0.262745 0.286275 0.305882 0.317647 0.321569 0.333333 0.345098 0.356863 0.360784 0.364706 0.368627 0.376471 0.376471 0.392157 0.392157 0.380392 0.380392 0.396078 0.396078 0.396078 0.392157 0.392157 0.380392 0.392157 0.380392 0.376471 0.392157 0.380392 0.368627 0.392157 0.368627 0.356863 0.352941 0.356863 0.352941 0.341176 0.34902 0.337255 0.333333 0.329412 0.317647 0.309804 0.305882 0.298039 0.286275 0.278431 0.266667 0.27451 0.258824 0.25098 0.243137 0.227451 0.215686 0.215686 0.207843 0.196078 0.184314 0.176471 0.168627 0.145098 0.141176 0.133333 0.109804 0.0901961 0.0941176 0.113725 0.137255 0.231373 0.341176 0.423529 0.466667 0.470588 0.466667 0.443137 0.403922 0.380392 0.337255 0.309804 0.258824 0.219608 0.188235 0.145098 0.105882 0.0745098 0.0392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.105882 0.14902 0.184314 0.215686 0.239216 0.266667 0.282353 0.294118 0.305882 0.32549 0.321569 0.337255 0.345098 0.352941 0.34902 0.364706 0.364706 0.368627 0.384314 0.376471 0.376471 0.380392 0.384314 0.392157 0.376471 0.388235 0.388235 0.384314 0.384314 0.364706 0.376471 0.380392 0.368627 0.372549 0.368627 0.352941 0.364706 0.352941 0.34902 0.34902 0.341176 0.333333 0.341176 0.32549 0.32549 0.309804 0.301961 0.294118 0.286275 0.282353 0.27451 0.262745 0.262745 0.25098 0.243137 0.235294 0.227451 0.215686 0.211765 0.196078 0.184314 0.172549 0.164706 0.160784 0.145098 0.133333 0.117647 0.105882 0.0941176 0.0705882 0.0901961 0.141176 0.223529 0.266667 0.298039 0.298039 0.282353 0.254902 0.223529 0.196078 0.168627 0.145098 0.117647 0.0901961 0.054902 0.0235294 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0588235 0.12549 0.164706 0.196078 0.227451 0.247059 0.262745 0.278431 0.290196 0.305882 0.305882 0.329412 0.32549 0.341176 0.341176 0.356863 0.356863 0.368627 0.368627 0.360784 0.364706 0.372549 0.364706 0.372549 0.372549 0.384314 0.376471 0.380392 0.380392 0.372549 0.364706 0.364706 0.372549 0.352941 0.368627 0.360784 0.34902 0.352941 0.333333 0.341176 0.329412 0.333333 0.313725 0.309804 0.309804 0.298039 0.294118 0.286275 0.282353 0.27451 0.270588 0.254902 0.254902 0.243137 0.231373 0.207843 0.211765 0.207843 0.196078 0.192157 0.176471 0.164706 0.156863 0.14902 0.133333 0.12549 0.113725 0.0941176 0.0745098 0.0470588 0.0862745 0.12549 0.14902 0.141176 0.137255 0.12549 0.113725 0.0980392 0.0705882 0.0509804 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0862745 0.141176 0.172549 0.196078 0.223529 0.25098 0.262745 0.278431 0.294118 0.301961 0.321569 0.321569 0.337255 0.341176 0.341176 0.352941 0.345098 0.364706 0.368627 0.356863 0.364706 0.364706 0.376471 0.368627 0.368627 0.368627 0.364706 0.372549 0.360784 0.360784 0.364706 0.352941 0.364706 0.352941 0.34902 0.341176 0.345098 0.32549 0.341176 0.32549 0.313725 0.313725 0.309804 0.294118 0.301961 0.282353 0.266667 0.262745 0.258824 0.262745 0.243137 0.243137 0.235294 0.215686 0.215686 0.196078 0.196078 0.192157 0.168627 0.176471 0.156863 0.14902 0.141176 0.121569 0.113725 0.0980392 0.0745098 0.0509804 0.0352941 0.0705882 0.0745098 0.0470588 0.0431373 0.027451 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.101961 0.145098 0.180392 0.211765 0.231373 0.25098 0.266667 0.282353 0.294118 0.298039 0.313725 0.32549 0.32549 0.341176 0.34902 0.345098 0.364706 0.356863 0.356863 0.368627 0.368627 0.356863 0.364706 0.364706 0.360784 0.352941 0.356863 0.356863 0.360784 0.360784 0.352941 0.34902 0.34902 0.333333 0.341176 0.337255 0.329412 0.321569 0.321569 0.317647 0.309804 0.290196 0.305882 0.286275 0.266667 0.278431 0.266667 0.25098 0.266667 0.243137 0.227451 0.223529 0.215686 0.207843 0.196078 0.188235 0.176471 0.172549 0.164706 0.14902 0.141176 0.12549 0.117647 0.105882 0.0862745 0.0627451 0.027451 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0431373 0.109804 0.152941 0.180392 0.219608 0.223529 0.247059 0.270588 0.286275 0.294118 0.305882 0.309804 0.32549 0.329412 0.333333 0.337255 0.345098 0.356863 0.341176 0.34902 0.34902 0.356863 0.356863 0.352941 0.356863 0.34902 0.360784 0.352941 0.352941 0.34902 0.345098 0.333333 0.345098 0.341176 0.32549 0.329412 0.321569 0.317647 0.313725 0.305882 0.298039 0.294118 0.294118 0.282353 0.270588 0.262745 0.25098 0.247059 0.239216 0.231373 0.227451 0.211765 0.211765 0.2 0.192157 0.180392 0.176471 0.160784 0.14902 0.141176 0.137255 0.117647 0.0980392 0.0941176 0.0705882 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0627451 0.121569 0.164706 0.188235 0.215686 0.243137 0.258824 0.266667 0.270588 0.294118 0.298039 0.301961 0.321569 0.32549 0.337255 0.329412 0.345098 0.34902 0.341176 0.337255 0.352941 0.34902 0.34902 0.345098 0.34902 0.34902 0.341176 0.341176 0.352941 0.333333 0.329412 0.333333 0.333333 0.32549 0.32549 0.317647 0.317647 0.301961 0.301961 0.298039 0.290196 0.27451 0.270588 0.254902 0.25098 0.25098 0.235294 0.239216 0.219608 0.215686 0.211765 0.2 0.192157 0.188235 0.188235 0.164706 0.152941 0.141176 0.141176 0.129412 0.109804 0.101961 0.0705882 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0588235 0.121569 0.156863 0.192157 0.219608 0.239216 0.254902 0.266667 0.282353 0.298039 0.298039 0.313725 0.317647 0.317647 0.329412 0.321569 0.32549 0.341176 0.333333 0.337255 0.337255 0.337255 0.337255 0.337255 0.337255 0.341176 0.32549 0.329412 0.345098 0.333333 0.321569 0.321569 0.317647 0.317647 0.305882 0.301961 0.298039 0.286275 0.282353 0.278431 0.27451 0.262745 0.262745 0.25098 0.239216 0.235294 0.223529 0.215686 0.203922 0.188235 0.188235 0.188235 0.180392 0.160784 0.152941 0.14902 0.141176 0.12549 0.113725 0.0862745 0.0705882 0.0470588 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0117647 0.0588235 0.0980392 0.141176 0.176471 0.2 0.235294 0.247059 0.262745 0.27451 0.278431 0.290196 0.305882 0.301961 0.317647 0.321569 0.317647 0.333333 0.32549 0.329412 0.333333 0.333333 0.32549 0.337255 0.321569 0.317647 0.32549 0.329412 0.313725 0.313725 0.321569 0.313725 0.309804 0.301961 0.298039 0.294118 0.286275 0.278431 0.266667 0.266667 0.254902 0.25098 0.243137 0.239216 0.227451 0.223529 0.219608 0.203922 0.207843 0.192157 0.188235 0.176471 0.176471 0.152941 0.14902 0.133333 0.121569 0.109804 0.0862745 0.0705882 0.0352941 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.0901961 0.0980392 0.12549 0.168627 0.211765 0.211765 0.231373 0.262745 0.258824 0.27451 0.282353 0.290196 0.301961 0.309804 0.313725 0.309804 0.321569 0.32549 0.317647 0.321569 0.32549 0.317647 0.313725 0.321569 0.32549 0.317647 0.317647 0.298039 0.309804 0.298039 0.294118 0.301961 0.286275 0.27451 0.282353 0.270588 0.262745 0.254902 0.247059 0.239216 0.231373 0.231373 0.223529 0.219608 0.203922 0.2 0.188235 0.188235 0.172549 0.164706 0.14902 0.137255 0.129412 0.12549 0.0980392 0.0901961 0.0666667 0.027451 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0352941 0.0901961 0.129412 0.109804 0.145098 0.172549 0.196078 0.211765 0.235294 0.247059 0.262745 0.270588 0.290196 0.298039 0.298039 0.298039 0.309804 0.301961 0.313725 0.305882 0.305882 0.329412 0.305882 0.317647 0.301961 0.301961 0.305882 0.298039 0.317647 0.294118 0.270588 0.286275 0.286275 0.270588 0.262745 0.262745 0.247059 0.247059 0.247059 0.235294 0.223529 0.231373 0.2 0.203922 0.2 0.180392 0.188235 0.164706 0.156863 0.145098 0.129412 0.117647 0.109804 0.0901961 0.0784314 0.054902 0.0588235 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0352941 0.0862745 0.117647 0.156863 0.164706 0.145098 0.164706 0.188235 0.2 0.219608 0.227451 0.243137 0.247059 0.262745 0.278431 0.286275 0.290196 0.290196 0.286275 0.298039 0.294118 0.301961 0.294118 0.298039 0.286275 0.298039 0.286275 0.282353 0.270588 0.27451 0.270588 0.258824 0.258824 0.254902 0.239216 0.239216 0.235294 0.231373 0.219608 0.207843 0.2 0.196078 0.188235 0.172549 0.168627 0.152941 0.145098 0.129412 0.121569 0.113725 0.0941176 0.0862745 0.0823529 0.0745098 0.0509804 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00392157 0.0901961 0.113725 0.141176 0.176471 0.196078 0.196078 0.184314 0.172549 0.188235 0.211765 0.207843 0.219608 0.243137 0.243137 0.25098 0.247059 0.262745 0.262745 0.258824 0.266667 0.278431 0.258824 0.262745 0.270588 0.258824 0.266667 0.25098 0.247059 0.239216 0.235294 0.239216 0.223529 0.219608 0.203922 0.207843 0.2 0.184314 0.192157 0.180392 0.176471 0.152941 0.164706 0.137255 0.133333 0.117647 0.101961 0.105882 0.113725 0.0980392 0.0823529 0.0627451 0.054902 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.113725 0.129412 0.152941 0.172549 0.2 0.215686 0.223529 0.211765 0.196078 0.196078 0.192157 0.2 0.196078 0.215686 0.219608 0.219608 0.227451 0.227451 0.223529 0.235294 0.231373 0.235294 0.223529 0.223529 0.223529 0.219608 0.203922 0.203922 0.196078 0.2 0.2 0.188235 0.180392 0.172549 0.168627 0.160784 0.145098 0.141176 0.129412 0.129412 0.12549 0.133333 0.141176 0.12549 0.121569 0.101961 0.0862745 0.0666667 0.0392157 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.0392157 0.109804 0.152941 0.172549 0.164706 0.176471 0.192157 0.207843 0.227451 0.243137 0.243137 0.243137 0.235294 0.219608 0.219608 0.207843 0.207843 0.196078 0.196078 0.196078 0.192157 0.188235 0.196078 0.172549 0.180392 0.172549 0.164706 0.172549 0.168627 0.168627 0.164706 0.168627 0.172549 0.164706 0.168627 0.176471 0.168627 0.160784 0.164706 0.137255 0.121569 0.109804 0.0980392 0.0901961 0.0823529 0.0509804 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.0588235 0.0470588 0.0862745 0.121569 0.168627 0.188235 0.196078 0.188235 0.196078 0.184314 0.196078 0.207843 0.219608 0.219608 0.239216 0.243137 0.243137 0.239216 0.247059 0.235294 0.239216 0.231373 0.235294 0.231373 0.219608 0.219608 0.207843 0.203922 0.196078 0.203922 0.184314 0.180392 0.164706 0.152941 0.145098 0.129412 0.137255 0.137255 0.14902 0.145098 0.113725 0.0862745 0.0509804 0.0313725 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0352941 0.168627 0.133333 0.0588235 0.0745098 0.0901961 0.105882 0.137255 0.164706 0.188235 0.207843 0.211765 0.207843 0.203922 0.207843 0.188235 0.196078 0.192157 0.192157 0.184314 0.188235 0.180392 0.192157 0.176471 0.172549 0.164706 0.164706 0.156863 0.164706 0.164706 0.14902 0.156863 0.145098 0.156863 0.141176 0.141176 0.160784 0.188235 0.180392 0.156863 0.113725 0.0666667 0.0588235 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.0588235 0.0627451 0.0588235 0.0470588 0.0588235 0.0666667 0.0862745 0.0941176 0.105882 0.117647 0.129412 0.14902 0.168627 0.176471 0.188235 0.192157 0.184314 0.180392 0.196078 0.180392 0.176471 0.172549 0.172549 0.164706 0.152941 0.137255 0.137255 0.121569 0.109804 0.0941176 0.0980392 0.145098 0.176471 0.196078 0.156863 0.133333 0.0980392 0.0980392 0.0431373 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.0392157 0.105882 0.0862745 0.0470588 0.054902 0.0666667 0.0705882 0.0784314 0.0862745 0.0862745 0.0941176 0.0941176 0.0980392 0.0941176 0.0980392 0.0901961 0.0980392 0.101961 0.0941176 0.0823529 0.0901961 0.0745098 0.0784314 0.0666667 0.0980392 0.129412 0.141176 0.117647 0.14902 0.129412 0.0588235 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.0784314 0.117647 0.105882 0.0980392 0.0862745 0.0745098 0.0627451 0.0509804 0.0509804 0.0588235 0.0509804 0.0627451 0.0588235 0.0431373 0.0666667 0.0627451 0.109804 0.141176 0.160784 0.14902 0.129412 0.0627451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.027451 0.0588235 0.101961 0.156863 0.2 0.235294 0.27451 0.301961 0.313725 0.317647 0.32549 0.313725 0.301961 0.270588 0.235294 0.188235 0.133333 0.0901961 0.0470588 0.027451 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.0784314 0.141176 0.243137 0.368627 0.47451 0.537255 0.576471 0.596078 0.623529 0.627451 0.639216 0.647059 0.654902 0.643137 0.662745 0.662745 0.666667 0.666667 0.654902 0.678431 0.713725 0.784314 0.772549 0.776471 0.772549 0.752941 0.694118 0.690196 0.682353 0.670588 0.658824 0.643137 0.627451 0.596078 0.545098 0.45098 0.321569 0.215686 0.137255 0.0666667 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00392157 0.129412 0.262745 0.368627 0.494118 0.556863 0.584314 0.603922 0.611765 0.603922 0.619608 0.615686 0.607843 0.607843 0.611765 0.592157 0.588235 0.584314 0.572549 0.568627 0.560784 0.556863 0.54902 0.556863 0.556863 0.545098 0.560784 0.619608 0.807843 0.823529 0.819608 0.803922 0.764706 0.662745 0.662745 0.658824 0.65098 0.654902 0.662745 0.666667 0.67451 0.678431 0.678431 0.654902 0.65098 0.647059 0.631373 0.603922 0.533333 0.423529 0.309804 0.160784 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0117647 0.231373 0.403922 0.494118 0.545098 0.564706 0.576471 0.584314 0.572549 0.560784 0.560784 0.560784 0.533333 0.509804 0.494118 0.458824 0.431373 0.423529 0.411765 0.388235 0.360784 0.345098 0.352941 0.356863 0.333333 0.329412 0.341176 0.32549 0.333333 0.341176 0.341176 0.372549 0.458824 0.454902 0.368627 0.368627 0.372549 0.380392 0.372549 0.4 0.423529 0.443137 0.454902 0.478431 0.513725 0.560784 0.631373 0.709804 0.882353 1 0.905882 0.717647 0.678431 0.690196 0.658824 0.643137 0.615686 0.552941 0.45098 0.243137 0.054902 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.117647 0.372549 0.490196 0.521569 0.54902 0.560784 0.54902 0.537255 0.533333 0.501961 0.486275 0.45098 0.415686 0.384314 0.368627 0.32549 0.294118 0.270588 0.270588 0.282353 0.282353 0.282353 0.278431 0.282353 0.282353 0.313725 0.301961 0.270588 0.278431 0.298039 0.270588 0.278431 0.329412 0.498039 0.647059 0.341176 0.329412 0.32549 0.294118 0.290196 0.294118 0.305882 0.290196 0.294118 0.298039 0.290196 0.294118 0.313725 0.32549 0.317647 0.345098 0.360784 0.384314 0.407843 0.447059 0.490196 0.52549 0.560784 0.592157 0.607843 0.631373 0.639216 0.627451 0.607843 0.564706 0.423529 0.180392 0.0666667 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.164706 0.372549 0.490196 0.501961 0.517647 0.529412 0.513725 0.490196 0.466667 0.423529 0.388235 0.34902 0.317647 0.298039 0.278431 0.262745 0.266667 0.258824 0.25098 0.227451 0.223529 0.247059 0.254902 0.258824 0.258824 0.262745 0.25098 0.266667 0.298039 0.294118 0.258824 0.290196 0.52549 0.258824 0.266667 0.321569 0.894118 0.988235 0.607843 0.341176 0.356863 0.313725 0.266667 0.27451 0.278431 0.258824 0.266667 0.266667 0.262745 0.278431 0.27451 0.286275 0.290196 0.305882 0.298039 0.309804 0.313725 0.32549 0.329412 0.333333 0.345098 0.380392 0.431373 0.462745 0.521569 0.568627 0.6 0.615686 0.611765 0.611765 0.576471 0.447059 0.25098 0.0627451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.313725 0.45098 0.470588 0.478431 0.501961 0.490196 0.45098 0.423529 0.364706 0.321569 0.290196 0.254902 0.243137 0.231373 0.243137 0.231373 0.235294 0.239216 0.235294 0.235294 0.223529 0.219608 0.219608 0.231373 0.239216 0.239216 0.25098 0.235294 0.243137 0.247059 0.278431 0.298039 0.247059 0.243137 0.266667 0.25098 0.262745 0.337255 0.427451 0.521569 0.321569 0.278431 0.278431 0.278431 0.262745 0.258824 0.262745 0.243137 0.254902 0.254902 0.25098 0.270588 0.27451 0.27451 0.278431 0.27451 0.286275 0.282353 0.286275 0.294118 0.294118 0.286275 0.305882 0.298039 0.305882 0.317647 0.333333 0.372549 0.415686 0.454902 0.521569 0.560784 0.588235 0.603922 0.580392 0.556863 0.435294 0.172549 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.027451 0.341176 0.447059 0.458824 0.439216 0.45098 0.435294 0.388235 0.337255 0.278431 0.239216 0.227451 0.219608 0.219608 0.211765 0.207843 0.207843 0.203922 0.223529 0.211765 0.223529 0.219608 0.223529 0.219608 0.203922 0.2 0.227451 0.235294 0.243137 0.231373 0.235294 0.223529 0.235294 0.270588 0.27451 0.235294 0.231373 0.247059 0.223529 0.258824 0.278431 0.317647 0.294118 0.282353 0.266667 0.25098 0.254902 0.266667 0.258824 0.254902 0.258824 0.243137 0.243137 0.239216 0.254902 0.258824 0.258824 0.262745 0.247059 0.247059 0.266667 0.266667 0.266667 0.286275 0.278431 0.282353 0.270588 0.278431 0.286275 0.27451 0.278431 0.282353 0.290196 0.317647 0.364706 0.423529 0.501961 0.545098 0.572549 0.564706 0.541176 0.498039 0.227451 0.0352941 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.27451 0.431373 0.423529 0.407843 0.4 0.380392 0.333333 0.27451 0.235294 0.211765 0.188235 0.196078 0.188235 0.188235 0.2 0.180392 0.196078 0.2 0.203922 0.2 0.2 0.211765 0.215686 0.215686 0.207843 0.196078 0.184314 0.2 0.231373 0.231373 0.235294 0.223529 0.219608 0.2 0.243137 0.270588 0.243137 0.239216 0.235294 0.235294 0.227451 0.262745 0.286275 0.286275 0.262745 0.25098 0.25098 0.258824 0.239216 0.247059 0.254902 0.25098 0.239216 0.243137 0.235294 0.243137 0.25098 0.247059 0.243137 0.223529 0.266667 0.270588 0.254902 0.266667 0.25098 0.266667 0.282353 0.25098 0.258824 0.27451 0.247059 0.25098 0.247059 0.270588 0.254902 0.27451 0.290196 0.317647 0.368627 0.45098 0.513725 0.541176 0.552941 0.533333 0.47451 0.207843 0.0196078 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.117647 0.388235 0.411765 0.380392 0.364706 0.341176 0.294118 0.247059 0.219608 0.2 0.180392 0.180392 0.172549 0.188235 0.164706 0.176471 0.192157 0.192157 0.2 0.196078 0.180392 0.2 0.2 0.215686 0.207843 0.215686 0.211765 0.188235 0.188235 0.203922 0.219608 0.235294 0.207843 0.207843 0.219608 0.219608 0.243137 0.258824 0.235294 0.223529 0.231373 0.231373 0.247059 0.25098 0.282353 0.266667 0.258824 0.247059 0.243137 0.25098 0.243137 0.243137 0.243137 0.235294 0.231373 0.235294 0.239216 0.235294 0.239216 0.231373 0.235294 0.223529 0.266667 0.266667 0.258824 0.25098 0.243137 0.266667 0.278431 0.247059 0.247059 0.243137 0.239216 0.243137 0.243137 0.235294 0.25098 0.243137 0.258824 0.25098 0.258824 0.278431 0.337255 0.427451 0.486275 0.517647 0.517647 0.505882 0.403922 0.105882 0.00392157 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.176471 0.407843 0.384314 0.345098 0.321569 0.278431 0.215686 0.188235 0.164706 0.160784 0.145098 0.156863 0.156863 0.14902 0.152941 0.172549 0.172549 0.168627 0.164706 0.180392 0.196078 0.188235 0.184314 0.192157 0.184314 0.188235 0.196078 0.196078 0.188235 0.188235 0.203922 0.215686 0.211765 0.207843 0.207843 0.211765 0.207843 0.227451 0.25098 0.223529 0.211765 0.219608 0.231373 0.231373 0.239216 0.254902 0.262745 0.262745 0.254902 0.235294 0.235294 0.243137 0.243137 0.247059 0.223529 0.235294 0.227451 0.231373 0.239216 0.215686 0.219608 0.231373 0.235294 0.25098 0.262745 0.243137 0.243137 0.247059 0.227451 0.243137 0.227451 0.239216 0.239216 0.243137 0.239216 0.266667 0.278431 0.266667 0.270588 0.25098 0.243137 0.243137 0.27451 0.254902 0.278431 0.317647 0.415686 0.470588 0.501961 0.498039 0.466667 0.215686 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14902 0.392157 0.360784 0.309804 0.286275 0.25098 0.176471 0.160784 0.145098 0.133333 0.145098 0.133333 0.137255 0.141176 0.145098 0.145098 0.160784 0.145098 0.156863 0.156863 0.160784 0.184314 0.192157 0.196078 0.192157 0.172549 0.176471 0.176471 0.180392 0.192157 0.188235 0.188235 0.184314 0.196078 0.192157 0.196078 0.203922 0.196078 0.2 0.203922 0.203922 0.203922 0.203922 0.215686 0.227451 0.215686 0.223529 0.223529 0.231373 0.231373 0.223529 0.227451 0.223529 0.215686 0.223529 0.223529 0.211765 0.227451 0.227451 0.227451 0.215686 0.223529 0.223529 0.219608 0.223529 0.231373 0.227451 0.223529 0.227451 0.219608 0.227451 0.219608 0.223529 0.207843 0.223529 0.227451 0.207843 0.227451 0.223529 0.231373 0.235294 0.223529 0.227451 0.231373 0.227451 0.239216 0.266667 0.282353 0.337255 0.419608 0.470588 0.482353 0.458824 0.286275 0.0392157 0.0156863 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.392157 0.345098 0.286275 0.262745 0.211765 0.152941 0.137255 0.145098 0.133333 0.12549 0.129412 0.137255 0.12549 0.145098 0.141176 0.14902 0.14902 0.14902 0.152941 0.145098 0.145098 0.156863 0.156863 0.176471 0.160784 0.164706 0.172549 0.164706 0.184314 0.176471 0.180392 0.180392 0.180392 0.188235 0.192157 0.180392 0.196078 0.2 0.192157 0.188235 0.192157 0.2 0.203922 0.2 0.2 0.2 0.211765 0.207843 0.207843 0.207843 0.219608 0.215686 0.207843 0.211765 0.223529 0.219608 0.211765 0.223529 0.215686 0.219608 0.223529 0.219608 0.219608 0.219608 0.215686 0.207843 0.211765 0.215686 0.211765 0.231373 0.219608 0.211765 0.215686 0.223529 0.223529 0.207843 0.215686 0.215686 0.215686 0.219608 0.223529 0.207843 0.219608 0.211765 0.211765 0.211765 0.227451 0.231373 0.247059 0.309804 0.388235 0.439216 0.470588 0.45098 0.278431 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.294118 0.368627 0.278431 0.262745 0.196078 0.141176 0.12549 0.129412 0.12549 0.12549 0.121569 0.129412 0.133333 0.141176 0.141176 0.133333 0.137255 0.141176 0.152941 0.156863 0.152941 0.152941 0.156863 0.160784 0.164706 0.172549 0.168627 0.172549 0.168627 0.180392 0.180392 0.176471 0.184314 0.180392 0.176471 0.2 0.180392 0.192157 0.180392 0.192157 0.192157 0.192157 0.2 0.219608 0.2 0.215686 0.211765 0.211765 0.223529 0.211765 0.219608 0.207843 0.207843 0.235294 0.211765 0.196078 0.211765 0.211765 0.223529 0.203922 0.207843 0.223529 0.215686 0.2 0.219608 0.219608 0.231373 0.219608 0.219608 0.231373 0.211765 0.215686 0.207843 0.219608 0.211765 0.215686 0.211765 0.211765 0.203922 0.207843 0.207843 0.211765 0.219608 0.203922 0.207843 0.196078 0.2 0.211765 0.223529 0.207843 0.207843 0.262745 0.384314 0.411765 0.427451 0.411765 0.219608 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.027451 0.376471 0.329412 0.247059 0.203922 0.141176 0.117647 0.109804 0.113725 0.113725 0.117647 0.117647 0.121569 0.129412 0.133333 0.133333 0.137255 0.137255 0.14902 0.14902 0.152941 0.14902 0.152941 0.156863 0.156863 0.160784 0.168627 0.156863 0.156863 0.176471 0.172549 0.172549 0.172549 0.176471 0.184314 0.172549 0.192157 0.176471 0.192157 0.192157 0.196078 0.188235 0.2 0.192157 0.2 0.211765 0.2 0.211765 0.207843 0.211765 0.211765 0.219608 0.207843 0.211765 0.211765 0.203922 0.223529 0.215686 0.211765 0.211765 0.211765 0.207843 0.219608 0.211765 0.223529 0.215686 0.211765 0.207843 0.211765 0.223529 0.211765 0.211765 0.215686 0.207843 0.215686 0.215686 0.215686 0.2 0.219608 0.211765 0.203922 0.215686 0.2 0.196078 0.196078 0.2 0.2 0.192157 0.211765 0.2 0.207843 0.203922 0.2 0.258824 0.360784 0.380392 0.415686 0.34902 0.0666667 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.105882 0.407843 0.313725 0.215686 0.145098 0.113725 0.101961 0.105882 0.0980392 0.105882 0.0980392 0.117647 0.117647 0.12549 0.129412 0.12549 0.12549 0.145098 0.141176 0.145098 0.152941 0.152941 0.152941 0.141176 0.152941 0.156863 0.164706 0.160784 0.160784 0.164706 0.172549 0.172549 0.176471 0.184314 0.184314 0.184314 0.192157 0.176471 0.184314 0.2 0.184314 0.196078 0.192157 0.207843 0.2 0.207843 0.207843 0.211765 0.207843 0.219608 0.219608 0.215686 0.219608 0.211765 0.211765 0.211765 0.215686 0.219608 0.211765 0.196078 0.203922 0.215686 0.219608 0.207843 0.215686 0.215686 0.207843 0.215686 0.227451 0.219608 0.211765 0.215686 0.215686 0.196078 0.211765 0.211765 0.211765 0.207843 0.2 0.211765 0.207843 0.203922 0.207843 0.2 0.196078 0.188235 0.192157 0.2 0.196078 0.2 0.188235 0.180392 0.188235 0.2 0.270588 0.360784 0.376471 0.380392 0.160784 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0862745 0.407843 0.345098 0.215686 0.121569 0.101961 0.105882 0.101961 0.0941176 0.0980392 0.0980392 0.109804 0.113725 0.113725 0.117647 0.12549 0.117647 0.133333 0.141176 0.137255 0.137255 0.141176 0.137255 0.152941 0.152941 0.156863 0.14902 0.160784 0.160784 0.156863 0.168627 0.172549 0.180392 0.180392 0.172549 0.180392 0.184314 0.184314 0.188235 0.184314 0.188235 0.184314 0.207843 0.196078 0.188235 0.196078 0.215686 0.2 0.211765 0.203922 0.207843 0.227451 0.211765 0.211765 0.215686 0.207843 0.207843 0.207843 0.207843 0.203922 0.215686 0.211765 0.223529 0.211765 0.211765 0.219608 0.207843 0.215686 0.211765 0.196078 0.2 0.196078 0.211765 0.211765 0.207843 0.211765 0.207843 0.196078 0.203922 0.203922 0.211765 0.207843 0.188235 0.203922 0.184314 0.203922 0.188235 0.180392 0.188235 0.180392 0.176471 0.176471 0.184314 0.176471 0.203922 0.321569 0.356863 0.388235 0.239216 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.117647 0.415686 0.403922 0.223529 0.109804 0.105882 0.0980392 0.0784314 0.0901961 0.0941176 0.0862745 0.0862745 0.109804 0.101961 0.105882 0.113725 0.121569 0.113725 0.129412 0.121569 0.145098 0.12549 0.14902 0.141176 0.145098 0.156863 0.152941 0.160784 0.164706 0.156863 0.160784 0.160784 0.164706 0.172549 0.164706 0.176471 0.176471 0.184314 0.180392 0.184314 0.196078 0.188235 0.196078 0.192157 0.196078 0.203922 0.196078 0.211765 0.196078 0.211765 0.203922 0.207843 0.196078 0.207843 0.211765 0.207843 0.2 0.215686 0.203922 0.211765 0.211765 0.223529 0.219608 0.215686 0.211765 0.203922 0.203922 0.203922 0.2 0.211765 0.207843 0.207843 0.223529 0.2 0.211765 0.2 0.192157 0.203922 0.180392 0.196078 0.2 0.184314 0.2 0.180392 0.188235 0.192157 0.180392 0.168627 0.176471 0.180392 0.172549 0.168627 0.172549 0.172549 0.184314 0.298039 0.352941 0.380392 0.231373 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0627451 0.341176 0.482353 0.364706 0.160784 0.0980392 0.0901961 0.0901961 0.0862745 0.0941176 0.0941176 0.0901961 0.0980392 0.0901961 0.0980392 0.0980392 0.0941176 0.0901961 0.113725 0.109804 0.117647 0.129412 0.133333 0.117647 0.133333 0.141176 0.133333 0.137255 0.14902 0.152941 0.152941 0.152941 0.156863 0.160784 0.156863 0.168627 0.164706 0.168627 0.160784 0.172549 0.176471 0.176471 0.184314 0.180392 0.188235 0.180392 0.184314 0.180392 0.184314 0.196078 0.188235 0.184314 0.203922 0.192157 0.196078 0.192157 0.196078 0.2 0.2 0.192157 0.188235 0.2 0.196078 0.192157 0.196078 0.192157 0.203922 0.207843 0.2 0.192157 0.192157 0.188235 0.184314 0.188235 0.2 0.188235 0.184314 0.192157 0.192157 0.180392 0.188235 0.172549 0.176471 0.184314 0.168627 0.172549 0.172549 0.164706 0.176471 0.164706 0.164706 0.168627 0.152941 0.156863 0.164706 0.278431 0.34902 0.368627 0.219608 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0627451 0.282353 0.454902 0.501961 0.356863 0.121569 0.0980392 0.0941176 0.0784314 0.0862745 0.0941176 0.0862745 0.0941176 0.101961 0.0862745 0.0941176 0.0941176 0.101961 0.0941176 0.109804 0.117647 0.113725 0.117647 0.133333 0.129412 0.137255 0.133333 0.137255 0.137255 0.137255 0.133333 0.141176 0.133333 0.164706 0.152941 0.152941 0.152941 0.160784 0.164706 0.160784 0.156863 0.164706 0.168627 0.176471 0.172549 0.172549 0.180392 0.176471 0.180392 0.192157 0.176471 0.196078 0.176471 0.188235 0.180392 0.192157 0.196078 0.188235 0.180392 0.196078 0.184314 0.192157 0.2 0.188235 0.188235 0.192157 0.196078 0.184314 0.172549 0.188235 0.192157 0.180392 0.188235 0.172549 0.188235 0.184314 0.180392 0.192157 0.172549 0.180392 0.180392 0.180392 0.172549 0.168627 0.180392 0.172549 0.168627 0.168627 0.172549 0.164706 0.164706 0.156863 0.164706 0.156863 0.188235 0.321569 0.407843 0.337255 0.168627 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0431373 0.231373 0.372549 0.498039 0.556863 0.392157 0.14902 0.105882 0.101961 0.0941176 0.0784314 0.0901961 0.0941176 0.0705882 0.0901961 0.0823529 0.0901961 0.0980392 0.101961 0.101961 0.113725 0.105882 0.113725 0.129412 0.117647 0.12549 0.129412 0.152941 0.141176 0.133333 0.14902 0.14902 0.14902 0.164706 0.156863 0.152941 0.160784 0.14902 0.168627 0.156863 0.172549 0.164706 0.156863 0.180392 0.176471 0.180392 0.176471 0.168627 0.172549 0.184314 0.188235 0.188235 0.180392 0.196078 0.188235 0.184314 0.196078 0.192157 0.192157 0.188235 0.184314 0.188235 0.192157 0.188235 0.192157 0.180392 0.180392 0.184314 0.180392 0.188235 0.176471 0.188235 0.184314 0.188235 0.176471 0.176471 0.168627 0.176471 0.176471 0.180392 0.180392 0.168627 0.180392 0.164706 0.164706 0.164706 0.168627 0.168627 0.156863 0.160784 0.160784 0.14902 0.14902 0.160784 0.298039 0.4 0.392157 0.270588 0.145098 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.196078 0.298039 0.407843 0.521569 0.596078 0.513725 0.262745 0.121569 0.109804 0.0980392 0.0862745 0.0901961 0.0862745 0.0901961 0.101961 0.0901961 0.105882 0.101961 0.101961 0.105882 0.113725 0.117647 0.117647 0.117647 0.12549 0.12549 0.133333 0.137255 0.133333 0.14902 0.152941 0.145098 0.156863 0.160784 0.160784 0.164706 0.14902 0.168627 0.160784 0.172549 0.164706 0.180392 0.176471 0.164706 0.164706 0.188235 0.188235 0.180392 0.172549 0.188235 0.188235 0.192157 0.188235 0.188235 0.192157 0.192157 0.184314 0.180392 0.184314 0.184314 0.172549 0.188235 0.184314 0.192157 0.184314 0.192157 0.180392 0.188235 0.184314 0.180392 0.184314 0.184314 0.192157 0.192157 0.188235 0.176471 0.184314 0.172549 0.172549 0.168627 0.176471 0.184314 0.160784 0.164706 0.160784 0.160784 0.156863 0.156863 0.14902 0.14902 0.152941 0.14902 0.290196 0.403922 0.4 0.321569 0.227451 0.129412 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.160784 0.270588 0.345098 0.439216 0.552941 0.619608 0.615686 0.498039 0.247059 0.117647 0.117647 0.105882 0.0941176 0.0901961 0.0901961 0.0980392 0.105882 0.101961 0.101961 0.109804 0.109804 0.121569 0.121569 0.12549 0.133333 0.129412 0.129412 0.137255 0.137255 0.141176 0.145098 0.145098 0.145098 0.145098 0.152941 0.160784 0.152941 0.156863 0.172549 0.152941 0.168627 0.172549 0.160784 0.164706 0.176471 0.180392 0.160784 0.180392 0.188235 0.176471 0.184314 0.184314 0.184314 0.192157 0.176471 0.184314 0.192157 0.188235 0.188235 0.180392 0.192157 0.188235 0.188235 0.188235 0.180392 0.184314 0.192157 0.176471 0.192157 0.196078 0.192157 0.184314 0.192157 0.188235 0.176471 0.180392 0.172549 0.180392 0.172549 0.160784 0.160784 0.168627 0.176471 0.164706 0.172549 0.152941 0.141176 0.164706 0.145098 0.141176 0.215686 0.396078 0.454902 0.411765 0.345098 0.278431 0.196078 0.101961 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12549 0.235294 0.298039 0.380392 0.435294 0.509804 0.596078 0.654902 0.654902 0.556863 0.305882 0.156863 0.12549 0.117647 0.101961 0.0901961 0.0980392 0.101961 0.0980392 0.105882 0.0980392 0.109804 0.113725 0.121569 0.12549 0.12549 0.113725 0.133333 0.141176 0.133333 0.141176 0.145098 0.145098 0.156863 0.145098 0.164706 0.164706 0.168627 0.168627 0.168627 0.160784 0.168627 0.176471 0.180392 0.172549 0.168627 0.184314 0.188235 0.184314 0.184314 0.188235 0.188235 0.192157 0.203922 0.196078 0.188235 0.176471 0.188235 0.192157 0.196078 0.192157 0.184314 0.2 0.207843 0.192157 0.196078 0.188235 0.184314 0.188235 0.192157 0.184314 0.176471 0.184314 0.192157 0.180392 0.164706 0.180392 0.188235 0.164706 0.172549 0.168627 0.164706 0.172549 0.164706 0.168627 0.152941 0.14902 0.152941 0.2 0.388235 0.470588 0.470588 0.435294 0.384314 0.301961 0.25098 0.184314 0.0666667 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0980392 0.203922 0.282353 0.34902 0.403922 0.45098 0.498039 0.552941 0.615686 0.666667 0.701961 0.654902 0.482353 0.258824 0.168627 0.129412 0.113725 0.113725 0.109804 0.109804 0.109804 0.113725 0.117647 0.117647 0.12549 0.117647 0.141176 0.121569 0.137255 0.137255 0.141176 0.145098 0.152941 0.156863 0.152941 0.156863 0.160784 0.164706 0.164706 0.160784 0.168627 0.168627 0.176471 0.180392 0.168627 0.180392 0.184314 0.192157 0.180392 0.180392 0.203922 0.188235 0.188235 0.192157 0.176471 0.180392 0.196078 0.184314 0.196078 0.184314 0.192157 0.2 0.192157 0.192157 0.184314 0.180392 0.180392 0.184314 0.192157 0.184314 0.188235 0.188235 0.184314 0.180392 0.184314 0.180392 0.184314 0.168627 0.172549 0.172549 0.168627 0.172549 0.168627 0.160784 0.152941 0.188235 0.278431 0.435294 0.498039 0.498039 0.470588 0.415686 0.372549 0.341176 0.313725 0.270588 0.168627 0.0352941 0 0 0 0 0.00784314 0.0627451 0.184314 0.301961 0.337255 0.372549 0.388235 0.392157 0.407843 0.396078 0.372549 0.345098 0.301961 0.168627 0.0392157 0 0 0 0 0 0 0 0 0 0 0 0.0627451 0.192157 0.254902 0.305882 0.368627 0.419608 0.454902 0.486275 0.521569 0.564706 0.615686 0.662745 0.709804 0.72549 0.682353 0.541176 0.376471 0.207843 0.137255 0.129412 0.12549 0.117647 0.12549 0.117647 0.121569 0.129412 0.129412 0.133333 0.137255 0.14902 0.145098 0.14902 0.14902 0.156863 0.156863 0.160784 0.156863 0.164706 0.164706 0.172549 0.168627 0.172549 0.168627 0.172549 0.172549 0.172549 0.176471 0.176471 0.188235 0.184314 0.180392 0.2 0.192157 0.180392 0.188235 0.192157 0.192157 0.184314 0.188235 0.192157 0.184314 0.2 0.184314 0.196078 0.196078 0.2 0.196078 0.188235 0.180392 0.188235 0.176471 0.180392 0.176471 0.184314 0.184314 0.180392 0.176471 0.176471 0.176471 0.172549 0.172549 0.160784 0.188235 0.305882 0.435294 0.521569 0.541176 0.509804 0.47451 0.431373 0.384314 0.352941 0.352941 0.333333 0.301961 0.270588 0.188235 0.0705882 0 0 0.054902 0.207843 0.356863 0.407843 0.447059 0.478431 0.494118 0.505882 0.509804 0.513725 0.513725 0.509804 0.498039 0.482353 0.45098 0.411765 0.368627 0.286275 0.109804 0 0 0 0 0 0 0 0 0 0.0509804 0.184314 0.247059 0.305882 0.345098 0.396078 0.427451 0.462745 0.490196 0.501961 0.529412 0.584314 0.607843 0.662745 0.690196 0.729412 0.745098 0.733333 0.690196 0.580392 0.376471 0.207843 0.152941 0.152941 0.145098 0.137255 0.117647 0.137255 0.137255 0.14902 0.137255 0.141176 0.156863 0.145098 0.160784 0.156863 0.160784 0.168627 0.160784 0.164706 0.176471 0.164706 0.184314 0.168627 0.172549 0.192157 0.180392 0.176471 0.184314 0.180392 0.184314 0.176471 0.184314 0.192157 0.196078 0.196078 0.196078 0.192157 0.196078 0.2 0.2 0.192157 0.196078 0.184314 0.196078 0.196078 0.2 0.184314 0.188235 0.188235 0.176471 0.180392 0.180392 0.188235 0.2 0.184314 0.184314 0.172549 0.203922 0.301961 0.443137 0.529412 0.552941 0.564706 0.552941 0.501961 0.462745 0.419608 0.388235 0.368627 0.356863 0.333333 0.333333 0.305882 0.301961 0.278431 0.282353 0.294118 0.262745 0.305882 0.380392 0.478431 0.509804 0.533333 0.556863 0.576471 0.584314 0.596078 0.6 0.592157 0.588235 0.584314 0.572549 0.54902 0.533333 0.505882 0.478431 0.427451 0.364706 0.239216 0.027451 0 0 0 0 0 0 0 0.00392157 0.156863 0.231373 0.282353 0.321569 0.368627 0.396078 0.423529 0.458824 0.482353 0.498039 0.52549 0.552941 0.580392 0.615686 0.627451 0.670588 0.698039 0.733333 0.752941 0.764706 0.760784 0.741176 0.658824 0.533333 0.368627 0.258824 0.215686 0.172549 0.14902 0.145098 0.156863 0.14902 0.14902 0.160784 0.164706 0.160784 0.160784 0.164706 0.164706 0.176471 0.168627 0.180392 0.184314 0.188235 0.184314 0.180392 0.192157 0.188235 0.184314 0.196078 0.180392 0.184314 0.196078 0.196078 0.196078 0.192157 0.192157 0.196078 0.192157 0.180392 0.203922 0.188235 0.196078 0.192157 0.188235 0.192157 0.196078 0.188235 0.196078 0.184314 0.188235 0.207843 0.227451 0.309804 0.407843 0.529412 0.588235 0.6 0.619608 0.596078 0.572549 0.533333 0.486275 0.458824 0.427451 0.4 0.360784 0.341176 0.329412 0.298039 0.309804 0.337255 0.309804 0.286275 0.313725 0.368627 0.419608 0.4 0.427451 0.498039 0.564706 0.588235 0.615686 0.635294 0.647059 0.643137 0.647059 0.654902 0.654902 0.654902 0.639216 0.627451 0.623529 0.615686 0.572549 0.54902 0.513725 0.462745 0.396078 0.313725 0.109804 0.00784314 0 0 0 0 0 0 0.141176 0.227451 0.27451 0.321569 0.360784 0.376471 0.415686 0.423529 0.458824 0.482353 0.498039 0.517647 0.533333 0.556863 0.572549 0.596078 0.615686 0.627451 0.658824 0.698039 0.717647 0.72549 0.752941 0.780392 0.807843 0.823529 0.847059 0.831373 0.717647 0.6 0.505882 0.431373 0.360784 0.286275 0.239216 0.192157 0.180392 0.168627 0.168627 0.172549 0.176471 0.180392 0.188235 0.188235 0.180392 0.192157 0.2 0.192157 0.192157 0.192157 0.196078 0.2 0.196078 0.192157 0.196078 0.2 0.192157 0.188235 0.2 0.196078 0.196078 0.188235 0.196078 0.215686 0.254902 0.301961 0.364706 0.423529 0.490196 0.572549 0.611765 0.639216 0.658824 0.65098 0.635294 0.627451 0.592157 0.560784 0.533333 0.509804 0.478431 0.443137 0.423529 0.411765 0.380392 0.34902 0.333333 0.317647 0.286275 0.266667 0.254902 0.294118 0.286275 0.305882 0.337255 0.45098 0.47451 0.435294 0.486275 0.572549 0.627451 0.639216 0.654902 0.670588 0.666667 0.682353 0.701961 0.690196 0.690196 0.694118 0.694118 0.678431 0.65098 0.639216 0.623529 0.603922 0.568627 0.52549 0.47451 0.415686 0.32549 0.137255 0.0117647 0 0 0 0 0 0.101961 0.207843 0.262745 0.305882 0.34902 0.372549 0.396078 0.415686 0.439216 0.466667 0.486275 0.498039 0.52549 0.52549 0.541176 0.552941 0.560784 0.584314 0.588235 0.615686 0.615686 0.647059 0.670588 0.670588 0.690196 0.72549 0.737255 0.752941 0.756863 0.803922 0.815686 0.815686 0.839216 0.815686 0.823529 0.772549 0.772549 0.733333 0.717647 0.682353 0.639216 0.611765 0.584314 0.560784 0.52549 0.505882 0.486275 0.490196 0.458824 0.462745 0.47451 0.478431 0.498039 0.501961 0.537255 0.556863 0.568627 0.6 0.623529 0.647059 0.670588 0.682353 0.67451 0.701961 0.701961 0.698039 0.690196 0.666667 0.662745 0.65098 0.635294 0.623529 0.588235 0.568627 0.545098 0.517647 0.505882 0.47451 0.454902 0.427451 0.403922 0.392157 0.368627 0.364706 0.329412 0.313725 0.305882 0.290196 0.270588 0.239216 0.223529 0.266667 0.294118 0.333333 0.376471 0.498039 0.486275 0.486275 0.537255 0.603922 0.666667 0.811765 0.988235 0.945098 0.772549 0.752941 0.709804 0.67451 0.686275 0.690196 0.729412 0.992157 0.984314 0.705882 0.682353 0.682353 0.627451 0.584314 0.537255 0.490196 0.415686 0.317647 0.121569 0.00784314 0 0 0 0 0.0666667 0.180392 0.25098 0.290196 0.333333 0.360784 0.384314 0.411765 0.431373 0.45098 0.462745 0.478431 0.494118 0.501961 0.509804 0.52549 0.537255 0.545098 0.560784 0.580392 0.576471 0.588235 0.596078 0.615686 0.615686 0.643137 0.647059 0.631373 0.666667 0.658824 0.678431 0.682353 0.690196 0.701961 0.709804 0.72549 0.721569 0.741176 0.74902 0.756863 0.764706 0.780392 0.8 0.847059 0.921569 0.972549 0.976471 0.980392 0.862745 0.803922 0.8 0.780392 0.756863 0.760784 0.745098 0.741176 0.733333 0.721569 0.729412 0.698039 0.690196 0.670588 0.666667 0.654902 0.635294 0.643137 0.6 0.572549 0.552941 0.541176 0.533333 0.517647 0.505882 0.490196 0.478431 0.462745 0.447059 0.427451 0.407843 0.384314 0.380392 0.356863 0.356863 0.337255 0.321569 0.290196 0.294118 0.278431 0.25098 0.215686 0.211765 0.266667 0.294118 0.305882 0.439216 0.556863 0.517647 0.513725 0.556863 0.611765 0.647059 0.631373 0.615686 0.592157 0.568627 0.529412 0.517647 0.509804 0.509804 0.537255 0.572549 0.619608 0.635294 0.717647 0.670588 0.654902 0.635294 0.596078 0.560784 0.533333 0.466667 0.388235 0.286275 0.0627451 0.00784314 0 0 0 0.0313725 0.160784 0.239216 0.278431 0.317647 0.364706 0.380392 0.407843 0.427451 0.443137 0.462745 0.466667 0.47451 0.490196 0.462745 0.494118 0.521569 0.529412 0.541176 0.560784 0.552941 0.576471 0.576471 0.592157 0.592157 0.603922 0.611765 0.611765 0.615686 0.611765 0.631373 0.619608 0.643137 0.639216 0.647059 0.635294 0.635294 0.65098 0.643137 0.658824 0.654902 0.65098 0.639216 0.647059 0.666667 0.662745 0.658824 0.670588 0.658824 0.65098 0.654902 0.647059 0.639216 0.627451 0.635294 0.639216 0.623529 0.607843 0.588235 0.6 0.588235 0.572549 0.560784 0.54902 0.552941 0.537255 0.517647 0.505882 0.501961 0.494118 0.486275 0.47451 0.478431 0.454902 0.435294 0.435294 0.403922 0.388235 0.372549 0.356863 0.345098 0.329412 0.313725 0.309804 0.278431 0.27451 0.286275 0.25098 0.239216 0.215686 0.192157 0.258824 0.286275 0.321569 0.486275 0.662745 0.521569 0.521569 0.572549 0.588235 0.564706 0.521569 0.447059 0.345098 0.258824 0.172549 0.133333 0.105882 0.117647 0.164706 0.239216 0.286275 0.439216 0.533333 0.611765 0.639216 0.623529 0.615686 0.588235 0.560784 0.509804 0.454902 0.352941 0.203922 0.0196078 0 0 0 0.00784314 0.141176 0.219608 0.266667 0.309804 0.352941 0.372549 0.403922 0.419608 0.439216 0.45098 0.466667 0.478431 0.486275 0.47451 0.494118 0.498039 0.509804 0.52549 0.52549 0.54902 0.541176 0.552941 0.560784 0.568627 0.576471 0.572549 0.588235 0.588235 0.592157 0.592157 0.592157 0.6 0.607843 0.6 0.615686 0.607843 0.615686 0.615686 0.596078 0.592157 0.603922 0.619608 0.603922 0.603922 0.619608 0.607843 0.603922 0.603922 0.6 0.588235 0.6 0.576471 0.576471 0.580392 0.580392 0.572549 0.564706 0.545098 0.552941 0.537255 0.533333 0.521569 0.521569 0.494118 0.494118 0.498039 0.478431 0.470588 0.454902 0.454902 0.439216 0.45098 0.435294 0.407843 0.388235 0.388235 0.360784 0.352941 0.341176 0.329412 0.305882 0.298039 0.290196 0.270588 0.270588 0.27451 0.254902 0.235294 0.207843 0.192157 0.247059 0.270588 0.364706 0.501961 0.529412 0.513725 0.529412 0.509804 0.462745 0.364706 0.215686 0.0862745 0.027451 0 0 0 0 0 0 0 0 0.0470588 0.270588 0.443137 0.52549 0.811765 0.588235 0.596078 0.592157 0.537255 0.478431 0.411765 0.286275 0.0823529 0.0117647 0 0 0 0.105882 0.192157 0.247059 0.286275 0.333333 0.368627 0.392157 0.411765 0.419608 0.45098 0.470588 0.466667 0.482353 0.498039 0.498039 0.498039 0.501961 0.521569 0.517647 0.517647 0.541176 0.533333 0.533333 0.552941 0.54902 0.54902 0.568627 0.572549 0.572549 0.580392 0.588235 0.580392 0.580392 0.6 0.592157 0.588235 0.592157 0.596078 0.580392 0.592157 0.592157 0.592157 0.580392 0.592157 0.6 0.615686 0.635294 0.623529 0.588235 0.568627 0.54902 0.556863 0.556863 0.560784 0.545098 0.521569 0.529412 0.517647 0.509804 0.505882 0.509804 0.494118 0.490196 0.470588 0.466667 0.470588 0.458824 0.447059 0.431373 0.439216 0.411765 0.411765 0.392157 0.380392 0.380392 0.356863 0.352941 0.337255 0.313725 0.301961 0.301961 0.282353 0.282353 0.270588 0.278431 0.270588 0.25098 0.235294 0.2 0.184314 0.239216 0.27451 0.392157 0.498039 0.498039 0.498039 0.47451 0.376471 0.219608 0.0745098 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0.0980392 0.360784 0.513725 0.666667 0.580392 0.572549 0.541176 0.494118 0.45098 0.345098 0.176471 0.0156863 0 0 0 0.0705882 0.184314 0.235294 0.290196 0.32549 0.356863 0.380392 0.407843 0.419608 0.435294 0.45098 0.458824 0.478431 0.490196 0.498039 0.494118 0.498039 0.501961 0.521569 0.529412 0.52549 0.52549 0.541176 0.537255 0.545098 0.541176 0.545098 0.54902 0.545098 0.552941 0.560784 0.556863 0.556863 0.568627 0.568627 0.572549 0.564706 0.568627 0.568627 0.568627 0.572549 0.564706 0.560784 0.572549 0.572549 0.584314 0.596078 0.588235 0.576471 0.52549 0.545098 0.541176 0.529412 0.52549 0.52549 0.513725 0.513725 0.501961 0.494118 0.494118 0.486275 0.47451 0.466667 0.462745 0.447059 0.45098 0.439216 0.419608 0.419608 0.407843 0.403922 0.392157 0.372549 0.364706 0.34902 0.345098 0.341176 0.329412 0.309804 0.309804 0.298039 0.278431 0.286275 0.266667 0.290196 0.266667 0.239216 0.231373 0.196078 0.176471 0.227451 0.286275 0.4 0.470588 0.478431 0.443137 0.329412 0.156863 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0588235 0.352941 0.501961 0.564706 0.576471 0.54902 0.509804 0.454902 0.384314 0.223529 0.0392157 0 0 0 0.0392157 0.156863 0.223529 0.262745 0.309804 0.337255 0.376471 0.392157 0.411765 0.435294 0.439216 0.458824 0.47451 0.482353 0.498039 0.494118 0.498039 0.517647 0.517647 0.517647 0.529412 0.52549 0.537255 0.533333 0.537255 0.54902 0.529412 0.541176 0.54902 0.54902 0.541176 0.541176 0.54902 0.552941 0.54902 0.54902 0.54902 0.556863 0.541176 0.545098 0.556863 0.541176 0.541176 0.545098 0.529412 0.533333 0.545098 0.533333 0.529412 0.521569 0.517647 0.509804 0.509804 0.501961 0.505882 0.505882 0.501961 0.482353 0.486275 0.47451 0.458824 0.466667 0.454902 0.435294 0.435294 0.431373 0.415686 0.411765 0.403922 0.376471 0.376471 0.384314 0.368627 0.352941 0.352941 0.341176 0.329412 0.32549 0.309804 0.309804 0.290196 0.278431 0.266667 0.25098 0.278431 0.27451 0.247059 0.215686 0.188235 0.168627 0.231373 0.282353 0.392157 0.443137 0.411765 0.298039 0.137255 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0705882 0.392157 0.513725 0.560784 0.537255 0.513725 0.462745 0.411765 0.290196 0.0901961 0 0 0 0 0.129412 0.2 0.254902 0.298039 0.337255 0.364706 0.388235 0.411765 0.427451 0.435294 0.45098 0.458824 0.47451 0.490196 0.482353 0.494118 0.505882 0.517647 0.513725 0.513725 0.533333 0.529412 0.537255 0.545098 0.521569 0.541176 0.54902 0.537255 0.533333 0.545098 0.537255 0.541176 0.537255 0.54902 0.552941 0.545098 0.537255 0.545098 0.52549 0.54902 0.529412 0.52549 0.533333 0.517647 0.533333 0.517647 0.521569 0.513725 0.509804 0.513725 0.498039 0.498039 0.490196 0.490196 0.47451 0.482353 0.478431 0.470588 0.458824 0.462745 0.45098 0.443137 0.443137 0.431373 0.427451 0.411765 0.403922 0.396078 0.384314 0.384314 0.368627 0.364706 0.356863 0.345098 0.337255 0.329412 0.32549 0.313725 0.313725 0.286275 0.278431 0.258824 0.25098 0.286275 0.258824 0.231373 0.211765 0.184314 0.160784 0.219608 0.278431 0.356863 0.372549 0.294118 0.145098 0.0431373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14902 0.443137 0.533333 0.537255 0.509804 0.470588 0.427451 0.333333 0.141176 0 0 0 0 0.0901961 0.176471 0.239216 0.27451 0.317647 0.356863 0.372549 0.384314 0.415686 0.427451 0.447059 0.447059 0.47451 0.47451 0.486275 0.498039 0.498039 0.501961 0.509804 0.513725 0.513725 0.521569 0.521569 0.521569 0.537255 0.529412 0.537255 0.537255 0.541176 0.545098 0.529412 0.529412 0.533333 0.545098 0.537255 0.537255 0.529412 0.545098 0.537255 0.533333 0.533333 0.529412 0.529412 0.529412 0.521569 0.517647 0.513725 0.521569 0.513725 0.509804 0.498039 0.490196 0.486275 0.478431 0.470588 0.47451 0.466667 0.458824 0.454902 0.447059 0.443137 0.443137 0.431373 0.423529 0.419608 0.4 0.392157 0.388235 0.396078 0.364706 0.376471 0.34902 0.356863 0.345098 0.329412 0.313725 0.309804 0.301961 0.294118 0.278431 0.262745 0.254902 0.25098 0.282353 0.254902 0.231373 0.196078 0.160784 0.14902 0.188235 0.258824 0.309804 0.27451 0.164706 0.0588235 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.356863 0.513725 0.509804 0.498039 0.47451 0.407843 0.333333 0.152941 0 0 0 0 0.0313725 0.156863 0.211765 0.258824 0.294118 0.333333 0.360784 0.380392 0.392157 0.419608 0.439216 0.447059 0.458824 0.458824 0.478431 0.482353 0.494118 0.501961 0.513725 0.501961 0.513725 0.509804 0.517647 0.517647 0.517647 0.529412 0.52549 0.52549 0.533333 0.529412 0.521569 0.533333 0.537255 0.537255 0.537255 0.529412 0.529412 0.537255 0.533333 0.521569 0.533333 0.529412 0.529412 0.521569 0.513725 0.529412 0.517647 0.505882 0.501961 0.501961 0.501961 0.498039 0.482353 0.486275 0.478431 0.478431 0.466667 0.466667 0.454902 0.45098 0.439216 0.435294 0.423529 0.423529 0.419608 0.403922 0.4 0.396078 0.380392 0.372549 0.368627 0.352941 0.341176 0.337255 0.32549 0.317647 0.309804 0.294118 0.294118 0.278431 0.266667 0.247059 0.247059 0.27451 0.25098 0.223529 0.184314 0.160784 0.145098 0.168627 0.243137 0.247059 0.168627 0.0823529 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.231373 0.486275 0.517647 0.486275 0.462745 0.4 0.313725 0.160784 0 0 0 0 0 0.121569 0.192157 0.247059 0.282353 0.313725 0.345098 0.368627 0.396078 0.411765 0.419608 0.431373 0.447059 0.462745 0.470588 0.482353 0.490196 0.490196 0.501961 0.509804 0.501961 0.517647 0.505882 0.498039 0.517647 0.529412 0.533333 0.517647 0.533333 0.529412 0.529412 0.529412 0.537255 0.529412 0.533333 0.52549 0.52549 0.54902 0.529412 0.517647 0.529412 0.52549 0.529412 0.517647 0.521569 0.517647 0.505882 0.509804 0.498039 0.505882 0.498039 0.498039 0.494118 0.482353 0.478431 0.470588 0.482353 0.458824 0.458824 0.447059 0.435294 0.419608 0.423529 0.411765 0.407843 0.4 0.396078 0.392157 0.376471 0.376471 0.360784 0.345098 0.337255 0.329412 0.321569 0.301961 0.301961 0.286275 0.27451 0.266667 0.254902 0.25098 0.247059 0.278431 0.239216 0.215686 0.184314 0.14902 0.133333 0.156863 0.2 0.172549 0.0901961 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.176471 0.466667 0.517647 0.478431 0.447059 0.396078 0.301961 0.145098 0 0 0 0 0 0.0862745 0.168627 0.223529 0.270588 0.313725 0.32549 0.356863 0.380392 0.392157 0.411765 0.427451 0.443137 0.447059 0.462745 0.470588 0.478431 0.482353 0.486275 0.498039 0.490196 0.505882 0.501961 0.509804 0.52549 0.517647 0.52549 0.52549 0.517647 0.521569 0.521569 0.52549 0.529412 0.52549 0.533333 0.517647 0.533333 0.517647 0.529412 0.513725 0.517647 0.505882 0.517647 0.501961 0.509804 0.505882 0.490196 0.501961 0.498039 0.490196 0.490196 0.490196 0.47451 0.486275 0.470588 0.478431 0.458824 0.447059 0.443137 0.45098 0.435294 0.419608 0.423529 0.407843 0.396078 0.396078 0.392157 0.384314 0.364706 0.368627 0.345098 0.32549 0.321569 0.32549 0.309804 0.298039 0.298039 0.286275 0.27451 0.254902 0.239216 0.235294 0.262745 0.258824 0.227451 0.207843 0.164706 0.137255 0.129412 0.133333 0.113725 0.0431373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.121569 0.431373 0.509804 0.482353 0.431373 0.372549 0.278431 0.113725 0 0 0 0 0 0.0313725 0.137255 0.207843 0.25098 0.294118 0.32549 0.34902 0.364706 0.376471 0.407843 0.415686 0.431373 0.439216 0.45098 0.454902 0.47451 0.47451 0.490196 0.494118 0.498039 0.498039 0.505882 0.505882 0.517647 0.513725 0.517647 0.517647 0.513725 0.52549 0.509804 0.513725 0.521569 0.521569 0.521569 0.52549 0.517647 0.521569 0.513725 0.52549 0.513725 0.509804 0.521569 0.505882 0.498039 0.501961 0.501961 0.494118 0.494118 0.490196 0.486275 0.478431 0.47451 0.470588 0.458824 0.45098 0.447059 0.45098 0.447059 0.431373 0.431373 0.415686 0.403922 0.403922 0.4 0.392157 0.372549 0.380392 0.364706 0.360784 0.341176 0.341176 0.333333 0.321569 0.301961 0.294118 0.286275 0.282353 0.262745 0.247059 0.235294 0.235294 0.258824 0.258824 0.235294 0.196078 0.164706 0.141176 0.117647 0.109804 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.105882 0.415686 0.513725 0.470588 0.415686 0.341176 0.266667 0.117647 0 0 0 0 0 0.0117647 0.12549 0.184314 0.235294 0.266667 0.313725 0.333333 0.352941 0.376471 0.396078 0.407843 0.419608 0.427451 0.439216 0.45098 0.458824 0.470588 0.486275 0.482353 0.486275 0.494118 0.498039 0.498039 0.505882 0.505882 0.52549 0.509804 0.513725 0.521569 0.517647 0.513725 0.517647 0.501961 0.509804 0.517647 0.521569 0.509804 0.498039 0.521569 0.501961 0.498039 0.505882 0.509804 0.505882 0.494118 0.498039 0.490196 0.482353 0.482353 0.494118 0.47451 0.47451 0.462745 0.45098 0.458824 0.447059 0.443137 0.447059 0.431373 0.427451 0.411765 0.403922 0.403922 0.4 0.380392 0.372549 0.364706 0.356863 0.337255 0.341176 0.329412 0.321569 0.309804 0.294118 0.286275 0.270588 0.270588 0.25098 0.25098 0.235294 0.227451 0.266667 0.247059 0.215686 0.2 0.14902 0.121569 0.113725 0.0470588 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.164706 0.447059 0.505882 0.458824 0.392157 0.32549 0.223529 0.0745098 0 0 0 0 0 0 0.0666667 0.156863 0.2 0.247059 0.290196 0.321569 0.337255 0.364706 0.388235 0.403922 0.415686 0.423529 0.431373 0.443137 0.454902 0.454902 0.466667 0.470588 0.478431 0.490196 0.494118 0.494118 0.498039 0.505882 0.498039 0.501961 0.498039 0.513725 0.501961 0.509804 0.513725 0.505882 0.509804 0.498039 0.505882 0.517647 0.505882 0.501961 0.501961 0.498039 0.505882 0.498039 0.498039 0.498039 0.482353 0.478431 0.482353 0.470588 0.482353 0.478431 0.458824 0.458824 0.443137 0.447059 0.439216 0.435294 0.427451 0.411765 0.411765 0.411765 0.392157 0.392157 0.384314 0.372549 0.356863 0.360784 0.34902 0.34902 0.321569 0.321569 0.313725 0.305882 0.290196 0.282353 0.270588 0.258824 0.235294 0.243137 0.219608 0.215686 0.278431 0.227451 0.219608 0.188235 0.137255 0.113725 0.0980392 0.00784314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.239216 0.462745 0.498039 0.443137 0.376471 0.301961 0.203922 0.0627451 0 0 0 0 0 0 0.0313725 0.141176 0.192157 0.239216 0.286275 0.305882 0.333333 0.356863 0.376471 0.380392 0.411765 0.411765 0.431373 0.431373 0.45098 0.45098 0.470588 0.47451 0.47451 0.470588 0.486275 0.490196 0.47451 0.498039 0.490196 0.498039 0.501961 0.513725 0.505882 0.498039 0.498039 0.509804 0.505882 0.501961 0.498039 0.501961 0.501961 0.498039 0.486275 0.498039 0.498039 0.494118 0.490196 0.486275 0.486275 0.482353 0.462745 0.462745 0.466667 0.458824 0.447059 0.454902 0.443137 0.443137 0.431373 0.427451 0.419608 0.411765 0.407843 0.396078 0.392157 0.384314 0.376471 0.376471 0.352941 0.352941 0.345098 0.337255 0.32549 0.309804 0.309804 0.294118 0.286275 0.27451 0.262745 0.25098 0.243137 0.231373 0.219608 0.211765 0.270588 0.223529 0.2 0.168627 0.121569 0.101961 0.054902 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.105882 0.372549 0.509804 0.498039 0.419608 0.345098 0.266667 0.141176 0.0156863 0 0 0 0 0 0 0 0.0980392 0.168627 0.223529 0.254902 0.286275 0.321569 0.337255 0.364706 0.384314 0.392157 0.407843 0.415686 0.423529 0.439216 0.443137 0.458824 0.458824 0.466667 0.478431 0.458824 0.482353 0.486275 0.490196 0.490196 0.494118 0.494118 0.498039 0.494118 0.498039 0.498039 0.498039 0.501961 0.482353 0.494118 0.498039 0.494118 0.490196 0.482353 0.486275 0.490196 0.478431 0.482353 0.470588 0.458824 0.470588 0.47451 0.458824 0.466667 0.45098 0.458824 0.443137 0.45098 0.435294 0.419608 0.415686 0.411765 0.4 0.4 0.384314 0.380392 0.384314 0.368627 0.34902 0.356863 0.345098 0.337255 0.32549 0.317647 0.305882 0.294118 0.290196 0.278431 0.262745 0.258824 0.247059 0.239216 0.223529 0.207843 0.211765 0.262745 0.215686 0.196078 0.160784 0.133333 0.0901961 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.027451 0.282353 0.454902 0.541176 0.482353 0.396078 0.301961 0.219608 0.0941176 0 0 0 0 0 0 0 0 0.0352941 0.133333 0.192157 0.231373 0.262745 0.301961 0.317647 0.341176 0.360784 0.364706 0.380392 0.411765 0.423529 0.427451 0.431373 0.439216 0.458824 0.458824 0.466667 0.462745 0.478431 0.47451 0.470588 0.482353 0.486275 0.490196 0.498039 0.490196 0.486275 0.494118 0.486275 0.494118 0.498039 0.486275 0.486275 0.482353 0.486275 0.490196 0.482353 0.482353 0.470588 0.466667 0.462745 0.458824 0.458824 0.458824 0.454902 0.462745 0.439216 0.45098 0.431373 0.439216 0.419608 0.431373 0.419608 0.4 0.403922 0.392157 0.376471 0.364706 0.368627 0.364706 0.352941 0.341176 0.337255 0.337255 0.298039 0.317647 0.298039 0.286275 0.282353 0.270588 0.258824 0.254902 0.231373 0.219608 0.211765 0.196078 0.223529 0.247059 0.211765 0.192157 0.156863 0.109804 0.0745098 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.227451 0.4 0.533333 0.54902 0.45098 0.352941 0.254902 0.164706 0.027451 0 0 0 0 0 0 0 0 0 0.101961 0.176471 0.223529 0.25098 0.286275 0.313725 0.321569 0.356863 0.372549 0.376471 0.388235 0.407843 0.423529 0.423529 0.431373 0.454902 0.443137 0.470588 0.462745 0.458824 0.466667 0.470588 0.482353 0.486275 0.470588 0.478431 0.478431 0.486275 0.482353 0.482353 0.486275 0.47451 0.478431 0.47451 0.47451 0.470588 0.466667 0.458824 0.466667 0.466667 0.466667 0.458824 0.454902 0.45098 0.443137 0.439216 0.443137 0.435294 0.439216 0.435294 0.423529 0.431373 0.411765 0.4 0.392157 0.396078 0.392157 0.380392 0.372549 0.356863 0.34902 0.337255 0.333333 0.32549 0.317647 0.301961 0.298039 0.298039 0.278431 0.270588 0.262745 0.25098 0.239216 0.231373 0.211765 0.2 0.184314 0.227451 0.235294 0.203922 0.188235 0.152941 0.105882 0.0431373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.027451 0.223529 0.384314 0.505882 0.580392 0.513725 0.403922 0.305882 0.211765 0.101961 0 0 0 0 0 0 0 0 0 0 0.054902 0.14902 0.196078 0.231373 0.266667 0.294118 0.317647 0.337255 0.360784 0.376471 0.388235 0.396078 0.419608 0.419608 0.435294 0.427451 0.45098 0.447059 0.454902 0.466667 0.462745 0.462745 0.470588 0.47451 0.478431 0.470588 0.47451 0.478431 0.470588 0.470588 0.478431 0.482353 0.478431 0.482353 0.478431 0.470588 0.47451 0.462745 0.466667 0.458824 0.462745 0.447059 0.458824 0.447059 0.443137 0.447059 0.443137 0.427451 0.431373 0.427451 0.415686 0.415686 0.407843 0.4 0.396078 0.376471 0.380392 0.368627 0.360784 0.360784 0.341176 0.329412 0.329412 0.317647 0.313725 0.301961 0.290196 0.278431 0.270588 0.266667 0.247059 0.235294 0.231373 0.207843 0.207843 0.192157 0.172549 0.219608 0.227451 0.196078 0.184314 0.141176 0.0941176 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0941176 0.243137 0.384314 0.501961 0.584314 0.568627 0.443137 0.345098 0.243137 0.145098 0.0235294 0 0 0 0 0 0 0 0 0 0 0.00392157 0.113725 0.176471 0.207843 0.25098 0.278431 0.301961 0.329412 0.337255 0.364706 0.372549 0.376471 0.396078 0.403922 0.419608 0.423529 0.431373 0.431373 0.447059 0.431373 0.454902 0.466667 0.466667 0.466667 0.462745 0.466667 0.482353 0.466667 0.478431 0.478431 0.466667 0.470588 0.466667 0.47451 0.462745 0.458824 0.466667 0.458824 0.45098 0.447059 0.458824 0.45098 0.427451 0.439216 0.443137 0.431373 0.419608 0.423529 0.431373 0.407843 0.415686 0.403922 0.396078 0.396078 0.376471 0.372549 0.368627 0.352941 0.341176 0.34902 0.333333 0.321569 0.317647 0.305882 0.301961 0.290196 0.286275 0.27451 0.266667 0.254902 0.235294 0.231373 0.223529 0.207843 0.2 0.172549 0.176471 0.227451 0.219608 0.2 0.176471 0.117647 0.0588235 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0588235 0.2 0.313725 0.411765 0.521569 0.6 0.592157 0.478431 0.368627 0.266667 0.168627 0.0509804 0 0 0 0 0 0 0 0 0 0 0 0 0.0784314 0.145098 0.192157 0.227451 0.254902 0.294118 0.321569 0.329412 0.345098 0.360784 0.372549 0.376471 0.396078 0.407843 0.419608 0.415686 0.423529 0.407843 0.443137 0.443137 0.447059 0.45098 0.454902 0.458824 0.454902 0.458824 0.470588 0.462745 0.45098 0.45098 0.462745 0.470588 0.458824 0.454902 0.458824 0.443137 0.458824 0.435294 0.45098 0.439216 0.447059 0.435294 0.435294 0.431373 0.419608 0.423529 0.423529 0.4 0.407843 0.403922 0.396078 0.392157 0.380392 0.372549 0.356863 0.352941 0.333333 0.341176 0.32549 0.317647 0.321569 0.309804 0.305882 0.290196 0.290196 0.27451 0.270588 0.243137 0.247059 0.235294 0.231373 0.207843 0.203922 0.2 0.176471 0.180392 0.227451 0.215686 0.196078 0.176471 0.0941176 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0627451 0.203922 0.278431 0.376471 0.466667 0.556863 0.615686 0.619608 0.501961 0.384314 0.258824 0.180392 0.0745098 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.12549 0.168627 0.215686 0.227451 0.27451 0.298039 0.313725 0.333333 0.345098 0.368627 0.380392 0.384314 0.4 0.411765 0.4 0.427451 0.419608 0.431373 0.435294 0.435294 0.439216 0.45098 0.447059 0.439216 0.447059 0.454902 0.447059 0.447059 0.462745 0.447059 0.443137 0.443137 0.45098 0.454902 0.439216 0.45098 0.447059 0.435294 0.439216 0.427451 0.431373 0.431373 0.419608 0.411765 0.407843 0.407843 0.396078 0.384314 0.384314 0.388235 0.384314 0.372549 0.372549 0.352941 0.345098 0.345098 0.333333 0.321569 0.313725 0.309804 0.301961 0.286275 0.282353 0.262745 0.270588 0.254902 0.247059 0.235294 0.223529 0.207843 0.2 0.192157 0.180392 0.168627 0.172549 0.227451 0.203922 0.188235 0.168627 0.0627451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0509804 0.12549 0.227451 0.290196 0.372549 0.458824 0.513725 0.596078 0.647059 0.611765 0.501961 0.376471 0.262745 0.168627 0.0823529 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.137255 0.184314 0.219608 0.247059 0.282353 0.298039 0.32549 0.345098 0.34902 0.368627 0.376471 0.384314 0.388235 0.4 0.411765 0.411765 0.415686 0.415686 0.431373 0.435294 0.447059 0.435294 0.431373 0.45098 0.45098 0.443137 0.443137 0.435294 0.443137 0.439216 0.447059 0.439216 0.447059 0.443137 0.435294 0.443137 0.431373 0.427451 0.435294 0.419608 0.415686 0.411765 0.403922 0.411765 0.384314 0.388235 0.384314 0.376471 0.364706 0.364706 0.352941 0.352941 0.341176 0.345098 0.329412 0.317647 0.313725 0.301961 0.294118 0.290196 0.282353 0.270588 0.266667 0.262745 0.243137 0.231373 0.227451 0.219608 0.2 0.2 0.180392 0.168627 0.164706 0.156863 0.235294 0.203922 0.184314 0.160784 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0666667 0.14902 0.211765 0.266667 0.329412 0.376471 0.458824 0.517647 0.588235 0.631373 0.662745 0.603922 0.490196 0.364706 0.254902 0.168627 0.0705882 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.121569 0.172549 0.192157 0.243137 0.266667 0.278431 0.309804 0.32549 0.34902 0.352941 0.352941 0.372549 0.388235 0.392157 0.4 0.4 0.419608 0.415686 0.419608 0.431373 0.435294 0.439216 0.439216 0.427451 0.423529 0.443137 0.427451 0.435294 0.443137 0.443137 0.431373 0.431373 0.435294 0.427451 0.419608 0.431373 0.415686 0.415686 0.423529 0.403922 0.419608 0.403922 0.396078 0.384314 0.388235 0.392157 0.380392 0.372549 0.372549 0.356863 0.352941 0.345098 0.341176 0.345098 0.309804 0.317647 0.305882 0.290196 0.294118 0.282353 0.27451 0.266667 0.254902 0.243137 0.243137 0.235294 0.219608 0.211765 0.192157 0.188235 0.168627 0.164706 0.152941 0.168627 0.235294 0.192157 0.192157 0.0941176 0 0 0 0 0 0 0 0 0 0 0.00392157 0.0156863 0.0823529 0.164706 0.203922 0.235294 0.270588 0.32549 0.380392 0.447059 0.501961 0.541176 0.596078 0.65098 0.670588 0.635294 0.552941 0.439216 0.317647 0.227451 0.133333 0.0509804 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0784314 0.145098 0.164706 0.215686 0.25098 0.266667 0.286275 0.313725 0.329412 0.34902 0.352941 0.364706 0.376471 0.384314 0.392157 0.403922 0.4 0.415686 0.403922 0.423529 0.423529 0.427451 0.423529 0.431373 0.435294 0.427451 0.431373 0.431373 0.435294 0.431373 0.427451 0.423529 0.419608 0.427451 0.407843 0.419608 0.411765 0.407843 0.415686 0.407843 0.407843 0.392157 0.396078 0.384314 0.380392 0.376471 0.372549 0.360784 0.352941 0.352941 0.345098 0.337255 0.329412 0.329412 0.313725 0.309804 0.301961 0.294118 0.282353 0.282353 0.266667 0.262745 0.243137 0.231373 0.231373 0.215686 0.215686 0.203922 0.184314 0.176471 0.160784 0.14902 0.145098 0.168627 0.262745 0.2 0.172549 0.121569 0.0196078 0 0 0.00784314 0.0431373 0.0666667 0.109804 0.14902 0.188235 0.211765 0.231373 0.254902 0.282353 0.309804 0.337255 0.388235 0.439216 0.490196 0.537255 0.596078 0.627451 0.662745 0.682353 0.65098 0.588235 0.486275 0.376471 0.266667 0.180392 0.105882 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.12549 0.160784 0.2 0.235294 0.247059 0.282353 0.298039 0.317647 0.329412 0.34902 0.356863 0.360784 0.376471 0.380392 0.380392 0.392157 0.403922 0.403922 0.407843 0.415686 0.419608 0.427451 0.419608 0.415686 0.431373 0.427451 0.419608 0.427451 0.423529 0.419608 0.407843 0.423529 0.423529 0.423529 0.415686 0.407843 0.403922 0.4 0.4 0.396078 0.392157 0.396078 0.368627 0.372549 0.376471 0.352941 0.352941 0.356863 0.341176 0.337255 0.333333 0.313725 0.321569 0.305882 0.305882 0.298039 0.282353 0.27451 0.262745 0.258824 0.247059 0.239216 0.227451 0.223529 0.203922 0.196078 0.188235 0.172549 0.172549 0.14902 0.141176 0.133333 0.196078 0.254902 0.196078 0.188235 0.160784 0.117647 0.145098 0.172549 0.203922 0.223529 0.247059 0.27451 0.27451 0.309804 0.341176 0.360784 0.4 0.423529 0.45098 0.505882 0.556863 0.603922 0.635294 0.67451 0.705882 0.698039 0.639216 0.560784 0.470588 0.376471 0.266667 0.184314 0.113725 0.0392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.145098 0.176471 0.203922 0.243137 0.262745 0.270588 0.298039 0.317647 0.329412 0.341176 0.352941 0.360784 0.380392 0.376471 0.380392 0.388235 0.396078 0.4 0.4 0.392157 0.419608 0.4 0.411765 0.415686 0.407843 0.415686 0.415686 0.431373 0.415686 0.419608 0.4 0.407843 0.4 0.403922 0.403922 0.396078 0.403922 0.396078 0.392157 0.376471 0.368627 0.368627 0.368627 0.364706 0.34902 0.341176 0.337255 0.329412 0.317647 0.32549 0.305882 0.317647 0.298039 0.294118 0.270588 0.262745 0.27451 0.258824 0.25098 0.25098 0.231373 0.223529 0.2 0.2 0.184314 0.176471 0.164706 0.156863 0.145098 0.137255 0.121569 0.211765 0.243137 0.207843 0.243137 0.239216 0.254902 0.27451 0.294118 0.329412 0.356863 0.380392 0.403922 0.411765 0.447059 0.486275 0.505882 0.541176 0.584314 0.635294 0.658824 0.682353 0.717647 0.705882 0.658824 0.584314 0.505882 0.427451 0.32549 0.243137 0.164706 0.105882 0.0509804 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0156863 0.113725 0.156863 0.188235 0.219608 0.247059 0.266667 0.290196 0.305882 0.317647 0.329412 0.34902 0.356863 0.356863 0.368627 0.380392 0.380392 0.388235 0.388235 0.388235 0.4 0.403922 0.396078 0.4 0.411765 0.407843 0.411765 0.4 0.403922 0.403922 0.403922 0.407843 0.396078 0.396078 0.392157 0.4 0.396078 0.392157 0.396078 0.376471 0.372549 0.364706 0.364706 0.360784 0.352941 0.345098 0.341176 0.345098 0.321569 0.321569 0.317647 0.317647 0.298039 0.286275 0.278431 0.270588 0.258824 0.247059 0.25098 0.239216 0.227451 0.219608 0.211765 0.2 0.184314 0.176471 0.168627 0.164706 0.152941 0.133333 0.12549 0.121569 0.211765 0.215686 0.239216 0.317647 0.364706 0.380392 0.403922 0.431373 0.45098 0.47451 0.494118 0.521569 0.54902 0.576471 0.6 0.65098 0.694118 0.713725 0.733333 0.67451 0.623529 0.568627 0.498039 0.419608 0.333333 0.258824 0.188235 0.137255 0.0784314 0.0313725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0666667 0.137255 0.180392 0.211765 0.227451 0.254902 0.278431 0.298039 0.305882 0.313725 0.341176 0.345098 0.360784 0.356863 0.360784 0.368627 0.368627 0.372549 0.388235 0.372549 0.403922 0.396078 0.396078 0.392157 0.392157 0.396078 0.4 0.396078 0.396078 0.403922 0.396078 0.396078 0.392157 0.396078 0.384314 0.376471 0.388235 0.364706 0.372549 0.376471 0.360784 0.360784 0.352941 0.34902 0.341176 0.333333 0.337255 0.317647 0.309804 0.305882 0.305882 0.286275 0.282353 0.282353 0.270588 0.254902 0.25098 0.247059 0.231373 0.223529 0.215686 0.196078 0.192157 0.184314 0.176471 0.14902 0.14902 0.152941 0.129412 0.117647 0.117647 0.184314 0.188235 0.298039 0.427451 0.466667 0.498039 0.521569 0.54902 0.576471 0.576471 0.603922 0.666667 0.686275 0.654902 0.682353 0.631373 0.584314 0.54902 0.498039 0.427451 0.368627 0.301961 0.231373 0.172549 0.129412 0.0823529 0.0352941 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.101961 0.14902 0.188235 0.215686 0.235294 0.258824 0.282353 0.298039 0.309804 0.329412 0.337255 0.345098 0.34902 0.356863 0.360784 0.376471 0.376471 0.376471 0.384314 0.396078 0.392157 0.384314 0.392157 0.380392 0.388235 0.392157 0.384314 0.392157 0.384314 0.376471 0.376471 0.384314 0.380392 0.372549 0.376471 0.376471 0.360784 0.368627 0.364706 0.352941 0.352941 0.337255 0.337255 0.337255 0.329412 0.321569 0.309804 0.294118 0.309804 0.286275 0.286275 0.27451 0.270588 0.262745 0.25098 0.243137 0.243137 0.223529 0.215686 0.2 0.203922 0.180392 0.172549 0.156863 0.152941 0.141176 0.12549 0.113725 0.101961 0.121569 0.14902 0.203922 0.415686 0.498039 0.545098 0.556863 0.576471 0.580392 0.568627 0.564706 0.533333 0.509804 0.494118 0.462745 0.427451 0.380392 0.337255 0.290196 0.227451 0.188235 0.141176 0.109804 0.0705882 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0431373 0.113725 0.160784 0.196078 0.215686 0.247059 0.270588 0.286275 0.298039 0.317647 0.321569 0.333333 0.337255 0.352941 0.34902 0.360784 0.368627 0.364706 0.376471 0.380392 0.388235 0.376471 0.380392 0.380392 0.384314 0.376471 0.376471 0.388235 0.380392 0.368627 0.368627 0.376471 0.376471 0.356863 0.360784 0.356863 0.352941 0.360784 0.360784 0.34902 0.341176 0.333333 0.333333 0.329412 0.317647 0.301961 0.298039 0.294118 0.294118 0.286275 0.27451 0.262745 0.254902 0.254902 0.243137 0.235294 0.219608 0.219608 0.2 0.188235 0.188235 0.172549 0.152941 0.160784 0.141176 0.129412 0.129412 0.113725 0.0901961 0.105882 0.145098 0.243137 0.341176 0.403922 0.431373 0.431373 0.419608 0.396078 0.364706 0.345098 0.321569 0.286275 0.262745 0.215686 0.188235 0.152941 0.121569 0.0941176 0.0627451 0.0431373 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0823529 0.133333 0.172549 0.203922 0.227451 0.262745 0.270588 0.290196 0.294118 0.313725 0.32549 0.329412 0.333333 0.341176 0.34902 0.352941 0.352941 0.368627 0.368627 0.364706 0.368627 0.376471 0.376471 0.384314 0.372549 0.380392 0.384314 0.376471 0.368627 0.368627 0.368627 0.376471 0.352941 0.368627 0.360784 0.345098 0.34902 0.337255 0.337255 0.333333 0.329412 0.321569 0.305882 0.309804 0.301961 0.298039 0.294118 0.270588 0.27451 0.270588 0.262745 0.247059 0.243137 0.235294 0.219608 0.223529 0.2 0.203922 0.180392 0.176471 0.172549 0.156863 0.141176 0.133333 0.121569 0.109804 0.0901961 0.0705882 0.0941176 0.141176 0.207843 0.227451 0.239216 0.235294 0.219608 0.203922 0.180392 0.160784 0.141176 0.129412 0.109804 0.0784314 0.054902 0.0235294 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.101961 0.145098 0.180392 0.203922 0.235294 0.254902 0.282353 0.286275 0.298039 0.313725 0.301961 0.329412 0.337255 0.341176 0.352941 0.34902 0.34902 0.364706 0.356863 0.356863 0.364706 0.372549 0.380392 0.352941 0.360784 0.364706 0.360784 0.364706 0.360784 0.352941 0.364706 0.352941 0.352941 0.345098 0.333333 0.345098 0.329412 0.333333 0.32549 0.317647 0.313725 0.313725 0.294118 0.301961 0.290196 0.270588 0.27451 0.270588 0.254902 0.25098 0.239216 0.235294 0.219608 0.211765 0.192157 0.2 0.192157 0.176471 0.168627 0.160784 0.145098 0.141176 0.121569 0.109804 0.0941176 0.0627451 0.0470588 0.0823529 0.113725 0.117647 0.101961 0.0862745 0.0862745 0.0784314 0.0627451 0.0509804 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0313725 0.113725 0.152941 0.192157 0.219608 0.239216 0.258824 0.258824 0.278431 0.298039 0.305882 0.317647 0.337255 0.333333 0.345098 0.337255 0.345098 0.364706 0.345098 0.34902 0.360784 0.356863 0.360784 0.360784 0.368627 0.360784 0.356863 0.345098 0.34902 0.356863 0.34902 0.345098 0.345098 0.341176 0.341176 0.337255 0.333333 0.317647 0.305882 0.309804 0.309804 0.301961 0.294118 0.298039 0.27451 0.278431 0.262745 0.258824 0.247059 0.239216 0.223529 0.223529 0.211765 0.207843 0.196078 0.188235 0.184314 0.160784 0.160784 0.152941 0.141176 0.12549 0.113725 0.0941176 0.0705882 0.0392157 0.0509804 0.0431373 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0470588 0.117647 0.156863 0.184314 0.219608 0.231373 0.254902 0.278431 0.290196 0.290196 0.305882 0.309804 0.317647 0.333333 0.337255 0.333333 0.341176 0.34902 0.34902 0.345098 0.34902 0.345098 0.356863 0.360784 0.356863 0.356863 0.34902 0.356863 0.341176 0.345098 0.337255 0.341176 0.345098 0.333333 0.329412 0.32549 0.317647 0.309804 0.305882 0.298039 0.298039 0.282353 0.270588 0.270588 0.258824 0.258824 0.247059 0.247059 0.235294 0.227451 0.223529 0.203922 0.2 0.196078 0.188235 0.172549 0.164706 0.14902 0.14902 0.133333 0.121569 0.101961 0.0784314 0.0509804 0.0313725 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.054902 0.117647 0.160784 0.188235 0.215686 0.243137 0.258824 0.266667 0.282353 0.294118 0.313725 0.321569 0.317647 0.329412 0.321569 0.341176 0.345098 0.333333 0.337255 0.34902 0.34902 0.333333 0.345098 0.352941 0.345098 0.34902 0.345098 0.333333 0.345098 0.32549 0.329412 0.333333 0.32549 0.32549 0.317647 0.305882 0.305882 0.298039 0.286275 0.286275 0.282353 0.270588 0.254902 0.25098 0.247059 0.235294 0.227451 0.223529 0.215686 0.211765 0.196078 0.192157 0.180392 0.172549 0.164706 0.156863 0.145098 0.133333 0.117647 0.101961 0.0901961 0.054902 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00392157 0.0627451 0.0980392 0.141176 0.176471 0.219608 0.235294 0.254902 0.262745 0.278431 0.298039 0.305882 0.301961 0.317647 0.309804 0.329412 0.329412 0.329412 0.32549 0.341176 0.341176 0.341176 0.337255 0.337255 0.32549 0.329412 0.337255 0.329412 0.337255 0.32549 0.321569 0.317647 0.305882 0.309804 0.305882 0.290196 0.294118 0.290196 0.27451 0.27451 0.270588 0.262745 0.254902 0.254902 0.247059 0.227451 0.223529 0.203922 0.207843 0.2 0.196078 0.180392 0.176471 0.152941 0.156863 0.14902 0.129412 0.133333 0.101961 0.0784314 0.0627451 0.027451 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.0901961 0.0823529 0.12549 0.172549 0.188235 0.215686 0.243137 0.262745 0.278431 0.278431 0.278431 0.298039 0.305882 0.321569 0.313725 0.32549 0.329412 0.313725 0.317647 0.333333 0.32549 0.321569 0.32549 0.32549 0.32549 0.32549 0.313725 0.313725 0.317647 0.313725 0.305882 0.305882 0.294118 0.290196 0.286275 0.270588 0.27451 0.270588 0.254902 0.254902 0.243137 0.243137 0.231373 0.223529 0.207843 0.203922 0.192157 0.192157 0.176471 0.180392 0.152941 0.160784 0.141176 0.129412 0.121569 0.105882 0.0666667 0.054902 0.0352941 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0392157 0.0862745 0.12549 0.12549 0.145098 0.180392 0.2 0.219608 0.231373 0.243137 0.258824 0.27451 0.282353 0.301961 0.305882 0.313725 0.305882 0.317647 0.321569 0.317647 0.317647 0.313725 0.317647 0.321569 0.317647 0.309804 0.313725 0.305882 0.309804 0.305882 0.294118 0.298039 0.290196 0.278431 0.278431 0.266667 0.25098 0.25098 0.243137 0.25098 0.227451 0.223529 0.223529 0.2 0.207843 0.196078 0.176471 0.180392 0.164706 0.152941 0.145098 0.129412 0.121569 0.101961 0.0784314 0.0627451 0.0588235 0.0509804 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0196078 0.0823529 0.121569 0.160784 0.145098 0.152941 0.152941 0.192157 0.211765 0.223529 0.239216 0.25098 0.278431 0.282353 0.27451 0.290196 0.298039 0.294118 0.294118 0.301961 0.309804 0.305882 0.305882 0.305882 0.309804 0.286275 0.286275 0.294118 0.286275 0.278431 0.270588 0.282353 0.266667 0.262745 0.25098 0.239216 0.235294 0.231373 0.227451 0.219608 0.215686 0.203922 0.196078 0.184314 0.176471 0.160784 0.160784 0.14902 0.129412 0.117647 0.113725 0.0941176 0.0823529 0.0666667 0.0745098 0.0431373 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0117647 0.0941176 0.113725 0.152941 0.188235 0.180392 0.176471 0.172549 0.188235 0.188235 0.207843 0.235294 0.239216 0.247059 0.258824 0.258824 0.27451 0.266667 0.278431 0.286275 0.278431 0.278431 0.278431 0.27451 0.278431 0.266667 0.270588 0.266667 0.258824 0.258824 0.258824 0.243137 0.239216 0.235294 0.231373 0.219608 0.211765 0.203922 0.196078 0.192157 0.180392 0.164706 0.160784 0.160784 0.137255 0.133333 0.121569 0.105882 0.101961 0.0901961 0.0980392 0.0823529 0.0627451 0.0470588 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0470588 0.121569 0.137255 0.145098 0.180392 0.2 0.211765 0.215686 0.2 0.188235 0.196078 0.196078 0.207843 0.219608 0.223529 0.231373 0.235294 0.243137 0.243137 0.235294 0.247059 0.243137 0.25098 0.235294 0.235294 0.243137 0.219608 0.223529 0.223529 0.211765 0.203922 0.219608 0.196078 0.196078 0.176471 0.176471 0.160784 0.160784 0.156863 0.141176 0.137255 0.121569 0.121569 0.12549 0.12549 0.113725 0.113725 0.0901961 0.0705882 0.0627451 0.0470588 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.054902 0.121569 0.156863 0.160784 0.164706 0.180392 0.207843 0.215686 0.239216 0.247059 0.239216 0.231373 0.219608 0.211765 0.196078 0.188235 0.192157 0.196078 0.203922 0.196078 0.211765 0.196078 0.2 0.196078 0.2 0.196078 0.180392 0.176471 0.184314 0.168627 0.160784 0.160784 0.145098 0.133333 0.141176 0.14902 0.156863 0.156863 0.160784 0.152941 0.133333 0.12549 0.109804 0.0901961 0.0823529 0.0784314 0.054902 0.0117647 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0862745 0.0705882 0.0509804 0.0980392 0.14902 0.180392 0.196078 0.180392 0.176471 0.184314 0.188235 0.215686 0.235294 0.235294 0.258824 0.262745 0.254902 0.258824 0.25098 0.25098 0.243137 0.227451 0.231373 0.231373 0.219608 0.219608 0.223529 0.211765 0.223529 0.211765 0.2 0.203922 0.196078 0.188235 0.172549 0.156863 0.156863 0.141176 0.129412 0.12549 0.109804 0.105882 0.0901961 0.0705882 0.0431373 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0745098 0.12549 0.054902 0.0509804 0.0862745 0.0980392 0.129412 0.156863 0.184314 0.192157 0.207843 0.219608 0.203922 0.207843 0.2 0.207843 0.203922 0.196078 0.2 0.203922 0.196078 0.192157 0.196078 0.188235 0.192157 0.192157 0.172549 0.176471 0.168627 0.156863 0.156863 0.156863 0.152941 0.152941 0.14902 0.172549 0.172549 0.152941 0.12549 0.101961 0.0666667 0.0470588 0.027451 0.00392157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0235294 0.0784314 0.0313725 0.0431373 0.0784314 0.0862745 0.0862745 0.105882 0.12549 0.14902 0.168627 0.188235 0.188235 0.203922 0.211765 0.203922 0.2 0.211765 0.203922 0.192157 0.2 0.203922 0.184314 0.180392 0.172549 0.172549 0.156863 0.152941 0.137255 0.145098 0.160784 0.184314 0.215686 0.196078 0.172549 0.133333 0.0901961 0.0627451 0.0470588 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0509804 0.0980392 0.0431373 0.0431373 0.0588235 0.0627451 0.0705882 0.0823529 0.0862745 0.0941176 0.0980392 0.105882 0.0941176 0.105882 0.101961 0.0980392 0.105882 0.105882 0.101961 0.0862745 0.0941176 0.0980392 0.0862745 0.0862745 0.105882 0.137255 0.176471 0.203922 0.196078 0.156863 0.14902 0.12549 0.12549 0.0784314 0.0196078 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0431373 0.0627451 0.0745098 0.101961 0.0901961 0.0627451 0.0588235 0.0588235 0.054902 0.0509804 0.0627451 0.0588235 0.054902 0.0588235 0.0470588 0.054902 0.0823529 0.0901961 0.121569 0.141176 0.14902 0.152941 0.141176 0.133333 0.0627451 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.0156863 0.0196078 0.0156863 0.0196078 0.0352941 0.0392157 0.0313725 0.0235294 0.0627451 0.109804 0.129412 0.0784314 0.0235294 0.0235294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/data/points/COIL_database/lucky_cat_PCA1 b/data/points/COIL_database/lucky_cat_PCA1 new file mode 100644 index 00000000..dd0f1eda --- /dev/null +++ b/data/points/COIL_database/lucky_cat_PCA1 @@ -0,0 +1,72 @@ +-1452.382 +-985.983 +-300.7043 +340.9664 +1115.224 +1816.717 +2603.418 +3283.292 +3776.975 +4193.036 +4514.083 +4805.137 +5132.243 +5429.507 +5762.975 +6104.911 +6283.41 +6435.22 +6388.126 +6131.01 +6004.362 +5890.452 +5560.509 +5414.897 +5437.464 +5192.032 +5230.463 +5249.902 +5477.721 +5498.137 +5558.49 +5788.839 +6038.19 +6097.074 +6011.507 +6224.031 +5961.784 +6142.578 +5787.753 +5592.622 +5318.977 +4860.224 +4682.885 +4236.65 +3752.153 +3248.328 +2737.484 +2294.011 +1755.705 +1159.159 +799.5467 +486.5098 +310.7009 +95.86115 +31.67501 +-183.7625 +-297.0857 +-279.4419 +-312.4302 +-608.9743 +-961.9346 +-1167.246 +-1320.912 +-1552.051 +-1915.02 +-2222.397 +-2398.179 +-2565.249 +-2594.809 +-2443.374 +-2182.187 +-1900.618 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0c16c9cc..a4e6eb50 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,7 @@ add_subdirectory(example/Spatial_searching) add_subdirectory(example/Subsampling) add_subdirectory(example/Tangential_complex) add_subdirectory(example/Bottleneck_distance) +add_subdirectory(example/Nerve_GIC) # data points generator add_subdirectory(data/points/generator) diff --git a/src/Nerve_GIC/example/CMakeLists.txt b/src/Nerve_GIC/example/CMakeLists.txt index d499613d..a4cb0f03 100644 --- a/src/Nerve_GIC/example/CMakeLists.txt +++ b/src/Nerve_GIC/example/CMakeLists.txt @@ -13,9 +13,15 @@ target_link_libraries(MapperDeltaCoord ${Boost_SYSTEM_LIBRARY}) add_executable ( MapperDeltaFunc MapperDeltaFunc.cpp ) target_link_libraries(MapperDeltaFunc ${Boost_SYSTEM_LIBRARY}) +add_executable ( GICvoronoi GICvoronoi.cpp ) +target_link_libraries(GICvoronoi ${Boost_SYSTEM_LIBRARY}) + +file(COPY visu.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + if (TBB_FOUND) target_link_libraries(Nerve ${TBB_LIBRARIES}) target_link_libraries(GIC ${TBB_LIBRARIES}) target_link_libraries(MapperDeltaCoord ${TBB_LIBRARIES}) target_link_libraries(MapperDeltaFunc ${TBB_LIBRARIES}) + target_link_libraries(GICvoronoi ${TBB_LIBRARIES}) endif() \ No newline at end of file diff --git a/src/Nerve_GIC/example/GIC.cpp b/src/Nerve_GIC/example/GIC.cpp index 30a485d5..1ab15ecc 100644 --- a/src/Nerve_GIC/example/GIC.cpp +++ b/src/Nerve_GIC/example/GIC.cpp @@ -3,7 +3,7 @@ void usage(int nbArgs, char * const progName) { std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; std::cerr << "Usage: " << progName << " filename.off threshold coordinate resolution gain\n"; - std::cerr << " i.e.: " << progName << " ../../../data/points/human.off 1.5 2 10 0.3 \n"; + std::cerr << " i.e.: " << progName << " ../../../data/points/human.off 0.075 2 10 0.3 \n"; exit(-1); // ----- >> } @@ -17,11 +17,6 @@ int main(int argc, char **argv) { double gain = atof(argv[5]); bool verb = 0; if(argc == 7) verb = 1; - // Type definitions - using Graph_t = boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS,\ - boost::property < vertex_filtration_t, Filtration_value >,\ - boost::property < edge_filtration_t, Filtration_value > >; - // ---------------------------------------------------------------------------- // Init of a graph induced complex from an OFF file // ---------------------------------------------------------------------------- @@ -29,12 +24,16 @@ int main(int argc, char **argv) { Gudhi::graph_induced_complex::Graph_induced_complex GIC; GIC.set_verbose(verb); - GIC.set_graph_from_rips(threshold, off_file_name); - GIC.set_function_from_coordinate(coord, off_file_name); GIC.set_color_from_coordinate(off_file_name, coord); + GIC.set_function_from_coordinate(coord, off_file_name); + + GIC.set_graph_from_rips(threshold, off_file_name); + GIC.set_resolution_double(resolution); GIC.set_gain(gain); GIC.set_cover_from_function(1); + GIC.find_GIC_simplices(); + GIC.plot_with_KeplerMapper(); Simplex_tree stree; GIC.create_complex(stree); diff --git a/src/Nerve_GIC/example/GICvoronoi.cpp b/src/Nerve_GIC/example/GICvoronoi.cpp new file mode 100644 index 00000000..2d50ab4d --- /dev/null +++ b/src/Nerve_GIC/example/GICvoronoi.cpp @@ -0,0 +1,59 @@ +#include + +void usage(int nbArgs, char * const progName) { + std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; + std::cerr << "Usage: " << progName << " filename.off threshold N\n"; + std::cerr << " i.e.: " << progName << " ../../../data/points/human.off 0.075 100 \n"; + exit(-1); // ----- >> +} + +int main(int argc, char **argv) { + if ((argc != 4) && (argc != 5)) usage(argc, (argv[0] - 1)); + + std::string off_file_name(argv[1]); + double threshold = atof(argv[2]); + int m = atoi(argv[3]); + bool verb = 0; if(argc == 5) verb = 1; + + // ---------------------------------------------------------------------------- + // Init of a graph induced complex from an OFF file + // ---------------------------------------------------------------------------- + + Gudhi::graph_induced_complex::Graph_induced_complex GIC; + GIC.set_verbose(verb); + + GIC.set_color_from_coordinate(off_file_name); + + GIC.set_graph_from_OFF(off_file_name); + + GIC.set_cover_from_Voronoi(m, off_file_name); + + GIC.find_GIC_simplices(); + + GIC.plot_with_KeplerMapper(); + + Simplex_tree stree; GIC.create_complex(stree); + + std::streambuf* streambufffer = std::cout.rdbuf(); + std::ostream output_stream(streambufffer); + + // ---------------------------------------------------------------------------- + // Display information about the graph induced complex + // ---------------------------------------------------------------------------- + + if(verb){ + output_stream << "Graph induced complex is of dimension " << stree.dimension() << + " - " << stree.num_simplices() << " simplices - " << + stree.num_vertices() << " vertices." << std::endl; + + output_stream << "Iterator on graph induced complex simplices" << std::endl; + for (auto f_simplex : stree.filtration_simplex_range()) { + for (auto vertex : stree.simplex_vertex_range(f_simplex)) { + output_stream << vertex << " "; + } + output_stream << std::endl; + } + } + + return 0; +} diff --git a/src/Nerve_GIC/example/MapperDeltaCoord.cpp b/src/Nerve_GIC/example/MapperDeltaCoord.cpp index aa12afe6..950ee58a 100644 --- a/src/Nerve_GIC/example/MapperDeltaCoord.cpp +++ b/src/Nerve_GIC/example/MapperDeltaCoord.cpp @@ -14,11 +14,6 @@ int main(int argc, char **argv) { int coord = atoi(argv[2]); bool verb = 0; if(argc == 4) verb = 1; - // Type definitions - using Graph_t = boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS,\ - boost::property < vertex_filtration_t, Filtration_value >,\ - boost::property < edge_filtration_t, Filtration_value > >; - // --------------------------------------- // Init of a Mapper Delta from an OFF file // --------------------------------------- @@ -26,12 +21,16 @@ int main(int argc, char **argv) { Gudhi::graph_induced_complex::Graph_induced_complex GIC; GIC.set_verbose(verb); - GIC.set_graph_from_automatic_rips(off_file_name); - GIC.set_function_from_coordinate(coord, off_file_name); GIC.set_color_from_coordinate(off_file_name, coord); + GIC.set_function_from_coordinate(coord, off_file_name); + + GIC.set_graph_from_automatic_rips(off_file_name); + GIC.set_automatic_resolution_for_GICMAP(); GIC.set_gain(); GIC.set_cover_from_function(1); + GIC.find_GICMAP_simplices_with_functional_minimal_cover(); + GIC.plot_with_KeplerMapper(); Simplex_tree stree; GIC.create_complex(stree); diff --git a/src/Nerve_GIC/example/MapperDeltaFunc.cpp b/src/Nerve_GIC/example/MapperDeltaFunc.cpp index 20924b9c..658b0273 100644 --- a/src/Nerve_GIC/example/MapperDeltaFunc.cpp +++ b/src/Nerve_GIC/example/MapperDeltaFunc.cpp @@ -14,11 +14,6 @@ int main(int argc, char **argv) { std::string func_file_name = argv[2]; bool verb = 0; if(argc == 4) verb = 1; - // Type definitions - using Graph_t = boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS,\ - boost::property < vertex_filtration_t, Filtration_value >,\ - boost::property < edge_filtration_t, Filtration_value > >; - // --------------------------------------- // Init of a Mapper Delta from an OFF file // --------------------------------------- @@ -26,12 +21,16 @@ int main(int argc, char **argv) { Gudhi::graph_induced_complex::Graph_induced_complex GIC; GIC.set_verbose(verb); - GIC.set_graph_from_automatic_rips(off_file_name); - GIC.set_function_from_file(func_file_name); GIC.set_color_from_file(func_file_name); + GIC.set_function_from_file(func_file_name); + + GIC.set_graph_from_automatic_rips(off_file_name); + GIC.set_automatic_resolution_for_GICMAP(); GIC.set_gain(); GIC.set_cover_from_function(1); + GIC.find_GICMAP_simplices_with_functional_minimal_cover(); + GIC.plot_with_KeplerMapper(); Simplex_tree stree; GIC.create_complex(stree); diff --git a/src/Nerve_GIC/example/Nerve.cpp b/src/Nerve_GIC/example/Nerve.cpp index d4a68c71..a0de31ae 100644 --- a/src/Nerve_GIC/example/Nerve.cpp +++ b/src/Nerve_GIC/example/Nerve.cpp @@ -16,11 +16,6 @@ int main(int argc, char **argv) { double gain = atof(argv[4]); bool verb = 0; if(argc == 6) verb = 1; - // Type definitions - using Graph_t = boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS,\ - boost::property < vertex_filtration_t, Filtration_value >,\ - boost::property < edge_filtration_t, Filtration_value > >; - // -------------------------------- // Init of a Nerve from an OFF file // -------------------------------- @@ -28,12 +23,16 @@ int main(int argc, char **argv) { Gudhi::graph_induced_complex::Graph_induced_complex GIC; GIC.set_verbose(verb); - GIC.set_graph_from_OFF(off_file_name); + GIC.set_color_from_coordinate(off_file_name, coord); GIC.set_function_from_coordinate(coord, off_file_name); - GIC.set_color_from_coordinate(off_file_name, --coord); + + GIC.set_graph_from_OFF(off_file_name); + GIC.set_resolution_int(resolution); GIC.set_gain(gain); GIC.set_cover_from_function(0); + GIC.find_Nerve_simplices(); + GIC.plot_with_KeplerMapper(); Simplex_tree stree; GIC.create_complex(stree); diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index e9b7a1f1..205aa87e 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include @@ -51,11 +53,18 @@ #define ETA 0.001 #define MASK 0 +namespace gss = Gudhi::spatial_searching; + using Simplex_tree = Gudhi::Simplex_tree<>; using Filtration_value = Simplex_tree::Filtration_value; using Rips_complex = Gudhi::rips_complex::Rips_complex; using Point = std::vector; +typedef CGAL::Epick_d > K; +typedef typename K::Point_d Pointd; +typedef std::vector Pointsd; +typedef gss::Kd_tree_search Points_ds; + std::map func; std::map func_color; @@ -88,14 +97,14 @@ namespace graph_induced_complex { class Graph_induced_complex { private: - bool verbose; - typedef int Cover_t; + bool verbose; // whether to display information. + typedef int Cover_t; // elements of cover C are indexed by integers. std::vector > simplices; std::map > cover; - int maximal_dim; - int data_dimension; - std::map cover_fct; - std::map > cover_color; + int maximal_dim; // maximal dimension of output simplicial complex. + int data_dimension; // dimension of input data. + std::map cover_fct; // integer-valued function that allows to state if two elements of the cover are consecutive or not. + std::map > cover_color; // size and coloring of the vertices of the output simplicial complex. Simplex_tree<> st; std::map > adjacency_matrix; int resolution_int; @@ -187,10 +196,10 @@ class Graph_induced_complex { * */ void set_graph_from_OFF(const std::string& off_file_name){ - int numpts, numedges, numfaces, i; std::vector edge(2); double x; int num; std::vector simplex; + int n, numedges, numfaces, i; std::vector edge(2); double x; int num; std::vector simplex; std::ifstream input(off_file_name); std::string line; getline(input, line); - input >> numpts; input >> numfaces; input >> numedges; - i = 0; while(i < numpts){input >> x; input >> x; input >> x; i++;} + input >> n; input >> numfaces; input >> numedges; + i = 0; while(i < n){input >> x; input >> x; input >> x; i++;} i = 0; while(i < numfaces){ simplex.clear(); input >> num; for(int j = 0; j < num; j++){int k; input >> k; simplex.push_back(k);} @@ -204,7 +213,7 @@ class Graph_induced_complex { } std::vector empty; - for(int i = 0; i < numpts; i++) adjacency_matrix.insert(std::pair >(i,empty)); + for(int i = 0; i < n; i++) adjacency_matrix.insert(std::pair >(i,empty)); for (auto simplex : st.complex_simplex_range()) { if(st.dimension(simplex) == 1){ std::vector vertices; @@ -292,7 +301,7 @@ class Graph_induced_complex { } } - #pragma omp parallel for + //#pragma omp parallel for for (int i = 0; i < N; i++){ SampleWithoutReplacement(n,m,samples); @@ -349,8 +358,8 @@ class Graph_induced_complex { */ void set_function_from_coordinate(const int& k, const std::string& off_file_name){ Points_off_reader off_reader(off_file_name); - int numpts = off_reader.get_point_cloud().size(); - for(int i = 0; i < numpts; i++) func.insert(std::pair(i,off_reader.get_point_cloud()[i][k])); + int n = off_reader.get_point_cloud().size(); + for(int i = 0; i < n; i++) func.insert(std::pair(i,off_reader.get_point_cloud()[i][k])); } public: // Set function from vector. @@ -360,7 +369,8 @@ class Graph_induced_complex { * */ void set_function_from_vector(const std::vector& function){ - for(int i = 0; i < function.size(); i++) func.insert(std::pair(i, function[i])); + int n = function.size(); + for(int i = 0; i < n; i++) func.insert(std::pair(i, function[i])); } // ******************************************************************************************************************* @@ -379,12 +389,56 @@ class Graph_induced_complex { std::ifstream input(cover_file_name); std::string line; while(std::getline(input,line)){ cov_elts.clear(); std::stringstream stream(line); - while(stream >> cov){cov_elts.push_back(cov); cov_number.push_back(cov); cover_fct.insert(std::pair(cov,cov));} - cover.insert(std::pair >(vertex_id, cov_elts)); vertex_id++; + while(stream >> cov){ + cov_elts.push_back(cov); cov_number.push_back(cov); + cover_fct[cov] = cov; cover_color[cov].second += func_color[vertex_id]; cover_color[cov].first++; + } + cover[vertex_id] = cov_elts; vertex_id++; } std::vector::iterator it; std::sort(cov_number.begin(),cov_number.end()); it = std::unique(cov_number.begin(),cov_number.end()); - cov_number.resize(std::distance(cov_number.begin(),it)); maximal_dim = cov_number.size(); + cov_number.resize(std::distance(cov_number.begin(),it)); maximal_dim = cov_number.size()-1; + for(int i = 0; i <= maximal_dim; i++) cover_color[i].second /= cover_color[i].first; + } + + public: // Set cover from Voronoi + /** \brief Creates the cover C from the Voronoï cells of a subsampling of the point cloud. + * + * @param[in] m number of points in the subsample. + * @param[in] off_file_name name of the input .OFF file. + * + */ + void set_cover_from_Voronoi(const int& m, const std::string& off_file_name){ + Points_off_reader off_reader(off_file_name); + int n = off_reader.get_point_cloud().size(); data_dimension = off_reader.get_point_cloud()[0].size(); + Pointsd pointsd(m+1); std::vector samples(m); SampleWithoutReplacement(n,m,samples); + double* coord = new double[data_dimension]; + + for(int i = 1; i <= m; i++){ + for(int j = 0; j < data_dimension; j++) coord[j] = off_reader.get_point_cloud()[samples[i-1]][j]; + pointsd[i] = Pointd(data_dimension, coord+0, coord + data_dimension); cover_fct[i-1] = i-1; + } std::cout << std::endl; + + int curr_subsample = 0; + for(int i = 0; i < n; i++){ + for(int j = 0; j < data_dimension; j++) coord[j] = off_reader.get_point_cloud()[i][j]; + pointsd[0] = Pointd(data_dimension, coord+0, coord + data_dimension); Points_ds points_ds(pointsd); + auto knn_range = points_ds.query_k_nearest_neighbors(pointsd[0], 2, true); + Cover_t cluster = (knn_range.begin()+1)->first-1; + if(cluster >= 0){ // Case where i is not a subsample point. + cover[i].push_back(cluster); cover_color[cluster].second += func_color[i]; cover_color[cluster].first++; + } + else{ // Case where i is a subsample point. + cover[i].push_back(curr_subsample); cover_color[curr_subsample].second += func_color[i]; + cover_color[curr_subsample].first++; curr_subsample++; + } + } + + for(int i = 0; i < m; i++) cover_color[i].second /= cover_color[i].first; + + delete [] coord; + maximal_dim = m-1; + } public: // Automatic tuning of resolution for Mapper Delta. @@ -448,9 +502,10 @@ class Graph_induced_complex { void set_cover_from_function(const bool& token){ // Read function values and compute min and max - std::map::iterator it; double maxf, minf; minf = std::numeric_limits::max(); maxf = std::numeric_limits::min(); + std::map::iterator it; + double maxf, minf; minf = std::numeric_limits::max(); maxf = std::numeric_limits::min(); for(it = func.begin(); it != func.end(); it++){minf = std::min(minf, it->second); maxf = std::max(maxf, it->second);} - int num_pts = func.size(); if(verbose) std::cout << "Min function value = " << minf << " and Max function value = " << maxf << std::endl; + int n = func.size(); if(verbose) std::cout << "Min function value = " << minf << " and Max function value = " << maxf << std::endl; // Compute cover of im(f) std::vector > intervals; int res; @@ -477,40 +532,41 @@ class Graph_induced_complex { y = x + resolution_double; } std::pair interM(x,maxf); intervals.push_back(interM); res = intervals.size(); - for(int i = 0; i < res; i++) if(verbose) std::cout << "Interval " << i << " = [" << intervals[i].first << ", " << intervals[i].second << "]" << std::endl; + for(int i = 0; i < res; i++) if(verbose) std::cout << "Interval " << i << " = [" << \ + intervals[i].first << ", " << intervals[i].second << "]" << std::endl; } // Sort points according to function values - std::vector points(num_pts); for(int i = 0; i < num_pts; i++) points[i] = i; + std::vector points(n); for(int i = 0; i < n; i++) points[i] = i; std::sort(points.begin(),points.end(),functional_comp); - int id = 0; int pos = 0; double min_prop_int; double max_prop_int; + int id = 0; int pos = 0; for(int i = 0; i < res; i++){ // Find points in the preimage std::map > prop; prop.clear(); - std::pair inter1 = intervals[i]; min_prop_int = inter1.first; + std::pair inter1 = intervals[i]; int tmp = pos; if(i != res-1){ if(i != 0){ - std::pair inter3 = intervals[i-1]; min_prop_int = inter3.second; - while(func[points[tmp]] < inter3.second && tmp != num_pts){ + std::pair inter3 = intervals[i-1]; + while(func[points[tmp]] < inter3.second && tmp != n){ prop.insert(std::pair >(points[tmp],adjacency_matrix[points[tmp]])); tmp++; } } - std::pair inter2 = intervals[i+1]; max_prop_int = inter2.first; - while(func[points[tmp]] < inter2.first && tmp != num_pts){ + std::pair inter2 = intervals[i+1]; + while(func[points[tmp]] < inter2.first && tmp != n){ prop.insert(std::pair >(points[tmp],adjacency_matrix[points[tmp]])); tmp++; } pos = tmp; - while(func[points[tmp]] < inter1.second && tmp != num_pts){ + while(func[points[tmp]] < inter1.second && tmp != n){ prop.insert(std::pair >(points[tmp],adjacency_matrix[points[tmp]])); tmp++; } @@ -520,13 +576,12 @@ class Graph_induced_complex { else{ std::pair inter3 = intervals[i-1]; - min_prop_int = inter3.second; max_prop_int = inter1.second; - while(func[points[tmp]] < inter3.second && tmp != num_pts){ + while(func[points[tmp]] < inter3.second && tmp != n){ prop.insert(std::pair >(points[tmp],adjacency_matrix[points[tmp]])); tmp++; } - while(tmp != num_pts){ + while(tmp != n){ prop.insert(std::pair >(points[tmp],adjacency_matrix[points[tmp]])); tmp++; } @@ -552,7 +607,7 @@ class Graph_induced_complex { if(verbose) std::cout << std::endl; } - maximal_dim = id; + maximal_dim = id-1; } @@ -583,8 +638,8 @@ class Graph_induced_complex { */ void set_color_from_coordinate(const std::string& off_file_name, int k = 0){ Points_off_reader off_reader(off_file_name); - int numpts = off_reader.get_point_cloud().size(); - for(int i = 0; i < numpts; i++) func_color.insert(std::pair(i,off_reader.get_point_cloud()[i][k])); + int n = off_reader.get_point_cloud().size(); + for(int i = 0; i < n; i++) func_color[i] = off_reader.get_point_cloud()[i][k]; } public: // Set color from vector. @@ -594,7 +649,7 @@ class Graph_induced_complex { * */ void set_color_from_vector(const std::vector& color){ - for(int i = 0; i < color.size(); i++) func_color.insert(std::pair(i, color[i])); + for(unsigned int i = 0; i < color.size(); i++) func_color.insert(std::pair(i, color[i])); } public: // Create a .dot file that can be compiled with neato to produce a .pdf file @@ -605,7 +660,7 @@ class Graph_induced_complex { double maxv, minv; maxv = std::numeric_limits::min(); minv = std::numeric_limits::max(); for (std::map >::iterator iit = cover_color.begin(); iit != cover_color.end(); iit++){ maxv = std::max(maxv, iit->second.second); minv = std::min(minv, iit->second.second); - } + } //std::cout << minv << " " << maxv << std::endl; int k = 0; std::vector nodes; nodes.clear(); for (std::map >::iterator iit = cover_color.begin(); iit != cover_color.end(); iit++){ if(iit->second.first > MASK){ @@ -622,6 +677,9 @@ class Graph_induced_complex { if (cover_color[simplices[i][0]].first > MASK && cover_color[simplices[i][1]].first > MASK){ graphic << " " << simplices[i][0] << " -- " << simplices[i][1] << " [weight=15];" << std::endl; ke++;} graphic << "}"; graphic.close(); + char command[100]; sprintf(command, "neato SC.dot -Tpdf -o SC_visu.pdf && rm SC.dot"); + int systemRet = system(command); + if(systemRet == -1) std::cout << "Visualization failed. Do you have neato?" << std::endl; } public: // Create a .txt file that can be compiled with KeplerMapper to produce a .html file @@ -649,6 +707,9 @@ class Graph_induced_complex { if (cover_color[simplices[i][0]].first > MASK && cover_color[simplices[i][1]].first > MASK) graphic << simplices[i][0] << " " << simplices[i][1] << std::endl; graphic.close(); + char command[100]; sprintf(command, "python visu.py && firefox SC_visu.html"); + int systemRet = system(command); + if(systemRet == -1) std::cout << "Visualization failed. Do you have python and firefox?" << std::endl; } // ******************************************************************************************************************* @@ -663,8 +724,8 @@ class Graph_induced_complex { */ template void create_complex(SimplicialComplexForGIC & complex) { - size_t sz = simplices.size(); int dimension = 0; - for(int i = 0; i < sz; i++){ + size_t sz = simplices.size(); unsigned int dimension = 0; + for(unsigned int i = 0; i < sz; i++){ complex.insert_simplex_and_subfaces(simplices[i]); if(dimension < simplices[i].size()-1) dimension = simplices[i].size()-1; } @@ -681,7 +742,7 @@ class Graph_induced_complex { int num_nodes = cover_elts.size(); std::vector simplex; for(int i = 0; i < num_nodes; i++) - for(int j = 0; j < cover_elts[i].size(); j++) + for(unsigned int j = 0; j < cover_elts[i].size(); j++) simplex.push_back(cover_elts[i][j]); std::sort(simplex.begin(),simplex.end()); std::vector::iterator it = std::unique(simplex.begin(),simplex.end()); simplex.resize(std::distance(simplex.begin(),it)); diff --git a/src/Nerve_GIC/test/CMakeLists.txt b/src/Nerve_GIC/test/CMakeLists.txt new file mode 100644 index 00000000..627778fa --- /dev/null +++ b/src/Nerve_GIC/test/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 2.6) +project(Graph_induced_complex_tests) + +if (GCOVR_PATH) + # for gcovr to make coverage reports - Corbera Jenkins plugin + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") +endif() +if (GPROF_PATH) + # for gprof to make coverage reports - Jenkins + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") +endif() + +add_executable ( graph_induced_complex_UT test_GIC.cpp ) +target_link_libraries(graph_induced_complex_UT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +if (TBB_FOUND) + target_link_libraries(graph_induced_complex_UT ${TBB_LIBRARIES}) +endif() + +file(COPY data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + +add_test(graph_induced_complex_UT ${CMAKE_CURRENT_BINARY_DIR}/graph_induced_complex_UT + # XML format for Jenkins xUnit plugin + --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/graph_induced_complex_UT.xml --log_level=test_suite --report_level=no) diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index e6f29fa8..b1625e69 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -93,6 +93,24 @@ User manual: \ref simplex_tree - Reference manual: Gudhi::Simplex_tree + + \subsection GICDataStructure Nerves and Graph Induced Complexes + \image html "gic_complex.png" "Graph Induced Complex of a point cloud." + + + + +
+ Author: Mathieu Carrière
+ Introduced in: GUDHI 2.0.1
+ Copyright: GPL v3
+
+ Nerves and Graph Induced Complexes are simplicial complexes that provably contain + topological information about the input data. They can be computed with a cover of the + data, that often comes from the preimage of a family of intervals covering the image + of a scalar-valued function defined on the data.
+ User manual: \ref graph_induced_complex - Reference manual: Gudhi::graph_induced_complex::Graph_induced_complex +
\subsection SkeletonBlockerDataStructure Skeleton blocker \image html "ds_representation.png" "Skeleton blocker representation" -- 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/common') 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 2bcb3d7cb47ce71803f2464cc822346ed2e1b039 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 30 May 2017 15:43:48 +0000 Subject: Fix doc typo git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2476 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: eee441e3902a0995a8356d76007664fe559f3036 --- src/Persistence_representations/include/gudhi/Persistence_vectors.h | 2 +- src/common/doc/main_page.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index 616ec50f..7cfb8e0b 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -54,7 +54,7 @@ struct Maximum_distance /** - * \class Vector_distances_in_diagram Vector_distances_in_diagram.h gudhi/Vector_distances_in_diagram.h + * \class Vector_distances_in_diagram Persistence_vectors.h gudhi/Persistence_vectors.h * \brief A class implementing persistence vectors. * * \ingroup Persistence_representations diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 6986a6b5..ec968558 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -222,11 +222,10 @@ Copyright: GPL v3
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
- It contain implementation of various representations of persistence diagrams; diagrams themselves, persistence + It contains 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 -
-- cgit v1.2.3 From 3a76dcb9f49671b01ae200a13569f47fca57dac0 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 31 May 2017 06:20:04 +0000 Subject: Fix cpplint and cppcheck git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2480 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9ad6fc7b096fff02a8696515c074ddd92980a8e2 --- .../example/persistence_heat_maps.cpp | 1 + .../example/persistence_intervals.cpp | 2 + .../example/persistence_landscape.cpp | 6 ++- .../example/persistence_landscape_on_grid.cpp | 6 ++- .../example/persistence_vectors.cpp | 6 ++- .../include/gudhi/PSSK.h | 9 +++-- .../include/gudhi/Persistence_heat_maps.h | 33 ++++++++-------- .../include/gudhi/Persistence_intervals.h | 7 ++-- .../gudhi/Persistence_intervals_with_distances.h | 4 +- .../include/gudhi/Persistence_landscape.h | 37 +++++++++--------- .../include/gudhi/Persistence_landscape_on_grid.h | 44 +++++++++++----------- .../include/gudhi/Persistence_vectors.h | 18 +++++---- .../gudhi/common_persistence_representations.h | 3 ++ .../include/gudhi/read_persistence_from_file.h | 8 ++-- .../average_persistence_heat_maps.cpp | 1 + .../compute_distance_of_persistence_heat_maps.cpp | 2 + ...ute_scalar_product_of_persistence_heat_maps.cpp | 1 + ...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 + ...te_birth_death_range_in_persistence_diagram.cpp | 1 + .../compute_bottleneck_distance.cpp | 2 + .../compute_number_of_dominant_intervals.cpp | 3 ++ .../plot_histogram_of_intervals_lengths.cpp | 3 ++ .../plot_persistence_Betti_numbers.cpp | 3 ++ .../plot_persistence_intervals.cpp | 3 ++ .../persistence_landscapes/average_landscapes.cpp | 1 + .../compute_distance_of_landscapes.cpp | 1 + .../compute_scalar_product_of_landscapes.cpp | 1 + .../compute_distance_of_landscapes_on_grid.cpp | 2 + ...ompute_scalar_product_of_landscapes_on_grid.cpp | 1 + .../create_landscapes_on_grid.cpp | 4 +- .../average_persistence_vectors.cpp | 1 + .../compute_distance_of_persistence_vectors.cpp | 2 + ...mpute_scalar_product_of_persistence_vectors.cpp | 2 + .../create_persistence_vectors.cpp | 2 + src/common/include/gudhi/distance_functions.h | 4 +- 39 files changed, 151 insertions(+), 83 deletions(-) (limited to 'src/common') diff --git a/src/Persistence_representations/example/persistence_heat_maps.cpp b/src/Persistence_representations/example/persistence_heat_maps.cpp index 5e3be880..a9ac5df5 100644 --- a/src/Persistence_representations/example/persistence_heat_maps.cpp +++ b/src/Persistence_representations/example/persistence_heat_maps.cpp @@ -25,6 +25,7 @@ #include #include +#include using namespace Gudhi; using namespace Gudhi::Persistence_representations; diff --git a/src/Persistence_representations/example/persistence_intervals.cpp b/src/Persistence_representations/example/persistence_intervals.cpp index 1accfb0c..29cd66f3 100644 --- a/src/Persistence_representations/example/persistence_intervals.cpp +++ b/src/Persistence_representations/example/persistence_intervals.cpp @@ -24,6 +24,8 @@ #include #include +#include +#include using namespace Gudhi; using namespace Gudhi::Persistence_representations; diff --git a/src/Persistence_representations/example/persistence_landscape.cpp b/src/Persistence_representations/example/persistence_landscape.cpp index 4225f83a..1bcc524a 100644 --- a/src/Persistence_representations/example/persistence_landscape.cpp +++ b/src/Persistence_representations/example/persistence_landscape.cpp @@ -22,11 +22,13 @@ #include +#include +#include +#include + using namespace Gudhi; using namespace Gudhi::Persistence_representations; -#include - 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 821fb5b7..0cede07e 100644 --- a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp +++ b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp @@ -22,11 +22,13 @@ #include +#include +#include +#include + using namespace Gudhi; using namespace Gudhi::Persistence_representations; -#include - 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 bc2f3fe7..c6581039 100644 --- a/src/Persistence_representations/example/persistence_vectors.cpp +++ b/src/Persistence_representations/example/persistence_vectors.cpp @@ -21,12 +21,14 @@ */ #include -#include - #include + +#include #include #include #include +#include +#include using namespace Gudhi; using namespace Gudhi::Persistence_representations; diff --git a/src/Persistence_representations/include/gudhi/PSSK.h b/src/Persistence_representations/include/gudhi/PSSK.h index 59e73af4..53628737 100644 --- a/src/Persistence_representations/include/gudhi/PSSK.h +++ b/src/Persistence_representations/include/gudhi/PSSK.h @@ -26,6 +26,10 @@ // gudhi include #include +#include +#include +#include + namespace Gudhi { namespace Persistence_representations { @@ -117,8 +121,8 @@ void PSSK::construct(const std::vector >& intervals_, 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); + int x_grid = static_cast((intervals_[pt_nr].first - this->min_) / (this->max_ - this->min_) * number_of_pixels); + int y_grid = static_cast((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; @@ -134,7 +138,6 @@ void PSSK::construct(const std::vector >& intervals_, 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; diff --git a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index 549c19e7..5ef5129d 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -23,18 +23,20 @@ #ifndef PERSISTENCE_HEAT_MAPS_H_ #define PERSISTENCE_HEAT_MAPS_H_ +// gudhi include +#include +#include + // standard include #include #include #include #include #include -#include #include - -// gudhi include -#include -#include +#include +#include +#include namespace Gudhi { namespace Persistence_representations { @@ -68,8 +70,8 @@ std::vector > create_Gaussian_filter(size_t pixel_radius, do getchar(); } - for (int x = -pixel_radius; x <= (int)pixel_radius; x++) { - for (int y = -pixel_radius; y <= (int)pixel_radius; y++) { + for (int x = -pixel_radius; x <= static_cast(pixel_radius); x++) { + for (int y = -pixel_radius; y <= static_cast(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); @@ -123,7 +125,7 @@ class constant_scaling_function { class distance_from_diagonal_scaling { public: double operator()(const std::pair& point_in_diagram) { - //(point_in_diagram.first+point_in_diagram.second)/2.0 + // (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)); } @@ -194,7 +196,7 @@ class Persistence_heat_maps { 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: @@ -580,8 +582,8 @@ void Persistence_heat_maps::construct(const std::vectormin_) / (this->max_ - this->min_) * number_of_pixels); - int y_grid = (int)((intervals_[pt_nr].second - this->min_) / (this->max_ - this->min_) * number_of_pixels); + int x_grid = static_cast((intervals_[pt_nr].first - this->min_) / (this->max_ - this->min_) * number_of_pixels); + int y_grid = static_cast((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; @@ -597,7 +599,6 @@ void Persistence_heat_maps::construct(const std::vector::compute_mean(const std::vector< 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(); + heat_maps[i][j] = mean / static_cast(maps.size()); } } this->heat_map = heat_maps; @@ -782,7 +783,7 @@ void Persistence_heat_maps::load_from_file(const char* file // 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"; + throw "The persistence landscape file do not exist. The program will now terminate \n"; } // now we read the file one by one. @@ -848,7 +849,7 @@ double Persistence_heat_maps::distance(const Persistence_he 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"; + throw "The persistence images are of non compatible sizes. 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 @@ -897,7 +898,7 @@ double Persistence_heat_maps::compute_scalar_product(const 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"; + throw "The persistence images are of non compatible sizes. 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 diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index 939ae274..9e614efd 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -32,9 +32,10 @@ #include #include #include -#include #include #include +#include +#include namespace Gudhi { namespace Persistence_representations { @@ -402,7 +403,7 @@ std::vector Persistence_intervals::characteristic_function_of_diagram(do 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); + ((x_max - x_min) / static_cast(number_of_bins)) * (this->intervals[i].second - this->intervals[i].first); } if (dbg) { std::cerr << "Result at this stage \n"; @@ -564,6 +565,6 @@ double Persistence_intervals::project_to_R(int number_of_function) const { } } // namespace Persistence_representations -} // namespace gudhi +} // namespace Gudhi #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 0f3920cd..e476d28a 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals_with_distances.h @@ -26,6 +26,8 @@ #include #include +#include + namespace Gudhi { namespace Persistence_representations { @@ -56,6 +58,6 @@ class Persistence_intervals_with_distances : public Persistence_intervals { }; } // namespace Persistence_representations -} // namespace gudhi +} // namespace Gudhi #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 be7c9e31..c86e68d3 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape.h @@ -23,6 +23,10 @@ #ifndef PERSISTENCE_LANDSCAPE_H_ #define PERSISTENCE_LANDSCAPE_H_ +// gudhi include +#include +#include + // standard include #include #include @@ -31,10 +35,9 @@ #include #include #include - -// gudhi include -#include -#include +#include +#include +#include namespace Gudhi { namespace Persistence_representations { @@ -323,7 +326,7 @@ class Persistence_landscape { * Vectorized_topological_data */ std::vector vectorize(int number_of_function) const { - // TODO, think of something smarter over here + // TODO(PD) think of something smarter over here std::vector v; if ((size_t)number_of_function > this->land.size()) { return v; @@ -393,7 +396,7 @@ class Persistence_landscape { nextLevelMerge.swap(nextNextLevelMerge); } (*this) = (*nextLevelMerge[0]); - (*this) *= 1 / ((double)to_average.size()); + (*this) *= 1 / static_cast(to_average.size()); } /** @@ -882,7 +885,7 @@ void Persistence_landscape::load_landscape_from_file(const char* filename) { 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"; + throw "The persistence landscape file do not exist. The program will now terminate \n"; } std::string line; @@ -971,7 +974,7 @@ Persistence_landscape operation_on_pair_of_landscapes(const Persistence_landscap } lambda_n.push_back( std::make_pair(land1.land[i][p].first, - oper((double)land1.land[i][p].second, + oper(static_cast(land1.land[i][p].second), function_value(land2.land[i][q - 1], land2.land[i][q], land1.land[i][p].first)))); ++p; continue; @@ -1085,8 +1088,8 @@ 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) // In this case, I consider points at the infinity - { + // In this case, I consider points at the infinity + for (size_t i = 1; i != pl1.land[level].size() - 1; ++i) { while (true) { if ((pl1.land[level][i].first >= pl2.land[level][p2Count].first) && (pl1.land[level][i].first <= pl2.land[level][p2Count + 1].first)) @@ -1142,17 +1145,17 @@ double compute_distance_of_landscapes(const Persistence_landscape& first, const } if (p < std::numeric_limits::max()) { - //\int_{- \infty}^{+\infty}| first-second |^p + // \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); + result = lan.compute_integral_of_landscape(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); + // (\int_{- \infty}^{+\infty}| first-second |^p)^(1/p) + return pow(result, 1.0 / p); } else { // p == infty if (dbg) std::cerr << "Power = infty, compute maximum \n"; @@ -1232,9 +1235,9 @@ double compute_inner_product(const Persistence_landscape& l1, const Persistence_ } // we have two intervals in which functions are constant: - //[l1.land[level][l1It].first , l1.land[level][l1It+1].first] + // [l1.land[level][l1It].first , l1.land[level][l1It+1].first] // and - //[l2.land[level][l2It].first , l2.land[level][l2It+1].first] + // [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. @@ -1316,6 +1319,6 @@ void Persistence_landscape::plot(const char* filename, double xRangeBegin, doubl } } // namespace Persistence_representations -} // namespace gudhi +} // 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 bea98f74..6eec26d6 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h @@ -24,6 +24,10 @@ #ifndef PERSISTENCE_LANDSCAPE_ON_GRID_H_ #define PERSISTENCE_LANDSCAPE_ON_GRID_H_ +// gudhi include +#include +#include + // standard include #include #include @@ -32,14 +36,9 @@ #include #include #include -#include -#include #include - -// gudhi include - -#include -#include +#include +#include namespace Gudhi { namespace Persistence_representations { @@ -165,7 +164,7 @@ class Persistence_landscape_on_grid { 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); + double dx = (this->grid_max - this->grid_min) / static_cast(this->values_of_landscapes.size() - 1); if (dbg) { std::cerr << "this->grid_max : " << this->grid_max << std::endl; @@ -220,7 +219,7 @@ class Persistence_landscape_on_grid { bool dbg = false; double result = 0; - double dx = (this->grid_max - this->grid_min) / (double)(this->values_of_landscapes.size() - 1); + double dx = (this->grid_max - this->grid_min) / static_cast(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]; @@ -279,7 +278,7 @@ class Persistence_landscape_on_grid { * 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 dx = (land.grid_max - land.grid_min) / static_cast(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 << " : "; @@ -306,7 +305,7 @@ class Persistence_landscape_on_grid { 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); + double dx = (this->grid_max - this->grid_min) / static_cast(this->values_of_landscapes.size() - 1); size_t position = size_t((x - this->grid_min) / dx); if (dbg) { @@ -338,7 +337,6 @@ class Persistence_landscape_on_grid { 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])); @@ -623,7 +621,7 @@ class Persistence_landscape_on_grid { 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 dx = (l1.grid_max - l1.grid_min) / static_cast(l1.values_of_landscapes.size() - 1); double previous_x = l1.grid_min - dx; double previous_y_l1 = 0; @@ -737,14 +735,14 @@ class Persistence_landscape_on_grid { } if (p < std::numeric_limits::max()) { - //\int_{- \infty}^{+\infty}| first-second |^p + // \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); + result = lan.compute_integral_of_landscape(p); if (dbg) { std::cerr << "integral : " << result << std::endl; getchar(); @@ -756,8 +754,8 @@ class Persistence_landscape_on_grid { getchar(); } } - //(\int_{- \infty}^{+\infty}| first-second |^p)^(1/p) - return pow(result, 1 / (double)p); + // (\int_{- \infty}^{+\infty}| first-second |^p)^(1/p) + return pow(result, 1.0 / p); } else { // p == infty return lan.compute_maximum(); @@ -789,7 +787,7 @@ class Persistence_landscape_on_grid { * Vectorized_topological_data */ std::vector vectorize(int number_of_function) const { - // TODO, think of something smarter over here + // TODO(PD) 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"; } @@ -864,7 +862,7 @@ class Persistence_landscape_on_grid { } // 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(); + this->values_of_landscapes[grid_point][i] /= static_cast(to_average.size()); } } } // compute_average @@ -979,10 +977,10 @@ void Persistence_landscape_on_grid::set_up_values_of_landscapes(const std::vecto 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"; + throw "Wrong parameters of grid_min and grid_max given to the procedure. The program will now terminate.\n"; } - double dx = (grid_max_ - grid_min_) / (double)(number_of_points_); + double dx = (grid_max_ - grid_min_) / static_cast(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; @@ -1161,7 +1159,7 @@ void Persistence_landscape_on_grid::load_landscape_from_file(const char* filenam // 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"; + throw "The persistence landscape file do not exist. The program will now terminate \n"; } size_t number_of_points_in_the_grid = 0; @@ -1223,7 +1221,7 @@ void Persistence_landscape_on_grid::plot(const char* filename, double min_x, dou } 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); + double dx = (this->grid_max - this->grid_min) / static_cast(this->values_of_landscapes.size() - 1); size_t from = 0; if (from_ != std::numeric_limits::max()) { diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index 282c107d..ad4d3c57 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -23,17 +23,19 @@ #ifndef PERSISTENCE_VECTORS_H_ #define PERSISTENCE_VECTORS_H_ +// gudhi include +#include +#include +#include + #include #include #include #include #include #include - -// gudhi include -#include -#include -#include +#include +#include namespace Gudhi { namespace Persistence_representations { @@ -66,7 +68,7 @@ class Vector_distances_in_diagram { /** * The default constructor. **/ - Vector_distances_in_diagram(){}; + Vector_distances_in_diagram(){} /** * The constructor that takes as an input a multiset of persistence intervals (given as vector of birth-death @@ -517,7 +519,7 @@ void Vector_distances_in_diagram::compute_average(const std::vector(to_average.size()); } this->sorted_vector_of_distances = av; this->where_to_cut = av.size(); @@ -611,7 +613,7 @@ void Vector_distances_in_diagram::load_from_file(const char* 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"; + throw "The persistence landscape file do not exist. The program will now terminate \n"; } double number; diff --git a/src/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h index 8f56ad3e..61a3274d 100644 --- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h +++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h @@ -23,6 +23,9 @@ #ifndef COMMON_PERSISTENCE_REPRESENTATIONS_H_ #define COMMON_PERSISTENCE_REPRESENTATIONS_H_ +#include +#include + namespace Gudhi { namespace Persistence_representations { // this file contain an implementation of some common procedures used in Persistence_representations. 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 a5c2b286..ad3d4e83 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -28,6 +28,8 @@ #include #include #include +#include +#include namespace Gudhi { namespace Persistence_representations { @@ -54,7 +56,7 @@ std::vector > read_persistence_intervals_in_one_dimens // 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"; + throw "The persistence landscape file do not exist. The program will now terminate \n"; } std::string line; @@ -85,7 +87,7 @@ std::vector > read_persistence_intervals_in_one_dimens while (ss >> number) { this_line.push_back(number); } - number_of_entries_per_line += (int)this_line.size(); + number_of_entries_per_line += static_cast(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; @@ -93,7 +95,7 @@ std::vector > read_persistence_intervals_in_one_dimens 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"; + throw "Wrong number of numerical entries per line in the input file. The program will now terminate. \n"; } } // In case there is an 'inf' string in this line, we are dealing with this situation in below. 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 b0ea3a35..b4e2be89 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 @@ -26,6 +26,7 @@ using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +#include int main(int argc, char** argv) { std::cout << "This program computes average persistence landscape of persistence landscapes created based on " 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 f87530d4..56b2d336 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#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 " 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 f801d056..ec9482f0 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 @@ -27,6 +27,7 @@ using namespace Gudhi::Persistence_representations; #include #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 " 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 a127996f..68c75059 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#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 " 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 371d94a6..a56393a3 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#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 " 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 e2b9abb1..44115329 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#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 " 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 03f1641a..ebc82f82 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#include +#include int main(int argc, char** argv) { std::cout << "This program creates persistence heat map of diagrams provided as an input.\n"; 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 004fa90e..7b24bb7c 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#include +#include int main(int argc, char** argv) { std::cout << "This program creates PSSK of diagrams provided as an input.\n"; 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 058677d9..72c56e92 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 @@ -26,6 +26,7 @@ #include #include #include +#include using namespace Gudhi; using namespace Gudhi::Persistence_representations; 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 f1ccda9f..6a872b7a 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp @@ -28,6 +28,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#include +#include int main(int argc, char** argv) { std::cout << "This program compute the bottleneck distance of persistence diagrams stored in a files. \n"; 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 1f7011e1..5fbbef14 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 @@ -24,6 +24,9 @@ #include #include +#include +#include +#include using namespace Gudhi; using namespace Gudhi::Persistence_representations; 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 6bdb0081..b8f96b60 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 @@ -24,6 +24,9 @@ #include #include +#include +#include +#include using namespace Gudhi; using namespace Gudhi::Persistence_representations; 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 206745c1..521621b2 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 @@ -24,6 +24,9 @@ #include #include +#include +#include +#include using namespace Gudhi; using namespace Gudhi::Persistence_representations; 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 971f039e..e76906e9 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -25,6 +25,9 @@ #include #include +#include +#include +#include using namespace Gudhi; using namespace Gudhi::Persistence_representations; diff --git a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp index 1927551d..f885a7a7 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp @@ -26,6 +26,7 @@ using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +#include int main(int argc, char** argv) { std::cout << "This program computes average persistence landscape of persistence landscapes created based on " 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 a4027fa7..7028b98b 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 @@ -27,6 +27,7 @@ using namespace Gudhi::Persistence_representations; #include #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 " 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 95d5a998..76a9d433 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 @@ -27,6 +27,7 @@ using namespace Gudhi::Persistence_representations; #include #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 " 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 1ba34762..4694e897 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#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 " 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 4ec9a740..75c33cb1 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 @@ -27,6 +27,7 @@ using namespace Gudhi::Persistence_representations; #include #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 " 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 65addbe5..490a1c25 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#include +#include int main(int argc, char** argv) { std::cout << "This program creates persistence landscape on grid of diagrams provided as an input.\n"; @@ -66,7 +68,7 @@ int main(int argc, char** argv) { 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. + // (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; 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 2bfc4a6d..585f2f61 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp @@ -26,6 +26,7 @@ using namespace Gudhi; using namespace Gudhi::Persistence_representations; #include +#include int main(int argc, char** argv) { std::cout << "This program computes average persistence vector of persistence vectors created based on persistence " 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 a2e27612..79906262 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#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 " 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 95f2d2ae..a5916ed8 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 @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#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 " 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 2996f49b..0941308f 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#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 " diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index f683136b..e52fc611 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -26,6 +26,7 @@ #include // for std::sqrt #include // for std::decay #include // for std::begin, std::end +#include namespace Gudhi { @@ -49,8 +50,7 @@ class Euclidean_distance { return std::sqrt(dist); } template< typename T > - T operator() ( const std::pair< T,T >& f , const std::pair< T,T >& s ) - { + 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) ); } }; -- cgit v1.2.3 From 3736caa9ed742f985d743b9c959442d331110050 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 31 May 2017 06:46:24 +0000 Subject: Fix cpplint git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2481 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 3e39324360996e408351421a2185c2cd9e6ee1ae --- .../doc/Persistence_representations_doc.h | 321 ++++++++++----------- .../include/gudhi/Persistence_vectors.h | 2 +- .../persistence_landscapes/create_landscapes.cpp | 2 + src/common/include/gudhi/distance_functions.h | 4 +- 4 files changed, 165 insertions(+), 164 deletions(-) (limited to 'src/common') diff --git a/src/Persistence_representations/doc/Persistence_representations_doc.h b/src/Persistence_representations/doc/Persistence_representations_doc.h index 7884574d..49a1cdd0 100644 --- a/src/Persistence_representations/doc/Persistence_representations_doc.h +++ b/src/Persistence_representations/doc/Persistence_representations_doc.h @@ -34,223 +34,222 @@ 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 + 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 + 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 + 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 + + 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 + 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$, - * 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 + 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$ + 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 + 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 + + 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 + + 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. - *\li Concept of representation of persistence that allows computations of scalar products. - *\li Concept of representation of persistence that allows vectorization. - *\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 + + \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. + \li Concept of representation of persistence that allows computations of scalar products. + \li Concept of representation of persistence that allows vectorization. + \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): - * - *\li Exact persistence landscapes (allow averaging, computation of distances, scalar products, vectorizations and real + + \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 + \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 + \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 + 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 + \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 + 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++ + + 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 + 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 + 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 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 - * - * \f[f_{(b,d)}(x) = - * \left\{ \begin{array}{ccl} - * 0 & \mbox{ if } & x \not\in (b, d) \; , \\ - * x - b & \mbox{ if } & x \in \left( b, \frac{b+d}{2} - * \right] \; , \\ - * d - x & \mbox{ if } & x \in \left(\frac{b+d}{2}, - * d \right) \; . - * \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 + 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 + + \f[f_{(b,d)}(x) = + \left\{ \begin{array}{ccl} + 0 & \mbox{ if } & x \not\in (b, d) \; , \\ + x - b & \mbox{ if } & x \in \left( b, \frac{b+d}{2} + \right] \; , \\ + d - x & \mbox{ if } & x \in \left(\frac{b+d}{2}, + d \right) \; . + \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$. - * - * 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 + 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 + 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 + 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 + + \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 + 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 + 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 + + 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 + + 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$. + 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 + 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 + + 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 + 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 + 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 + + 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 + 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 + + 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. + 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: - * - *\li Begin and end point of a grid -- the interval \f$[x,y]\f$ (real numbers). - *\li Number of points in a grid (positive integer \f$N\f$). - * - * - *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
- *This is a general class of discrete structures which are based on idea of placing a kernel in the points of + 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: + + \li Begin and end point of a grid -- the interval \f$[x,y]\f$ (real numbers). + \li Number of points in a grid (positive integer \f$N\f$). + + + 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
+ 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 + 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 + 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 + 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$. + 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. + + 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 + 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 + (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 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 + \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 + \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 + 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. - * - *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 + + 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 + + \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. - * - *Given two persistence vectors, the computation of distances, averages and scalar products is straightforward. Average + + 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 + 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. + values at the corresponding positions of two vectors. + + \copyright GNU General Public License v3. */ /** @} */ // end defgroup Persistence_representations diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h index ad4d3c57..0fb49eee 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h +++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h @@ -68,7 +68,7 @@ class Vector_distances_in_diagram { /** * The default constructor. **/ - Vector_distances_in_diagram(){} + Vector_distances_in_diagram() {} /** * The constructor that takes as an input a multiset of persistence intervals (given as vector of birth-death diff --git a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp index 1692c7ac..a6b33225 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp @@ -27,6 +27,8 @@ using namespace Gudhi::Persistence_representations; #include #include +#include +#include int main(int argc, char** argv) { std::cout << "This program creates persistence landscapes of diagrams provided as an input. \n"; diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index e52fc611..c556155e 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -50,8 +50,8 @@ 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) ); + 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)); } }; -- cgit v1.2.3 From 3f6290ba33cedec91ca69866d1be33bb4887e31f Mon Sep 17 00:00:00 2001 From: cjamin Date: Wed, 31 May 2017 17:25:00 +0000 Subject: Mention utilities git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2495 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 40a98c7df253c4938fdadfb8b6ec59174c9f1f4f --- src/common/doc/main_page.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index bd4615f5..6ff3f94d 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -269,7 +269,7 @@ make doxygen * Having CGAL version 4.4.0 or higher installed is recommended. The procedure to install this library according to * your operating system is detailed here http://doc.cgal.org/latest/Manual/installation.html * - * The following examples require the Computational Geometry Algorithms + * The following examples/utilities require the Computational Geometry Algorithms * Library (CGAL \cite cgal:eb-15b) and will not be built if CGAL is not installed: * \li * Persistent_cohomology/alpha_complex_3d_persistence.cpp @@ -343,7 +343,7 @@ make doxygen * * Having Intel® TBB installed is recommended to parallelize and accelerate some GUDHI computations. * - * The following examples are using Intel® TBB if installed: + * The following examples/utilities are using Intel® TBB if installed: * \li * Alpha_complex/Alpha_complex_from_off.cpp * \li -- cgit v1.2.3 From f583b644e6bb34e6289c17fa33e34f52897a6329 Mon Sep 17 00:00:00 2001 From: cjamin Date: Tue, 13 Jun 2017 15:27:43 +0000 Subject: Merge read_persistence_from_file into persistence_representation_integration git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2539 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 2bfc0f855b4814946c5cad892d6314d147db1caf --- src/Bottleneck_distance/example/CMakeLists.txt | 4 ++ .../example/bottleneck_read_file_example.cpp | 36 ++-------- src/common/doc/file_formats.h | 54 +++++++++++++++ src/common/include/gudhi/reader_utils.h | 76 +++++++++++++++++++++- 4 files changed, 139 insertions(+), 31 deletions(-) create mode 100644 src/common/doc/file_formats.h (limited to 'src/common') diff --git a/src/Bottleneck_distance/example/CMakeLists.txt b/src/Bottleneck_distance/example/CMakeLists.txt index 0534a2c4..508e57bf 100644 --- a/src/Bottleneck_distance/example/CMakeLists.txt +++ b/src/Bottleneck_distance/example/CMakeLists.txt @@ -19,6 +19,10 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.15" "-m" "0.12" "-d" "3" "-p" "3") + add_test(NAME Bottleneck_read_file_example + COMMAND $ + "${CMAKE_SOURCE_DIR}/data/persistence_diagram/first.pers" "${CMAKE_SOURCE_DIR}/data/persistence_diagram/second.pers") + install(TARGETS bottleneck_read_file_example DESTINATION bin) install(TARGETS bottleneck_basic_example DESTINATION bin) install(TARGETS alpha_rips_persistence_bottleneck_distance DESTINATION bin) diff --git a/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp b/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp index bde05825..238d99ad 100644 --- a/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp +++ b/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp @@ -20,9 +20,8 @@ * along with this program. If not, see . */ -#define CGAL_HAS_THREADS - #include +#include #include #include #include // for pair @@ -30,43 +29,22 @@ #include #include -std::vector< std::pair > read_diagram_from_file(const char* filename) { - std::ifstream in; - in.open(filename); - std::vector< std::pair > result; - if (!in.is_open()) { - std::cerr << "File : " << filename << " do not exist. The program will now terminate \n"; - throw "File do not exist \n"; - } - - std::string line; - while (!in.eof()) { - getline(in, line); - if (line.length() != 0) { - std::stringstream lineSS; - lineSS << line; - double beginn, endd; - lineSS >> beginn; - lineSS >> endd; - result.push_back(std::make_pair(beginn, endd)); - } - } - in.close(); - return result; -} // read_diagram_from_file - int main(int argc, char** argv) { if (argc < 3) { std::cout << "To run this program please provide as an input two files with persistence diagrams. Each file " << "should contain a birth-death pair per line. Third, optional parameter is an error bound on a bottleneck" << " distance (set by default to zero). The program will now terminate \n"; + return -1; } - std::vector< std::pair< double, double > > diag1 = read_diagram_from_file(argv[1]); - std::vector< std::pair< double, double > > diag2 = read_diagram_from_file(argv[2]); + std::vector> diag1 = read_persistence_intervals_in_dimension(argv[1]); + std::vector> diag2 = read_persistence_intervals_in_dimension(argv[2]); + double tolerance = 0.; if (argc == 4) { tolerance = atof(argv[3]); } double b = Gudhi::persistence_diagram::bottleneck_distance(diag1, diag2, tolerance); std::cout << "The distance between the diagrams is : " << b << ". The tolerance is : " << tolerance << std::endl; + + return 0; } diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h new file mode 100644 index 00000000..c145b271 --- /dev/null +++ b/src/common/doc/file_formats.h @@ -0,0 +1,54 @@ +/* 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 . +*/ + +#ifndef DOC_COMMON_FILE_FORMAT_H_ +#define DOC_COMMON_FILE_FORMAT_H_ + +namespace Gudhi { + +/*! \page fileformats File formats + + \tableofcontents + + \section FileFormatsPers Persistence Diagram + + Such a file, whose extension is usually `.pers`, contains a list of persistence intervals.
+ Lines starting with `#` are ignored (comments).
+ Other lines might contain 2, 3 or 4 values (the number of values on each line must be the same for all lines): + \code{.unparsed} + [[field] dimension] birth death + \endcode + + Here is a simple sample file: + \code{.unparsed} + # Beautiful persistence diagram + 2 2.7 3.7 + 2 9.6 14. + 3 34.2 34.974 + 4 3. inf + \endcode + + Other sample files can be found in the `data/persistence_diagram` folder. +*/ +} // namespace Gudhi + +#endif // DOC_COMMON_FILE_FORMAT_H_ diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h index 97a87edd..35af09bd 100644 --- a/src/common/include/gudhi/reader_utils.h +++ b/src/common/include/gudhi/reader_utils.h @@ -2,7 +2,7 @@ * (Geometric Understanding in Higher Dimensions) is a generic C++ * library for computational topology. * - * Author(s): Clement Maria, Pawel Dlotko + * Author(s): Clement Maria, Pawel Dlotko, Clement Jamin * * Copyright (C) 2014 INRIA * @@ -24,6 +24,8 @@ #define READER_UTILS_H_ #include +#include +#include #include @@ -92,7 +94,10 @@ template< typename Graph_t, typename Filtration_value, typename Vertex_handle > Graph_t read_graph(std::string file_name) { std::ifstream in_(file_name.c_str(), std::ios::in); if (!in_.is_open()) { - std::cerr << "Unable to open file " << file_name << std::endl; + std::string error_str("read_graph - Unable to open file "); + error_str.append(file_name); + std::cerr << error_str << std::endl; + throw std::invalid_argument(error_str); } typedef std::pair< Vertex_handle, Vertex_handle > Edge_t; @@ -295,4 +300,71 @@ std::vector< std::vector< Filtration_value > > read_lower_triangular_matrix_from return result; } // read_lower_triangular_matrix_from_csv_file +/** +Reads a file containing persistence intervals. +Each line might contain 2, 3 or 4 values: [[field] dimension] birth death +The output iterator `out` is used this way: `*out++ = std::make_tuple(dim, birth, death);` +where `dim` is an `int`, `birth` a `double`, and `death` a `double`. +**/ +template +void read_persistence_intervals_and_dimension(std::string const& filename, OutputIterator out) { + + std::ifstream in(filename); + if (!in.is_open()) { + std::string error_str("read_persistence_intervals_and_dimension - Unable to open file "); + error_str.append(filename); + std::cerr << error_str << std::endl; + throw std::invalid_argument(error_str); + } + + while (!in.eof()) { + std::string line; + getline(in, line); + if (line.length() != 0 && line[0] != '#') { + double numbers[4]; + int n = sscanf(line.c_str(), "%lf %lf %lf %lf", &numbers[0], &numbers[1], &numbers[2], &numbers[3]); + if (n >= 2) { + //int field = (n == 4 ? static_cast(numbers[0]) : -1); + int dim = (n >= 3 ? static_cast(numbers[n - 3]) : -1); + GUDHI_CHECK(numbers[n - 2] <= numbers[n - 1], "Error: birth > death."); + *out++ = std::make_tuple(dim, numbers[n - 2], numbers[n - 1]); + } + } + } +} // read_persistence_diagram_from_file + +/** +Reads a file containing persistence intervals. +Each line might contain 2, 3 or 4 values: [[field] dimension] birth death +The return value is an `std::map>>` +where `dim` is an `int`, `birth` a `double`, and `death` a `double`. +**/ +std::map>> read_persistence_intervals_grouped_by_dimension(std::string const& filename) { + + std::map>> ret; + read_persistence_intervals_and_dimension( + filename, + boost::make_function_output_iterator([&ret](auto t) { ret[get<0>(t)].push_back(std::make_pair(get<1>(t), get<2>(t))); })); + return ret; +} // read_persistence_diagram_from_file + + +/** +Reads a file containing persistence intervals. +Each line might contain 2, 3 or 4 values: [[field] dimension] birth death +If `only_this_dim` = -1, dimension is ignored and all lines are returned. +If `only_this_dim` is >= 0, only the lines where dimension = `only_this_dim` +(or where dimension is not specified) are returned. +The return value is an `std::vector>` +where `dim` is an `int`, `birth` a `double`, and `death` a `double`. +**/ +std::vector> read_persistence_intervals_in_dimension(std::string const& filename, int only_this_dim = -1) { + + std::vector> ret; + read_persistence_intervals_and_dimension( + filename, + boost::make_function_output_iterator([&ret](auto t) { ret.emplace_back(get<1>(t), get<2>(t)); })); + return ret; +} // read_persistence_diagram_from_file + #endif // READER_UTILS_H_ -- cgit v1.2.3 From ef61b085afd77976a2c7fc5dfa13bc4b293b4f95 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 28 Sep 2017 13:43:58 +0000 Subject: Remove python rips_complex construction from files as it can lead to errors with correlation matrix Add examples for doxygen Cythonization of rips correlation matrix git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@2727 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8aae33839fa27f9d26897e625904671b2c05e0e7 --- src/Persistent_cohomology/example/CMakeLists.txt | 2 +- .../rips_correlation_matrix_persistence.cpp | 92 +++++++++------------- src/Rips_complex/example/CMakeLists.txt | 11 ++- ...e_one_skeleton_rips_from_correlation_matrix.cpp | 39 ++++----- src/common/doc/main_page.h | 4 + src/cython/cython/off_reader.pyx | 1 + src/cython/cython/rips_complex.pyx | 35 +------- .../doc/persistence_graphical_tools_user.rst | 8 +- src/cython/doc/pyplots/diagram_persistence.py | 5 +- src/cython/doc/rips_complex_user.rst | 73 ++++++++++++++++- .../alpha_rips_persistence_bottleneck_distance.py | 5 +- ...ersistence_from_distance_matrix_file_example.py | 3 +- ...ex_diagram_persistence_from_off_file_example.py | 3 +- src/cython/include/Rips_complex_interface.h | 17 ---- 14 files changed, 155 insertions(+), 143 deletions(-) (limited to 'src/common') diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index 8a21d038..926cef6b 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -40,7 +40,7 @@ add_test(NAME Persistent_cohomology_example_from_simple_simplex_tree COMMAND $ "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" "-r" "1.0" "-d" "3" "-p" "3" "-m" "0") add_test(rips_distance_matrix ${CMAKE_CURRENT_BINARY_DIR}/rips_distance_matrix_persistence - ${CMAKE_SOURCE_DIR}/data/distance_matrix/full_correlation_matrix.csv.csv -r 1.0 -d 3 -p 3 -m 0) + ${CMAKE_SOURCE_DIR}/data/correlation_matrix/full_correlation_matrix.csv.csv -r 1.0 -d 3 -p 3 -m 0) add_test(NAME Persistent_cohomology_example_from_rips_on_tore_3D COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3") add_test(NAME Persistent_cohomology_example_from_rips_step_by_step_on_tore_3D COMMAND $ diff --git a/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp b/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp index 6f2891fe..41cf915a 100644 --- a/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp +++ b/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp @@ -1,5 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ +/* 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, Vincent Rouvreau @@ -31,24 +31,18 @@ #include #include // infinity - // Types definition using Simplex_tree = Gudhi::Simplex_tree; using Filtration_value = Simplex_tree::Filtration_value; using Rips_complex = Gudhi::rips_complex::Rips_complex; using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; -using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; using Correlation_matrix = std::vector>; -void program_options(int argc, char * argv[] - , std::string & csv_matrix_file - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence); +void program_options(int argc, char* argv[], std::string& csv_matrix_file, std::string& filediag, + Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence); -int main(int argc, char * argv[]) { +int main(int argc, char* argv[]) { std::string csv_matrix_file; std::string filediag; Filtration_value threshold; @@ -58,22 +52,20 @@ int main(int argc, char * argv[]) { program_options(argc, argv, csv_matrix_file, filediag, threshold, dim_max, p, min_persistence); - Correlation_matrix correlations = Gudhi::read_lower_triangular_matrix_from_csv_file(csv_matrix_file); - - //Given a correlation matrix M, we compute component-wise M'[i,j] = 1-M[i,j] to get a distance matrix: - for ( size_t i = 0 ; i != correlations.size() ; ++i ) - { - for ( size_t j = 0 ; j != correlations[i].size() ; ++j ) - { - correlations[i][j] = 1-correlations[i][j]; - if ( correlations[i][j] < 0 ) - { - std::cerr << "The input matrix is not a correlation matrix. \n"; - throw "The input matrix is not a correlation matrix. \n"; - } - } - } - + Correlation_matrix correlations = + Gudhi::read_lower_triangular_matrix_from_csv_file(csv_matrix_file); + + // Given a correlation matrix M, we compute component-wise M'[i,j] = 1-M[i,j] to get a distance matrix: + for (size_t i = 0; i != correlations.size(); ++i) { + for (size_t j = 0; j != correlations[i].size(); ++j) { + correlations[i][j] = 1 - correlations[i][j]; + if (correlations[i][j] < 0) { + std::cerr << "The input matrix is not a correlation matrix. \n"; + throw "The input matrix is not a correlation matrix. \n"; + } + } + } + Rips_complex rips_complex_from_file(correlations, threshold); // Construct the Rips complex in a Simplex Tree @@ -104,33 +96,28 @@ int main(int argc, char * argv[]) { return 0; } -void program_options(int argc, char * argv[] - , std::string & csv_matrix_file - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence) { +void program_options(int argc, char* argv[], std::string& csv_matrix_file, std::string& filediag, + Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence) { namespace po = boost::program_options; po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&csv_matrix_file), - "Name of file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'."); + hidden.add_options()( + "input-file", po::value(&csv_matrix_file), + "Name of file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'."); po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-edge-length,r", - po::value(&threshold)->default_value(std::numeric_limits::infinity()), - "Maximal length of an edge for the Rips complex construction.") - ("cpx-dimension,d", po::value(&dim_max)->default_value(1), - "Maximal dimension of the Rips complex we want to compute.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); + visible.add_options()("help,h", "produce help message")( + "output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout")( + "max-edge-length,r", + po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "Maximal length of an edge for the Rips complex construction.")( + "cpx-dimension,d", po::value(&dim_max)->default_value(1), + "Maximal dimension of the Rips complex we want to compute.")( + "field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.")( + "min-persistence,m", po::value(&min_persistence), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length " + "intervals"); po::positional_options_description pos; pos.add("input-file", 1); @@ -139,8 +126,7 @@ void program_options(int argc, char * argv[] all.add(visible).add(hidden); po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); + po::store(po::command_line_parser(argc, argv).options(all).positional(pos).run(), vm); po::notify(vm); if (vm.count("help") || !vm.count("input-file")) { diff --git a/src/Rips_complex/example/CMakeLists.txt b/src/Rips_complex/example/CMakeLists.txt index f58ab455..fcb1eaee 100644 --- a/src/Rips_complex/example/CMakeLists.txt +++ b/src/Rips_complex/example/CMakeLists.txt @@ -9,23 +9,25 @@ add_executable ( Rips_complex_example_one_skeleton_from_points example_one_skele # Distance matrix add_executable ( Rips_complex_example_one_skeleton_from_distance_matrix example_one_skeleton_rips_from_distance_matrix.cpp ) -add_executable ( example_one_skeleton_rips_from_correlation_matrix example_one_skeleton_rips_from_correlation_matrix.cpp ) - - add_executable ( Rips_complex_example_from_csv_distance_matrix example_rips_complex_from_csv_distance_matrix_file.cpp ) +# Correlation matrix +add_executable ( Rips_complex_example_one_skeleton_rips_from_correlation_matrix example_one_skeleton_rips_from_correlation_matrix.cpp ) + if (TBB_FOUND) target_link_libraries(Rips_complex_example_from_off ${TBB_LIBRARIES}) target_link_libraries(Rips_complex_example_one_skeleton_from_points ${TBB_LIBRARIES}) target_link_libraries(Rips_complex_example_one_skeleton_from_distance_matrix ${TBB_LIBRARIES}) - target_link_libraries(example_one_skeleton_rips_from_correlation_matrix ${TBB_LIBRARIES}) target_link_libraries(Rips_complex_example_from_csv_distance_matrix ${TBB_LIBRARIES}) + target_link_libraries(Rips_complex_example_one_skeleton_rips_from_correlation_matrix ${TBB_LIBRARIES}) endif() add_test(NAME Rips_complex_example_one_skeleton_from_points COMMAND $) add_test(NAME Rips_complex_example_one_skeleton_from_distance_matrix COMMAND $) +add_test(NAME Rips_complex_example_one_skeleton_rips_from_correlation_matrix + COMMAND $) add_test(NAME Rips_complex_example_from_off_doc_12_1 COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" "12.0" "1" "${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_1.txt") @@ -61,3 +63,4 @@ install(TARGETS Rips_complex_example_from_off DESTINATION bin) install(TARGETS Rips_complex_example_one_skeleton_from_points DESTINATION bin) install(TARGETS Rips_complex_example_one_skeleton_from_distance_matrix DESTINATION bin) install(TARGETS Rips_complex_example_from_csv_distance_matrix DESTINATION bin) +install(TARGETS Rips_complex_example_one_skeleton_rips_from_correlation_matrix DESTINATION bin) diff --git a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp index 0acdfe83..ae347a00 100644 --- a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp +++ b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp @@ -21,7 +21,6 @@ int main() { // |0.01 0.01 0.72 1 0.7 | // |0.89 0.61 0.03 0.7 1 | - Distance_matrix correlations; correlations.push_back({}); correlations.push_back({0.06}); @@ -32,24 +31,21 @@ int main() { // ---------------------------------------------------------------------------- // Convert correlation matrix to a distance matrix: // ---------------------------------------------------------------------------- - for ( size_t i = 0 ; i != correlations.size() ; ++i ) - { - for ( size_t j = 0 ; j != correlations[i].size() ; ++j ) - { - correlations[i][j] = 1-correlations[i][j]; - if ( correlations[i][j] < 0 ) - { - std::cerr << "The input matrix is not a correlation matrix. \n"; - throw "The input matrix is not a correlation matrix. \n"; - } - } - } - + for (size_t i = 0; i != correlations.size(); ++i) { + for (size_t j = 0; j != correlations[i].size(); ++j) { + correlations[i][j] = 1 - correlations[i][j]; + if (correlations[i][j] < 0) { + std::cerr << "The input matrix is not a correlation matrix. \n"; + throw "The input matrix is not a correlation matrix. \n"; + } + } + } + //----------------------------------------------------------------------------- - // Now the correlation matrix is really the distance matrix and can be processed further. + // Now the correlation matrix is really the distance matrix and can be processed further. //----------------------------------------------------------------------------- Distance_matrix distances = correlations; - + double threshold = 1.0; Rips_complex rips_complex_from_points(distances, threshold); @@ -58,18 +54,17 @@ int main() { // ---------------------------------------------------------------------------- // Display information about the one skeleton Rips complex // ---------------------------------------------------------------------------- - std::cout << "Rips complex is of dimension " << stree.dimension() << - " - " << stree.num_simplices() << " simplices - " << - stree.num_vertices() << " vertices." << std::endl; + std::cout << "Rips complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - " + << stree.num_vertices() << " vertices." << std::endl; - std::cout << "Iterator on Rips complex simplices in the filtration order, with [filtration value]:" << - std::endl; + std::cout << "Iterator on Rips complex simplices in the filtration order, with [filtration value]:" << std::endl; for (auto f_simplex : stree.filtration_simplex_range()) { std::cout << " ( "; for (auto vertex : stree.simplex_vertex_range(f_simplex)) { std::cout << vertex << " "; } - std::cout << ") -> " << "[" << stree.filtration(f_simplex) << "] "; + std::cout << ") -> " + << "[" << stree.filtration(f_simplex) << "] "; std::cout << std::endl; } diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 1a7994a5..91535ee6 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -456,11 +456,15 @@ make doxygen * @example Persistent_cohomology/persistence_from_simple_simplex_tree.cpp * @example Persistent_cohomology/plain_homology.cpp * @example Persistent_cohomology/rips_multifield_persistence.cpp + * @example Persistent_cohomology/rips_correlation_matrix_persistence.cpp * @example Persistent_cohomology/rips_distance_matrix_persistence.cpp * @example Persistent_cohomology/rips_persistence.cpp * @example Persistent_cohomology/custom_persistence_sort.cpp * @example Persistent_cohomology/rips_persistence_step_by_step.cpp + * @example Rips_complex/example_one_skeleton_rips_from_correlation_matrix.cpp + * @example Rips_complex/example_one_skeleton_rips_from_distance_matrix.cpp * @example Rips_complex/example_one_skeleton_rips_from_points.cpp + * @example Rips_complex/example_rips_complex_from_csv_distance_matrix_file.cpp * @example Rips_complex/example_rips_complex_from_off_file.cpp * @example Simplex_tree/mini_simplex_tree.cpp * @example Simplex_tree/simple_simplex_tree.cpp diff --git a/src/cython/cython/off_reader.pyx b/src/cython/cython/off_reader.pyx index b6e107ef..266dae2c 100644 --- a/src/cython/cython/off_reader.pyx +++ b/src/cython/cython/off_reader.pyx @@ -46,4 +46,5 @@ def read_off(off_file=''): return read_points_from_OFF_file(str.encode(off_file)) else: print("file " + off_file + " not found.") + return [] diff --git a/src/cython/cython/rips_complex.pyx b/src/cython/cython/rips_complex.pyx index ad9b0a4d..73b154b8 100644 --- a/src/cython/cython/rips_complex.pyx +++ b/src/cython/cython/rips_complex.pyx @@ -34,8 +34,6 @@ __license__ = "GPL v3" cdef extern from "Rips_complex_interface.h" namespace "Gudhi": cdef cppclass Rips_complex_interface "Gudhi::rips_complex::Rips_complex_interface": Rips_complex_interface(vector[vector[double]] values, double threshold, bool euclidean) - # bool from_file is a workaround for cython to find the correct signature - Rips_complex_interface(string file_name, double threshold, bool euclidean, bool from_file) void create_simplex_tree(Simplex_tree_interface_full_featured* simplex_tree, int dim_max) # RipsComplex python interface @@ -49,7 +47,7 @@ cdef class RipsComplex: cdef Rips_complex_interface * thisptr # Fake constructor that does nothing but documenting the constructor - def __init__(self, points=None, off_file='', distance_matrix=None, csv_file='', max_edge_length=float('inf')): + def __init__(self, points=None, distance_matrix=None, max_edge_length=float('inf')): """RipsComplex constructor. :param max_edge_length: Rips value. @@ -60,41 +58,14 @@ cdef class RipsComplex: Or - :param off_file: An OFF file style name. - :type off_file: string - - Or - :param distance_matrix: A distance matrix (full square or lower triangular). :type points: list of list of double - - Or - - :param csv_file: A csv file style name containing a full square or a - lower triangular distance matrix. - :type csv_file: string """ # The real cython constructor - def __cinit__(self, points=None, off_file='', distance_matrix=None, csv_file='', max_edge_length=float('inf')): - if off_file is not '': - if os.path.isfile(off_file): - self.thisptr = new Rips_complex_interface(str.encode(off_file), - max_edge_length, - True, - True) - else: - print("file " + off_file + " not found.") - elif csv_file is not '': - if os.path.isfile(csv_file): - self.thisptr = new Rips_complex_interface(str.encode(csv_file), - max_edge_length, - False, - True) - else: - print("file " + csv_file + " not found.") - elif distance_matrix is not None: + def __cinit__(self, points=None, distance_matrix=None, max_edge_length=float('inf')): + if distance_matrix is not None: self.thisptr = new Rips_complex_interface(distance_matrix, max_edge_length, False) else: if points is None: diff --git a/src/cython/doc/persistence_graphical_tools_user.rst b/src/cython/doc/persistence_graphical_tools_user.rst index 9033331f..a5523d23 100644 --- a/src/cython/doc/persistence_graphical_tools_user.rst +++ b/src/cython/doc/persistence_graphical_tools_user.rst @@ -58,8 +58,8 @@ This function can display the persistence result as a diagram: import gudhi - rips_complex = gudhi.RipsComplex(off_file=gudhi.__root_source_dir__ + \ - '/data/points/tore3D_1307.off', max_edge_length=0.2) + point_cloud = gudhi.read_off(off_file=gudhi.__root_source_dir__ + '/data/points/tore3D_1307.off') + rips_complex = gudhi.RipsComplex(points=point_cloud, max_edge_length=0.2) simplex_tree = rips_complex.create_simplex_tree(max_dimension=3) diag = simplex_tree.persistence() plt = gudhi.plot_persistence_diagram(diag, band_boot=0.13) @@ -69,8 +69,8 @@ This function can display the persistence result as a diagram: import gudhi - rips_complex = gudhi.RipsComplex(off_file=gudhi.__root_source_dir__ + \ - '/data/points/tore3D_1307.off', max_edge_length=0.2) + point_cloud = gudhi.read_off(off_file=gudhi.__root_source_dir__ + '/data/points/tore3D_1307.off') + rips_complex = gudhi.RipsComplex(points=point_cloud, max_edge_length=0.2) simplex_tree = rips_complex.create_simplex_tree(max_dimension=3) diag = simplex_tree.persistence() plt = gudhi.plot_persistence_diagram(diag, band_boot=0.13) diff --git a/src/cython/doc/pyplots/diagram_persistence.py b/src/cython/doc/pyplots/diagram_persistence.py index c2fbf801..ac20bf47 100755 --- a/src/cython/doc/pyplots/diagram_persistence.py +++ b/src/cython/doc/pyplots/diagram_persistence.py @@ -1,7 +1,8 @@ import gudhi -rips_complex = gudhi.RipsComplex(off_file=gudhi.__root_source_dir__ + \ - '/data/points/tore3D_1307.off', max_edge_length=0.2) +point_cloud = gudhi.read_off(off_file=gudhi.__root_source_dir__ + \ + '/data/points/tore3D_1307.off') +rips_complex = gudhi.RipsComplex(points=point_cloud, max_edge_length=0.2) simplex_tree = rips_complex.create_simplex_tree(max_dimension=3) diag = simplex_tree.persistence() plt = gudhi.plot_persistence_diagram(diag, band_boot=0.13) diff --git a/src/cython/doc/rips_complex_user.rst b/src/cython/doc/rips_complex_user.rst index 96ba9944..f0e7bf2d 100644 --- a/src/cython/doc/rips_complex_user.rst +++ b/src/cython/doc/rips_complex_user.rst @@ -101,8 +101,8 @@ Finally, it is asked to display information about the Rips complex. .. testcode:: import gudhi - rips_complex = gudhi.RipsComplex(off_file=gudhi.__root_source_dir__ + \ - '/data/points/alphacomplexdoc.off', max_edge_length=12.0) + point_cloud = gudhi.read_off(off_file=gudhi.__root_source_dir__ + '/data/points/alphacomplexdoc.off') + rips_complex = gudhi.RipsComplex(points=point_cloud, max_edge_length=12.0) simplex_tree = rips_complex.create_simplex_tree(max_dimension=1) result_str = 'Rips complex is of dimension ' + repr(simplex_tree.dimension()) + ' - ' + \ repr(simplex_tree.num_simplices()) + ' simplices - ' + \ @@ -206,8 +206,9 @@ Finally, it is asked to display information about the Rips complex. .. testcode:: import gudhi - rips_complex = gudhi.RipsComplex(csv_file=gudhi.__root_source_dir__ + \ - '/data/distance_matrix/full_square_distance_matrix.csv', max_edge_length=12.0) + distance_matrix = gudhi.read_lower_triangular_matrix_from_csv_file(csv_file=gudhi.__root_source_dir__ + \ + '/data/distance_matrix/full_square_distance_matrix.csv') + rips_complex = gudhi.RipsComplex(distance_matrix=distance_matrix, max_edge_length=12.0) simplex_tree = rips_complex.create_simplex_tree(max_dimension=1) result_str = 'Rips complex is of dimension ' + repr(simplex_tree.dimension()) + ' - ' + \ repr(simplex_tree.num_simplices()) + ' simplices - ' + \ @@ -240,3 +241,67 @@ the program output is: [0, 3] -> 9.43 [4, 6] -> 9.49 [3, 6] -> 11.00 + +Correlation matrix +--------------- + +Example from a correlation matrix +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Analogously to the case of distance matrix, Rips complexes can be also constructed based on correlation matrix. +Given a correlation matrix M, comportment-wise 1-M is a distance matrix. +This example builds the one skeleton graph from the given corelation matrix and threshold value. +Then it creates a :doc:`Simplex_tree ` with it. + +Finally, it is asked to display information about the simplicial complex. + +.. testcode:: + + import gudhi + import numpy as np + + # User defined correlation matrix is: + # |1 0.06 0.23 0.01 0.89| + # |0.06 1 0.74 0.01 0.61| + # |0.23 0.74 1 0.72 0.03| + # |0.01 0.01 0.72 1 0.7 | + # |0.89 0.61 0.03 0.7 1 | + correlation_matrix=np.array([[1., 0.06, 0.23, 0.01, 0.89], + [0.06, 1., 0.74, 0.01, 0.61], + [0.23, 0.74, 1., 0.72, 0.03], + [0.01, 0.01, 0.72, 1., 0.7], + [0.89, 0.61, 0.03, 0.7, 1.]], float) + + distance_matrix = np.ones((correlation_matrix.shape),float) - correlation_matrix + rips_complex = gudhi.RipsComplex(distance_matrix=distance_matrix, max_edge_length=1.0) + + simplex_tree = rips_complex.create_simplex_tree(max_dimension=1) + result_str = 'Rips complex is of dimension ' + repr(simplex_tree.dimension()) + ' - ' + \ + repr(simplex_tree.num_simplices()) + ' simplices - ' + \ + repr(simplex_tree.num_vertices()) + ' vertices.' + print(result_str) + fmt = '%s -> %.2f' + for filtered_value in simplex_tree.get_filtration(): + print(fmt % tuple(filtered_value)) + +When launching (Rips maximal distance between 2 points is 12.0, is expanded +until dimension 1 - one skeleton graph in other words), the output is: + +.. testoutput:: + + Rips complex is of dimension 1 - 15 simplices - 5 vertices. + [0] -> 0.00 + [1] -> 0.00 + [2] -> 0.00 + [3] -> 0.00 + [4] -> 0.00 + [0, 4] -> 0.11 + [1, 2] -> 0.26 + [2, 3] -> 0.28 + [3, 4] -> 0.30 + [1, 4] -> 0.39 + [0, 2] -> 0.77 + [0, 1] -> 0.94 + [2, 4] -> 0.97 + [0, 3] -> 0.99 + [1, 3] -> 0.99 diff --git a/src/cython/example/alpha_rips_persistence_bottleneck_distance.py b/src/cython/example/alpha_rips_persistence_bottleneck_distance.py index ab5fc1e9..386f8457 100755 --- a/src/cython/example/alpha_rips_persistence_bottleneck_distance.py +++ b/src/cython/example/alpha_rips_persistence_bottleneck_distance.py @@ -45,13 +45,14 @@ args = parser.parse_args() with open(args.file, 'r') as f: first_line = f.readline() if (first_line == 'OFF\n') or (first_line == 'nOFF\n'): + point_cloud = gudhi.read_off(off_file=args.file) print("#####################################################################") print("RipsComplex creation from points read in a OFF file") message = "RipsComplex with max_edge_length=" + repr(args.threshold) print(message) - rips_complex = gudhi.RipsComplex(off_file=args.file, + rips_complex = gudhi.RipsComplex(points=point_cloud, max_edge_length=args.threshold) rips_stree = rips_complex.create_simplex_tree(max_dimension=args.max_dimension) @@ -67,7 +68,7 @@ with open(args.file, 'r') as f: message = "AlphaComplex with max_edge_length=" + repr(args.threshold) print(message) - alpha_complex = gudhi.AlphaComplex(off_file=args.file) + alpha_complex = gudhi.AlphaComplex(points=point_cloud) alpha_stree = alpha_complex.create_simplex_tree(max_alpha_square=(args.threshold * args.threshold)) message = "Number of simplices=" + repr(alpha_stree.num_simplices()) 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 3baebd17..fa82a2f3 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 @@ -50,7 +50,8 @@ print("RipsComplex creation from distance matrix read in a csv file") message = "RipsComplex with max_edge_length=" + repr(args.max_edge_length) print(message) -rips_complex = gudhi.RipsComplex(csv_file=args.file, max_edge_length=args.max_edge_length) +distance_matrix = gudhi.read_lower_triangular_matrix_from_csv_file(csv_file=args.file) +rips_complex = gudhi.RipsComplex(distance_matrix=distance_matrix, max_edge_length=args.max_edge_length) simplex_tree = rips_complex.create_simplex_tree(max_dimension=args.max_dimension) message = "Number of simplices=" + repr(simplex_tree.num_simplices()) 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 5951eedf..544b68c9 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 @@ -53,7 +53,8 @@ with open(args.file, 'r') as f: message = "RipsComplex with max_edge_length=" + repr(args.max_edge_length) print(message) - rips_complex = gudhi.RipsComplex(off_file=args.file, max_edge_length=args.max_edge_length) + point_cloud = gudhi.read_off(off_file=args.file) + rips_complex = gudhi.RipsComplex(points=point_cloud, max_edge_length=args.max_edge_length) simplex_tree = rips_complex.create_simplex_tree(max_dimension=args.max_dimension) message = "Number of simplices=" + repr(simplex_tree.num_simplices()) diff --git a/src/cython/include/Rips_complex_interface.h b/src/cython/include/Rips_complex_interface.h index 02985727..f26befbc 100644 --- a/src/cython/include/Rips_complex_interface.h +++ b/src/cython/include/Rips_complex_interface.h @@ -25,9 +25,7 @@ #include #include -#include #include -#include #include "Simplex_tree_interface.h" @@ -56,21 +54,6 @@ class Rips_complex_interface { } } - Rips_complex_interface(const std::string& file_name, double threshold, bool euclidean, bool from_file = true) { - if (euclidean) { - // Rips construction where file_name is an OFF file - Gudhi::Points_off_reader off_reader(file_name); - rips_complex_ = new Rips_complex::Filtration_value>(off_reader.get_point_cloud(), - threshold, - Gudhi::Euclidean_distance()); - } else { - // Rips construction where values is a distance matrix - Distance_matrix distances = - Gudhi::read_lower_triangular_matrix_from_csv_file::Filtration_value>(file_name); - rips_complex_ = new Rips_complex::Filtration_value>(distances, threshold); - } - } - ~Rips_complex_interface() { delete rips_complex_; } -- cgit v1.2.3 From 73efba37dfcab3f9b8589cb3b0b80f6d7dd7bd0b Mon Sep 17 00:00:00 2001 From: cjamin Date: Wed, 4 Oct 2017 10:24:04 +0000 Subject: Document utilies in README files using Markdown + move/rename some utilities Only missing doc for now: Garland_heckbert git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2752 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7ba0113762b6622130835dc9e372acfae29c2db8 --- src/Alpha_complex/utilities/CMakeLists.txt | 37 +++ src/Alpha_complex/utilities/README | 131 ++++++++++ .../utilities/alpha_complex_3d_helper.h | 76 ++++++ .../utilities/alpha_complex_3d_persistence.cpp | 242 +++++++++++++++++++ .../utilities/alpha_complex_persistence.cpp | 125 ++++++++++ .../periodic_alpha_complex_3d_persistence.cpp | 268 +++++++++++++++++++++ .../utilities/Bitmap_cubical_complex.cpp | 4 +- ...ubical_complex_periodic_boundary_conditions.cpp | 4 +- src/Bitmap_cubical_complex/utilities/README | 24 ++ src/Bottleneck_distance/utilities/README | 19 ++ src/Persistent_cohomology/utilities/CMakeLists.txt | 33 --- src/Persistent_cohomology/utilities/README | 150 ++++-------- .../utilities/alpha_complex_3d_helper.h | 76 ------ .../utilities/alpha_complex_3d_persistence.cpp | 242 ------------------- .../utilities/alpha_complex_persistence.cpp | 125 ---------- .../periodic_alpha_complex_3d_persistence.cpp | 268 --------------------- src/Witness_complex/example/CMakeLists.txt | 21 +- .../example/example_strong_witness_complex_off.cpp | 79 ++++++ .../example_witness_complex_persistence.cpp | 171 ------------- src/Witness_complex/utilities/CMakeLists.txt | 26 +- src/Witness_complex/utilities/README | 72 ++++++ .../example_strong_witness_complex_off.cpp | 79 ------ .../example_strong_witness_persistence.cpp | 171 ------------- .../utilities/strong_witness_persistence.cpp | 171 +++++++++++++ .../utilities/weak_witness_persistence.cpp | 171 +++++++++++++ src/common/utilities/README | 26 +- 26 files changed, 1506 insertions(+), 1305 deletions(-) create mode 100644 src/Alpha_complex/utilities/CMakeLists.txt create mode 100644 src/Alpha_complex/utilities/README create mode 100644 src/Alpha_complex/utilities/alpha_complex_3d_helper.h create mode 100644 src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp create mode 100644 src/Alpha_complex/utilities/alpha_complex_persistence.cpp create mode 100644 src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp create mode 100644 src/Bitmap_cubical_complex/utilities/README create mode 100644 src/Bottleneck_distance/utilities/README delete mode 100644 src/Persistent_cohomology/utilities/alpha_complex_3d_helper.h delete mode 100644 src/Persistent_cohomology/utilities/alpha_complex_3d_persistence.cpp delete mode 100644 src/Persistent_cohomology/utilities/alpha_complex_persistence.cpp delete mode 100644 src/Persistent_cohomology/utilities/periodic_alpha_complex_3d_persistence.cpp create mode 100644 src/Witness_complex/example/example_strong_witness_complex_off.cpp delete mode 100644 src/Witness_complex/example/example_witness_complex_persistence.cpp create mode 100644 src/Witness_complex/utilities/README delete mode 100644 src/Witness_complex/utilities/example_strong_witness_complex_off.cpp delete mode 100644 src/Witness_complex/utilities/example_strong_witness_persistence.cpp create mode 100644 src/Witness_complex/utilities/strong_witness_persistence.cpp create mode 100644 src/Witness_complex/utilities/weak_witness_persistence.cpp (limited to 'src/common') diff --git a/src/Alpha_complex/utilities/CMakeLists.txt b/src/Alpha_complex/utilities/CMakeLists.txt new file mode 100644 index 00000000..69dbc28a --- /dev/null +++ b/src/Alpha_complex/utilities/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 2.6) +project(Alpha_complex_utilities) + +if(CGAL_FOUND) + add_executable(alpha_complex_3d_persistence alpha_complex_3d_persistence.cpp) + target_link_libraries(alpha_complex_3d_persistence ${CGAL_LIBRARY}) + + if (TBB_FOUND) + target_link_libraries(alpha_complex_3d_persistence ${TBB_LIBRARIES}) + endif(TBB_FOUND) + add_test(NAME Alpha_complex_utilities_alpha_complex_3d_persistence COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "2" "0.45") + + install(TARGETS alpha_complex_3d_persistence DESTINATION bin) + + if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) + add_executable (alpha_complex_persistence alpha_complex_persistence.cpp) + target_link_libraries(alpha_complex_persistence + ${CGAL_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) + + add_executable(periodic_alpha_complex_3d_persistence periodic_alpha_complex_3d_persistence.cpp) + target_link_libraries(periodic_alpha_complex_3d_persistence ${CGAL_LIBRARY}) + + if (TBB_FOUND) + target_link_libraries(alpha_complex_persistence ${TBB_LIBRARIES}) + target_link_libraries(periodic_alpha_complex_3d_persistence ${TBB_LIBRARIES}) + endif(TBB_FOUND) + add_test(NAME Alpha_complex_utilities_alpha_complex_persistence COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "-p" "2" "-m" "0.45") + add_test(NAME Alpha_complex_utilities_periodic_alpha_complex_3d_persistence COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/grid_10_10_10_in_0_1.off" "${CMAKE_SOURCE_DIR}/data/points/iso_cuboid_3_in_0_1.txt" "2" "0") + + install(TARGETS alpha_complex_persistence DESTINATION bin) + install(TARGETS periodic_alpha_complex_3d_persistence DESTINATION bin) + + endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) +endif(CGAL_FOUND) diff --git a/src/Alpha_complex/utilities/README b/src/Alpha_complex/utilities/README new file mode 100644 index 00000000..30e1b187 --- /dev/null +++ b/src/Alpha_complex/utilities/README @@ -0,0 +1,131 @@ +# Alpha_complex # + +## `alpha_complex_3d_persistence` ## +This program computes the persistent homology with coefficient field Z/pZ of the 3D alpha complex built from a 3D point cloud. The output diagram contains one bar per line, written with the convention: + +`p dim b d` + +where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p = p1*...*pr` is the product of prime numbers *pi* such that the homology feature exists in homology with *Z/piZ* coefficients). + +**Usage** +`alpha_complex_3d_persistence

` +where +`` is the path to the input point cloud in OFF format. +`

` is the characteristic p of the coefficient field *Z/pZ* for computing homology. It must be a stricly positive integer. +`` is the minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. It must be a floating-point number >= -1. + +**Example** +`alpha_complex_3d_persistence ../../data/points/tore3D_300.off 2 0.45` + +outputs: +``` +Simplex_tree dim: 3 +2 0 0 inf +2 1 0.0682162 1.0001 +2 1 0.0934117 1.00003 +2 2 0.56444 1.03938 +``` + +Here we retrieve expected Betti numbers on a tore 3D: +``` +Betti numbers[0] = 1 +Betti numbers[1] = 2 +Betti numbers[2] = 1 +``` + +N.B.: +* `alpha_complex_3d_persistence` only accepts OFF files in dimension 3. +* Filtration values are alpha square values. + + + + +## `periodic_alpha_complex_3d_persistence` ## +This program computes the persistent homology with coefficient field Z/pZ of the 3D periodic alpha complex built from a 3D point cloud. The output diagram contains one bar per line, written with the convention: + +`p dim b d` + +where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p = p1*...*pr` is the product of prime numbers *pi* such that the homology feature exists in homology with *Z/piZ* coefficients). + +**Usage** +`periodic_alpha_complex_3d_persistence

` +where +`` is the path to the input point cloud in OFF format. +`

` is the characteristic p of the coefficient field *Z/pZ* for computing homology. It must be a stricly positive integer. +`` is the minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. It must be a floating-point number >= -1. + +**Example** +`periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off ../../data/points/iso_cuboid_3_in_0_1.txt 3 1.0` + +outputs: +``` +Periodic Delaunay computed. +Simplex_tree dim: 3 +3 0 0 inf +3 1 0.0025 inf +3 1 0.0025 inf +3 1 0.0025 inf +3 2 0.005 inf +3 2 0.005 inf +3 2 0.005 inf +3 3 0.0075 inf +``` + +Here we retrieve expected Betti numbers on an 3D iso-oriented cuboids: +``` +Betti numbers[0] = 1 +Betti numbers[1] = 3 +Betti numbers[2] = 3 +Betti numbers[3] = 1 +``` + +N.B.: +* `periodic_alpha_complex_3d_persistence` only accepts OFF files in dimension 3. +* In this example, the periodic cube is hard coded to { x = [0,1]; y = [0,1]; z = [0,1] } +* Filtration values are alpha square values. + + + + + +## `alpha_complex_persistence` ## +This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. The output diagram contains one bar per line, written with the convention: + +`p dim b d` + +where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p = p1*...*pr` is the product of prime numbers pi such that the homology feature exists in homology with Z/piZ coefficients). + +**Usage** +`alpha_complex_persistence [options] ` + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in std::cout. +* `-r [ --max-alpha-square-value ]` (default = inf) Maximal alpha square value for the Alpha complex construction. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. + +**Example** +`alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off` + +outputs: +``` +Alpha complex is of dimension 3 - 9273 simplices - 300 vertices. +Simplex_tree dim: 3 +2 0 0 inf +2 1 0.0682162 1.0001 +2 1 0.0934117 1.00003 +2 2 0.56444 1.03938 +``` + +Here we retrieve expected Betti numbers on a tore 3D: +``` +Betti numbers[0] = 1 +Betti numbers[1] = 2 +Betti numbers[2] = 1 +``` + +N.B.: +* `alpha_complex_persistence` only accepts OFF files in dimension d. +* Filtration values are alpha square values. diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_helper.h b/src/Alpha_complex/utilities/alpha_complex_3d_helper.h new file mode 100644 index 00000000..7865e4ec --- /dev/null +++ b/src/Alpha_complex/utilities/alpha_complex_3d_helper.h @@ -0,0 +1,76 @@ +/* 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) 2014 INRIA Saclay (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef ALPHA_COMPLEX_3D_HELPER_H_ +#define ALPHA_COMPLEX_3D_HELPER_H_ + +template +Vertex_list from_cell(const Cell_handle& ch) { + Vertex_list the_list; + for (auto i = 0; i < 4; i++) { +#ifdef DEBUG_TRACES + std::cout << "from cell[" << i << "]=" << ch->vertex(i)->point() << std::endl; +#endif // DEBUG_TRACES + the_list.push_back(ch->vertex(i)); + } + return the_list; +} + +template +Vertex_list from_facet(const Facet& fct) { + Vertex_list the_list; + for (auto i = 0; i < 4; i++) { + if (fct.second != i) { +#ifdef DEBUG_TRACES + std::cout << "from facet=[" << i << "]" << fct.first->vertex(i)->point() << std::endl; +#endif // DEBUG_TRACES + the_list.push_back(fct.first->vertex(i)); + } + } + return the_list; +} + +template +Vertex_list from_edge(const Edge_3& edg) { + Vertex_list the_list; + for (auto i = 0; i < 4; i++) { + if ((edg.second == i) || (edg.third == i)) { +#ifdef DEBUG_TRACES + std::cout << "from edge[" << i << "]=" << edg.first->vertex(i)->point() << std::endl; +#endif // DEBUG_TRACES + the_list.push_back(edg.first->vertex(i)); + } + } + return the_list; +} + +template +Vertex_list from_vertex(const Vertex_handle& vh) { + Vertex_list the_list; +#ifdef DEBUG_TRACES + std::cout << "from vertex=" << vh->point() << std::endl; +#endif // DEBUG_TRACES + the_list.push_back(vh); + return the_list; +} + +#endif // ALPHA_COMPLEX_3D_HELPER_H_ diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp new file mode 100644 index 00000000..f63ff0f6 --- /dev/null +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -0,0 +1,242 @@ +/* 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) 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 + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "alpha_complex_3d_helper.h" + +// Alpha_shape_3 templates type definitions +using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; +using Vb = CGAL::Alpha_shape_vertex_base_3; +using Fb = CGAL::Alpha_shape_cell_base_3; +using Tds = CGAL::Triangulation_data_structure_3; +using Triangulation_3 = CGAL::Delaunay_triangulation_3; +using Alpha_shape_3 = CGAL::Alpha_shape_3; + +// From file type definition +using Point_3 = Kernel::Point_3; + +// filtration with alpha values needed type definition +using Alpha_value_type = Alpha_shape_3::FT; +using Object = CGAL::Object; +using Dispatch = CGAL::Dispatch_output_iterator< + CGAL::cpp11::tuple, + CGAL::cpp11::tuple >, + std::back_insert_iterator< std::vector > > >; +using Cell_handle = Alpha_shape_3::Cell_handle; +using Facet = Alpha_shape_3::Facet; +using Edge_3 = Alpha_shape_3::Edge; +using Vertex_handle = Alpha_shape_3::Vertex_handle; +using Vertex_list = std::list; + +// gudhi type definition +using ST = Gudhi::Simplex_tree; +using Filtration_value = ST::Filtration_value; +using Simplex_tree_vertex = ST::Vertex_handle; +using Alpha_shape_simplex_tree_map = std::map; +using Alpha_shape_simplex_tree_pair = std::pair; +using Simplex_tree_vector_vertex = std::vector< Simplex_tree_vertex >; +using PCOH = Gudhi::persistent_cohomology::Persistent_cohomology< ST, Gudhi::persistent_cohomology::Field_Zp >; + +void usage(const std::string& progName) { + std::cerr << "Usage:\n" << progName << " path_to_OFF_file coeff_field_characteristic[integer " << + "> 0] min_persistence[float >= -1.0]\n"; + std::cerr << " path_to_OFF_file is the path to your points cloud in OFF format.\n"; + exit(-1); +} + +int main(int argc, char * const argv[]) { + // program args management + if (argc != 4) { + std::cerr << "Error: Number of arguments (" << argc << ") is not correct\n"; + usage(argv[0]); + } + + int coeff_field_characteristic = atoi(argv[2]); + + Filtration_value min_persistence = 0.0; + int returnedScanValue = sscanf(argv[3], "%f", &min_persistence); + if ((returnedScanValue == EOF) || (min_persistence < -1.0)) { + std::cerr << "Error: " << argv[3] << " is not correct\n"; + usage(argv[0]); + } + + // Read points from file + std::string offInputFile(argv[1]); + // Read the OFF file (input file name given as parameter) and triangulate points + Gudhi::Points_3D_off_reader off_reader(offInputFile); + // Check the read operation was correct + if (!off_reader.is_valid()) { + std::cerr << "Unable to read file " << offInputFile << std::endl; + usage(argv[0]); + } + + // Retrieve the triangulation + std::vector lp = off_reader.get_point_cloud(); + + // alpha shape construction from points. CGAL has a strange behavior in REGULARIZED mode. + Alpha_shape_3 as(lp.begin(), lp.end(), 0, Alpha_shape_3::GENERAL); +#ifdef DEBUG_TRACES + std::cout << "Alpha shape computed in GENERAL mode" << std::endl; +#endif // DEBUG_TRACES + + // filtration with alpha values from alpha shape + std::vector the_objects; + std::vector the_alpha_values; + + Dispatch disp = CGAL::dispatch_output(std::back_inserter(the_objects), + std::back_inserter(the_alpha_values)); + + as.filtration_with_alpha_values(disp); +#ifdef DEBUG_TRACES + std::cout << "filtration_with_alpha_values returns : " << the_objects.size() << " objects" << std::endl; +#endif // DEBUG_TRACES + + Alpha_shape_3::size_type count_vertices = 0; + Alpha_shape_3::size_type count_edges = 0; + Alpha_shape_3::size_type count_facets = 0; + Alpha_shape_3::size_type count_cells = 0; + + // Loop on objects vector + Vertex_list vertex_list; + ST simplex_tree; + Alpha_shape_simplex_tree_map map_cgal_simplex_tree; + std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); + int dim_max = 0; + Filtration_value filtration_max = 0.0; + for (auto object_iterator : the_objects) { + // Retrieve Alpha shape vertex list from object + if (const Cell_handle * cell = CGAL::object_cast(&object_iterator)) { + vertex_list = from_cell(*cell); + count_cells++; + if (dim_max < 3) { + // Cell is of dim 3 + dim_max = 3; + } + } else if (const Facet * facet = CGAL::object_cast(&object_iterator)) { + vertex_list = from_facet(*facet); + count_facets++; + if (dim_max < 2) { + // Facet is of dim 2 + dim_max = 2; + } + } else if (const Edge_3 * edge = CGAL::object_cast(&object_iterator)) { + vertex_list = from_edge(*edge); + count_edges++; + if (dim_max < 1) { + // Edge_3 is of dim 1 + dim_max = 1; + } + } else if (const Vertex_handle * vertex = CGAL::object_cast(&object_iterator)) { + count_vertices++; + vertex_list = from_vertex(*vertex); + } + // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex + Simplex_tree_vector_vertex the_simplex_tree; + for (auto the_alpha_shape_vertex : vertex_list) { + Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); + if (the_map_iterator == map_cgal_simplex_tree.end()) { + // alpha shape not found + Simplex_tree_vertex vertex = map_cgal_simplex_tree.size(); +#ifdef DEBUG_TRACES + std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; +#endif // DEBUG_TRACES + the_simplex_tree.push_back(vertex); + map_cgal_simplex_tree.insert(Alpha_shape_simplex_tree_pair(the_alpha_shape_vertex, vertex)); + } else { + // alpha shape found + Simplex_tree_vertex vertex = the_map_iterator->second; +#ifdef DEBUG_TRACES + std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; +#endif // DEBUG_TRACES + the_simplex_tree.push_back(vertex); + } + } + // Construction of the simplex_tree + Filtration_value filtr = /*std::sqrt*/(*the_alpha_value_iterator); +#ifdef DEBUG_TRACES + std::cout << "filtration = " << filtr << std::endl; +#endif // DEBUG_TRACES + if (filtr > filtration_max) { + filtration_max = filtr; + } + simplex_tree.insert_simplex(the_simplex_tree, filtr); + if (the_alpha_value_iterator != the_alpha_values.end()) + ++the_alpha_value_iterator; + else + std::cout << "This shall not happen" << std::endl; + } + simplex_tree.set_dimension(dim_max); + +#ifdef DEBUG_TRACES + std::cout << "vertices \t\t" << count_vertices << std::endl; + std::cout << "edges \t\t" << count_edges << std::endl; + std::cout << "facets \t\t" << count_facets << std::endl; + std::cout << "cells \t\t" << count_cells << std::endl; + + + std::cout << "Information of the Simplex Tree: " << std::endl; + std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " "; + std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl; + std::cout << " Dimension = " << simplex_tree.dimension() << " "; +#endif // DEBUG_TRACES + +#ifdef DEBUG_TRACES + std::cout << "Iterator on vertices: " << std::endl; + for (auto vertex : simplex_tree.complex_vertex_range()) { + std::cout << vertex << " "; + } +#endif // DEBUG_TRACES + + // Sort the simplices in the order of the filtration + simplex_tree.initialize_filtration(); + + std::cout << "Simplex_tree dim: " << simplex_tree.dimension() << std::endl; + // Compute the persistence diagram of the complex + PCOH pcoh(simplex_tree); + // initializes the coefficient field for homology + pcoh.init_coefficients(coeff_field_characteristic); + + pcoh.compute_persistent_cohomology(min_persistence); + + pcoh.output_diagram(); + + return 0; +} diff --git a/src/Alpha_complex/utilities/alpha_complex_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_persistence.cpp new file mode 100644 index 00000000..9e84e91f --- /dev/null +++ b/src/Alpha_complex/utilities/alpha_complex_persistence.cpp @@ -0,0 +1,125 @@ +#include + +#include + +#include +#include +// to construct a simplex_tree from alpha complex +#include + +#include +#include +#include // for numeric_limits + +using Simplex_tree = Gudhi::Simplex_tree<>; +using Filtration_value = Simplex_tree::Filtration_value; + +void program_options(int argc, char * argv[] + , std::string & off_file_points + , std::string & output_file_diag + , Filtration_value & alpha_square_max_value + , int & coeff_field_characteristic + , Filtration_value & min_persistence); + +int main(int argc, char **argv) { + std::string off_file_points; + std::string output_file_diag; + Filtration_value alpha_square_max_value; + int coeff_field_characteristic; + Filtration_value min_persistence; + + program_options(argc, argv, off_file_points, output_file_diag, alpha_square_max_value, + coeff_field_characteristic, min_persistence); + + // ---------------------------------------------------------------------------- + // Init of an alpha complex from an OFF file + // ---------------------------------------------------------------------------- + using Kernel = CGAL::Epick_d< CGAL::Dynamic_dimension_tag >; + Gudhi::alpha_complex::Alpha_complex alpha_complex_from_file(off_file_points); + + Simplex_tree simplex; + if (alpha_complex_from_file.create_complex(simplex, alpha_square_max_value)) { + // ---------------------------------------------------------------------------- + // Display information about the alpha complex + // ---------------------------------------------------------------------------- + std::cout << "Simplicial complex is of dimension " << simplex.dimension() << + " - " << simplex.num_simplices() << " simplices - " << + simplex.num_vertices() << " vertices." << std::endl; + + // Sort the simplices in the order of the filtration + simplex.initialize_filtration(); + + std::cout << "Simplex_tree dim: " << simplex.dimension() << std::endl; + // Compute the persistence diagram of the complex + Gudhi::persistent_cohomology::Persistent_cohomology< Simplex_tree, + Gudhi::persistent_cohomology::Field_Zp > pcoh(simplex); + // initializes the coefficient field for homology + pcoh.init_coefficients(coeff_field_characteristic); + + pcoh.compute_persistent_cohomology(min_persistence); + + // Output the diagram in filediag + if (output_file_diag.empty()) { + pcoh.output_diagram(); + } else { + std::cout << "Result in file: " << output_file_diag << std::endl; + std::ofstream out(output_file_diag); + pcoh.output_diagram(out); + out.close(); + } + } + + return 0; +} + +void program_options(int argc, char * argv[] + , std::string & off_file_points + , std::string & output_file_diag + , Filtration_value & alpha_square_max_value + , int & coeff_field_characteristic + , Filtration_value & min_persistence) { + namespace po = boost::program_options; + po::options_description hidden("Hidden options"); + hidden.add_options() + ("input-file", po::value(&off_file_points), + "Name of file containing a point set. Format is one point per line: X1 ... Xd "); + + po::options_description visible("Allowed options", 100); + visible.add_options() + ("help,h", "produce help message") + ("output-file,o", po::value(&output_file_diag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout") + ("max-alpha-square-value,r", + po::value(&alpha_square_max_value)->default_value(std::numeric_limits::infinity()), + "Maximal alpha square value for the Alpha complex construction.") + ("field-charac,p", po::value(&coeff_field_characteristic)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.") + ("min-persistence,m", po::value(&min_persistence), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); + + po::positional_options_description pos; + pos.add("input-file", 1); + + po::options_description all; + all.add(visible).add(hidden); + + po::variables_map vm; + po::store(po::command_line_parser(argc, argv). + options(all).positional(pos).run(), vm); + po::notify(vm); + + if (vm.count("help") || !vm.count("input-file")) { + std::cout << std::endl; + std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; + std::cout << "of an Alpha complex defined on a set of input points.\n \n"; + std::cout << "The output diagram contains one bar per line, written with the convention: \n"; + std::cout << " p dim b d \n"; + std::cout << "where dim is the dimension of the homological feature,\n"; + std::cout << "b and d are respectively the birth and death of the feature and \n"; + std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; + + std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; + std::cout << visible << std::endl; + std::abort(); + } +} diff --git a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp new file mode 100644 index 00000000..8140a3c5 --- /dev/null +++ b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp @@ -0,0 +1,268 @@ +/* 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) 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 + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "alpha_complex_3d_helper.h" + +// Traits +using K = CGAL::Exact_predicates_inexact_constructions_kernel; +using PK = CGAL::Periodic_3_Delaunay_triangulation_traits_3; +// Vertex type +using DsVb = CGAL::Periodic_3_triangulation_ds_vertex_base_3<>; +using Vb = CGAL::Triangulation_vertex_base_3; +using AsVb = CGAL::Alpha_shape_vertex_base_3; +// Cell type +using DsCb = CGAL::Periodic_3_triangulation_ds_cell_base_3<>; +using Cb = CGAL::Triangulation_cell_base_3; +using AsCb = CGAL::Alpha_shape_cell_base_3; +using Tds = CGAL::Triangulation_data_structure_3; +using P3DT3 = CGAL::Periodic_3_Delaunay_triangulation_3; +using Alpha_shape_3 = CGAL::Alpha_shape_3; +using Point_3 = PK::Point_3; + +// filtration with alpha values needed type definition +using Alpha_value_type = Alpha_shape_3::FT; +using Object = CGAL::Object; +using Dispatch = CGAL::Dispatch_output_iterator< + CGAL::cpp11::tuple, + CGAL::cpp11::tuple >, + std::back_insert_iterator< std::vector > > >; +using Cell_handle = Alpha_shape_3::Cell_handle; +using Facet = Alpha_shape_3::Facet; +using Edge_3 = Alpha_shape_3::Edge; +using Vertex_handle = Alpha_shape_3::Vertex_handle; +using Vertex_list = std::list; + +// gudhi type definition +using ST = Gudhi::Simplex_tree; +using Filtration_value = ST::Filtration_value; +using Simplex_tree_vertex = ST::Vertex_handle; +using Alpha_shape_simplex_tree_map = std::map; +using Alpha_shape_simplex_tree_pair = std::pair; +using Simplex_tree_vector_vertex = std::vector< Simplex_tree_vertex >; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology< + ST, Gudhi::persistent_cohomology::Field_Zp >; + +void usage(char * const progName) { + std::cerr << "Usage:\n" << progName << " path_to_OFF_file path_to_iso_cuboid_3_file coeff_field_characteristic[" << + "integer > 0] min_persistence[float >= -1.0]\n" << + " path_to_OFF_file is the path to your points cloud in OFF format.\n" << + " path_to_iso_cuboid_3_file is the path to the iso cuboid file with the following format :\n" << + " x_min y_min z_min x_max y_max z_max\n" << + " In this example, the periodic cube will be " << + "{ x = [x_min,x_max]; y = [y_min,y_max]; z = [z_min,z_max] }.\n" << + " For more information, please refer to\n" << + " https://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Iso__cuboid__3.html\n"; + + exit(-1); +} + +int main(int argc, char * const argv[]) { + // program args management + if (argc != 5) { + std::cerr << "Error: Number of arguments (" << argc << ") is not correct\n"; + usage(argv[0]); + } + + int coeff_field_characteristic = atoi(argv[3]); + Filtration_value min_persistence = strtof(argv[4], nullptr); + + // Read points from file + std::string offInputFile(argv[1]); + // Read the OFF file (input file name given as parameter) and triangulate points + Gudhi::Points_3D_off_reader off_reader(offInputFile); + // Check the read operation was correct + if (!off_reader.is_valid()) { + std::cerr << "Unable to read file " << offInputFile << std::endl; + usage(argv[0]); + } + + // Read iso_cuboid_3 information from file + std::ifstream iso_cuboid_str(argv[2]); + double x_min, y_min, z_min, x_max, y_max, z_max; + if (iso_cuboid_str.good()) { + iso_cuboid_str >> x_min >> y_min >> z_min >> x_max >> y_max >> z_max; + } else { + std::cerr << "Unable to read file " << argv[2] << std::endl; + usage(argv[0]); + } + + // Retrieve the triangulation + std::vector lp = off_reader.get_point_cloud(); + + // Define the periodic cube + P3DT3 pdt(PK::Iso_cuboid_3(x_min, y_min, z_min, x_max, y_max, z_max)); + // Heuristic for inserting large point sets (if pts is reasonably large) + pdt.insert(lp.begin(), lp.end(), true); + // As pdt won't be modified anymore switch to 1-sheeted cover if possible + if (pdt.is_triangulation_in_1_sheet()) pdt.convert_to_1_sheeted_covering(); + std::cout << "Periodic Delaunay computed." << std::endl; + + // alpha shape construction from points. CGAL has a strange behavior in REGULARIZED mode. This is the default mode + // Maybe need to set it to GENERAL mode + Alpha_shape_3 as(pdt, 0, Alpha_shape_3::GENERAL); + + // filtration with alpha values from alpha shape + std::vector the_objects; + std::vector the_alpha_values; + + Dispatch disp = CGAL::dispatch_output(std::back_inserter(the_objects), + std::back_inserter(the_alpha_values)); + + as.filtration_with_alpha_values(disp); +#ifdef DEBUG_TRACES + std::cout << "filtration_with_alpha_values returns : " << the_objects.size() << " objects" << std::endl; +#endif // DEBUG_TRACES + + Alpha_shape_3::size_type count_vertices = 0; + Alpha_shape_3::size_type count_edges = 0; + Alpha_shape_3::size_type count_facets = 0; + Alpha_shape_3::size_type count_cells = 0; + + // Loop on objects vector + Vertex_list vertex_list; + ST simplex_tree; + Alpha_shape_simplex_tree_map map_cgal_simplex_tree; + std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); + int dim_max = 0; + Filtration_value filtration_max = 0.0; + for (auto object_iterator : the_objects) { + // Retrieve Alpha shape vertex list from object + if (const Cell_handle * cell = CGAL::object_cast(&object_iterator)) { + vertex_list = from_cell(*cell); + count_cells++; + if (dim_max < 3) { + // Cell is of dim 3 + dim_max = 3; + } + } else if (const Facet * facet = CGAL::object_cast(&object_iterator)) { + vertex_list = from_facet(*facet); + count_facets++; + if (dim_max < 2) { + // Facet is of dim 2 + dim_max = 2; + } + } else if (const Edge_3 * edge = CGAL::object_cast(&object_iterator)) { + vertex_list = from_edge(*edge); + count_edges++; + if (dim_max < 1) { + // Edge_3 is of dim 1 + dim_max = 1; + } + } else if (const Alpha_shape_3::Vertex_handle * vertex = + CGAL::object_cast(&object_iterator)) { + count_vertices++; + vertex_list = from_vertex(*vertex); + } + // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex + Simplex_tree_vector_vertex the_simplex_tree; + for (auto the_alpha_shape_vertex : vertex_list) { + Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); + if (the_map_iterator == map_cgal_simplex_tree.end()) { + // alpha shape not found + Simplex_tree_vertex vertex = map_cgal_simplex_tree.size(); +#ifdef DEBUG_TRACES + std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; +#endif // DEBUG_TRACES + the_simplex_tree.push_back(vertex); + map_cgal_simplex_tree.insert(Alpha_shape_simplex_tree_pair(the_alpha_shape_vertex, vertex)); + } else { + // alpha shape found + Simplex_tree_vertex vertex = the_map_iterator->second; +#ifdef DEBUG_TRACES + std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; +#endif // DEBUG_TRACES + the_simplex_tree.push_back(vertex); + } + } + // Construction of the simplex_tree + Filtration_value filtr = /*std::sqrt*/(*the_alpha_value_iterator); +#ifdef DEBUG_TRACES + std::cout << "filtration = " << filtr << std::endl; +#endif // DEBUG_TRACES + if (filtr > filtration_max) { + filtration_max = filtr; + } + simplex_tree.insert_simplex(the_simplex_tree, filtr); + if (the_alpha_value_iterator != the_alpha_values.end()) + ++the_alpha_value_iterator; + else + std::cout << "This shall not happen" << std::endl; + } + simplex_tree.set_dimension(dim_max); + +#ifdef DEBUG_TRACES + std::cout << "vertices \t\t" << count_vertices << std::endl; + std::cout << "edges \t\t" << count_edges << std::endl; + std::cout << "facets \t\t" << count_facets << std::endl; + std::cout << "cells \t\t" << count_cells << std::endl; + + + std::cout << "Information of the Simplex Tree: " << std::endl; + std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " "; + std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl; + std::cout << " Dimension = " << simplex_tree.dimension() << " "; +#endif // DEBUG_TRACES + +#ifdef DEBUG_TRACES + std::cout << "Iterator on vertices: " << std::endl; + for (auto vertex : simplex_tree.complex_vertex_range()) { + std::cout << vertex << " "; + } +#endif // DEBUG_TRACES + + // Sort the simplices in the order of the filtration + simplex_tree.initialize_filtration(); + + std::cout << "Simplex_tree dim: " << simplex_tree.dimension() << std::endl; + // Compute the persistence diagram of the complex + Persistent_cohomology pcoh(simplex_tree, true); + // initializes the coefficient field for homology + pcoh.init_coefficients(coeff_field_characteristic); + + pcoh.compute_persistent_cohomology(min_persistence); + + pcoh.output_diagram(); + + return 0; +} diff --git a/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex.cpp b/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex.cpp index 67735ba1..e126caea 100644 --- a/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex.cpp +++ b/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex.cpp @@ -32,8 +32,8 @@ #include int main(int argc, char** argv) { - std::cout << "This program computes persistent homology, by using bitmap_cubical_complex class, of cubical " << - "complexes provided in text files in Perseus style (the only numbered in the first line is a dimension D of a" << + std::cout << "This program computes persistent homology, by using the Bitmap_cubical_complex_base class, of cubical " << + "complexes provided in text files in Perseus style. The only number in the first line is a dimension D of a" << "bitmap. In the lines I between 2 and D+1 there are numbers of top dimensional cells in the direction I. Let " << "N denote product of the numbers in the lines between 2 and D. In the lines D+2 to D+2+N there are " << "filtrations of top dimensional cells. We assume that the cells are in the lexicographical order. See " << diff --git a/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex_periodic_boundary_conditions.cpp b/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex_periodic_boundary_conditions.cpp index 122160a2..7f9296a6 100644 --- a/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex_periodic_boundary_conditions.cpp +++ b/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex_periodic_boundary_conditions.cpp @@ -33,9 +33,9 @@ #include int main(int argc, char** argv) { - std::cout << "This program computes persistent homology, by using " << + std::cout << "This program computes persistent homology, by using the " << "Bitmap_cubical_complex_periodic_boundary_conditions class, of cubical complexes provided in text files in " << - "Perseus style (the only numbered in the first line is a dimension D of a bitmap. In the lines I between 2 " << + "Perseus style. The only number in the first line is a dimension D of a bitmap. In the lines I between 2 " << "and D+1 there are numbers of top dimensional cells in the direction I. Let N denote product of the numbers " << "in the lines between 2 and D. In the lines D+2 to D+2+N there are filtrations of top dimensional cells. We " << "assume that the cells are in the lexicographical order. See CubicalOneSphere.txt or CubicalTwoSphere.txt for" << diff --git a/src/Bitmap_cubical_complex/utilities/README b/src/Bitmap_cubical_complex/utilities/README new file mode 100644 index 00000000..d9085635 --- /dev/null +++ b/src/Bitmap_cubical_complex/utilities/README @@ -0,0 +1,24 @@ +# Bitmap_cubical_complex # + +## `Bitmap_cubical_complex` ## +This program computes persistent homology, by using the Bitmap_cubical_complex class, of cubical complexes provided in text files in Perseus style. The only number in the first line is a dimension D of a bitmap. In the lines I between 2 and D+1 there are numbers of top dimensional cells in the direction I. Let N denote product of the numbers in the lines between 2 and D. In the lines D+2 to D+2+N there are filtrations of top dimensional cells. We assume that the cells are in the lexicographical order. + +Examples: + +* Create a Cubical Complex from the Perseus style file CubicalOneSphere.txt, computes Persistence cohomology from it and writes the results in a persistence file: +`Bitmap_cubical_complex data/bitmap/CubicalOneSphere.txt` + +* Create a Cubical Complex from the Perseus style file CubicalTwoSphere.txt, computes Persistence cohomology from it and writes the results in a persistence file: +`Bitmap_cubical_complex data/bitmap/CubicalTwoSphere.txt` + +## `Bitmap_cubical_complex_periodic_boundary_conditions` ## + +Same as above, but with periodic boundary conditions. + +Examples: + +* Create a Periodical Cubical Complex from the Perseus style file 2d_torus.txt, computes Persistence cohomology from it and writes the results in a persistence file: +`Bitmap_cubical_complex_periodic_boundary_conditions.exe data/bitmap/2d_torus.txt` + +* Create a Periodical Cubical Complex from the Perseus style file 3d_torus.txt, computes Persistence cohomology from it and writes the results in a persistence file: +`Bitmap_cubical_complex_periodic_boundary_conditions.exe data/bitmap/3d_torus.txt` diff --git a/src/Bottleneck_distance/utilities/README b/src/Bottleneck_distance/utilities/README new file mode 100644 index 00000000..4c9b0735 --- /dev/null +++ b/src/Bottleneck_distance/utilities/README @@ -0,0 +1,19 @@ +# Bottleneck_distance # + +## `alpha_rips_persistence_bottleneck_distance` ## +This program computes the persistent homology with coefficient field Z/pZ of a Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: + +`p dim b d` + +where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. + +Usage: +`alpha_rips_persistence_bottleneck_distance [options] ` + +Allowed options: + +* `-h [ --help ]` Produce help message +* `-r [ --max-edge-length ]` (default = inf) Maximal length of an edge for the Rips complex construction.` +* `-d [ --cpx-dimension ]` (default = 1) Maximal dimension of the Rips complex we want to compute.` +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. \ No newline at end of file diff --git a/src/Persistent_cohomology/utilities/CMakeLists.txt b/src/Persistent_cohomology/utilities/CMakeLists.txt index c2f00da2..5b315801 100644 --- a/src/Persistent_cohomology/utilities/CMakeLists.txt +++ b/src/Persistent_cohomology/utilities/CMakeLists.txt @@ -20,37 +20,4 @@ add_test(NAME Persistent_cohomology_example_from_rips_on_tore_3D COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "2" "0.45") - - install(TARGETS alpha_complex_3d_persistence DESTINATION bin) - - if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) - add_executable (alpha_complex_persistence alpha_complex_persistence.cpp) - target_link_libraries(alpha_complex_persistence - ${CGAL_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) - - add_executable(periodic_alpha_complex_3d_persistence periodic_alpha_complex_3d_persistence.cpp) - target_link_libraries(periodic_alpha_complex_3d_persistence ${CGAL_LIBRARY}) - - if (TBB_FOUND) - target_link_libraries(alpha_complex_persistence ${TBB_LIBRARIES}) - target_link_libraries(periodic_alpha_complex_3d_persistence ${TBB_LIBRARIES}) - endif(TBB_FOUND) - add_test(NAME Persistent_cohomology_example_alpha_complex COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "-p" "2" "-m" "0.45") - add_test(NAME Persistent_cohomology_example_periodic_alpha_complex_3d COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/grid_10_10_10_in_0_1.off" "${CMAKE_SOURCE_DIR}/data/points/iso_cuboid_3_in_0_1.txt" "2" "0") - - install(TARGETS alpha_complex_persistence DESTINATION bin) - install(TARGETS periodic_alpha_complex_3d_persistence DESTINATION bin) - - endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) endif(CGAL_FOUND) diff --git a/src/Persistent_cohomology/utilities/README b/src/Persistent_cohomology/utilities/README index 76e960da..eecee7ee 100644 --- a/src/Persistent_cohomology/utilities/README +++ b/src/Persistent_cohomology/utilities/README @@ -1,114 +1,66 @@ -To build the utilities, run in a Terminal: +# Persistent_cohomology # -cd /path-to-utilities/ -cmake . -make +## `rips_persistence` ## +This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: -*********************************************************************************************************************** -Example of use of RIPS: +`p dim b d` -Computation of the persistent homology with Z/2Z coefficients of the Rips complex on points -sampling a 3D torus: +where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p = p1*...*pr` is the product of prime numbers *pi* such that the homology feature exists in homology with *Z/piZ* coefficients). -./rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2 +**Usage** +`rips_persistence [options] ` -output: -2 0 0 inf +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-r [ --max-edge-length ]` (default = inf) Maximal length of an edge for the Rips complex construction. +* `-d [ --cpx-dimension ]` (default = 1) Maximal dimension of the Rips complex we want to compute. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. + +**Example 1 with Z/2Z coefficients** +`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2` + +outputs: +``` +2 0 0 inf 2 1 0.0983494 inf 2 1 0.104347 inf 2 2 0.138335 inf +``` +**Example 2 with Z/3Z coefficients** -Every line is of this format: p1*...*pr dim b d -where - p1*...*pr is the product of prime numbers pi such that the homology feature exists in homology with Z/piZ coefficients. - dim is the dimension of the homological feature, - b and d are respectively the birth and death of the feature and - +rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3 +outputs: +``` +3 0 0 inf +3 1 0.0983494 inf +3 1 0.104347 inf +3 2 0.138335 inf +``` -with Z/3Z coefficients: -./rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3 -output: -3 0 0 inf -3 1 0.0983494 inf -3 1 0.104347 inf -3 2 0.138335 inf - -*********************************************************************************************************************** -Example of use of ALPHA: - -For a more verbose mode, please run cmake with option "DEBUG_TRACES=TRUE" and recompile the programs. - -1) 3D special case ------------------- -Computation of the persistent homology with Z/2Z coefficients of the alpha complex on points -sampling a torus 3D: - -./alpha_complex_3d_persistence ../../data/points/tore3D_300.off 2 0.45 - -output: -Simplex_tree dim: 3 -2 0 0 inf -2 1 0.0682162 1.0001 -2 1 0.0934117 1.00003 -2 2 0.56444 1.03938 - -Here we retrieve expected Betti numbers on a tore 3D: -Betti numbers[0] = 1 -Betti numbers[1] = 2 -Betti numbers[2] = 1 - -N.B.: - alpha_complex_3d_persistence accepts only OFF files in 3D dimension. - - filtration values are alpha square values - -2) d-Dimension case -------------------- -Computation of the persistent homology with Z/2Z coefficients of the alpha complex on points -sampling a torus 3D: - -./alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off - -output: -Alpha complex is of dimension 3 - 9273 simplices - 300 vertices. -Simplex_tree dim: 3 -2 0 0 inf -2 1 0.0682162 1.0001 -2 1 0.0934117 1.00003 -2 2 0.56444 1.03938 - -Here we retrieve expected Betti numbers on a tore 3D: -Betti numbers[0] = 1 -Betti numbers[1] = 2 -Betti numbers[2] = 1 - -N.B.: - alpha_complex_persistence accepts OFF files in d-Dimension. - - filtration values are alpha square values - -3) 3D periodic special case ---------------------------- -./periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off ../../data/points/iso_cuboid_3_in_0_1.txt 3 1.0 - -output: -Periodic Delaunay computed. -Simplex_tree dim: 3 + +## `rips_distance_matrix_persistence` ## +Same as `rips_persistence` but taking an distance matrix as input. + +**Example** +`rips_distance_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0` + +outputs: +``` +The complex contains 46 simplices + and has dimension 3 3 0 0 inf -3 1 0.0025 inf -3 1 0.0025 inf -3 1 0.0025 inf -3 2 0.005 inf -3 2 0.005 inf -3 2 0.005 inf -3 3 0.0075 inf - -Here we retrieve expected Betti numbers on a tore 3D: -Betti numbers[0] = 1 -Betti numbers[1] = 3 -Betti numbers[2] = 3 -Betti numbers[3] = 1 - -N.B.: - periodic_alpha_complex_3d_persistence accepts only OFF files in 3D dimension. In this example, the periodic cube -is hard coded to { x = [0,1]; y = [0,1]; z = [0,1] } - - filtration values are alpha square values +3 0 0 8.94427 +3 0 0 7.28011 +3 0 0 6.08276 +3 0 0 5.83095 +3 0 0 5.38516 +3 0 0 5 +3 1 11 12.0416 +3 1 6.32456 6.7082 +``` diff --git a/src/Persistent_cohomology/utilities/alpha_complex_3d_helper.h b/src/Persistent_cohomology/utilities/alpha_complex_3d_helper.h deleted file mode 100644 index 7865e4ec..00000000 --- a/src/Persistent_cohomology/utilities/alpha_complex_3d_helper.h +++ /dev/null @@ -1,76 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Vincent Rouvreau - * - * Copyright (C) 2014 INRIA Saclay (France) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef ALPHA_COMPLEX_3D_HELPER_H_ -#define ALPHA_COMPLEX_3D_HELPER_H_ - -template -Vertex_list from_cell(const Cell_handle& ch) { - Vertex_list the_list; - for (auto i = 0; i < 4; i++) { -#ifdef DEBUG_TRACES - std::cout << "from cell[" << i << "]=" << ch->vertex(i)->point() << std::endl; -#endif // DEBUG_TRACES - the_list.push_back(ch->vertex(i)); - } - return the_list; -} - -template -Vertex_list from_facet(const Facet& fct) { - Vertex_list the_list; - for (auto i = 0; i < 4; i++) { - if (fct.second != i) { -#ifdef DEBUG_TRACES - std::cout << "from facet=[" << i << "]" << fct.first->vertex(i)->point() << std::endl; -#endif // DEBUG_TRACES - the_list.push_back(fct.first->vertex(i)); - } - } - return the_list; -} - -template -Vertex_list from_edge(const Edge_3& edg) { - Vertex_list the_list; - for (auto i = 0; i < 4; i++) { - if ((edg.second == i) || (edg.third == i)) { -#ifdef DEBUG_TRACES - std::cout << "from edge[" << i << "]=" << edg.first->vertex(i)->point() << std::endl; -#endif // DEBUG_TRACES - the_list.push_back(edg.first->vertex(i)); - } - } - return the_list; -} - -template -Vertex_list from_vertex(const Vertex_handle& vh) { - Vertex_list the_list; -#ifdef DEBUG_TRACES - std::cout << "from vertex=" << vh->point() << std::endl; -#endif // DEBUG_TRACES - the_list.push_back(vh); - return the_list; -} - -#endif // ALPHA_COMPLEX_3D_HELPER_H_ diff --git a/src/Persistent_cohomology/utilities/alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/utilities/alpha_complex_3d_persistence.cpp deleted file mode 100644 index f63ff0f6..00000000 --- a/src/Persistent_cohomology/utilities/alpha_complex_3d_persistence.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): 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 . - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "alpha_complex_3d_helper.h" - -// Alpha_shape_3 templates type definitions -using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; -using Vb = CGAL::Alpha_shape_vertex_base_3; -using Fb = CGAL::Alpha_shape_cell_base_3; -using Tds = CGAL::Triangulation_data_structure_3; -using Triangulation_3 = CGAL::Delaunay_triangulation_3; -using Alpha_shape_3 = CGAL::Alpha_shape_3; - -// From file type definition -using Point_3 = Kernel::Point_3; - -// filtration with alpha values needed type definition -using Alpha_value_type = Alpha_shape_3::FT; -using Object = CGAL::Object; -using Dispatch = CGAL::Dispatch_output_iterator< - CGAL::cpp11::tuple, - CGAL::cpp11::tuple >, - std::back_insert_iterator< std::vector > > >; -using Cell_handle = Alpha_shape_3::Cell_handle; -using Facet = Alpha_shape_3::Facet; -using Edge_3 = Alpha_shape_3::Edge; -using Vertex_handle = Alpha_shape_3::Vertex_handle; -using Vertex_list = std::list; - -// gudhi type definition -using ST = Gudhi::Simplex_tree; -using Filtration_value = ST::Filtration_value; -using Simplex_tree_vertex = ST::Vertex_handle; -using Alpha_shape_simplex_tree_map = std::map; -using Alpha_shape_simplex_tree_pair = std::pair; -using Simplex_tree_vector_vertex = std::vector< Simplex_tree_vertex >; -using PCOH = Gudhi::persistent_cohomology::Persistent_cohomology< ST, Gudhi::persistent_cohomology::Field_Zp >; - -void usage(const std::string& progName) { - std::cerr << "Usage:\n" << progName << " path_to_OFF_file coeff_field_characteristic[integer " << - "> 0] min_persistence[float >= -1.0]\n"; - std::cerr << " path_to_OFF_file is the path to your points cloud in OFF format.\n"; - exit(-1); -} - -int main(int argc, char * const argv[]) { - // program args management - if (argc != 4) { - std::cerr << "Error: Number of arguments (" << argc << ") is not correct\n"; - usage(argv[0]); - } - - int coeff_field_characteristic = atoi(argv[2]); - - Filtration_value min_persistence = 0.0; - int returnedScanValue = sscanf(argv[3], "%f", &min_persistence); - if ((returnedScanValue == EOF) || (min_persistence < -1.0)) { - std::cerr << "Error: " << argv[3] << " is not correct\n"; - usage(argv[0]); - } - - // Read points from file - std::string offInputFile(argv[1]); - // Read the OFF file (input file name given as parameter) and triangulate points - Gudhi::Points_3D_off_reader off_reader(offInputFile); - // Check the read operation was correct - if (!off_reader.is_valid()) { - std::cerr << "Unable to read file " << offInputFile << std::endl; - usage(argv[0]); - } - - // Retrieve the triangulation - std::vector lp = off_reader.get_point_cloud(); - - // alpha shape construction from points. CGAL has a strange behavior in REGULARIZED mode. - Alpha_shape_3 as(lp.begin(), lp.end(), 0, Alpha_shape_3::GENERAL); -#ifdef DEBUG_TRACES - std::cout << "Alpha shape computed in GENERAL mode" << std::endl; -#endif // DEBUG_TRACES - - // filtration with alpha values from alpha shape - std::vector the_objects; - std::vector the_alpha_values; - - Dispatch disp = CGAL::dispatch_output(std::back_inserter(the_objects), - std::back_inserter(the_alpha_values)); - - as.filtration_with_alpha_values(disp); -#ifdef DEBUG_TRACES - std::cout << "filtration_with_alpha_values returns : " << the_objects.size() << " objects" << std::endl; -#endif // DEBUG_TRACES - - Alpha_shape_3::size_type count_vertices = 0; - Alpha_shape_3::size_type count_edges = 0; - Alpha_shape_3::size_type count_facets = 0; - Alpha_shape_3::size_type count_cells = 0; - - // Loop on objects vector - Vertex_list vertex_list; - ST simplex_tree; - Alpha_shape_simplex_tree_map map_cgal_simplex_tree; - std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - int dim_max = 0; - Filtration_value filtration_max = 0.0; - for (auto object_iterator : the_objects) { - // Retrieve Alpha shape vertex list from object - if (const Cell_handle * cell = CGAL::object_cast(&object_iterator)) { - vertex_list = from_cell(*cell); - count_cells++; - if (dim_max < 3) { - // Cell is of dim 3 - dim_max = 3; - } - } else if (const Facet * facet = CGAL::object_cast(&object_iterator)) { - vertex_list = from_facet(*facet); - count_facets++; - if (dim_max < 2) { - // Facet is of dim 2 - dim_max = 2; - } - } else if (const Edge_3 * edge = CGAL::object_cast(&object_iterator)) { - vertex_list = from_edge(*edge); - count_edges++; - if (dim_max < 1) { - // Edge_3 is of dim 1 - dim_max = 1; - } - } else if (const Vertex_handle * vertex = CGAL::object_cast(&object_iterator)) { - count_vertices++; - vertex_list = from_vertex(*vertex); - } - // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex - Simplex_tree_vector_vertex the_simplex_tree; - for (auto the_alpha_shape_vertex : vertex_list) { - Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); - if (the_map_iterator == map_cgal_simplex_tree.end()) { - // alpha shape not found - Simplex_tree_vertex vertex = map_cgal_simplex_tree.size(); -#ifdef DEBUG_TRACES - std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; -#endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); - map_cgal_simplex_tree.insert(Alpha_shape_simplex_tree_pair(the_alpha_shape_vertex, vertex)); - } else { - // alpha shape found - Simplex_tree_vertex vertex = the_map_iterator->second; -#ifdef DEBUG_TRACES - std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; -#endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); - } - } - // Construction of the simplex_tree - Filtration_value filtr = /*std::sqrt*/(*the_alpha_value_iterator); -#ifdef DEBUG_TRACES - std::cout << "filtration = " << filtr << std::endl; -#endif // DEBUG_TRACES - if (filtr > filtration_max) { - filtration_max = filtr; - } - simplex_tree.insert_simplex(the_simplex_tree, filtr); - if (the_alpha_value_iterator != the_alpha_values.end()) - ++the_alpha_value_iterator; - else - std::cout << "This shall not happen" << std::endl; - } - simplex_tree.set_dimension(dim_max); - -#ifdef DEBUG_TRACES - std::cout << "vertices \t\t" << count_vertices << std::endl; - std::cout << "edges \t\t" << count_edges << std::endl; - std::cout << "facets \t\t" << count_facets << std::endl; - std::cout << "cells \t\t" << count_cells << std::endl; - - - std::cout << "Information of the Simplex Tree: " << std::endl; - std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " "; - std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl; - std::cout << " Dimension = " << simplex_tree.dimension() << " "; -#endif // DEBUG_TRACES - -#ifdef DEBUG_TRACES - std::cout << "Iterator on vertices: " << std::endl; - for (auto vertex : simplex_tree.complex_vertex_range()) { - std::cout << vertex << " "; - } -#endif // DEBUG_TRACES - - // Sort the simplices in the order of the filtration - simplex_tree.initialize_filtration(); - - std::cout << "Simplex_tree dim: " << simplex_tree.dimension() << std::endl; - // Compute the persistence diagram of the complex - PCOH pcoh(simplex_tree); - // initializes the coefficient field for homology - pcoh.init_coefficients(coeff_field_characteristic); - - pcoh.compute_persistent_cohomology(min_persistence); - - pcoh.output_diagram(); - - return 0; -} diff --git a/src/Persistent_cohomology/utilities/alpha_complex_persistence.cpp b/src/Persistent_cohomology/utilities/alpha_complex_persistence.cpp deleted file mode 100644 index 9e84e91f..00000000 --- a/src/Persistent_cohomology/utilities/alpha_complex_persistence.cpp +++ /dev/null @@ -1,125 +0,0 @@ -#include - -#include - -#include -#include -// to construct a simplex_tree from alpha complex -#include - -#include -#include -#include // for numeric_limits - -using Simplex_tree = Gudhi::Simplex_tree<>; -using Filtration_value = Simplex_tree::Filtration_value; - -void program_options(int argc, char * argv[] - , std::string & off_file_points - , std::string & output_file_diag - , Filtration_value & alpha_square_max_value - , int & coeff_field_characteristic - , Filtration_value & min_persistence); - -int main(int argc, char **argv) { - std::string off_file_points; - std::string output_file_diag; - Filtration_value alpha_square_max_value; - int coeff_field_characteristic; - Filtration_value min_persistence; - - program_options(argc, argv, off_file_points, output_file_diag, alpha_square_max_value, - coeff_field_characteristic, min_persistence); - - // ---------------------------------------------------------------------------- - // Init of an alpha complex from an OFF file - // ---------------------------------------------------------------------------- - using Kernel = CGAL::Epick_d< CGAL::Dynamic_dimension_tag >; - Gudhi::alpha_complex::Alpha_complex alpha_complex_from_file(off_file_points); - - Simplex_tree simplex; - if (alpha_complex_from_file.create_complex(simplex, alpha_square_max_value)) { - // ---------------------------------------------------------------------------- - // Display information about the alpha complex - // ---------------------------------------------------------------------------- - std::cout << "Simplicial complex is of dimension " << simplex.dimension() << - " - " << simplex.num_simplices() << " simplices - " << - simplex.num_vertices() << " vertices." << std::endl; - - // Sort the simplices in the order of the filtration - simplex.initialize_filtration(); - - std::cout << "Simplex_tree dim: " << simplex.dimension() << std::endl; - // Compute the persistence diagram of the complex - Gudhi::persistent_cohomology::Persistent_cohomology< Simplex_tree, - Gudhi::persistent_cohomology::Field_Zp > pcoh(simplex); - // initializes the coefficient field for homology - pcoh.init_coefficients(coeff_field_characteristic); - - pcoh.compute_persistent_cohomology(min_persistence); - - // Output the diagram in filediag - if (output_file_diag.empty()) { - pcoh.output_diagram(); - } else { - std::cout << "Result in file: " << output_file_diag << std::endl; - std::ofstream out(output_file_diag); - pcoh.output_diagram(out); - out.close(); - } - } - - return 0; -} - -void program_options(int argc, char * argv[] - , std::string & off_file_points - , std::string & output_file_diag - , Filtration_value & alpha_square_max_value - , int & coeff_field_characteristic - , Filtration_value & min_persistence) { - namespace po = boost::program_options; - po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&off_file_points), - "Name of file containing a point set. Format is one point per line: X1 ... Xd "); - - po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("output-file,o", po::value(&output_file_diag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-alpha-square-value,r", - po::value(&alpha_square_max_value)->default_value(std::numeric_limits::infinity()), - "Maximal alpha square value for the Alpha complex construction.") - ("field-charac,p", po::value(&coeff_field_characteristic)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); - - po::positional_options_description pos; - pos.add("input-file", 1); - - po::options_description all; - all.add(visible).add(hidden); - - po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); - po::notify(vm); - - if (vm.count("help") || !vm.count("input-file")) { - std::cout << std::endl; - std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; - std::cout << "of an Alpha complex defined on a set of input points.\n \n"; - std::cout << "The output diagram contains one bar per line, written with the convention: \n"; - std::cout << " p dim b d \n"; - std::cout << "where dim is the dimension of the homological feature,\n"; - std::cout << "b and d are respectively the birth and death of the feature and \n"; - std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; - - std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; - std::cout << visible << std::endl; - std::abort(); - } -} diff --git a/src/Persistent_cohomology/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/utilities/periodic_alpha_complex_3d_persistence.cpp deleted file mode 100644 index 8140a3c5..00000000 --- a/src/Persistent_cohomology/utilities/periodic_alpha_complex_3d_persistence.cpp +++ /dev/null @@ -1,268 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): 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 . - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "alpha_complex_3d_helper.h" - -// Traits -using K = CGAL::Exact_predicates_inexact_constructions_kernel; -using PK = CGAL::Periodic_3_Delaunay_triangulation_traits_3; -// Vertex type -using DsVb = CGAL::Periodic_3_triangulation_ds_vertex_base_3<>; -using Vb = CGAL::Triangulation_vertex_base_3; -using AsVb = CGAL::Alpha_shape_vertex_base_3; -// Cell type -using DsCb = CGAL::Periodic_3_triangulation_ds_cell_base_3<>; -using Cb = CGAL::Triangulation_cell_base_3; -using AsCb = CGAL::Alpha_shape_cell_base_3; -using Tds = CGAL::Triangulation_data_structure_3; -using P3DT3 = CGAL::Periodic_3_Delaunay_triangulation_3; -using Alpha_shape_3 = CGAL::Alpha_shape_3; -using Point_3 = PK::Point_3; - -// filtration with alpha values needed type definition -using Alpha_value_type = Alpha_shape_3::FT; -using Object = CGAL::Object; -using Dispatch = CGAL::Dispatch_output_iterator< - CGAL::cpp11::tuple, - CGAL::cpp11::tuple >, - std::back_insert_iterator< std::vector > > >; -using Cell_handle = Alpha_shape_3::Cell_handle; -using Facet = Alpha_shape_3::Facet; -using Edge_3 = Alpha_shape_3::Edge; -using Vertex_handle = Alpha_shape_3::Vertex_handle; -using Vertex_list = std::list; - -// gudhi type definition -using ST = Gudhi::Simplex_tree; -using Filtration_value = ST::Filtration_value; -using Simplex_tree_vertex = ST::Vertex_handle; -using Alpha_shape_simplex_tree_map = std::map; -using Alpha_shape_simplex_tree_pair = std::pair; -using Simplex_tree_vector_vertex = std::vector< Simplex_tree_vertex >; -using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology< - ST, Gudhi::persistent_cohomology::Field_Zp >; - -void usage(char * const progName) { - std::cerr << "Usage:\n" << progName << " path_to_OFF_file path_to_iso_cuboid_3_file coeff_field_characteristic[" << - "integer > 0] min_persistence[float >= -1.0]\n" << - " path_to_OFF_file is the path to your points cloud in OFF format.\n" << - " path_to_iso_cuboid_3_file is the path to the iso cuboid file with the following format :\n" << - " x_min y_min z_min x_max y_max z_max\n" << - " In this example, the periodic cube will be " << - "{ x = [x_min,x_max]; y = [y_min,y_max]; z = [z_min,z_max] }.\n" << - " For more information, please refer to\n" << - " https://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Iso__cuboid__3.html\n"; - - exit(-1); -} - -int main(int argc, char * const argv[]) { - // program args management - if (argc != 5) { - std::cerr << "Error: Number of arguments (" << argc << ") is not correct\n"; - usage(argv[0]); - } - - int coeff_field_characteristic = atoi(argv[3]); - Filtration_value min_persistence = strtof(argv[4], nullptr); - - // Read points from file - std::string offInputFile(argv[1]); - // Read the OFF file (input file name given as parameter) and triangulate points - Gudhi::Points_3D_off_reader off_reader(offInputFile); - // Check the read operation was correct - if (!off_reader.is_valid()) { - std::cerr << "Unable to read file " << offInputFile << std::endl; - usage(argv[0]); - } - - // Read iso_cuboid_3 information from file - std::ifstream iso_cuboid_str(argv[2]); - double x_min, y_min, z_min, x_max, y_max, z_max; - if (iso_cuboid_str.good()) { - iso_cuboid_str >> x_min >> y_min >> z_min >> x_max >> y_max >> z_max; - } else { - std::cerr << "Unable to read file " << argv[2] << std::endl; - usage(argv[0]); - } - - // Retrieve the triangulation - std::vector lp = off_reader.get_point_cloud(); - - // Define the periodic cube - P3DT3 pdt(PK::Iso_cuboid_3(x_min, y_min, z_min, x_max, y_max, z_max)); - // Heuristic for inserting large point sets (if pts is reasonably large) - pdt.insert(lp.begin(), lp.end(), true); - // As pdt won't be modified anymore switch to 1-sheeted cover if possible - if (pdt.is_triangulation_in_1_sheet()) pdt.convert_to_1_sheeted_covering(); - std::cout << "Periodic Delaunay computed." << std::endl; - - // alpha shape construction from points. CGAL has a strange behavior in REGULARIZED mode. This is the default mode - // Maybe need to set it to GENERAL mode - Alpha_shape_3 as(pdt, 0, Alpha_shape_3::GENERAL); - - // filtration with alpha values from alpha shape - std::vector the_objects; - std::vector the_alpha_values; - - Dispatch disp = CGAL::dispatch_output(std::back_inserter(the_objects), - std::back_inserter(the_alpha_values)); - - as.filtration_with_alpha_values(disp); -#ifdef DEBUG_TRACES - std::cout << "filtration_with_alpha_values returns : " << the_objects.size() << " objects" << std::endl; -#endif // DEBUG_TRACES - - Alpha_shape_3::size_type count_vertices = 0; - Alpha_shape_3::size_type count_edges = 0; - Alpha_shape_3::size_type count_facets = 0; - Alpha_shape_3::size_type count_cells = 0; - - // Loop on objects vector - Vertex_list vertex_list; - ST simplex_tree; - Alpha_shape_simplex_tree_map map_cgal_simplex_tree; - std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - int dim_max = 0; - Filtration_value filtration_max = 0.0; - for (auto object_iterator : the_objects) { - // Retrieve Alpha shape vertex list from object - if (const Cell_handle * cell = CGAL::object_cast(&object_iterator)) { - vertex_list = from_cell(*cell); - count_cells++; - if (dim_max < 3) { - // Cell is of dim 3 - dim_max = 3; - } - } else if (const Facet * facet = CGAL::object_cast(&object_iterator)) { - vertex_list = from_facet(*facet); - count_facets++; - if (dim_max < 2) { - // Facet is of dim 2 - dim_max = 2; - } - } else if (const Edge_3 * edge = CGAL::object_cast(&object_iterator)) { - vertex_list = from_edge(*edge); - count_edges++; - if (dim_max < 1) { - // Edge_3 is of dim 1 - dim_max = 1; - } - } else if (const Alpha_shape_3::Vertex_handle * vertex = - CGAL::object_cast(&object_iterator)) { - count_vertices++; - vertex_list = from_vertex(*vertex); - } - // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex - Simplex_tree_vector_vertex the_simplex_tree; - for (auto the_alpha_shape_vertex : vertex_list) { - Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); - if (the_map_iterator == map_cgal_simplex_tree.end()) { - // alpha shape not found - Simplex_tree_vertex vertex = map_cgal_simplex_tree.size(); -#ifdef DEBUG_TRACES - std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; -#endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); - map_cgal_simplex_tree.insert(Alpha_shape_simplex_tree_pair(the_alpha_shape_vertex, vertex)); - } else { - // alpha shape found - Simplex_tree_vertex vertex = the_map_iterator->second; -#ifdef DEBUG_TRACES - std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; -#endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); - } - } - // Construction of the simplex_tree - Filtration_value filtr = /*std::sqrt*/(*the_alpha_value_iterator); -#ifdef DEBUG_TRACES - std::cout << "filtration = " << filtr << std::endl; -#endif // DEBUG_TRACES - if (filtr > filtration_max) { - filtration_max = filtr; - } - simplex_tree.insert_simplex(the_simplex_tree, filtr); - if (the_alpha_value_iterator != the_alpha_values.end()) - ++the_alpha_value_iterator; - else - std::cout << "This shall not happen" << std::endl; - } - simplex_tree.set_dimension(dim_max); - -#ifdef DEBUG_TRACES - std::cout << "vertices \t\t" << count_vertices << std::endl; - std::cout << "edges \t\t" << count_edges << std::endl; - std::cout << "facets \t\t" << count_facets << std::endl; - std::cout << "cells \t\t" << count_cells << std::endl; - - - std::cout << "Information of the Simplex Tree: " << std::endl; - std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " "; - std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl; - std::cout << " Dimension = " << simplex_tree.dimension() << " "; -#endif // DEBUG_TRACES - -#ifdef DEBUG_TRACES - std::cout << "Iterator on vertices: " << std::endl; - for (auto vertex : simplex_tree.complex_vertex_range()) { - std::cout << vertex << " "; - } -#endif // DEBUG_TRACES - - // Sort the simplices in the order of the filtration - simplex_tree.initialize_filtration(); - - std::cout << "Simplex_tree dim: " << simplex_tree.dimension() << std::endl; - // Compute the persistence diagram of the complex - Persistent_cohomology pcoh(simplex_tree, true); - // initializes the coefficient field for homology - pcoh.init_coefficients(coeff_field_characteristic); - - pcoh.compute_persistent_cohomology(min_persistence); - - pcoh.output_diagram(); - - return 0; -} diff --git a/src/Witness_complex/example/CMakeLists.txt b/src/Witness_complex/example/CMakeLists.txt index f8527e0f..a8231392 100644 --- a/src/Witness_complex/example/CMakeLists.txt +++ b/src/Witness_complex/example/CMakeLists.txt @@ -14,25 +14,22 @@ install(TARGETS Witness_complex_example_nearest_landmark_table DESTINATION bin) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) add_executable( Witness_complex_example_off example_witness_complex_off.cpp ) add_executable ( Witness_complex_example_sphere example_witness_complex_sphere.cpp ) - - add_executable ( Witness_complex_example_witness_persistence example_witness_complex_persistence.cpp ) - target_link_libraries(Witness_complex_example_witness_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) - - if (TBB_FOUND) - target_link_libraries(Witness_complex_example_witness_persistence ${TBB_LIBRARIES}) - endif() + + add_executable( Witness_complex_example_strong_off example_strong_witness_complex_off.cpp ) + target_link_libraries(Witness_complex_example_strong_off) add_test(NAME Witness_complex_example_off_test_torus COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "20" "1.0" "3") add_test(NAME Witness_complex_example_test_sphere_10 COMMAND $ "10") - add_test(NAME Witness_complex_example_test_torus_persistence - COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-l" "20" "-a" "0.5") - + add_test(NAME Witness_complex_example_strong_off_test_torus + COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "20" "1.0" "3") + install(TARGETS Witness_complex_example_off DESTINATION bin) install(TARGETS Witness_complex_example_sphere DESTINATION bin) - install(TARGETS Witness_complex_example_witness_persistence DESTINATION bin) + install(TARGETS Witness_complex_example_strong_off DESTINATION bin) + endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) diff --git a/src/Witness_complex/example/example_strong_witness_complex_off.cpp b/src/Witness_complex/example/example_strong_witness_complex_off.cpp new file mode 100644 index 00000000..0ee9ee90 --- /dev/null +++ b/src/Witness_complex/example/example_strong_witness_complex_off.cpp @@ -0,0 +1,79 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): 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 +#include + +#include + +#include +#include +#include +#include +#include + +using K = CGAL::Epick_d; +using Point_d = typename K::Point_d; +using Witness_complex = Gudhi::witness_complex::Euclidean_strong_witness_complex; +using Point_vector = std::vector; + +int main(int argc, char * const argv[]) { + if (argc != 5) { + std::cerr << "Usage: " << argv[0] + << " path_to_point_file number_of_landmarks max_squared_alpha limit_dimension\n"; + return 0; + } + + std::string file_name = argv[1]; + int nbL = atoi(argv[2]), lim_dim = atoi(argv[4]); + double alpha2 = atof(argv[3]); + clock_t start, end; + Gudhi::Simplex_tree<> simplex_tree; + + // Read the point file + Point_vector point_vector, landmarks; + Gudhi::Points_off_reader off_reader(file_name); + if (!off_reader.is_valid()) { + std::cerr << "Strong witness complex - Unable to read file " << file_name << "\n"; + exit(-1); // ----- >> + } + point_vector = Point_vector(off_reader.get_point_cloud()); + + std::cout << "Successfully read " << point_vector.size() << " points.\n"; + std::cout << "Ambient dimension is " << point_vector[0].dimension() << ".\n"; + + // Choose landmarks + Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); + + // Compute witness complex + start = clock(); + Witness_complex witness_complex(landmarks, + point_vector); + + witness_complex.create_complex(simplex_tree, alpha2, lim_dim); + end = clock(); + std::cout << "Strong witness complex took " + << static_cast(end - start) / CLOCKS_PER_SEC << " s. \n"; + std::cout << "Number of simplices is: " << simplex_tree.num_simplices() << "\n"; +} diff --git a/src/Witness_complex/example/example_witness_complex_persistence.cpp b/src/Witness_complex/example/example_witness_complex_persistence.cpp deleted file mode 100644 index a1146922..00000000 --- a/src/Witness_complex/example/example_witness_complex_persistence.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): 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 -#include -#include - -#include - -#include - -#include -#include -#include // infinity - -using K = CGAL::Epick_d; -using Point_d = K::Point_d; - -using Point_vector = std::vector; -using Witness_complex = Gudhi::witness_complex::Euclidean_witness_complex; -using SimplexTree = Gudhi::Simplex_tree<>; - -using Filtration_value = SimplexTree::Filtration_value; - -using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; -using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; - -void program_options(int argc, char * argv[] - , int & nbL - , std::string & file_name - , std::string & filediag - , Filtration_value & max_squared_alpha - , int & p - , int & dim_max - , Filtration_value & min_persistence); - -int main(int argc, char * argv[]) { - std::string file_name; - std::string filediag; - Filtration_value max_squared_alpha; - int p, nbL, lim_d; - Filtration_value min_persistence; - SimplexTree simplex_tree; - - program_options(argc, argv, nbL, file_name, filediag, max_squared_alpha, p, lim_d, min_persistence); - - // Extract the points from the file file_name - Point_vector witnesses, landmarks; - Gudhi::Points_off_reader off_reader(file_name); - if (!off_reader.is_valid()) { - std::cerr << "Witness complex - Unable to read file " << file_name << "\n"; - exit(-1); // ----- >> - } - witnesses = Point_vector(off_reader.get_point_cloud()); - std::cout << "Successfully read " << witnesses.size() << " points.\n"; - std::cout << "Ambient dimension is " << witnesses[0].dimension() << ".\n"; - - // Choose landmarks from witnesses - Gudhi::subsampling::pick_n_random_points(witnesses, nbL, std::back_inserter(landmarks)); - - // Compute witness complex - Witness_complex witness_complex(landmarks, - witnesses); - - witness_complex.create_complex(simplex_tree, max_squared_alpha, lim_d); - - std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; - std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; - - // Sort the simplices in the order of the filtration - simplex_tree.initialize_filtration(); - - // Compute the persistence diagram of the complex - Persistent_cohomology pcoh(simplex_tree); - // initializes the coefficient field for homology - pcoh.init_coefficients(p); - - pcoh.compute_persistent_cohomology(min_persistence); - - // Output the diagram in filediag - if (filediag.empty()) { - pcoh.output_diagram(); - } else { - std::ofstream out(filediag); - pcoh.output_diagram(out); - out.close(); - } - - return 0; -} - - -void program_options(int argc, char * argv[] - , int & nbL - , std::string & file_name - , std::string & filediag - , Filtration_value & max_squared_alpha - , int & p - , int & dim_max - , Filtration_value & min_persistence) { - namespace po = boost::program_options; - - po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&file_name), - "Name of file containing a point set in off format."); - - Filtration_value default_alpha = std::numeric_limits::infinity(); - po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("landmarks,l", po::value(&nbL), - "Number of landmarks to choose from the point cloud.") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-sq-alpha,a", po::value(&max_squared_alpha)->default_value(default_alpha), - "Maximal squared relaxation parameter.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence)->default_value(0), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals") - ("cpx-dimension,d", po::value(&dim_max)->default_value(std::numeric_limits::max()), - "Maximal dimension of the weak witness complex we want to compute."); - - po::positional_options_description pos; - pos.add("input-file", 1); - - po::options_description all; - all.add(visible).add(hidden); - po::variables_map vm; - - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); - po::notify(vm); - - if (vm.count("help") || !vm.count("input-file")) { - std::cout << std::endl; - std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; - std::cout << "of a Weak witness complex defined on a set of input points.\n \n"; - std::cout << "The output diagram contains one bar per line, written with the convention: \n"; - std::cout << " p dim b d \n"; - std::cout << "where dim is the dimension of the homological feature,\n"; - std::cout << "b and d are respectively the birth and death of the feature and \n"; - std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; - - std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; - std::cout << visible << std::endl; - std::abort(); - } -} diff --git a/src/Witness_complex/utilities/CMakeLists.txt b/src/Witness_complex/utilities/CMakeLists.txt index 918ab864..125a41ff 100644 --- a/src/Witness_complex/utilities/CMakeLists.txt +++ b/src/Witness_complex/utilities/CMakeLists.txt @@ -3,24 +3,26 @@ project(Witness_complex_utilities) # CGAL and Eigen3 are required for Euclidean version of Witness if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) - add_executable( Witness_complex_example_strong_off example_strong_witness_complex_off.cpp ) - target_link_libraries(Witness_complex_example_strong_off) + + add_executable ( Witness_complex_strong_witness_persistence strong_witness_persistence.cpp ) + target_link_libraries(Witness_complex_strong_witness_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) - add_executable ( Witness_complex_example_strong_witness_persistence example_strong_witness_persistence.cpp ) - target_link_libraries(Witness_complex_example_strong_witness_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) + add_executable ( Witness_complex_weak_witness_persistence weak_witness_persistence.cpp ) + target_link_libraries(Witness_complex_weak_witness_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) if (TBB_FOUND) - target_link_libraries(Witness_complex_example_strong_witness_persistence ${TBB_LIBRARIES}) + target_link_libraries(Witness_complex_strong_witness_persistence ${TBB_LIBRARIES}) + target_link_libraries(Witness_complex_weak_witness_persistence ${TBB_LIBRARIES}) endif() - add_test(NAME Witness_complex_example_strong_off_test_torus - COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "20" "1.0" "3") - add_test(NAME Witness_complex_example_strong_test_torus_persistence - COMMAND $ + add_test(NAME Witness_complex_strong_test_torus_persistence + COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-l" "20" "-a" "0.5") + add_test(NAME Witness_complex_weak_test_torus_persistence + COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-l" "20" "-a" "0.5") - install(TARGETS Witness_complex_example_strong_off DESTINATION bin) - install(TARGETS Witness_complex_example_strong_witness_persistence DESTINATION bin) + install(TARGETS Witness_complex_strong_witness_persistence DESTINATION bin) + install(TARGETS Witness_complex_weak_witness_persistence DESTINATION bin) endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) diff --git a/src/Witness_complex/utilities/README b/src/Witness_complex/utilities/README new file mode 100644 index 00000000..d8dc9ca7 --- /dev/null +++ b/src/Witness_complex/utilities/README @@ -0,0 +1,72 @@ +# Witness_complex # + +## `weak_witness_persistence` ## +This program computes the persistent homology with coefficient field *Z/pZ* of a Weak witness complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: + +`p dim b d` + +where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. + +*Usage* +`weak_witness_persistence [options] ` + +*Allowed options* + +* `-h [ --help ]` Produce help message +* `-l [ --landmarks ]` Number of landmarks to choose from the point cloud. +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in std::cout. +* `-a [ --max-sq-alpha ]` (default = inf) Maximal squared relaxation parameter. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. +* `-d [ --cpx-dimension ]` (default = 2147483647) Maximal dimension of the weak witness complex we want to compute. + +*Example* +`weak_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.006` + +outputs: +``` +Successfully read 1307 points. +Ambient dimension is 3. +The complex contains 732 simplices and has dimension 8 +11 0 0 inf +11 1 0 inf +11 2 0.0275251 0.0534586 +11 1 0 0.0239952 +``` + +N.B.: output is random as the 20 landmarks are chosen randomly. + +## `strong_witness_persistence` ## +This program computes the persistent homology with coefficient field *Z/pZ* of a Strong witness complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: + +`p dim b d` + +where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. + +*Usage* +`strong_witness_persistence [options] ` + +*Allowed options* + +* `-h [ --help ]` Produce help message +* `-l [ --landmarks ]` Number of landmarks to choose from the point cloud. +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in std::cout. +* `-a [ --max-sq-alpha ]` (default = inf) Maximal squared relaxation parameter. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. +* `-d [ --cpx-dimension ]` (default = 2147483647) Maximal dimension of the weak witness complex we want to compute. + +*Example* +`strong_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.06` + +outputs: +``` +Successfully read 1307 points. +Ambient dimension is 3. +The complex contains 1836 simplices and has dimension 8 +11 0 0 inf +11 1 0.00674748 inf +11 2 0.0937751 0.235354 +``` + +N.B.: output is random as the 20 landmarks are chosen randomly. diff --git a/src/Witness_complex/utilities/example_strong_witness_complex_off.cpp b/src/Witness_complex/utilities/example_strong_witness_complex_off.cpp deleted file mode 100644 index 0ee9ee90..00000000 --- a/src/Witness_complex/utilities/example_strong_witness_complex_off.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): 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 -#include - -#include - -#include -#include -#include -#include -#include - -using K = CGAL::Epick_d; -using Point_d = typename K::Point_d; -using Witness_complex = Gudhi::witness_complex::Euclidean_strong_witness_complex; -using Point_vector = std::vector; - -int main(int argc, char * const argv[]) { - if (argc != 5) { - std::cerr << "Usage: " << argv[0] - << " path_to_point_file number_of_landmarks max_squared_alpha limit_dimension\n"; - return 0; - } - - std::string file_name = argv[1]; - int nbL = atoi(argv[2]), lim_dim = atoi(argv[4]); - double alpha2 = atof(argv[3]); - clock_t start, end; - Gudhi::Simplex_tree<> simplex_tree; - - // Read the point file - Point_vector point_vector, landmarks; - Gudhi::Points_off_reader off_reader(file_name); - if (!off_reader.is_valid()) { - std::cerr << "Strong witness complex - Unable to read file " << file_name << "\n"; - exit(-1); // ----- >> - } - point_vector = Point_vector(off_reader.get_point_cloud()); - - std::cout << "Successfully read " << point_vector.size() << " points.\n"; - std::cout << "Ambient dimension is " << point_vector[0].dimension() << ".\n"; - - // Choose landmarks - Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); - - // Compute witness complex - start = clock(); - Witness_complex witness_complex(landmarks, - point_vector); - - witness_complex.create_complex(simplex_tree, alpha2, lim_dim); - end = clock(); - std::cout << "Strong witness complex took " - << static_cast(end - start) / CLOCKS_PER_SEC << " s. \n"; - std::cout << "Number of simplices is: " << simplex_tree.num_simplices() << "\n"; -} diff --git a/src/Witness_complex/utilities/example_strong_witness_persistence.cpp b/src/Witness_complex/utilities/example_strong_witness_persistence.cpp deleted file mode 100644 index f786fe7b..00000000 --- a/src/Witness_complex/utilities/example_strong_witness_persistence.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): 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 -#include -#include - -#include - -#include - -#include -#include -#include // infinity - -using K = CGAL::Epick_d; -using Point_d = K::Point_d; - -using Point_vector = std::vector; -using Strong_witness_complex = Gudhi::witness_complex::Euclidean_strong_witness_complex; -using SimplexTree = Gudhi::Simplex_tree<>; - -using Filtration_value = SimplexTree::Filtration_value; - -using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; -using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; - -void program_options(int argc, char * argv[] - , int & nbL - , std::string & file_name - , std::string & filediag - , Filtration_value & max_squared_alpha - , int & p - , int & dim_max - , Filtration_value & min_persistence); - -int main(int argc, char * argv[]) { - std::string file_name; - std::string filediag; - Filtration_value max_squared_alpha; - int p, nbL, lim_d; - Filtration_value min_persistence; - SimplexTree simplex_tree; - - program_options(argc, argv, nbL, file_name, filediag, max_squared_alpha, p, lim_d, min_persistence); - - // Extract the points from the file file_name - Point_vector witnesses, landmarks; - Gudhi::Points_off_reader off_reader(file_name); - if (!off_reader.is_valid()) { - std::cerr << "Witness complex - Unable to read file " << file_name << "\n"; - exit(-1); // ----- >> - } - witnesses = Point_vector(off_reader.get_point_cloud()); - std::cout << "Successfully read " << witnesses.size() << " points.\n"; - std::cout << "Ambient dimension is " << witnesses[0].dimension() << ".\n"; - - // Choose landmarks from witnesses - Gudhi::subsampling::pick_n_random_points(witnesses, nbL, std::back_inserter(landmarks)); - - // Compute witness complex - Strong_witness_complex strong_witness_complex(landmarks, - witnesses); - - strong_witness_complex.create_complex(simplex_tree, max_squared_alpha, lim_d); - - std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; - std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; - - // Sort the simplices in the order of the filtration - simplex_tree.initialize_filtration(); - - // Compute the persistence diagram of the complex - Persistent_cohomology pcoh(simplex_tree); - // initializes the coefficient field for homology - pcoh.init_coefficients(p); - - pcoh.compute_persistent_cohomology(min_persistence); - - // Output the diagram in filediag - if (filediag.empty()) { - pcoh.output_diagram(); - } else { - std::ofstream out(filediag); - pcoh.output_diagram(out); - out.close(); - } - - return 0; -} - -void program_options(int argc, char * argv[] - , int & nbL - , std::string & file_name - , std::string & filediag - , Filtration_value & max_squared_alpha - , int & p - , int & dim_max - , Filtration_value & min_persistence) { - namespace po = boost::program_options; - - po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&file_name), - "Name of file containing a point set in off format."); - - po::options_description visible("Allowed options", 100); - Filtration_value default_alpha = std::numeric_limits::infinity(); - visible.add_options() - ("help,h", "produce help message") - ("landmarks,l", po::value(&nbL), - "Number of landmarks to choose from the point cloud.") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-sq-alpha,a", po::value(&max_squared_alpha)->default_value(default_alpha), - "Maximal squared relaxation parameter.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence)->default_value(0), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals") - ("cpx-dimension,d", po::value(&dim_max)->default_value(std::numeric_limits::max()), - "Maximal dimension of the strong witness complex we want to compute."); - - po::positional_options_description pos; - pos.add("input-file", 1); - - po::options_description all; - all.add(visible).add(hidden); - po::variables_map vm; - - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); - po::notify(vm); - - if (vm.count("help") || !vm.count("input-file")) { - std::cout << std::endl; - std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; - std::cout << "of a Strong witness complex defined on a set of input points.\n \n"; - std::cout << "The output diagram contains one bar per line, written with the convention: \n"; - std::cout << " p dim b d \n"; - std::cout << "where dim is the dimension of the homological feature,\n"; - std::cout << "b and d are respectively the birth and death of the feature and \n"; - std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; - - std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; - std::cout << visible << std::endl; - std::abort(); - } -} - diff --git a/src/Witness_complex/utilities/strong_witness_persistence.cpp b/src/Witness_complex/utilities/strong_witness_persistence.cpp new file mode 100644 index 00000000..f786fe7b --- /dev/null +++ b/src/Witness_complex/utilities/strong_witness_persistence.cpp @@ -0,0 +1,171 @@ +/* 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 +#include +#include + +#include + +#include + +#include +#include +#include // infinity + +using K = CGAL::Epick_d; +using Point_d = K::Point_d; + +using Point_vector = std::vector; +using Strong_witness_complex = Gudhi::witness_complex::Euclidean_strong_witness_complex; +using SimplexTree = Gudhi::Simplex_tree<>; + +using Filtration_value = SimplexTree::Filtration_value; + +using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; + +void program_options(int argc, char * argv[] + , int & nbL + , std::string & file_name + , std::string & filediag + , Filtration_value & max_squared_alpha + , int & p + , int & dim_max + , Filtration_value & min_persistence); + +int main(int argc, char * argv[]) { + std::string file_name; + std::string filediag; + Filtration_value max_squared_alpha; + int p, nbL, lim_d; + Filtration_value min_persistence; + SimplexTree simplex_tree; + + program_options(argc, argv, nbL, file_name, filediag, max_squared_alpha, p, lim_d, min_persistence); + + // Extract the points from the file file_name + Point_vector witnesses, landmarks; + Gudhi::Points_off_reader off_reader(file_name); + if (!off_reader.is_valid()) { + std::cerr << "Witness complex - Unable to read file " << file_name << "\n"; + exit(-1); // ----- >> + } + witnesses = Point_vector(off_reader.get_point_cloud()); + std::cout << "Successfully read " << witnesses.size() << " points.\n"; + std::cout << "Ambient dimension is " << witnesses[0].dimension() << ".\n"; + + // Choose landmarks from witnesses + Gudhi::subsampling::pick_n_random_points(witnesses, nbL, std::back_inserter(landmarks)); + + // Compute witness complex + Strong_witness_complex strong_witness_complex(landmarks, + witnesses); + + strong_witness_complex.create_complex(simplex_tree, max_squared_alpha, lim_d); + + std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; + std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; + + // Sort the simplices in the order of the filtration + simplex_tree.initialize_filtration(); + + // Compute the persistence diagram of the complex + Persistent_cohomology pcoh(simplex_tree); + // initializes the coefficient field for homology + pcoh.init_coefficients(p); + + pcoh.compute_persistent_cohomology(min_persistence); + + // Output the diagram in filediag + if (filediag.empty()) { + pcoh.output_diagram(); + } else { + std::ofstream out(filediag); + pcoh.output_diagram(out); + out.close(); + } + + return 0; +} + +void program_options(int argc, char * argv[] + , int & nbL + , std::string & file_name + , std::string & filediag + , Filtration_value & max_squared_alpha + , int & p + , int & dim_max + , Filtration_value & min_persistence) { + namespace po = boost::program_options; + + po::options_description hidden("Hidden options"); + hidden.add_options() + ("input-file", po::value(&file_name), + "Name of file containing a point set in off format."); + + po::options_description visible("Allowed options", 100); + Filtration_value default_alpha = std::numeric_limits::infinity(); + visible.add_options() + ("help,h", "produce help message") + ("landmarks,l", po::value(&nbL), + "Number of landmarks to choose from the point cloud.") + ("output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout") + ("max-sq-alpha,a", po::value(&max_squared_alpha)->default_value(default_alpha), + "Maximal squared relaxation parameter.") + ("field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.") + ("min-persistence,m", po::value(&min_persistence)->default_value(0), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals") + ("cpx-dimension,d", po::value(&dim_max)->default_value(std::numeric_limits::max()), + "Maximal dimension of the strong witness complex we want to compute."); + + po::positional_options_description pos; + pos.add("input-file", 1); + + po::options_description all; + all.add(visible).add(hidden); + po::variables_map vm; + + po::store(po::command_line_parser(argc, argv). + options(all).positional(pos).run(), vm); + po::notify(vm); + + if (vm.count("help") || !vm.count("input-file")) { + std::cout << std::endl; + std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; + std::cout << "of a Strong witness complex defined on a set of input points.\n \n"; + std::cout << "The output diagram contains one bar per line, written with the convention: \n"; + std::cout << " p dim b d \n"; + std::cout << "where dim is the dimension of the homological feature,\n"; + std::cout << "b and d are respectively the birth and death of the feature and \n"; + std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; + + std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; + std::cout << visible << std::endl; + std::abort(); + } +} + diff --git a/src/Witness_complex/utilities/weak_witness_persistence.cpp b/src/Witness_complex/utilities/weak_witness_persistence.cpp new file mode 100644 index 00000000..a1146922 --- /dev/null +++ b/src/Witness_complex/utilities/weak_witness_persistence.cpp @@ -0,0 +1,171 @@ +/* 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 +#include +#include + +#include + +#include + +#include +#include +#include // infinity + +using K = CGAL::Epick_d; +using Point_d = K::Point_d; + +using Point_vector = std::vector; +using Witness_complex = Gudhi::witness_complex::Euclidean_witness_complex; +using SimplexTree = Gudhi::Simplex_tree<>; + +using Filtration_value = SimplexTree::Filtration_value; + +using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; + +void program_options(int argc, char * argv[] + , int & nbL + , std::string & file_name + , std::string & filediag + , Filtration_value & max_squared_alpha + , int & p + , int & dim_max + , Filtration_value & min_persistence); + +int main(int argc, char * argv[]) { + std::string file_name; + std::string filediag; + Filtration_value max_squared_alpha; + int p, nbL, lim_d; + Filtration_value min_persistence; + SimplexTree simplex_tree; + + program_options(argc, argv, nbL, file_name, filediag, max_squared_alpha, p, lim_d, min_persistence); + + // Extract the points from the file file_name + Point_vector witnesses, landmarks; + Gudhi::Points_off_reader off_reader(file_name); + if (!off_reader.is_valid()) { + std::cerr << "Witness complex - Unable to read file " << file_name << "\n"; + exit(-1); // ----- >> + } + witnesses = Point_vector(off_reader.get_point_cloud()); + std::cout << "Successfully read " << witnesses.size() << " points.\n"; + std::cout << "Ambient dimension is " << witnesses[0].dimension() << ".\n"; + + // Choose landmarks from witnesses + Gudhi::subsampling::pick_n_random_points(witnesses, nbL, std::back_inserter(landmarks)); + + // Compute witness complex + Witness_complex witness_complex(landmarks, + witnesses); + + witness_complex.create_complex(simplex_tree, max_squared_alpha, lim_d); + + std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; + std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; + + // Sort the simplices in the order of the filtration + simplex_tree.initialize_filtration(); + + // Compute the persistence diagram of the complex + Persistent_cohomology pcoh(simplex_tree); + // initializes the coefficient field for homology + pcoh.init_coefficients(p); + + pcoh.compute_persistent_cohomology(min_persistence); + + // Output the diagram in filediag + if (filediag.empty()) { + pcoh.output_diagram(); + } else { + std::ofstream out(filediag); + pcoh.output_diagram(out); + out.close(); + } + + return 0; +} + + +void program_options(int argc, char * argv[] + , int & nbL + , std::string & file_name + , std::string & filediag + , Filtration_value & max_squared_alpha + , int & p + , int & dim_max + , Filtration_value & min_persistence) { + namespace po = boost::program_options; + + po::options_description hidden("Hidden options"); + hidden.add_options() + ("input-file", po::value(&file_name), + "Name of file containing a point set in off format."); + + Filtration_value default_alpha = std::numeric_limits::infinity(); + po::options_description visible("Allowed options", 100); + visible.add_options() + ("help,h", "produce help message") + ("landmarks,l", po::value(&nbL), + "Number of landmarks to choose from the point cloud.") + ("output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout") + ("max-sq-alpha,a", po::value(&max_squared_alpha)->default_value(default_alpha), + "Maximal squared relaxation parameter.") + ("field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.") + ("min-persistence,m", po::value(&min_persistence)->default_value(0), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals") + ("cpx-dimension,d", po::value(&dim_max)->default_value(std::numeric_limits::max()), + "Maximal dimension of the weak witness complex we want to compute."); + + po::positional_options_description pos; + pos.add("input-file", 1); + + po::options_description all; + all.add(visible).add(hidden); + po::variables_map vm; + + po::store(po::command_line_parser(argc, argv). + options(all).positional(pos).run(), vm); + po::notify(vm); + + if (vm.count("help") || !vm.count("input-file")) { + std::cout << std::endl; + std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; + std::cout << "of a Weak witness complex defined on a set of input points.\n \n"; + std::cout << "The output diagram contains one bar per line, written with the convention: \n"; + std::cout << " p dim b d \n"; + std::cout << "where dim is the dimension of the homological feature,\n"; + std::cout << "b and d are respectively the birth and death of the feature and \n"; + std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; + + std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; + std::cout << visible << std::endl; + std::abort(); + } +} diff --git a/src/common/utilities/README b/src/common/utilities/README index dc841521..18fa8cc4 100644 --- a/src/common/utilities/README +++ b/src/common/utilities/README @@ -1,19 +1,19 @@ -======================= off_file_from_shape_generator ================================== +# Pointset generator # -Example of use : +## `off_file_from_shape_generator` ## -*** on|in sphere|cube|curve|torus|klein generator +Generates a pointset and save it in an OFF file. Command-line is: +`off_file_from_shape_generator on|in sphere|cube|curve|torus|klein ...` -./off_file_from_shape_generator on sphere onSphere.off 1000 3 15.2 +Warning: "on cube" generator is not available! - => generates a onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2 +Examples: -./off_file_from_shape_generator in sphere inSphere.off 100 2 +* Generate an onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2: +`off_file_from_shape_generator on sphere onSphere.off 1000 3 15.2` + +* Generate an inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default): +`off_file_from_shape_generator in sphere inSphere.off 100 2` - => generates a inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default) - -./off_file_from_shape_generator in cube inCube.off 10000 3 5.8 - - => generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8 - -!! Warning: hypegenerator on cube is not available !! +* Generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8: +`off_file_from_shape_generator in cube inCube.off 10000 3 5.8` -- cgit v1.2.3 From 300914816e3e5d347efd9eaa5d06c236ad81511e Mon Sep 17 00:00:00 2001 From: cjamin Date: Thu, 5 Oct 2017 08:26:50 +0000 Subject: Move some utils + update doc so that utilities are shown as examples git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2756 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a707d174a382da7efad3d12a73bb66d2c90da599 --- src/Doxyfile | 3 +- .../doc/Intro_persistent_cohomology.h | 20 +-- src/Persistent_cohomology/utilities/CMakeLists.txt | 21 --- src/Persistent_cohomology/utilities/README | 66 --------- .../utilities/rips_distance_matrix_persistence.cpp | 144 -------------------- .../utilities/rips_persistence.cpp | 147 --------------------- src/Rips_complex/utilities/CMakeLists.txt | 21 +++ src/Rips_complex/utilities/README | 66 +++++++++ .../utilities/rips_distance_matrix_persistence.cpp | 144 ++++++++++++++++++++ src/Rips_complex/utilities/rips_persistence.cpp | 147 +++++++++++++++++++++ src/common/doc/main_page.h | 54 ++++---- 11 files changed, 415 insertions(+), 418 deletions(-) delete mode 100644 src/Persistent_cohomology/utilities/CMakeLists.txt delete mode 100644 src/Persistent_cohomology/utilities/README delete mode 100644 src/Persistent_cohomology/utilities/rips_distance_matrix_persistence.cpp delete mode 100644 src/Persistent_cohomology/utilities/rips_persistence.cpp create mode 100644 src/Rips_complex/utilities/CMakeLists.txt create mode 100644 src/Rips_complex/utilities/README create mode 100644 src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp create mode 100644 src/Rips_complex/utilities/rips_persistence.cpp (limited to 'src/common') diff --git a/src/Doxyfile b/src/Doxyfile index 7f5975eb..7b506e42 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -819,7 +819,8 @@ EXCLUDE_SYMBOLS = # command). EXAMPLE_PATH = biblio/ \ - example/ + example/ \ + utilities/ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and diff --git a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h index e17e5926..576a1af8 100644 --- a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h +++ b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h @@ -143,8 +143,8 @@ namespace persistent_cohomology { We provide several example files: run these examples with -h for details on their use, and read the README file. -\li -Persistent_cohomology/rips_persistence.cpp computes the Rips complex of a point cloud and outputs its persistence +\li +Rips_complex/rips_persistence.cpp computes the Rips complex of a point cloud and outputs its persistence diagram. \code $> ./rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3 \endcode \code The complex contains 177838 simplices @@ -158,12 +158,12 @@ diagram. Persistent_cohomology/rips_multifield_persistence.cpp computes the Rips complex of a point cloud and outputs its persistence diagram with a family of field coefficients. -\li -Persistent_cohomology/rips_distance_matrix_persistence.cpp computes the Rips complex of a distance matrix and +\li +Rips_complex/rips_distance_matrix_persistence.cpp computes the Rips complex of a distance matrix and outputs its persistence diagram. -\li -Persistent_cohomology/alpha_complex_3d_persistence.cpp computes the persistent homology with +\li +Alpha_complex/alpha_complex_3d_persistence.cpp computes the persistent homology with \f$\mathbb{Z}/2\mathbb{Z}\f$ coefficients of the alpha complex on points sampling from an OFF file. \code $> ./alpha_complex_3d_persistence ../../data/points/tore3D_300.off 2 0.45 \endcode \code Simplex_tree dim: 3 @@ -194,8 +194,8 @@ and a weights file. 2 1 0.0934117 1.00003 2 2 0.56444 1.03938 \endcode -\li -Persistent_cohomology/alpha_complex_persistence.cpp computes the persistent homology with +\li +Alpha_complex/alpha_complex_persistence.cpp computes the persistent homology with \f$\mathbb{Z}/p\mathbb{Z}\f$ coefficients of the alpha complex on points sampling from an OFF file. \code $> ./alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off \endcode \code Alpha complex is of dimension 3 - 9273 simplices - 300 vertices. @@ -205,8 +205,8 @@ Simplex_tree dim: 3 2 1 0.0934117 1.00003 2 2 0.56444 1.03938 \endcode -\li -Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp computes the persistent homology with +\li +Alpha_complex/periodic_alpha_complex_3d_persistence.cpp computes the persistent homology with \f$\mathbb{Z}/2\mathbb{Z}\f$ coefficients of the periodic alpha complex on points sampling from an OFF file. \code $> ./periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off 3 1.0 \endcode \code Periodic Delaunay computed. diff --git a/src/Persistent_cohomology/utilities/CMakeLists.txt b/src/Persistent_cohomology/utilities/CMakeLists.txt deleted file mode 100644 index 9a506b3f..00000000 --- a/src/Persistent_cohomology/utilities/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(Persistent_cohomology_utilities) - -add_executable(rips_distance_matrix_persistence rips_distance_matrix_persistence.cpp) -target_link_libraries(rips_distance_matrix_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) - -add_executable(rips_persistence rips_persistence.cpp) -target_link_libraries(rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) - -if (TBB_FOUND) - target_link_libraries(rips_distance_matrix_persistence ${TBB_LIBRARIES}) - target_link_libraries(rips_persistence ${TBB_LIBRARIES}) -endif() - -add_test(NAME Persistent_cohomology_example_from_rips_distance_matrix COMMAND $ - "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" "-r" "1.0" "-d" "3" "-p" "3" "-m" "0") -add_test(NAME Persistent_cohomology_example_from_rips_on_tore_3D COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3") - -install(TARGETS rips_distance_matrix_persistence DESTINATION bin) -install(TARGETS rips_persistence DESTINATION bin) diff --git a/src/Persistent_cohomology/utilities/README b/src/Persistent_cohomology/utilities/README deleted file mode 100644 index eecee7ee..00000000 --- a/src/Persistent_cohomology/utilities/README +++ /dev/null @@ -1,66 +0,0 @@ -# Persistent_cohomology # - -## `rips_persistence` ## -This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: - -`p dim b d` - -where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p = p1*...*pr` is the product of prime numbers *pi* such that the homology feature exists in homology with *Z/piZ* coefficients). - -**Usage** -`rips_persistence [options] ` - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-r [ --max-edge-length ]` (default = inf) Maximal length of an edge for the Rips complex construction. -* `-d [ --cpx-dimension ]` (default = 1) Maximal dimension of the Rips complex we want to compute. -* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. - -**Example 1 with Z/2Z coefficients** -`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2` - -outputs: -``` -2 0 0 inf -2 1 0.0983494 inf -2 1 0.104347 inf -2 2 0.138335 inf -``` - -**Example 2 with Z/3Z coefficients** - -rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3 - -outputs: -``` -3 0 0 inf -3 1 0.0983494 inf -3 1 0.104347 inf -3 2 0.138335 inf -``` - - - - -## `rips_distance_matrix_persistence` ## -Same as `rips_persistence` but taking an distance matrix as input. - -**Example** -`rips_distance_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0` - -outputs: -``` -The complex contains 46 simplices - and has dimension 3 -3 0 0 inf -3 0 0 8.94427 -3 0 0 7.28011 -3 0 0 6.08276 -3 0 0 5.83095 -3 0 0 5.38516 -3 0 0 5 -3 1 11 12.0416 -3 1 6.32456 6.7082 -``` diff --git a/src/Persistent_cohomology/utilities/rips_distance_matrix_persistence.cpp b/src/Persistent_cohomology/utilities/rips_distance_matrix_persistence.cpp deleted file mode 100644 index d38808c7..00000000 --- a/src/Persistent_cohomology/utilities/rips_distance_matrix_persistence.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Pawel Dlotko, 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 -#include -#include - -#include - -#include -#include -#include // infinity - -// Types definition -using Simplex_tree = Gudhi::Simplex_tree; -using Filtration_value = Simplex_tree::Filtration_value; -using Rips_complex = Gudhi::rips_complex::Rips_complex; -using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; -using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; -using Distance_matrix = std::vector>; - -void program_options(int argc, char * argv[] - , std::string & csv_matrix_file - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence); - -int main(int argc, char * argv[]) { - std::string csv_matrix_file; - std::string filediag; - Filtration_value threshold; - int dim_max; - int p; - Filtration_value min_persistence; - - program_options(argc, argv, csv_matrix_file, filediag, threshold, dim_max, p, min_persistence); - - Distance_matrix distances = Gudhi::read_lower_triangular_matrix_from_csv_file(csv_matrix_file); - Rips_complex rips_complex_from_file(distances, threshold); - - // Construct the Rips complex in a Simplex Tree - Simplex_tree simplex_tree; - - rips_complex_from_file.create_complex(simplex_tree, dim_max); - std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; - std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; - - // Sort the simplices in the order of the filtration - simplex_tree.initialize_filtration(); - - // Compute the persistence diagram of the complex - Persistent_cohomology pcoh(simplex_tree); - // initializes the coefficient field for homology - pcoh.init_coefficients(p); - - pcoh.compute_persistent_cohomology(min_persistence); - - // Output the diagram in filediag - if (filediag.empty()) { - pcoh.output_diagram(); - } else { - std::ofstream out(filediag); - pcoh.output_diagram(out); - out.close(); - } - return 0; -} - -void program_options(int argc, char * argv[] - , std::string & csv_matrix_file - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence) { - namespace po = boost::program_options; - po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&csv_matrix_file), - "Name of file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'."); - - po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-edge-length,r", - po::value(&threshold)->default_value(std::numeric_limits::infinity()), - "Maximal length of an edge for the Rips complex construction.") - ("cpx-dimension,d", po::value(&dim_max)->default_value(1), - "Maximal dimension of the Rips complex we want to compute.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); - - po::positional_options_description pos; - pos.add("input-file", 1); - - po::options_description all; - all.add(visible).add(hidden); - - po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); - po::notify(vm); - - if (vm.count("help") || !vm.count("input-file")) { - std::cout << std::endl; - std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; - std::cout << "of a Rips complex defined on a set of distance matrix.\n \n"; - std::cout << "The output diagram contains one bar per line, written with the convention: \n"; - std::cout << " p dim b d \n"; - std::cout << "where dim is the dimension of the homological feature,\n"; - std::cout << "b and d are respectively the birth and death of the feature and \n"; - std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; - - std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; - std::cout << visible << std::endl; - std::abort(); - } -} diff --git a/src/Persistent_cohomology/utilities/rips_persistence.cpp b/src/Persistent_cohomology/utilities/rips_persistence.cpp deleted file mode 100644 index d504798b..00000000 --- a/src/Persistent_cohomology/utilities/rips_persistence.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): 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 . - */ - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include // infinity - -// Types definition -using Simplex_tree = Gudhi::Simplex_tree; -using Filtration_value = Simplex_tree::Filtration_value; -using Rips_complex = Gudhi::rips_complex::Rips_complex; -using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; -using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; -using Point = std::vector; -using Points_off_reader = Gudhi::Points_off_reader; - -void program_options(int argc, char * argv[] - , std::string & off_file_points - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence); - -int main(int argc, char * argv[]) { - std::string off_file_points; - std::string filediag; - Filtration_value threshold; - int dim_max; - int p; - Filtration_value min_persistence; - - program_options(argc, argv, off_file_points, filediag, threshold, dim_max, p, min_persistence); - - Points_off_reader off_reader(off_file_points); - Rips_complex rips_complex_from_file(off_reader.get_point_cloud(), threshold, Gudhi::Euclidean_distance()); - - // Construct the Rips complex in a Simplex Tree - Simplex_tree simplex_tree; - - rips_complex_from_file.create_complex(simplex_tree, dim_max); - std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; - std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; - - // Sort the simplices in the order of the filtration - simplex_tree.initialize_filtration(); - - // Compute the persistence diagram of the complex - Persistent_cohomology pcoh(simplex_tree); - // initializes the coefficient field for homology - pcoh.init_coefficients(p); - - pcoh.compute_persistent_cohomology(min_persistence); - - // Output the diagram in filediag - if (filediag.empty()) { - pcoh.output_diagram(); - } else { - std::ofstream out(filediag); - pcoh.output_diagram(out); - out.close(); - } - - return 0; -} - -void program_options(int argc, char * argv[] - , std::string & off_file_points - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence) { - namespace po = boost::program_options; - po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&off_file_points), - "Name of an OFF file containing a point set.\n"); - - po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-edge-length,r", - po::value(&threshold)->default_value(std::numeric_limits::infinity()), - "Maximal length of an edge for the Rips complex construction.") - ("cpx-dimension,d", po::value(&dim_max)->default_value(1), - "Maximal dimension of the Rips complex we want to compute.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); - - po::positional_options_description pos; - pos.add("input-file", 1); - - po::options_description all; - all.add(visible).add(hidden); - - po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); - po::notify(vm); - - if (vm.count("help") || !vm.count("input-file")) { - std::cout << std::endl; - std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; - std::cout << "of a Rips complex defined on a set of input points.\n \n"; - std::cout << "The output diagram contains one bar per line, written with the convention: \n"; - std::cout << " p dim b d \n"; - std::cout << "where dim is the dimension of the homological feature,\n"; - std::cout << "b and d are respectively the birth and death of the feature and \n"; - std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; - - std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; - std::cout << visible << std::endl; - std::abort(); - } -} diff --git a/src/Rips_complex/utilities/CMakeLists.txt b/src/Rips_complex/utilities/CMakeLists.txt new file mode 100644 index 00000000..baa571fa --- /dev/null +++ b/src/Rips_complex/utilities/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 2.6) +project(Rips_complex_utilities) + +add_executable(rips_distance_matrix_persistence rips_distance_matrix_persistence.cpp) +target_link_libraries(rips_distance_matrix_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) + +add_executable(rips_persistence rips_persistence.cpp) +target_link_libraries(rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) + +if (TBB_FOUND) + target_link_libraries(rips_distance_matrix_persistence ${TBB_LIBRARIES}) + target_link_libraries(rips_persistence ${TBB_LIBRARIES}) +endif() + +add_test(NAME Rips_complex_utility_from_rips_distance_matrix COMMAND $ + "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" "-r" "1.0" "-d" "3" "-p" "3" "-m" "0") +add_test(NAME Rips_complex_utility_from_rips_on_tore_3D COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3") + +install(TARGETS rips_distance_matrix_persistence DESTINATION bin) +install(TARGETS rips_persistence DESTINATION bin) diff --git a/src/Rips_complex/utilities/README b/src/Rips_complex/utilities/README new file mode 100644 index 00000000..ddb7860f --- /dev/null +++ b/src/Rips_complex/utilities/README @@ -0,0 +1,66 @@ +# Rips_complex # + +## `rips_persistence` ## +This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: + +`p dim b d` + +where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p = p1*...*pr` is the product of prime numbers *pi* such that the homology feature exists in homology with *Z/piZ* coefficients). + +**Usage** +`rips_persistence [options] ` + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-r [ --max-edge-length ]` (default = inf) Maximal length of an edge for the Rips complex construction. +* `-d [ --cpx-dimension ]` (default = 1) Maximal dimension of the Rips complex we want to compute. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. + +**Example 1 with Z/2Z coefficients** +`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2` + +outputs: +``` +2 0 0 inf +2 1 0.0983494 inf +2 1 0.104347 inf +2 2 0.138335 inf +``` + +**Example 2 with Z/3Z coefficients** + +rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3 + +outputs: +``` +3 0 0 inf +3 1 0.0983494 inf +3 1 0.104347 inf +3 2 0.138335 inf +``` + + + + +## `rips_distance_matrix_persistence` ## +Same as `rips_persistence` but taking an distance matrix as input. + +**Example** +`rips_distance_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0` + +outputs: +``` +The complex contains 46 simplices + and has dimension 3 +3 0 0 inf +3 0 0 8.94427 +3 0 0 7.28011 +3 0 0 6.08276 +3 0 0 5.83095 +3 0 0 5.38516 +3 0 0 5 +3 1 11 12.0416 +3 1 6.32456 6.7082 +``` diff --git a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp new file mode 100644 index 00000000..d38808c7 --- /dev/null +++ b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp @@ -0,0 +1,144 @@ +/* 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, 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 +#include +#include + +#include + +#include +#include +#include // infinity + +// Types definition +using Simplex_tree = Gudhi::Simplex_tree; +using Filtration_value = Simplex_tree::Filtration_value; +using Rips_complex = Gudhi::rips_complex::Rips_complex; +using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; +using Distance_matrix = std::vector>; + +void program_options(int argc, char * argv[] + , std::string & csv_matrix_file + , std::string & filediag + , Filtration_value & threshold + , int & dim_max + , int & p + , Filtration_value & min_persistence); + +int main(int argc, char * argv[]) { + std::string csv_matrix_file; + std::string filediag; + Filtration_value threshold; + int dim_max; + int p; + Filtration_value min_persistence; + + program_options(argc, argv, csv_matrix_file, filediag, threshold, dim_max, p, min_persistence); + + Distance_matrix distances = Gudhi::read_lower_triangular_matrix_from_csv_file(csv_matrix_file); + Rips_complex rips_complex_from_file(distances, threshold); + + // Construct the Rips complex in a Simplex Tree + Simplex_tree simplex_tree; + + rips_complex_from_file.create_complex(simplex_tree, dim_max); + std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; + std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; + + // Sort the simplices in the order of the filtration + simplex_tree.initialize_filtration(); + + // Compute the persistence diagram of the complex + Persistent_cohomology pcoh(simplex_tree); + // initializes the coefficient field for homology + pcoh.init_coefficients(p); + + pcoh.compute_persistent_cohomology(min_persistence); + + // Output the diagram in filediag + if (filediag.empty()) { + pcoh.output_diagram(); + } else { + std::ofstream out(filediag); + pcoh.output_diagram(out); + out.close(); + } + return 0; +} + +void program_options(int argc, char * argv[] + , std::string & csv_matrix_file + , std::string & filediag + , Filtration_value & threshold + , int & dim_max + , int & p + , Filtration_value & min_persistence) { + namespace po = boost::program_options; + po::options_description hidden("Hidden options"); + hidden.add_options() + ("input-file", po::value(&csv_matrix_file), + "Name of file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'."); + + po::options_description visible("Allowed options", 100); + visible.add_options() + ("help,h", "produce help message") + ("output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout") + ("max-edge-length,r", + po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "Maximal length of an edge for the Rips complex construction.") + ("cpx-dimension,d", po::value(&dim_max)->default_value(1), + "Maximal dimension of the Rips complex we want to compute.") + ("field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.") + ("min-persistence,m", po::value(&min_persistence), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); + + po::positional_options_description pos; + pos.add("input-file", 1); + + po::options_description all; + all.add(visible).add(hidden); + + po::variables_map vm; + po::store(po::command_line_parser(argc, argv). + options(all).positional(pos).run(), vm); + po::notify(vm); + + if (vm.count("help") || !vm.count("input-file")) { + std::cout << std::endl; + std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; + std::cout << "of a Rips complex defined on a set of distance matrix.\n \n"; + std::cout << "The output diagram contains one bar per line, written with the convention: \n"; + std::cout << " p dim b d \n"; + std::cout << "where dim is the dimension of the homological feature,\n"; + std::cout << "b and d are respectively the birth and death of the feature and \n"; + std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; + + std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; + std::cout << visible << std::endl; + std::abort(); + } +} diff --git a/src/Rips_complex/utilities/rips_persistence.cpp b/src/Rips_complex/utilities/rips_persistence.cpp new file mode 100644 index 00000000..d504798b --- /dev/null +++ b/src/Rips_complex/utilities/rips_persistence.cpp @@ -0,0 +1,147 @@ +/* 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 . + */ + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include // infinity + +// Types definition +using Simplex_tree = Gudhi::Simplex_tree; +using Filtration_value = Simplex_tree::Filtration_value; +using Rips_complex = Gudhi::rips_complex::Rips_complex; +using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; +using Point = std::vector; +using Points_off_reader = Gudhi::Points_off_reader; + +void program_options(int argc, char * argv[] + , std::string & off_file_points + , std::string & filediag + , Filtration_value & threshold + , int & dim_max + , int & p + , Filtration_value & min_persistence); + +int main(int argc, char * argv[]) { + std::string off_file_points; + std::string filediag; + Filtration_value threshold; + int dim_max; + int p; + Filtration_value min_persistence; + + program_options(argc, argv, off_file_points, filediag, threshold, dim_max, p, min_persistence); + + Points_off_reader off_reader(off_file_points); + Rips_complex rips_complex_from_file(off_reader.get_point_cloud(), threshold, Gudhi::Euclidean_distance()); + + // Construct the Rips complex in a Simplex Tree + Simplex_tree simplex_tree; + + rips_complex_from_file.create_complex(simplex_tree, dim_max); + std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; + std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; + + // Sort the simplices in the order of the filtration + simplex_tree.initialize_filtration(); + + // Compute the persistence diagram of the complex + Persistent_cohomology pcoh(simplex_tree); + // initializes the coefficient field for homology + pcoh.init_coefficients(p); + + pcoh.compute_persistent_cohomology(min_persistence); + + // Output the diagram in filediag + if (filediag.empty()) { + pcoh.output_diagram(); + } else { + std::ofstream out(filediag); + pcoh.output_diagram(out); + out.close(); + } + + return 0; +} + +void program_options(int argc, char * argv[] + , std::string & off_file_points + , std::string & filediag + , Filtration_value & threshold + , int & dim_max + , int & p + , Filtration_value & min_persistence) { + namespace po = boost::program_options; + po::options_description hidden("Hidden options"); + hidden.add_options() + ("input-file", po::value(&off_file_points), + "Name of an OFF file containing a point set.\n"); + + po::options_description visible("Allowed options", 100); + visible.add_options() + ("help,h", "produce help message") + ("output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout") + ("max-edge-length,r", + po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "Maximal length of an edge for the Rips complex construction.") + ("cpx-dimension,d", po::value(&dim_max)->default_value(1), + "Maximal dimension of the Rips complex we want to compute.") + ("field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.") + ("min-persistence,m", po::value(&min_persistence), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); + + po::positional_options_description pos; + pos.add("input-file", 1); + + po::options_description all; + all.add(visible).add(hidden); + + po::variables_map vm; + po::store(po::command_line_parser(argc, argv). + options(all).positional(pos).run(), vm); + po::notify(vm); + + if (vm.count("help") || !vm.count("input-file")) { + std::cout << std::endl; + std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; + std::cout << "of a Rips complex defined on a set of input points.\n \n"; + std::cout << "The output diagram contains one bar per line, written with the convention: \n"; + std::cout << " p dim b d \n"; + std::cout << "where dim is the dimension of the homological feature,\n"; + std::cout << "b and d are respectively the birth and death of the feature and \n"; + std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; + + std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; + std::cout << visible << std::endl; + std::abort(); + } +} diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index cee0c28b..466236ad 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -271,8 +271,8 @@ make doxygen * * The following examples/utilities require the Computational Geometry Algorithms * Library (CGAL \cite cgal:eb-15b) and will not be built if CGAL is not installed: - * \li - * Persistent_cohomology/alpha_complex_3d_persistence.cpp + * \li + * Alpha_complex/alpha_complex_3d_persistence.cpp * \li * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp * \li @@ -289,10 +289,10 @@ make doxygen * Alpha_complex/Alpha_complex_from_off.cpp * \li * Alpha_complex/Alpha_complex_from_points.cpp - * \li - * Persistent_cohomology/alpha_complex_persistence.cpp - * \li - * Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp + * \li + * Alpha_complex/alpha_complex_persistence.cpp + * \li + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp * \li * Persistent_cohomology/custom_persistence_sort.cpp * @@ -329,12 +329,12 @@ make doxygen * Alpha_complex/Alpha_complex_from_off.cpp * \li * Alpha_complex/Alpha_complex_from_points.cpp + * \li + * Alpha_complex/alpha_complex_persistence.cpp + * \li + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp * \li * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp - * \li - * Persistent_cohomology/alpha_complex_persistence.cpp - * \li - * Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp * \li * Persistent_cohomology/custom_persistence_sort.cpp * \li @@ -364,26 +364,24 @@ make doxygen * Alpha_complex/Alpha_complex_from_off.cpp * \li * Alpha_complex/Alpha_complex_from_points.cpp + * \li + * Alpha_complex/alpha_complex_3d_persistence.cpp + * \li + * Alpha_complex/alpha_complex_persistence.cpp + * \li + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp * \li * Bitmap_cubical_complex/Bitmap_cubical_complex.cpp * \li * Bitmap_cubical_complex/Bitmap_cubical_complex_periodic_boundary_conditions.cpp * \li * Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp - * \li - * Persistent_cohomology/alpha_complex_3d_persistence.cpp - * \li - * Persistent_cohomology/alpha_complex_persistence.cpp * \li * Simplex_tree/simple_simplex_tree.cpp * \li * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp * \li * Simplex_tree/simplex_tree_from_cliques_of_graph.cpp - * \li - * Persistent_cohomology/alpha_complex_3d_persistence.cpp - * \li - * Persistent_cohomology/alpha_complex_persistence.cpp * \li * Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp * \li @@ -392,26 +390,24 @@ make doxygen * Persistent_cohomology/persistence_from_simple_simplex_tree.cpp * \li * Persistent_cohomology/plain_homology.cpp - * \li - * Persistent_cohomology/rips_distance_matrix_persistence.cpp * \li * Persistent_cohomology/rips_multifield_persistence.cpp - * \li - * Persistent_cohomology/rips_persistence.cpp * \li * Persistent_cohomology/rips_persistence_step_by_step.cpp * \li * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp * \li * Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp - * \li - * Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp * \li * Persistent_cohomology/custom_persistence_sort.cpp * \li * Rips_complex/example_one_skeleton_rips_from_points.cpp * \li * Rips_complex/example_rips_complex_from_off_file.cpp + * \li + * Rips_complex/rips_distance_matrix_persistence.cpp + * \li + * Rips_complex/rips_persistence.cpp * * \section Contributions Bug reports and contributions * Please help us improving the quality of the GUDHI library. You may report bugs or suggestions to: @@ -436,6 +432,9 @@ make doxygen /*! @file Examples * @example Alpha_complex/Alpha_complex_from_off.cpp * @example Alpha_complex/Alpha_complex_from_points.cpp + * @example Alpha_complex/alpha_complex_3d_persistence.cpp + * @example Alpha_complex/alpha_complex_persistence.cpp + * @example Alpha_complex/periodic_alpha_complex_3d_persistence.cpp * @example Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp * @example Bottleneck_distance/bottleneck_basic_example.cpp * @example Bottleneck_distance/bottleneck_read_file_example.cpp @@ -446,22 +445,19 @@ make doxygen * @example common/example_CGAL_points_off_reader.cpp * @example Contraction/Garland_heckbert.cpp * @example Contraction/Rips_contraction.cpp - * @example Persistent_cohomology/alpha_complex_3d_persistence.cpp - * @example Persistent_cohomology/alpha_complex_persistence.cpp * @example Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp * @example Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp * @example Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp - * @example Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp * @example Persistent_cohomology/persistence_from_file.cpp * @example Persistent_cohomology/persistence_from_simple_simplex_tree.cpp * @example Persistent_cohomology/plain_homology.cpp * @example Persistent_cohomology/rips_multifield_persistence.cpp - * @example Persistent_cohomology/rips_distance_matrix_persistence.cpp - * @example Persistent_cohomology/rips_persistence.cpp * @example Persistent_cohomology/custom_persistence_sort.cpp * @example Persistent_cohomology/rips_persistence_step_by_step.cpp * @example Rips_complex/example_one_skeleton_rips_from_points.cpp * @example Rips_complex/example_rips_complex_from_off_file.cpp + * @example Rips_complex/rips_persistence.cpp + * @example Rips_complex/rips_distance_matrix_persistence.cpp * @example Simplex_tree/mini_simplex_tree.cpp * @example Simplex_tree/simple_simplex_tree.cpp * @example Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp -- cgit v1.2.3 From 629542264458d2174ece2c18a490f63d1a231802 Mon Sep 17 00:00:00 2001 From: cjamin Date: Thu, 26 Oct 2017 15:08:50 +0000 Subject: Fix sentence git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2807 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8d914e747993fc8c1883ee6c0807c3335c816a3e --- src/common/doc/main_page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 466236ad..9071b566 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -323,7 +323,7 @@ make doxygen * Eigen3 is a C++ template library for linear algebra: * matrices, vectors, numerical solvers, and related algorithms. * - * The following example requires the Eigen3 and will not be + * The following examples/utilities require the Eigen3 and will not be * built if Eigen3 is not installed: * \li * Alpha_complex/Alpha_complex_from_off.cpp -- cgit v1.2.3 From 0729a55a67503c068e4843c63930d6b29e76f7ac Mon Sep 17 00:00:00 2001 From: pdlotko Date: Fri, 3 Nov 2017 05:10:17 +0000 Subject: a few more changes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@2823 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d12b2413620003883e82b3022f8d933aa05e2856 --- .../rips_correlation_matrix_persistence.cpp | 56 +++++++- ...e_one_skeleton_rips_from_correlation_matrix.cpp | 15 +- src/common/include/gudhi/file_writer.h | 157 +++++++++++++++++++++ 3 files changed, 220 insertions(+), 8 deletions(-) create mode 100644 src/common/include/gudhi/file_writer.h (limited to 'src/common') diff --git a/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp b/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp index 41cf915a..6f12dada 100644 --- a/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp +++ b/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -38,6 +39,7 @@ using Rips_complex = Gudhi::rips_complex::Rips_complex; using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; using Correlation_matrix = std::vector>; +using intervals_common = Gudhi::Persistence_interval_common< double , int >; void program_options(int argc, char* argv[], std::string& csv_matrix_file, std::string& filediag, Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence); @@ -66,6 +68,13 @@ int main(int argc, char* argv[]) { } } + //If the treshold, being minimal corelation is in the range [0,1], + //change it to 1-threshold + if ( ( threshold>=0 ) && ( threshold<=1 ) ) + { + threshold = 1-threshold; + } + Rips_complex rips_complex_from_file(correlations, threshold); // Construct the Rips complex in a Simplex Tree @@ -82,15 +91,34 @@ int main(int argc, char* argv[]) { Persistent_cohomology pcoh(simplex_tree); // initializes the coefficient field for homology pcoh.init_coefficients(p); - + //compute persistence pcoh.compute_persistent_cohomology(min_persistence); - - // Output the diagram in filediag + + + //invert the persistence diagram + auto pairs = pcoh.get_persistent_pairs(); + std::vector< intervals_common > processed_persistence_intervals; + processed_persistence_intervals.reserve( pairs.size() ); + for (auto pair :pairs ) + { + double birth = 1-simplex_tree.filtration( get<0>(pair) ); + double death = 1-simplex_tree.filtration( get<1>(pair) ); + unsigned dimension = (unsigned)simplex_tree.dimension( get<0>(pair) ); + int field = get<2>(pair); + processed_persistence_intervals.push_back( + intervals_common(birth, death,dimension,field) + ); + } + + //sort the processed intervals: + std::sort( processed_persistence_intervals.begin() , processed_persistence_intervals.end() ); + + //and write them to a file if (filediag.empty()) { - pcoh.output_diagram(); + write_persistence_intervals_to_stream(processed_persistence_intervals); } else { std::ofstream out(filediag); - pcoh.output_diagram(out); + write_persistence_intervals_to_stream(processed_persistence_intervals,out); out.close(); } return 0; @@ -103,6 +131,9 @@ void program_options(int argc, char* argv[], std::string& csv_matrix_file, std:: hidden.add_options()( "input-file", po::value(&csv_matrix_file), "Name of file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'."); + hidden.add_options() + ("input-file", po::value(&csv_matrix_file), + "Name of file containing a corelation matrix. Can be square or lower triangular matrix. Separator is ';'."); po::options_description visible("Allowed options", 100); visible.add_options()("help,h", "produce help message")( @@ -118,6 +149,19 @@ void program_options(int argc, char* argv[], std::string& csv_matrix_file, std:: "min-persistence,m", po::value(&min_persistence), "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length " "intervals"); + visible.add_options() + ("help,h", "produce help message") + ("output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout") + ("min-edge-corelation,c", + po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "Minimal corelation of an edge for the Rips complex construction.") + ("cpx-dimension,d", po::value(&dim_max)->default_value(1), + "Maximal dimension of the Rips complex we want to compute.") + ("field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.") + ("min-persistence,m", po::value(&min_persistence), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); po::positional_options_description pos; pos.add("input-file", 1); @@ -132,7 +176,7 @@ void program_options(int argc, char* argv[], std::string& csv_matrix_file, std:: if (vm.count("help") || !vm.count("input-file")) { std::cout << std::endl; std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; - std::cout << "of a Rips complex defined on a set of distance matrix.\n \n"; + std::cout << "of a Rips complex defined on a corelation matrix.\n \n"; std::cout << "The output diagram contains one bar per line, written with the convention: \n"; std::cout << " p dim b d \n"; std::cout << "where dim is the dimension of the homological feature,\n"; diff --git a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp index ae347a00..d1ccbf31 100644 --- a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp +++ b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp @@ -42,17 +42,28 @@ int main() { } //----------------------------------------------------------------------------- - // Now the correlation matrix is really the distance matrix and can be processed further. + // Now the correlation matrix is a distance matrix and can be processed further. //----------------------------------------------------------------------------- Distance_matrix distances = correlations; + //------------------------------------------------------------------------------ + //Note that this treshold mean that the points in the distance 1, i.e. corelation + //0 will be connected. + //------------------------------------------------------------------------------ double threshold = 1.0; + + Rips_complex rips_complex_from_points(distances, threshold); Simplex_tree stree; rips_complex_from_points.create_complex(stree, 1); // ---------------------------------------------------------------------------- - // Display information about the one skeleton Rips complex + // Display information about the one skeleton Rips complex. Note that + // the filtration displayed here comes from the distance matrix computed + // above, which is 1 - initial correlation matrix. Only this way, we obtain + // a complex with filtration. If a correlation matrix is used instead, we would + // have a reverse filtration (i.e. filtration of boundary of each simplex S + // is greater or equal to the filtration of S). // ---------------------------------------------------------------------------- std::cout << "Rips complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - " << stree.num_vertices() << " vertices." << std::endl; diff --git a/src/common/include/gudhi/file_writer.h b/src/common/include/gudhi/file_writer.h new file mode 100644 index 00000000..1b59ae46 --- /dev/null +++ b/src/common/include/gudhi/file_writer.h @@ -0,0 +1,157 @@ +/* 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) 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 . + */ + +#ifndef FILE_WRITER_ +#define FILE_WRITER_ + +#include +#include +#include + +namespace Gudhi { + + +/** +* This is a class to store persistence intervals. Its main purpose is to +* exchange data in between different packages and provide unified way +* of writing a collection of persistence intervals to file. +**/ +template +class Persistence_interval_common +{ +public: + Persistence_interval_common( Filtration_type birth , Filtration_type death ): + birth_(birth),death_(death),dimension_(std::numeric_limits::max), + Arith_element_(std::numeric_limits::max() ){} + + Persistence_interval_common( Filtration_type birth , Filtration_type death, + unsigned dim ): + birth_(birth),death_(death),dimension_(dim), + Arith_element_(std::numeric_limits::max()){} + + Persistence_interval_common( Filtration_type birth , Filtration_type death, + unsigned dim , Coefficient_field field ): + birth_(birth),death_(death),dimension_(dim), + Arith_element_(field){} + + + inline bool operator == ( const Persistence_interval_common &i2) + { + return ( + (this->birth_ == i2.birth_) && (this->death_ == i2.death_) && + (this->dimension_ == i2.dimension_) && (this->Arith_element_ == i2.Arith_element_) + ); + } + + inline bool operator != ( const Persistence_interval_common &i2) + { + return (!((*this)==i2)); + } + + + /** + * Note that this operator do not take Arith_element into account when doing comparisions. + **/ + inline bool operator < ( const Persistence_interval_common &i2) + { + if ( this->birth_ < i2.birth_ ) + { + return true; + } + else + { + if ( this->birth_ > i2.birth_ ) + { + return false; + } + else + { + //in this case this->birth_ == i2.birth_ + if ( this->death_ > i2.death_ ) + { + return true; + } + else + { + if ( this->death_ < i2.death_ ) + { + return false; + } + else + { + //in this case this->death_ == i2.death_ + if ( this->dimension_ < i2.dimension_ ) + { + return true; + } + else + { + //in this case this->dimension >= i2.dimension + return false; + } + } + } + } + } + } + + friend std::ostream& operator<<(std::ostream& out, const Persistence_interval_common& it) + { + if ( it.Arith_element_ != std::numeric_limits::max() ) + { + out << it.Arith_element_ << " "; + } + if ( it.dimension_ != std::numeric_limits::max() ) + { + out << it.dimension_ << " "; + } + out << it.birth_ << " " << it.death_ << " "; + return out; + } + +private: + Filtration_type birth_; + Filtration_type death_; + unsigned dimension_; + Coefficient_field Arith_element_; +};//Persistence_interval_common + + +/** + * This function write a vector to a stream +**/ +template +void write_persistence_intervals_to_stream( +const std::vector< Persistence_interval_common >& intervals, + std::ostream& out = std::cout ) +{ + for ( auto interval : intervals ) + { + out << interval << std::endl; + } +}//write_persistence_intervals_to_stream + + + +} + +#endif //FILE_WRITER_ -- cgit v1.2.3 From 3d4c842d34f4d6c52ba6c39836f57d702d6a6ff3 Mon Sep 17 00:00:00 2001 From: mcarrier Date: Tue, 7 Nov 2017 10:30:08 +0000 Subject: git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Nerve_GIC@2840 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9037e52ab98b2b9c699c104aa4da45bf6d74cfc7 --- CMakeLists.txt | 3 +-- src/CMakeLists.txt | 1 + src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 4 ++-- src/Nerve_GIC/include/gudhi/GIC.h | 2 +- src/common/doc/main_page.h | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/common') diff --git a/CMakeLists.txt b/CMakeLists.txt index da6f5709..ef129cd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,6 @@ endif() # Add your new module in the list, order is not important include(GUDHI_modules) -include_directories(src/Nerve_GIC/include/) add_gudhi_module(common) add_gudhi_module(Alpha_complex) @@ -49,8 +48,8 @@ add_gudhi_module(Spatial_searching) add_gudhi_module(Subsampling) add_gudhi_module(Tangential_complex) add_gudhi_module(Witness_complex) +add_gudhi_module(Nerve_GIC) add_subdirectory(src/Nerve_GIC/example) -add_subdirectory(src/Nerve_GIC/test) message("++ GUDHI_MODULES list is:\"${GUDHI_MODULES}\"") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9961fcf9..a2617020 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,6 +24,7 @@ add_gudhi_module(Spatial_searching) add_gudhi_module(Subsampling) add_gudhi_module(Tangential_complex) add_gudhi_module(Witness_complex) +add_gudhi_module(Nerve_GIC) message("++ GUDHI_MODULES list is:\"${GUDHI_MODULES}\"") diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index 2a869009..cb9ba554 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -2,9 +2,9 @@ * (Geometric Understanding in Higher Dimensions) is a generic C++ * library for computational topology. * - * Author(s): Clément Maria, Pawel Dlotko, Vincent Rouvreau + * Author(s): Mathieu Carriere * - * Copyright (C) 2016 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 fc615828..2520042d 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -700,7 +700,7 @@ class Cover_complex { * @result cover_back(c) vector of IDs of data points. * */ - std::vector subpopulation(Cover_t c){ + const std::vector & subpopulation(Cover_t c){ return cover_back[c]; } diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index d48294a5..34bf6c22 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -93,8 +93,8 @@ - \subsection GICDataStructure Nerves and Graph Induced Complexes - \image html "gic_complex.png" "Graph Induced Complex of a point cloud." + \subsection CoverComplexDataStructure Cover Complexes: Nerves and Graph Induced Complexes + \image html "gicvisu.jpg" "Graph Induced Complex of a point cloud."
@@ -103,11 +103,11 @@ Copyright: GPL v3
- Nerves and Graph Induced Complexes are simplicial complexes that provably contain + Nerves and Graph Induced Complexes are cover complexes, i.e. simplicial complexes that provably contain topological information about the input data. They can be computed with a cover of the - data, that often comes from the preimage of a family of intervals covering the image + data, that comes i.e. from the preimage of a family of intervals covering the image of a scalar-valued function defined on the data.
- User manual: \ref graph_induced_complex - Reference manual: Gudhi::graph_induced_complex::Graph_induced_complex + User manual: \ref cover_complex - Reference manual: Gudhi::cover_complex::Cover_complex
-- cgit v1.2.3 From ae41883215cd89e2ca71fd7e2a46b66d5075dc2d Mon Sep 17 00:00:00 2001 From: cjamin Date: Wed, 15 Nov 2017 14:39:41 +0000 Subject: Add iso-cuboid file format git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2882 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ad82867ef7523c4a03fdb89054e5bd7b8d40f7da --- src/Alpha_complex/utilities/README | 3 ++- src/Bottleneck_distance/utilities/README | 6 +++--- src/common/doc/file_formats.h | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/Alpha_complex/utilities/README b/src/Alpha_complex/utilities/README index abb17bf7..67ea1875 100644 --- a/src/Alpha_complex/utilities/README +++ b/src/Alpha_complex/utilities/README @@ -48,9 +48,10 @@ This program computes the persistent homology with coefficient field Z/pZ of the where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). **Usage** -`periodic_alpha_complex_3d_persistence

` +`periodic_alpha_complex_3d_persistence

` where `` is the path to the input point cloud in OFF format. +`` is the path to the file describing the periodic domain. It must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsIsoCuboid). `

` is the characteristic p of the coefficient field *Z/pZ* for computing homology. It must be a stricly positive integer. `` is the minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. diff --git a/src/Bottleneck_distance/utilities/README b/src/Bottleneck_distance/utilities/README index cfdccf0b..d9fdd252 100644 --- a/src/Bottleneck_distance/utilities/README +++ b/src/Bottleneck_distance/utilities/README @@ -5,6 +5,6 @@ This program computes the Bottleneck distance between two persistence diagram fi Usage: `bottleneck_read_file_example []` - - and must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPers). - is an error bound on the bottleneck distance (set by default to the smallest positive double value). +where +`` and `` must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPers). +`` is an error bound on the bottleneck distance (set by default to the smallest positive double value). diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h index d715aa4d..3b3d9248 100644 --- a/src/common/doc/file_formats.h +++ b/src/common/doc/file_formats.h @@ -53,6 +53,21 @@ namespace Gudhi { Such files can be generated with `Gudhi::persistent_cohomology::Persistent_cohomology::output_diagram()` and read with `Gudhi::read_persistence_intervals_and_dimension()`, `Gudhi::read_persistence_intervals_grouped_by_dimension()` or `Gudhi::read_persistence_intervals_in_dimension()`. + + + \section FileFormatsIsoCuboid Iso-cuboid + + Such a file describes an iso-oriented cuboid with diagonal opposite vertices (min_hx, min_hy, min_hz,...) and (max_hx, max_hy, max_hz, ...). The format is:
+ \verbatim + min_hx min_hy [min_hz ...] + max_hx max_hy [max_hz ...] + \endverbatim + + Here is a simple sample file in the 3D case: + \verbatim + -1. -1. -1. + 1. 1. 1. + \endverbatim */ } // namespace Gudhi -- cgit v1.2.3 From 9b05f9dadd25f2a5f1051044b2e00ebfc6e9b0a5 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 22 Nov 2017 09:57:46 +0000 Subject: Merge graph_expansion_blocker fix from cech_complex branch git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2932 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c6397609dbf92cad0fdd6c0fc5365b96657edec9 --- .../example/rips_persistence_step_by_step.cpp | 59 +----- src/Simplex_tree/example/CMakeLists.txt | 10 + .../example/cech_complex_cgal_mini_sphere_3d.cpp | 234 +++++++++++++++++++++ src/Simplex_tree/include/gudhi/Simplex_tree.h | 26 ++- .../include/gudhi/graph_simplicial_complex.h | 63 ++++++ 5 files changed, 323 insertions(+), 69 deletions(-) create mode 100644 src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp (limited to 'src/common') 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 554eeba6..c1de0ef8 100644 --- a/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp +++ b/src/Persistent_cohomology/example/rips_persistence_step_by_step.cpp @@ -45,14 +45,7 @@ using Simplex_tree = Gudhi::Simplex_tree; using Vertex_handle = Simplex_tree::Vertex_handle; using Filtration_value = Simplex_tree::Filtration_value; -using Graph_t = boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS -, boost::property < vertex_filtration_t, Filtration_value > -, boost::property < edge_filtration_t, Filtration_value > ->; -using Edge_t = std::pair< Vertex_handle, Vertex_handle >; - -template< typename InputPointRange, typename Distance > -Graph_t compute_proximity_graph(InputPointRange &points, Filtration_value threshold, Distance distance); +using Proximity_graph = Gudhi::Proximity_graph; using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; @@ -81,8 +74,9 @@ int main(int argc, char * argv[]) { Points_off_reader off_reader(off_file_points); // Compute the proximity graph of the points - Graph_t prox_graph = compute_proximity_graph(off_reader.get_point_cloud(), threshold - , Gudhi::Euclidean_distance()); + Proximity_graph prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), + threshold, + Gudhi::Euclidean_distance()); // Construct the Rips complex in a Simplex Tree Simplex_tree st; @@ -170,48 +164,3 @@ void program_options(int argc, char * argv[] std::abort(); } } - -/** Output the proximity graph of the points. - * - * If points contains n elements, the proximity graph is the graph - * with n vertices, and an edge [u,v] iff the distance function between - * points u and v is smaller than threshold. - * - * The type PointCloud furnishes .begin() and .end() methods, that return - * iterators with value_type Point. - */ -template< typename InputPointRange, typename Distance > -Graph_t compute_proximity_graph(InputPointRange &points, Filtration_value threshold, Distance distance) { - std::vector< Edge_t > edges; - std::vector< Filtration_value > edges_fil; - - Vertex_handle idx_u, idx_v; - Filtration_value fil; - idx_u = 0; - for (auto it_u = points.begin(); it_u != points.end(); ++it_u) { - idx_v = idx_u + 1; - for (auto it_v = it_u + 1; it_v != points.end(); ++it_v, ++idx_v) { - fil = distance(*it_u, *it_v); - if (fil <= threshold) { - edges.emplace_back(idx_u, idx_v); - edges_fil.push_back(fil); - } - } - ++idx_u; - } - - Graph_t skel_graph(edges.begin() - , edges.end() - , edges_fil.begin() - , idx_u); // number of points labeled from 0 to idx_u-1 - - auto vertex_prop = boost::get(vertex_filtration_t(), skel_graph); - - boost::graph_traits::vertex_iterator vi, vi_end; - for (std::tie(vi, vi_end) = boost::vertices(skel_graph); - vi != vi_end; ++vi) { - boost::put(vertex_prop, *vi, 0.); - } - - return skel_graph; -} diff --git a/src/Simplex_tree/example/CMakeLists.txt b/src/Simplex_tree/example/CMakeLists.txt index 8bc4ad53..b33b2d05 100644 --- a/src/Simplex_tree/example/CMakeLists.txt +++ b/src/Simplex_tree/example/CMakeLists.txt @@ -34,6 +34,16 @@ if(GMP_FOUND AND CGAL_FOUND) "${CMAKE_SOURCE_DIR}/data/points/bunny_5000.off") install(TARGETS Simplex_tree_example_alpha_shapes_3_from_off DESTINATION bin) + + add_executable ( Simplex_tree_example_cech_complex_cgal_mini_sphere_3d cech_complex_cgal_mini_sphere_3d.cpp ) + target_link_libraries(Simplex_tree_example_cech_complex_cgal_mini_sphere_3d ${Boost_PROGRAM_OPTIONS_LIBRARY} ${CGAL_LIBRARY}) + if (TBB_FOUND) + target_link_libraries(Simplex_tree_example_cech_complex_cgal_mini_sphere_3d ${TBB_LIBRARIES}) + endif() + add_test(NAME Simplex_tree_example_cech_complex_cgal_mini_sphere_3d COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" -r 0.3 -d 3) + + install(TARGETS Simplex_tree_example_alpha_shapes_3_from_off DESTINATION bin) endif() add_executable ( Simplex_tree_example_graph_expansion_with_blocker graph_expansion_with_blocker.cpp ) 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 new file mode 100644 index 00000000..217e251f --- /dev/null +++ b/src/Simplex_tree/example/cech_complex_cgal_mini_sphere_3d.cpp @@ -0,0 +1,234 @@ +/* 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 Sophia Antipolis-Méditerranée (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 +#include + +#include +#include +#include + +#include + +#include +#include +#include // infinity +#include // for pair +#include + +// ------------------------------------------------------------------------------- +// cech_complex_cgal_mini_sphere_3d is an example of each step that is required to +// build a Cech over a Simplex_tree. Please refer to cech_persistence to see +// how to do the same thing with the Cech_complex wrapper for less detailed +// steps. +// ------------------------------------------------------------------------------- + +// Types definition +using Simplex_tree = Gudhi::Simplex_tree<>; +using Vertex_handle = Simplex_tree::Vertex_handle; +using Simplex_handle = Simplex_tree::Simplex_handle; +using Filtration_value = Simplex_tree::Filtration_value; +using Siblings = Simplex_tree::Siblings; +using Graph_t = boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS +, boost::property < Gudhi::vertex_filtration_t, Filtration_value > +, boost::property < Gudhi::edge_filtration_t, Filtration_value > +>; +using Edge_t = std::pair< Vertex_handle, Vertex_handle >; + +using Kernel = CGAL::Epick_d< CGAL::Dimension_tag<3> >; +using Point = Kernel::Point_d; +using Traits = CGAL::Min_sphere_of_points_d_traits_d; +using Min_sphere = CGAL::Min_sphere_of_spheres_d; + +using Points_off_reader = Gudhi::Points_off_reader; + +class Cech_blocker { + public: + bool operator()(Simplex_handle sh) { + std::vector points; +#if DEBUG_TRACES + std::cout << "Cech_blocker on ["; +#endif // DEBUG_TRACES + for (auto vertex : simplex_tree_.simplex_vertex_range(sh)) { + points.push_back(point_cloud_[vertex]); +#if DEBUG_TRACES + std::cout << vertex << ", "; +#endif // DEBUG_TRACES + } + Min_sphere ms(points.begin(),points.end()); + Filtration_value radius = ms.radius(); +#if DEBUG_TRACES + std::cout << "] - radius = " << radius << " - returns " << (radius > threshold_) << std::endl; +#endif // DEBUG_TRACES + simplex_tree_.assign_filtration(sh, radius); + return (radius > threshold_); + } + Cech_blocker(Simplex_tree& simplex_tree, Filtration_value threshold, const std::vector& point_cloud) + : simplex_tree_(simplex_tree), + threshold_(threshold), + point_cloud_(point_cloud) { } + private: + Simplex_tree simplex_tree_; + Filtration_value threshold_; + std::vector point_cloud_; +}; + +template< typename InputPointRange> +Graph_t compute_proximity_graph(InputPointRange &points, Filtration_value threshold); + +void program_options(int argc, char * argv[] + , std::string & off_file_points + , Filtration_value & threshold + , int & dim_max); + +int main(int argc, char * argv[]) { + std::string off_file_points; + Filtration_value threshold; + int dim_max; + + program_options(argc, argv, off_file_points, threshold, dim_max); + + // Extract the points from the file filepoints + Points_off_reader off_reader(off_file_points); + + // Compute the proximity graph of the points + Graph_t prox_graph = compute_proximity_graph(off_reader.get_point_cloud(), threshold); + + //Min_sphere sph1(off_reader.get_point_cloud()[0], off_reader.get_point_cloud()[1], off_reader.get_point_cloud()[2]); + // Construct the Rips complex in a Simplex Tree + Simplex_tree st; + // insert the proximity graph in the simplex tree + st.insert_graph(prox_graph); + // expand the graph until dimension dim_max + st.expansion_with_blockers(dim_max, Cech_blocker(st, threshold, off_reader.get_point_cloud())); + + std::cout << "The complex contains " << st.num_simplices() << " simplices \n"; + std::cout << " and has dimension " << st.dimension() << " \n"; + + // Sort the simplices in the order of the filtration + st.initialize_filtration(); + +#if DEBUG_TRACES + std::cout << "********************************************************************\n"; + // Display the Simplex_tree - Can not be done in the middle of 2 inserts + std::cout << "* The complex contains " << st.num_simplices() << " simplices - dimension=" << st.dimension() << "\n"; + std::cout << "* Iterator on Simplices in the filtration, with [filtration value]:\n"; + for (auto f_simplex : st.filtration_simplex_range()) { + std::cout << " " << "[" << st.filtration(f_simplex) << "] "; + for (auto vertex : st.simplex_vertex_range(f_simplex)) { + std::cout << static_cast(vertex) << " "; + } + std::cout << std::endl; + } +#endif // DEBUG_TRACES + return 0; +} + +void program_options(int argc, char * argv[] + , std::string & off_file_points + , Filtration_value & threshold + , int & dim_max) { + namespace po = boost::program_options; + po::options_description hidden("Hidden options"); + hidden.add_options() + ("input-file", po::value(&off_file_points), + "Name of an OFF file containing a 3d point set.\n"); + + po::options_description visible("Allowed options", 100); + visible.add_options() + ("help,h", "produce help message") + ("max-edge-length,r", + po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "Maximal length of an edge for the Cech complex construction.") + ("cpx-dimension,d", po::value(&dim_max)->default_value(1), + "Maximal dimension of the Cech complex we want to compute."); + + po::positional_options_description pos; + pos.add("input-file", 1); + + po::options_description all; + all.add(visible).add(hidden); + + po::variables_map vm; + po::store(po::command_line_parser(argc, argv). + options(all).positional(pos).run(), vm); + po::notify(vm); + + if (vm.count("help") || !vm.count("input-file")) { + std::cout << std::endl; + std::cout << "Construct a Cech complex defined on a set of input points.\n \n"; + + std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; + std::cout << visible << std::endl; + std::abort(); + } +} + +/** Output the proximity graph of the points. + * + * If points contains n elements, the proximity graph is the graph + * with n vertices, and an edge [u,v] iff the distance function between + * points u and v is smaller than threshold. + * + * The type PointCloud furnishes .begin() and .end() methods, that return + * iterators with value_type Point. + */ +template< typename InputPointRange> +Graph_t compute_proximity_graph(InputPointRange &points, Filtration_value threshold) { + std::vector< Edge_t > edges; + std::vector< Filtration_value > edges_fil; + + Kernel k; + Vertex_handle idx_u, idx_v; + Filtration_value fil; + idx_u = 0; + for (auto it_u = points.begin(); it_u != points.end(); ++it_u) { + idx_v = idx_u + 1; + for (auto it_v = it_u + 1; it_v != points.end(); ++it_v, ++idx_v) { + fil = k.squared_distance_d_object()(*it_u, *it_v); + // For Cech Complex, threshold is a radius (distance /2) + fil = std::sqrt(fil) / 2.; + if (fil <= threshold) { + edges.emplace_back(idx_u, idx_v); + edges_fil.push_back(fil); + } + } + ++idx_u; + } + + Graph_t skel_graph(edges.begin() + , edges.end() + , edges_fil.begin() + , idx_u); // number of points labeled from 0 to idx_u-1 + + auto vertex_prop = boost::get(Gudhi::vertex_filtration_t(), skel_graph); + + boost::graph_traits::vertex_iterator vi, vi_end; + for (std::tie(vi, vi_end) = boost::vertices(skel_graph); + vi != vi_end; ++vi) { + boost::put(vertex_prop, *vi, 0.); + } + + return skel_graph; +} diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 7da767cb..5d8a90ee 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -1145,7 +1145,7 @@ class Simplex_tree { Siblings * new_sib = new Siblings(siblings, // oncles simplex->first, // parent boost::adaptors::reverse(intersection)); // boost::container::ordered_unique_range_t - std::vector blocked_new_sib_list; + std::vector blocked_new_sib_vertex_list; // As all intersections are inserted, we can call the blocker function on all new_sib members for (auto new_sib_member = new_sib->members().begin(); new_sib_member != new_sib->members().end(); @@ -1153,17 +1153,19 @@ class Simplex_tree { bool blocker_result = block_simplex(new_sib_member); // new_sib member has been blocked by the blocker function // add it to the list to be removed - do not perform it while looping on it - if (blocker_result) - blocked_new_sib_list.push_back(new_sib_member); + if (blocker_result) { + blocked_new_sib_vertex_list.push_back(new_sib_member->first); + } } - bool removed = false; - for (auto& blocked_new_sib_member : blocked_new_sib_list){ - removed = removed || remove_maximal_simplex(blocked_new_sib_member); - } - if (removed) { + if (blocked_new_sib_vertex_list.size() == new_sib->members().size()) { + // Specific case where all have to be deleted + delete new_sib; // ensure the children property simplex->second.assign_children(siblings); } else { + for (auto& blocked_new_sib_member : blocked_new_sib_vertex_list) { + new_sib->members().erase(blocked_new_sib_member); + } // ensure recursive call simplex->second.assign_children(new_sib); siblings_expansion_with_blockers(new_sib, max_dim, k - 1, block_simplex); @@ -1338,16 +1340,14 @@ class Simplex_tree { public: /** \brief Remove a maximal simplex. * @param[in] sh Simplex handle on the maximal simplex to remove. - * @return a boolean value that is an implementation detail, and that the user is supposed to ignore * \pre Please check the simplex has no coface before removing it. * \exception std::invalid_argument In debug mode, if sh has children. - * \post Be aware that removing is shifting data in a flat_map (`initialize_filtration()` to be done). + * \post Be aware that removing is shifting data in a flat_map (initialize_filtration to be done). * \post Note that the dimension of the simplicial complex may be lower after calling `remove_maximal_simplex()` * than it was before. However, `upper_bound_dimension()` will return the old value, which remains a valid upper * bound. If you care, you can call `dimension()` to recompute the exact dimension. - * \internal @return true if the leaf's branch has no other leaves (branch's children has been re-assigned), false otherwise. */ - bool remove_maximal_simplex(Simplex_handle sh) { + void remove_maximal_simplex(Simplex_handle sh) { // Guarantee the simplex has no children GUDHI_CHECK(!has_children(sh), std::invalid_argument("Simplex_tree::remove_maximal_simplex - argument has children")); @@ -1365,9 +1365,7 @@ class Simplex_tree { delete child; // dimension may need to be lowered dimension_to_be_lowered_ = true; - return true; } - return false; } private: diff --git a/src/common/include/gudhi/graph_simplicial_complex.h b/src/common/include/gudhi/graph_simplicial_complex.h index 5fe7c826..d84421b2 100644 --- a/src/common/include/gudhi/graph_simplicial_complex.h +++ b/src/common/include/gudhi/graph_simplicial_complex.h @@ -28,6 +28,9 @@ #include // for pair<> #include #include +#include // for std::tie + +namespace Gudhi { /* Edge tag for Boost PropertyGraph. */ struct edge_filtration_t { @@ -39,4 +42,64 @@ struct vertex_filtration_t { typedef boost::vertex_property_tag kind; }; +template +using Proximity_graph = typename boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS +, boost::property < vertex_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value > +, boost::property < edge_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value >>; + +/** \brief Computes the proximity graph of the points. + * + * If points contains n elements, the proximity graph is the graph with n vertices, and an edge [u,v] iff the + * distance function between points u and v is smaller than threshold. + * + * \tparam ForwardPointRange furnishes `.begin()` and `.end()` methods. + * + * \tparam Distance furnishes `operator()(const Point& p1, const Point& p2)`, where + * `Point` is a point from the `ForwardPointRange`, and that returns a `Filtration_value`. + */ +template< typename SimplicialComplexForProximityGraph + , typename ForwardPointRange + , typename Distance > +Proximity_graph compute_proximity_graph( + const ForwardPointRange& points, + typename SimplicialComplexForProximityGraph::Filtration_value threshold, + Distance distance) { + using Vertex_handle = typename SimplicialComplexForProximityGraph::Vertex_handle; + using Filtration_value = typename SimplicialComplexForProximityGraph::Filtration_value; + + std::vector> edges; + std::vector< Filtration_value > edges_fil; + std::map< Vertex_handle, Filtration_value > vertices; + + Vertex_handle idx_u, idx_v; + Filtration_value fil; + idx_u = 0; + for (auto it_u = points.begin(); it_u != points.end(); ++it_u) { + idx_v = idx_u + 1; + for (auto it_v = it_u + 1; it_v != points.end(); ++it_v, ++idx_v) { + fil = distance(*it_u, *it_v); + if (fil <= threshold) { + edges.emplace_back(idx_u, idx_v); + edges_fil.push_back(fil); + } + } + ++idx_u; + } + + // Points are labeled from 0 to idx_u-1 + Proximity_graph skel_graph(edges.begin(), edges.end(), edges_fil.begin(), idx_u); + + auto vertex_prop = boost::get(vertex_filtration_t(), skel_graph); + + typename boost::graph_traits>::vertex_iterator vi, vi_end; + for (std::tie(vi, vi_end) = boost::vertices(skel_graph); + vi != vi_end; ++vi) { + boost::put(vertex_prop, *vi, 0.); + } + + return skel_graph; +} + +} // namespace Gudhi + #endif // GRAPH_SIMPLICIAL_COMPLEX_H_ -- cgit v1.2.3 From def50bba711e9c2a3be86b4944845b0009fe29a2 Mon Sep 17 00:00:00 2001 From: cjamin Date: Wed, 22 Nov 2017 15:48:17 +0000 Subject: Fix typo git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2940 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: b888519a9985ae84fcf5788eab66fc5b574936f8 --- src/common/doc/file_formats.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h index 3b3d9248..069b19d1 100644 --- a/src/common/doc/file_formats.h +++ b/src/common/doc/file_formats.h @@ -57,10 +57,10 @@ namespace Gudhi { \section FileFormatsIsoCuboid Iso-cuboid - Such a file describes an iso-oriented cuboid with diagonal opposite vertices (min_hx, min_hy, min_hz,...) and (max_hx, max_hy, max_hz, ...). The format is:
+ Such a file describes an iso-oriented cuboid with diagonal opposite vertices (min_x, min_y, min_z,...) and (max_x, max_y, max_z, ...). The format is:
\verbatim - min_hx min_hy [min_hz ...] - max_hx max_hy [max_hz ...] + min_x min_y [min_z ...] + max_x max_y [max_z ...] \endverbatim Here is a simple sample file in the 3D case: -- cgit v1.2.3 From 05224407e92eaf623a980adf5f578b72c64647cb Mon Sep 17 00:00:00 2001 From: cjamin Date: Wed, 22 Nov 2017 16:31:18 +0000 Subject: Rename some utilities + some fix in the doc git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2942 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e7fe4af0f7d54ed580e557fe7ff9bc57ced2baa9 --- .../utilities/Bitmap_cubical_complex.cpp | 80 --------------------- ...ubical_complex_periodic_boundary_conditions.cpp | 82 ---------------------- .../utilities/CMakeLists.txt | 20 +++--- src/Bitmap_cubical_complex/utilities/README | 22 +++--- .../utilities/cubical_complex_persistence.cpp | 80 +++++++++++++++++++++ .../periodic_cubical_complex_persistence.cpp | 82 ++++++++++++++++++++++ src/Bottleneck_distance/utilities/CMakeLists.txt | 8 +-- .../utilities/bottleneck_distance.cpp | 50 +++++++++++++ .../utilities/bottleneck_read_file.cpp | 50 ------------- src/common/doc/main_page.h | 12 ++-- 10 files changed, 240 insertions(+), 246 deletions(-) delete mode 100644 src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex.cpp delete mode 100644 src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex_periodic_boundary_conditions.cpp create mode 100644 src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp create mode 100644 src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp create mode 100644 src/Bottleneck_distance/utilities/bottleneck_distance.cpp delete mode 100644 src/Bottleneck_distance/utilities/bottleneck_read_file.cpp (limited to 'src/common') diff --git a/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex.cpp b/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex.cpp deleted file mode 100644 index 9d1bc08c..00000000 --- a/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Pawel Dlotko - * - * Copyright (C) 2015 INRIA Saclay (France) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include - -// standard stuff -#include -#include -#include -#include - -int main(int argc, char** argv) { - std::cout - << "This program computes persistent homology, by using bitmap_cubical_complex class, of cubical " - << "complexes provided in text files in Perseus style (the only numbered in the first line is a dimension D of a" - << "bitmap. In the lines I between 2 and D+1 there are numbers of top dimensional cells in the direction I. Let " - << "N denote product of the numbers in the lines between 2 and D. In the lines D+2 to D+2+N there are " - << "filtrations of top dimensional cells. We assume that the cells are in the lexicographical order. See " - << "CubicalOneSphere.txt or CubicalTwoSphere.txt for example.\n" - << std::endl; - - if (argc != 2) { - std::cerr << "Wrong number of parameters. Please provide the name of a file with a Perseus style bitmap at " - << "the input. The program will now terminate.\n"; - return 1; - } - - typedef Gudhi::cubical_complex::Bitmap_cubical_complex_base Bitmap_cubical_complex_base; - typedef Gudhi::cubical_complex::Bitmap_cubical_complex Bitmap_cubical_complex; - typedef Gudhi::persistent_cohomology::Field_Zp Field_Zp; - typedef Gudhi::persistent_cohomology::Persistent_cohomology Persistent_cohomology; - - Bitmap_cubical_complex b(argv[1]); - - // Compute the persistence diagram of the complex - Persistent_cohomology pcoh(b); - int p = 11; - double min_persistence = 0; - - pcoh.init_coefficients(p); // initializes the coefficient field for homology - pcoh.compute_persistent_cohomology(min_persistence); - - std::string output_file_name(argv[1]); - output_file_name += "_persistence"; - - std::size_t last_in_path = output_file_name.find_last_of("/\\"); - - if (last_in_path != std::string::npos) { - output_file_name = output_file_name.substr(last_in_path + 1); - } - - std::ofstream out(output_file_name.c_str()); - pcoh.output_diagram(out); - out.close(); - - std::cout << "Result in file: " << output_file_name << "\n"; - - return 0; -} diff --git a/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex_periodic_boundary_conditions.cpp b/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex_periodic_boundary_conditions.cpp deleted file mode 100644 index c812cb3a..00000000 --- a/src/Bitmap_cubical_complex/utilities/Bitmap_cubical_complex_periodic_boundary_conditions.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Pawel Dlotko - * - * Copyright (C) 2015 INRIA Saclay (France) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include - -// standard stuff -#include -#include -#include -#include - -int main(int argc, char** argv) { - std::cout - << "This program computes persistent homology, by using " - << "Bitmap_cubical_complex_periodic_boundary_conditions class, of cubical complexes provided in text files in " - << "Perseus style (the only numbered in the first line is a dimension D of a bitmap. In the lines I between 2 " - << "and D+1 there are numbers of top dimensional cells in the direction I. Let N denote product of the numbers " - << "in the lines between 2 and D. In the lines D+2 to D+2+N there are filtrations of top dimensional cells. We " - << "assume that the cells are in the lexicographical order. See CubicalOneSphere.txt or CubicalTwoSphere.txt for" - << " example.\n" - << std::endl; - - if (argc != 2) { - std::cerr << "Wrong number of parameters. Please provide the name of a file with a Perseus style bitmap at " - << "the input. The program will now terminate.\n"; - return 1; - } - - typedef Gudhi::cubical_complex::Bitmap_cubical_complex_periodic_boundary_conditions_base Bitmap_base; - typedef Gudhi::cubical_complex::Bitmap_cubical_complex Bitmap_cubical_complex; - - Bitmap_cubical_complex b(argv[1]); - - typedef Gudhi::persistent_cohomology::Field_Zp Field_Zp; - typedef Gudhi::persistent_cohomology::Persistent_cohomology Persistent_cohomology; - // Compute the persistence diagram of the complex - Persistent_cohomology pcoh(b, true); - - int p = 11; - double min_persistence = 0; - pcoh.init_coefficients(p); // initializes the coefficient field for homology - pcoh.compute_persistent_cohomology(min_persistence); - - std::string output_file_name(argv[1]); - output_file_name += "_persistence"; - - std::size_t last_in_path = output_file_name.find_last_of("/\\"); - - if (last_in_path != std::string::npos) { - output_file_name = output_file_name.substr(last_in_path + 1); - } - - std::ofstream out(output_file_name.c_str()); - pcoh.output_diagram(out); - out.close(); - - std::cout << "Result in file: " << output_file_name << "\n"; - - return 0; -} diff --git a/src/Bitmap_cubical_complex/utilities/CMakeLists.txt b/src/Bitmap_cubical_complex/utilities/CMakeLists.txt index f0f80059..676a730a 100644 --- a/src/Bitmap_cubical_complex/utilities/CMakeLists.txt +++ b/src/Bitmap_cubical_complex/utilities/CMakeLists.txt @@ -1,29 +1,29 @@ cmake_minimum_required(VERSION 2.6) project(Bitmap_cubical_complex_utilities) -add_executable ( Bitmap_cubical_complex Bitmap_cubical_complex.cpp ) +add_executable ( cubical_complex_persistence cubical_complex_persistence.cpp ) if (TBB_FOUND) - target_link_libraries(Bitmap_cubical_complex ${TBB_LIBRARIES}) + target_link_libraries(cubical_complex_persistence ${TBB_LIBRARIES}) endif() -add_test(NAME Bitmap_cubical_complex_utility_persistence_one_sphere COMMAND $ +add_test(NAME Bitmap_cubical_complex_utility_persistence_one_sphere COMMAND $ "${CMAKE_SOURCE_DIR}/data/bitmap/CubicalOneSphere.txt") -add_test(NAME Bitmap_cubical_complex_utility_persistence_two_sphere COMMAND $ +add_test(NAME Bitmap_cubical_complex_utility_persistence_two_sphere COMMAND $ "${CMAKE_SOURCE_DIR}/data/bitmap/CubicalTwoSphere.txt") -add_executable ( Bitmap_cubical_complex_periodic_boundary_conditions Bitmap_cubical_complex_periodic_boundary_conditions.cpp ) +add_executable ( periodic_cubical_complex_persistence periodic_cubical_complex_persistence.cpp ) if (TBB_FOUND) - target_link_libraries(Bitmap_cubical_complex_periodic_boundary_conditions ${TBB_LIBRARIES}) + target_link_libraries(periodic_cubical_complex_persistence ${TBB_LIBRARIES}) endif() add_test(NAME Bitmap_cubical_complex_utility_periodic_boundary_conditions_2d_torus - COMMAND $ + COMMAND $ "${CMAKE_SOURCE_DIR}/data/bitmap/2d_torus.txt") add_test(NAME Bitmap_cubical_complex_utility_periodic_boundary_conditions_3d_torus - COMMAND $ + COMMAND $ "${CMAKE_SOURCE_DIR}/data/bitmap/3d_torus.txt") -install(TARGETS Bitmap_cubical_complex DESTINATION bin) -install(TARGETS Bitmap_cubical_complex_periodic_boundary_conditions DESTINATION bin) +install(TARGETS cubical_complex_persistence DESTINATION bin) +install(TARGETS periodic_cubical_complex_persistence DESTINATION bin) diff --git a/src/Bitmap_cubical_complex/utilities/README b/src/Bitmap_cubical_complex/utilities/README index d9085635..e7c10083 100644 --- a/src/Bitmap_cubical_complex/utilities/README +++ b/src/Bitmap_cubical_complex/utilities/README @@ -1,24 +1,18 @@ # Bitmap_cubical_complex # -## `Bitmap_cubical_complex` ## +## `cubical_complex_persistence` ## This program computes persistent homology, by using the Bitmap_cubical_complex class, of cubical complexes provided in text files in Perseus style. The only number in the first line is a dimension D of a bitmap. In the lines I between 2 and D+1 there are numbers of top dimensional cells in the direction I. Let N denote product of the numbers in the lines between 2 and D. In the lines D+2 to D+2+N there are filtrations of top dimensional cells. We assume that the cells are in the lexicographical order. -Examples: +Example: -* Create a Cubical Complex from the Perseus style file CubicalOneSphere.txt, computes Persistence cohomology from it and writes the results in a persistence file: -`Bitmap_cubical_complex data/bitmap/CubicalOneSphere.txt` +* Create a Cubical Complex from the Perseus style file `CubicalTwoSphere.txt`, computes Persistence cohomology from it and writes the results in a persistence file `CubicalTwoSphere.txt_persistence`: +`cubical_complex_persistence data/bitmap/CubicalTwoSphere.txt` -* Create a Cubical Complex from the Perseus style file CubicalTwoSphere.txt, computes Persistence cohomology from it and writes the results in a persistence file: -`Bitmap_cubical_complex data/bitmap/CubicalTwoSphere.txt` - -## `Bitmap_cubical_complex_periodic_boundary_conditions` ## +## `periodic_cubical_complex_persistence` ## Same as above, but with periodic boundary conditions. -Examples: - -* Create a Periodical Cubical Complex from the Perseus style file 2d_torus.txt, computes Persistence cohomology from it and writes the results in a persistence file: -`Bitmap_cubical_complex_periodic_boundary_conditions.exe data/bitmap/2d_torus.txt` +Example: -* Create a Periodical Cubical Complex from the Perseus style file 3d_torus.txt, computes Persistence cohomology from it and writes the results in a persistence file: -`Bitmap_cubical_complex_periodic_boundary_conditions.exe data/bitmap/3d_torus.txt` +* Create a Periodical Cubical Complex from the Perseus style file `3d_torus.txt`, computes Persistence cohomology from it and writes the results in a persistence file `3d_torus.txt_persistence`: +`periodic_cubical_complex_persistence data/bitmap/3d_torus.txt` diff --git a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp new file mode 100644 index 00000000..9d1bc08c --- /dev/null +++ b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp @@ -0,0 +1,80 @@ +/* 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 Saclay (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include +#include + +// standard stuff +#include +#include +#include +#include + +int main(int argc, char** argv) { + std::cout + << "This program computes persistent homology, by using bitmap_cubical_complex class, of cubical " + << "complexes provided in text files in Perseus style (the only numbered in the first line is a dimension D of a" + << "bitmap. In the lines I between 2 and D+1 there are numbers of top dimensional cells in the direction I. Let " + << "N denote product of the numbers in the lines between 2 and D. In the lines D+2 to D+2+N there are " + << "filtrations of top dimensional cells. We assume that the cells are in the lexicographical order. See " + << "CubicalOneSphere.txt or CubicalTwoSphere.txt for example.\n" + << std::endl; + + if (argc != 2) { + std::cerr << "Wrong number of parameters. Please provide the name of a file with a Perseus style bitmap at " + << "the input. The program will now terminate.\n"; + return 1; + } + + typedef Gudhi::cubical_complex::Bitmap_cubical_complex_base Bitmap_cubical_complex_base; + typedef Gudhi::cubical_complex::Bitmap_cubical_complex Bitmap_cubical_complex; + typedef Gudhi::persistent_cohomology::Field_Zp Field_Zp; + typedef Gudhi::persistent_cohomology::Persistent_cohomology Persistent_cohomology; + + Bitmap_cubical_complex b(argv[1]); + + // Compute the persistence diagram of the complex + Persistent_cohomology pcoh(b); + int p = 11; + double min_persistence = 0; + + pcoh.init_coefficients(p); // initializes the coefficient field for homology + pcoh.compute_persistent_cohomology(min_persistence); + + std::string output_file_name(argv[1]); + output_file_name += "_persistence"; + + std::size_t last_in_path = output_file_name.find_last_of("/\\"); + + if (last_in_path != std::string::npos) { + output_file_name = output_file_name.substr(last_in_path + 1); + } + + std::ofstream out(output_file_name.c_str()); + pcoh.output_diagram(out); + out.close(); + + std::cout << "Result in file: " << output_file_name << "\n"; + + return 0; +} diff --git a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp new file mode 100644 index 00000000..c812cb3a --- /dev/null +++ b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp @@ -0,0 +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 Saclay (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +// standard stuff +#include +#include +#include +#include + +int main(int argc, char** argv) { + std::cout + << "This program computes persistent homology, by using " + << "Bitmap_cubical_complex_periodic_boundary_conditions class, of cubical complexes provided in text files in " + << "Perseus style (the only numbered in the first line is a dimension D of a bitmap. In the lines I between 2 " + << "and D+1 there are numbers of top dimensional cells in the direction I. Let N denote product of the numbers " + << "in the lines between 2 and D. In the lines D+2 to D+2+N there are filtrations of top dimensional cells. We " + << "assume that the cells are in the lexicographical order. See CubicalOneSphere.txt or CubicalTwoSphere.txt for" + << " example.\n" + << std::endl; + + if (argc != 2) { + std::cerr << "Wrong number of parameters. Please provide the name of a file with a Perseus style bitmap at " + << "the input. The program will now terminate.\n"; + return 1; + } + + typedef Gudhi::cubical_complex::Bitmap_cubical_complex_periodic_boundary_conditions_base Bitmap_base; + typedef Gudhi::cubical_complex::Bitmap_cubical_complex Bitmap_cubical_complex; + + Bitmap_cubical_complex b(argv[1]); + + typedef Gudhi::persistent_cohomology::Field_Zp Field_Zp; + typedef Gudhi::persistent_cohomology::Persistent_cohomology Persistent_cohomology; + // Compute the persistence diagram of the complex + Persistent_cohomology pcoh(b, true); + + int p = 11; + double min_persistence = 0; + pcoh.init_coefficients(p); // initializes the coefficient field for homology + pcoh.compute_persistent_cohomology(min_persistence); + + std::string output_file_name(argv[1]); + output_file_name += "_persistence"; + + std::size_t last_in_path = output_file_name.find_last_of("/\\"); + + if (last_in_path != std::string::npos) { + output_file_name = output_file_name.substr(last_in_path + 1); + } + + std::ofstream out(output_file_name.c_str()); + pcoh.output_diagram(out); + out.close(); + + std::cout << "Result in file: " << output_file_name << "\n"; + + return 0; +} diff --git a/src/Bottleneck_distance/utilities/CMakeLists.txt b/src/Bottleneck_distance/utilities/CMakeLists.txt index 063b6ae3..d19e3b1c 100644 --- a/src/Bottleneck_distance/utilities/CMakeLists.txt +++ b/src/Bottleneck_distance/utilities/CMakeLists.txt @@ -2,15 +2,15 @@ cmake_minimum_required(VERSION 2.6) project(Bottleneck_distance_utilities) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) - add_executable (bottleneck_read_file bottleneck_read_file.cpp) + add_executable (bottleneck_distance bottleneck_distance.cpp) if (TBB_FOUND) - target_link_libraries(bottleneck_read_file ${TBB_LIBRARIES}) + target_link_libraries(bottleneck_distance ${TBB_LIBRARIES}) endif(TBB_FOUND) add_test(NAME Bottleneck_distance_utilities_Bottleneck_read_file - COMMAND $ + COMMAND $ "${CMAKE_SOURCE_DIR}/data/persistence_diagram/first.pers" "${CMAKE_SOURCE_DIR}/data/persistence_diagram/second.pers") - install(TARGETS bottleneck_read_file DESTINATION bin) + install(TARGETS bottleneck_distance DESTINATION bin) endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/Bottleneck_distance/utilities/bottleneck_distance.cpp b/src/Bottleneck_distance/utilities/bottleneck_distance.cpp new file mode 100644 index 00000000..9dd52b31 --- /dev/null +++ b/src/Bottleneck_distance/utilities/bottleneck_distance.cpp @@ -0,0 +1,50 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Authors: Francois Godi, small modifications by Pawel Dlotko + * + * 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 . + */ + +#include +#include +#include +#include +#include // for pair +#include +#include // for numeric_limits + +int main(int argc, char** argv) { + if (argc < 3) { + std::cout << "To run this program please provide as an input two files with persistence diagrams. Each file" << + " should contain a birth-death pair per line. Third, optional parameter is an error bound on the bottleneck" << + " distance (set by default to the smallest positive double value). If you set the error bound to 0, be" << + " aware this version is exact but expensive. The program will now terminate \n"; + return -1; + } + std::vector> diag1 = Gudhi::read_persistence_intervals_in_dimension(argv[1]); + std::vector> diag2 = Gudhi::read_persistence_intervals_in_dimension(argv[2]); + + double tolerance = std::numeric_limits::min(); + if (argc == 4) { + tolerance = atof(argv[3]); + } + double b = Gudhi::persistence_diagram::bottleneck_distance(diag1, diag2, tolerance); + std::cout << "The distance between the diagrams is : " << b << ". The tolerance is : " << tolerance << std::endl; + + return 0; +} diff --git a/src/Bottleneck_distance/utilities/bottleneck_read_file.cpp b/src/Bottleneck_distance/utilities/bottleneck_read_file.cpp deleted file mode 100644 index 9dd52b31..00000000 --- a/src/Bottleneck_distance/utilities/bottleneck_read_file.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Authors: Francois Godi, small modifications by Pawel Dlotko - * - * 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 . - */ - -#include -#include -#include -#include -#include // for pair -#include -#include // for numeric_limits - -int main(int argc, char** argv) { - if (argc < 3) { - std::cout << "To run this program please provide as an input two files with persistence diagrams. Each file" << - " should contain a birth-death pair per line. Third, optional parameter is an error bound on the bottleneck" << - " distance (set by default to the smallest positive double value). If you set the error bound to 0, be" << - " aware this version is exact but expensive. The program will now terminate \n"; - return -1; - } - std::vector> diag1 = Gudhi::read_persistence_intervals_in_dimension(argv[1]); - std::vector> diag2 = Gudhi::read_persistence_intervals_in_dimension(argv[2]); - - double tolerance = std::numeric_limits::min(); - if (argc == 4) { - tolerance = atof(argv[3]); - } - double b = Gudhi::persistence_diagram::bottleneck_distance(diag1, diag2, tolerance); - std::cout << "The distance between the diagrams is : " << b << ". The tolerance is : " << tolerance << std::endl; - - return 0; -} diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 34d3893d..72ef191d 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -328,7 +328,7 @@ make doxygen * \li * Bottleneck_distance/bottleneck_basic_example.cpp * \li - * Bottleneck_distance/bottleneck_read_file.cpp + * Bottleneck_distance/bottleneck_distance.cpp * \li * Spatial_searching/example_spatial_searching.cpp * \li @@ -411,9 +411,9 @@ make doxygen * \li * Alpha_complex/weighted_alpha_complex_3d_persistence.cpp * \li - * Bitmap_cubical_complex/Bitmap_cubical_complex.cpp + * Bitmap_cubical_complex/cubical_complex_persistence.cpp * \li - * Bitmap_cubical_complex/Bitmap_cubical_complex_periodic_boundary_conditions.cpp + * Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp * \li * Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp * \li @@ -491,9 +491,9 @@ make doxygen * @example Alpha_complex/weighted_alpha_complex_3d_persistence.cpp * @example Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp * @example Bottleneck_distance/bottleneck_basic_example.cpp - * @example Bottleneck_distance/bottleneck_read_file.cpp - * @example Bitmap_cubical_complex/Bitmap_cubical_complex.cpp - * @example Bitmap_cubical_complex/Bitmap_cubical_complex_periodic_boundary_conditions.cpp + * @example Bottleneck_distance/bottleneck_distance.cpp + * @example Bitmap_cubical_complex/cubical_complex_persistence.cpp + * @example Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp * @example Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp * @example common/example_CGAL_3D_points_off_reader.cpp * @example common/example_CGAL_points_off_reader.cpp -- cgit v1.2.3 From f1691997a3f6eceab45256ce4a94a9aa64d92471 Mon Sep 17 00:00:00 2001 From: cjamin Date: Fri, 24 Nov 2017 08:10:28 +0000 Subject: Move Perseus file format to file_formats.h git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2949 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e2f0dcf1efdc3c26ff609b7a14d37a604a9c162f --- .../doc/Gudhi_Cubical_Complex_doc.h | 49 ++-------------------- src/common/doc/file_formats.h | 49 ++++++++++++++++++++++ 2 files changed, 53 insertions(+), 45 deletions(-) (limited to 'src/common') 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 daba15a4..56b62e92 100644 --- a/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h +++ b/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h @@ -91,31 +91,8 @@ namespace cubical_complex { * filtration to all cubes. There are a number of constructors that can be used to construct cubical complex by users * who want to use the code directly. They can be found in the \a Bitmap_cubical_complex class. * Currently one input from a text file is used. It uses a format used already in Perseus software - * (http://www.sas.upenn.edu/~vnanda/perseus/) by Vidit Nanda. - * Below we are providing a description of the format. The first line contains a number d begin the dimension of the - * bitmap (2 in the example below). Next d lines are the numbers of top dimensional cubes in each dimensions (3 and 3 - * in the example below). Next, in lexicographical order, the filtration of top dimensional cubes is given (1 4 6 8 - * 20 4 7 6 5 in the example below). - * - * - * \image html "exampleBitmap.png" "Example of a input data." - * - * The input file for the following complex is: - * \verbatim -2 -3 -3 -1 -4 -6 -8 -20 -4 -7 -6 -5 -\endverbatim - + * (http://www.sas.upenn.edu/~vnanda/perseus/) by Vidit Nanda. The file format is described here: \ref FileFormatsPerseus. + * * \section PeriodicBoundaryConditions Periodic boundary conditions * Often one would like to impose periodic boundary conditions to the cubical complex. Let \f$ I_1\times ... \times * I_n \f$ be a box that is decomposed with a cubical complex \f$ \mathcal{K} \f$. Imposing periodic boundary @@ -123,26 +100,8 @@ namespace cubical_complex { * considered the same. In particular, if for a bitmap \f$ \mathcal{K} \f$ periodic boundary conditions are imposed * in all directions, then complex \f$ \mathcal{K} \f$ became n-dimensional torus. One can use various constructors * from the file Bitmap_cubical_complex_periodic_boundary_conditions_base.h to construct cubical complex with periodic - * boundary conditions. One can also use Perseus style input files. To indicate periodic boundary conditions in a - * given direction, then number of top dimensional cells in this direction have to be multiplied by -1. For instance: - - *\verbatim -2 --3 -3 -1 -4 -6 -8 -20 -4 -7 -6 -5 -\endverbatim - - * Indicate that we have imposed periodic boundary conditions in the direction x, but not in the direction y. - + * boundary conditions. One can also use Perseus style input files (see \ref FileFormatsPerseus). + * * \section BitmapExamples Examples * End user programs are available in example/Bitmap_cubical_complex and utilities/Bitmap_cubical_complex folders. * diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h index 069b19d1..d06b81f5 100644 --- a/src/common/doc/file_formats.h +++ b/src/common/doc/file_formats.h @@ -68,6 +68,55 @@ namespace Gudhi { -1. -1. -1. 1. 1. 1. \endverbatim + + + \section FileFormatsPerseus Perseus + + This file format is the format used by the Perseus software + (http://www.sas.upenn.edu/~vnanda/perseus/) by Vidit Nanda. + The first line contains a number d begin the dimension of the + bitmap (2 in the example below). Next d lines are the numbers of top dimensional cubes in each dimensions (3 and 3 + in the example below). Next, in lexicographical order, the filtration of top dimensional cubes is given (1 4 6 8 + 20 4 7 6 5 in the example below). + + \image html "exampleBitmap.png" "Example of a input data." + + The input file for the following complex is: + \verbatim + 2 + 3 + 3 + 1 + 4 + 6 + 8 + 20 + 4 + 7 + 6 + 5 + \endverbatim + + To indicate periodic boundary conditions in a + given direction, then number of top dimensional cells in this direction have to be multiplied by -1. For instance: + + \verbatim + 2 + -3 + 3 + 1 + 4 + 6 + 8 + 20 + 4 + 7 + 6 + 5 + \endverbatim + + Indicate that we have imposed periodic boundary conditions in the direction x, but not in the direction y. + */ } // namespace Gudhi -- cgit v1.2.3 From 4cf2e2232a2046590909d78c887a2b96a2af8177 Mon Sep 17 00:00:00 2001 From: glisse Date: Sat, 2 Dec 2017 13:34:29 +0000 Subject: Cleanup checks in Simplex_tree Rewrite GUDHi_CHECK so we don't get nasty surprises with: if(cond) GUDHI_CHECK(...) else ... where the else would have been matched with the if in GUDHI_CHECK. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST-glisse@3010 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a1385540710d0079567b7e4566766bd0da53c584 --- src/Simplex_tree/include/gudhi/Simplex_tree.h | 7 ++++--- src/common/include/gudhi/Debug_utils.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index cb6ab309..81dff00d 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -106,8 +106,9 @@ class Simplex_tree { }; struct Key_simplex_base_dummy { Key_simplex_base_dummy() {} - void assign_key(Simplex_key) { } - Simplex_key key() const { assert(false); return -1; } + // Undefined so it will not link + void assign_key(Simplex_key); + Simplex_key key() const; }; typedef typename std::conditional::type Key_simplex_base; @@ -121,7 +122,7 @@ class Simplex_tree { }; struct Filtration_simplex_base_dummy { Filtration_simplex_base_dummy() {} - void assign_filtration(Filtration_value f) { assert(f == 0); } + void assign_filtration(Filtration_value GUDHI_CHECK_code(f)) { GUDHI_CHECK(f == 0, "filtration value specified for a complex that does not store them"); } Filtration_value filtration() const { return 0; } }; typedef typename std::conditional Date: Fri, 8 Dec 2017 11:07:09 +0000 Subject: File formats for iso cuboid and perseus in the Python version git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3057 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 6eb0a025d8549320e03727ce491563b2a941c82d --- src/common/doc/file_formats.h | 2 ++ src/cython/doc/cubical_complex_user.rst | 45 ++++++++++++--------------- src/cython/doc/fileformats.rst | 55 ++++++++++++++++++++++++++++++++- 3 files changed, 76 insertions(+), 26 deletions(-) (limited to 'src/common') diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h index d06b81f5..c60ed15a 100644 --- a/src/common/doc/file_formats.h +++ b/src/common/doc/file_formats.h @@ -117,6 +117,8 @@ namespace Gudhi { Indicate that we have imposed periodic boundary conditions in the direction x, but not in the direction y. + Other sample files can be found in the `data/bitmap` folder. + */ } // namespace Gudhi diff --git a/src/cython/doc/cubical_complex_user.rst b/src/cython/doc/cubical_complex_user.rst index 2bfac62a..34598f02 100644 --- a/src/cython/doc/cubical_complex_user.rst +++ b/src/cython/doc/cubical_complex_user.rst @@ -81,23 +81,7 @@ filtration to all cubes. There are a number of constructors that can be used to who want to use the code directly. They can be found in the :doc:`cubical_complex_ref`. Currently one input from a text file is used. It uses a format used already in `Perseus software `_ by Vidit Nanda. -Below we are providing a description of the format. The first line contains a number d begin the dimension of the -bitmap (2 in the example below). Next d lines are the numbers of top dimensional cubes in each dimensions (3 and 3 -in the example below). Next, in lexicographical order, the filtration of top dimensional cubes is given (1 4 6 8 -20 4 7 6 5 in the example below). - -.. figure:: - ../../doc/Bitmap_cubical_complex/exampleBitmap.png - :alt: Example of a input data. - :figclass: align-center - - Example of a input data. - -The input file for the following complex is: - -.. literalinclude:: ../../data/bitmap/cubicalcomplexdoc.txt - -.. centered:: ../../data/bitmap/cubicalcomplexdoc.txt +The file format is described here: :doc:`Perseus `. .. testcode:: @@ -124,15 +108,9 @@ Imposing periodic boundary conditions in the direction i, means that the left an :math:`\mathcal{K}` are considered the same. In particular, if for a bitmap :math:`\mathcal{K}` periodic boundary conditions are imposed in all directions, then complex :math:`\mathcal{K}` became n-dimensional torus. One can use various constructors from the file Bitmap_cubical_complex_periodic_boundary_conditions_base.h to construct cubical -complex with periodic boundary conditions. One can also use Perseus style input files. To indicate periodic boundary -conditions in a given direction, then number of top dimensional cells in this direction have to be multiplied by -1. -For instance: - -.. literalinclude:: ../../data/bitmap/periodiccubicalcomplexdoc.txt - -.. centered:: ../../data/bitmap/periodiccubicalcomplexdoc.txt +complex with periodic boundary conditions. -Indicate that we have imposed periodic boundary conditions in the direction x, but not in the direction y. +One can also use Perseus style input files (see :doc:`Perseus `) for the specific periodic case: .. testcode:: @@ -149,6 +127,23 @@ the program output is: Periodic cubical complex is of dimension 2 - 42 simplices. +Or it can be defined as follows: + +.. testcode:: + + from gudhi import PeriodicCubicalComplex as pcc + periodic_cc = pcc(dimensions=[3,3], + top_dimensional_cells= [0, 0, 0, 0, 1, 0, 0, 0, 0], + periodic_dimensions=[True, False]) + result_str = 'Periodic cubical complex is of dimension ' + repr(periodic_cc.dimension()) + ' - ' + \ + repr(periodic_cc.num_simplices()) + ' simplices.' + print(result_str) + +the program output is: + +.. testoutput:: + + Periodic cubical complex is of dimension 2 - 42 simplices. Examples. --------- diff --git a/src/cython/doc/fileformats.rst b/src/cython/doc/fileformats.rst index 156ef4e4..4f0b6f6d 100644 --- a/src/cython/doc/fileformats.rst +++ b/src/cython/doc/fileformats.rst @@ -23,7 +23,7 @@ Here is a simple sample file:: 3 34.2 34.974 4 3. inf -Other sample files can be found in the data/persistence_diagram folder. +Other sample files can be found in the `data/persistence_diagram` folder. Such files can be generated with :meth:`gudhi.SimplexTree.write_persistence_diagram`, read with @@ -31,3 +31,56 @@ Such files can be generated with :meth:`gudhi.read_persistence_intervals_in_dimension` and displayed with :meth:`gudhi.plot_persistence_barcode` or :meth:`gudhi.plot_persistence_diagram`. + +Iso-cuboid +********** + +Such a file describes an iso-oriented cuboid with diagonal opposite vertices +(min_x, min_y, min_z,...) and (max_x, max_y, max_z, ...). The format is:: + + min_x min_y [min_z ...] + max_x max_y [max_z ...] + +Here is a simple sample file in the 3D case:: + + -1. -1. -1. + 1. 1. 1. + + +Perseus +******* + +This file format is the format used by the +`Perseus software `_ by Vidit Nanda. +The first line contains a number d begin the dimension of the bitmap (2 in the +example below). Next d lines are the numbers of top dimensional cubes in each +dimensions (3 and 3 in the example below). Next, in lexicographical order, the +filtration of top dimensional cubes is given (1 4 6 8 20 4 7 6 5 in the example +below). + +.. figure:: + ../../doc/Bitmap_cubical_complex/exampleBitmap.png + :alt: Example of a input data. + :figclass: align-center + + Example of a input data. + +The input file for the following complex is: + +.. literalinclude:: ../../data/bitmap/cubicalcomplexdoc.txt + +.. centered:: ../../data/bitmap/cubicalcomplexdoc.txt + +To indicate periodic boundary conditions in a given direction, then number of +top dimensional cells in this direction have to be multiplied by -1. For +instance: + +.. literalinclude:: ../../data/bitmap/periodiccubicalcomplexdoc.txt + +.. centered:: ../../data/bitmap/periodiccubicalcomplexdoc.txt + + +Indicate that we have imposed periodic boundary conditions in the direction x, +but not in the direction y. + +Other sample files can be found in the `data/bitmap` folder. -- cgit v1.2.3 From 51d5cdbb5e0d2ac632611811435eef798e496ac6 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 14 Dec 2017 12:55:06 +0000 Subject: Version numbers git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3073 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 38b84cada057e433d09aaf987b0d495e86e19962 --- CMakeGUDHIVersion.txt | 4 ++-- src/Doxyfile | 2 +- src/common/doc/main_page.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index bfef1590..cb07e55a 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 2) -set (GUDHI_MINOR_VERSION 0) -set (GUDHI_PATCH_VERSION 1) +set (GUDHI_MINOR_VERSION 1) +set (GUDHI_PATCH_VERSION 0.rc1) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/Doxyfile b/src/Doxyfile index 429bf6a1..2d5adea1 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "GUDHI" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "2.0.1" +PROJECT_NUMBER = "2.1.0.rc1" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 108cf6e3..148ee670 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -99,7 +99,7 @@ Author: Mathieu Carrière
- Introduced in: GUDHI 2.0.1
+ Introduced in: GUDHI 2.1.0
Copyright: GPL v3
@@ -551,4 +551,4 @@ make doxygen * @example Witness_complex/weak_witness_persistence.cpp * @example Witness_complex/strong_witness_persistence.cpp */ - \ No newline at end of file + -- cgit v1.2.3 From aa5760623c2d769c01567f5c7f07d52fabc3e2d9 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 19 Dec 2017 09:52:37 +0000 Subject: Add a function for unitary tests to test floating point values equality w/wo epsilon values git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration_cmake_improvement@3083 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 835037fd6efea4fbfc9a494df3015186232388bf --- src/Alpha_complex/test/Alpha_complex_unit_test.cpp | 19 +++--- .../test/persistence_heat_maps_test.cpp | 72 ++++++++-------------- src/Rips_complex/test/test_rips_complex.cpp | 25 ++++---- src/cmake/modules/GUDHI_test_coverage.cmake | 14 ++++- src/common/include/gudhi/Debug_utils.h | 2 +- src/common/include/gudhi/Unitary_tests_utils.h | 39 ++++++++++++ 6 files changed, 96 insertions(+), 75 deletions(-) create mode 100644 src/common/include/gudhi/Unitary_tests_utils.h (limited to 'src/common') diff --git a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp index 166373fe..c3ad1a9c 100644 --- a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp +++ b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp @@ -23,6 +23,7 @@ #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "alpha_complex" #include +#include #include #include @@ -36,7 +37,7 @@ // to construct a simplex_tree from Delaunay_triangulation #include #include -#include +#include // Use dynamic_dimension_tag for the user to be able to set dimension typedef CGAL::Epick_d< CGAL::Dynamic_dimension_tag > Kernel_d; @@ -96,10 +97,6 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(Alpha_complex_from_OFF_file, TestedKernel, list_of BOOST_CHECK(simplex_tree_59.num_simplices() == 23); } -bool are_almost_the_same(float a, float b) { - return std::fabs(a - b) < std::numeric_limits::epsilon(); -} - // Use static dimension_tag for the user not to be able to set dimension typedef CGAL::Epick_d< CGAL::Dimension_tag<4> > Kernel_4; typedef Kernel_4::Point_d Point_4; @@ -166,16 +163,16 @@ BOOST_AUTO_TEST_CASE(Alpha_complex_from_points) { for (auto f_simplex : simplex_tree.filtration_simplex_range()) { switch (simplex_tree.dimension(f_simplex)) { case 0: - BOOST_CHECK(are_almost_the_same(simplex_tree.filtration(f_simplex), 0.0)); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(simplex_tree.filtration(f_simplex), 0.0); break; case 1: - BOOST_CHECK(are_almost_the_same(simplex_tree.filtration(f_simplex), 1.0/2.0)); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(simplex_tree.filtration(f_simplex), 1.0/2.0); break; case 2: - BOOST_CHECK(are_almost_the_same(simplex_tree.filtration(f_simplex), 2.0/3.0)); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(simplex_tree.filtration(f_simplex), 2.0/3.0); break; case 3: - BOOST_CHECK(are_almost_the_same(simplex_tree.filtration(f_simplex), 3.0/4.0)); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(simplex_tree.filtration(f_simplex), 3.0/4.0); break; default: BOOST_CHECK(false); // Shall not happen @@ -239,10 +236,10 @@ BOOST_AUTO_TEST_CASE(Alpha_complex_from_points) { for (auto f_simplex : simplex_tree.filtration_simplex_range()) { switch (simplex_tree.dimension(f_simplex)) { case 0: - BOOST_CHECK(are_almost_the_same(simplex_tree.filtration(f_simplex), 0.0)); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(simplex_tree.filtration(f_simplex), 0.0); break; case 1: - BOOST_CHECK(are_almost_the_same(simplex_tree.filtration(f_simplex), 1.0/2.0)); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(simplex_tree.filtration(f_simplex), 1.0/2.0); break; default: BOOST_CHECK(false); // Shall not happen diff --git a/src/Persistence_representations/test/persistence_heat_maps_test.cpp b/src/Persistence_representations/test/persistence_heat_maps_test.cpp index 1f1502f5..4da13b86 100644 --- a/src/Persistence_representations/test/persistence_heat_maps_test.cpp +++ b/src/Persistence_representations/test/persistence_heat_maps_test.cpp @@ -25,12 +25,15 @@ #include #include #include +#include #include using namespace Gudhi; using namespace Gudhi::Persistence_representations; +double epsilon = 0.0005; + 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); @@ -139,28 +142,15 @@ BOOST_AUTO_TEST_CASE(check_distance_for_heat_maps) { 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); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.distance(p), 0., epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.distance(q), 624.183, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.distance(r), 415.815, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(q.distance(p), 624.183, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(q.distance(q), 0., epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(q.distance(r), 528.066, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(r.distance(p), 415.815, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(r.distance(q), 528.066, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(r.distance(r), 0., epsilon); } BOOST_AUTO_TEST_CASE(check_projections_to_R_for_heat_maps) { @@ -169,13 +159,9 @@ BOOST_AUTO_TEST_CASE(check_projections_to_R_for_heat_maps) { 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.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); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.project_to_R(0), 44.3308, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(q.project_to_R(0), 650.568, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(r.project_to_R(0), 429.287, epsilon); } BOOST_AUTO_TEST_CASE(check_scalar_products_for_heat_maps) { @@ -184,25 +170,15 @@ BOOST_AUTO_TEST_CASE(check_scalar_products_for_heat_maps) { 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); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_scalar_product(p), 0.0345687, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_scalar_product(q), 0.0509357, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_scalar_product(r), 0.0375608, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(q.compute_scalar_product(p), 0.0509357, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(q.compute_scalar_product(q), 1.31293 , epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(q.compute_scalar_product(r), 0.536799 , epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(r.compute_scalar_product(p), 0.0375608, epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(r.compute_scalar_product(q), 0.536799 , epsilon); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(r.compute_scalar_product(r), 0.672907 , epsilon); } BOOST_AUTO_TEST_CASE(check_arythmetic_operations_for_heat_maps) { diff --git a/src/Rips_complex/test/test_rips_complex.cpp b/src/Rips_complex/test/test_rips_complex.cpp index fc83f5f7..89afbc25 100644 --- a/src/Rips_complex/test/test_rips_complex.cpp +++ b/src/Rips_complex/test/test_rips_complex.cpp @@ -36,6 +36,7 @@ #include #include #include +#include // Type definitions using Point = std::vector; @@ -44,10 +45,6 @@ using Filtration_value = Simplex_tree::Filtration_value; using Rips_complex = Gudhi::rips_complex::Rips_complex; using Distance_matrix = std::vector>; -bool are_almost_the_same(float a, float b) { - return std::fabs(a - b) < std::numeric_limits::epsilon(); -} - BOOST_AUTO_TEST_CASE(RIPS_DOC_OFF_file) { // ---------------------------------------------------------------------------- // @@ -92,7 +89,7 @@ BOOST_AUTO_TEST_CASE(RIPS_DOC_OFF_file) { std::cout << ") - distance =" << Gudhi::Euclidean_distance()(vp.at(0), vp.at(1)) << " - filtration =" << st.filtration(f_simplex) << std::endl; BOOST_CHECK(vp.size() == 2); - BOOST_CHECK(are_almost_the_same(st.filtration(f_simplex), Gudhi::Euclidean_distance()(vp.at(0), vp.at(1)))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), Gudhi::Euclidean_distance()(vp.at(0), vp.at(1))); } } @@ -113,14 +110,14 @@ BOOST_AUTO_TEST_CASE(RIPS_DOC_OFF_file) { Simplex_tree::Filtration_value f12 = st2.filtration(st2.find({1, 2})); Simplex_tree::Filtration_value f012 = st2.filtration(st2.find({0, 1, 2})); std::cout << "f012= " << f012 << " | f01= " << f01 << " - f02= " << f02 << " - f12= " << f12 << std::endl; - BOOST_CHECK(are_almost_the_same(f012, std::max(f01, std::max(f02,f12)))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(f012, std::max(f01, std::max(f02,f12))); Simplex_tree::Filtration_value f45 = st2.filtration(st2.find({4, 5})); Simplex_tree::Filtration_value f56 = st2.filtration(st2.find({5, 6})); Simplex_tree::Filtration_value f46 = st2.filtration(st2.find({4, 6})); Simplex_tree::Filtration_value f456 = st2.filtration(st2.find({4, 5, 6})); std::cout << "f456= " << f456 << " | f45= " << f45 << " - f56= " << f56 << " - f46= " << f46 << std::endl; - BOOST_CHECK(are_almost_the_same(f456, std::max(f45, std::max(f56,f46)))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(f456, std::max(f45, std::max(f56,f46))); const int DIMENSION_3 = 3; Simplex_tree st3; @@ -140,7 +137,7 @@ BOOST_AUTO_TEST_CASE(RIPS_DOC_OFF_file) { Simplex_tree::Filtration_value f0123 = st3.filtration(st3.find({0, 1, 2, 3})); std::cout << "f0123= " << f0123 << " | f012= " << f012 << " - f123= " << f123 << " - f013= " << f013 << " - f023= " << f023 << std::endl; - BOOST_CHECK(are_almost_the_same(f0123, std::max(f012, std::max(f123, std::max(f013, f023))))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(f0123, std::max(f012, std::max(f123, std::max(f013, f023)))); } @@ -219,12 +216,12 @@ BOOST_AUTO_TEST_CASE(Rips_complex_from_points) { std::cout << "dimension(" << st.dimension(f_simplex) << ") - f = " << st.filtration(f_simplex) << std::endl; switch (st.dimension(f_simplex)) { case 0: - BOOST_CHECK(are_almost_the_same(st.filtration(f_simplex), 0.0)); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.0); break; case 1: case 2: case 3: - BOOST_CHECK(are_almost_the_same(st.filtration(f_simplex), 2.0)); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 2.0); break; default: BOOST_CHECK(false); // Shall not happen @@ -276,7 +273,7 @@ BOOST_AUTO_TEST_CASE(Rips_doc_csv_file) { } std::cout << ") - filtration =" << st.filtration(f_simplex) << std::endl; BOOST_CHECK(vvh.size() == 2); - BOOST_CHECK(are_almost_the_same(st.filtration(f_simplex), distances[vvh.at(0)][vvh.at(1)])); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), distances[vvh.at(0)][vvh.at(1)]); } } @@ -297,14 +294,14 @@ BOOST_AUTO_TEST_CASE(Rips_doc_csv_file) { Simplex_tree::Filtration_value f12 = st2.filtration(st2.find({1, 2})); Simplex_tree::Filtration_value f012 = st2.filtration(st2.find({0, 1, 2})); std::cout << "f012= " << f012 << " | f01= " << f01 << " - f02= " << f02 << " - f12= " << f12 << std::endl; - BOOST_CHECK(are_almost_the_same(f012, std::max(f01, std::max(f02,f12)))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(f012, std::max(f01, std::max(f02,f12))); Simplex_tree::Filtration_value f45 = st2.filtration(st2.find({4, 5})); Simplex_tree::Filtration_value f56 = st2.filtration(st2.find({5, 6})); Simplex_tree::Filtration_value f46 = st2.filtration(st2.find({4, 6})); Simplex_tree::Filtration_value f456 = st2.filtration(st2.find({4, 5, 6})); std::cout << "f456= " << f456 << " | f45= " << f45 << " - f56= " << f56 << " - f46= " << f46 << std::endl; - BOOST_CHECK(are_almost_the_same(f456, std::max(f45, std::max(f56,f46)))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(f456, std::max(f45, std::max(f56,f46))); const int DIMENSION_3 = 3; Simplex_tree st3; @@ -324,7 +321,7 @@ BOOST_AUTO_TEST_CASE(Rips_doc_csv_file) { Simplex_tree::Filtration_value f0123 = st3.filtration(st3.find({0, 1, 2, 3})); std::cout << "f0123= " << f0123 << " | f012= " << f012 << " - f123= " << f123 << " - f013= " << f013 << " - f023= " << f023 << std::endl; - BOOST_CHECK(are_almost_the_same(f0123, std::max(f012, std::max(f123, std::max(f013, f023))))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(f0123, std::max(f012, std::max(f123, std::max(f013, f023)))); } diff --git a/src/cmake/modules/GUDHI_test_coverage.cmake b/src/cmake/modules/GUDHI_test_coverage.cmake index ce171a0e..bea5b2d6 100644 --- a/src/cmake/modules/GUDHI_test_coverage.cmake +++ b/src/cmake/modules/GUDHI_test_coverage.cmake @@ -8,7 +8,19 @@ if (GPROF_PATH) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") endif() +if (DEBUG_TRACES) + # Make CTest more verbose with DEBUG_TRACES - no XML output + set(GUDHI_UT_LOG_LEVEL "--log_level=all") + set(GUDHI_UT_REPORT_LEVEL "--report_level=detailed") +else() + set(GUDHI_UT_LOG_FORMAT "--log_format=XML") + set(GUDHI_UT_LOG_SINK "--log_sink=${CMAKE_BINARY_DIR}/${unitary_test}_UT.xml") + set(GUDHI_UT_LOG_LEVEL "--log_level=test_suite") + set(GUDHI_UT_REPORT_LEVEL "--report_level=no") +endif() + function(gudhi_add_coverage_test unitary_test) add_test(NAME ${unitary_test} COMMAND $ - "--log_format=XML" "--log_sink=${CMAKE_BINARY_DIR}/${unitary_test}_UT.xml" "--log_level=test_suite" "--report_level=no") + ${GUDHI_UT_LOG_FORMAT} ${GUDHI_UT_LOG_SINK} + ${GUDHI_UT_LOG_LEVEL} ${GUDHI_UT_REPORT_LEVEL}) endfunction() diff --git a/src/common/include/gudhi/Debug_utils.h b/src/common/include/gudhi/Debug_utils.h index 8ed3b7b3..f9d9c50c 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 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/Unitary_tests_utils.h b/src/common/include/gudhi/Unitary_tests_utils.h new file mode 100644 index 00000000..7ae5d356 --- /dev/null +++ b/src/common/include/gudhi/Unitary_tests_utils.h @@ -0,0 +1,39 @@ +/* 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) 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 . + */ +#ifndef UNITARY_TESTS_UTILS_H_ +#define UNITARY_TESTS_UTILS_H_ + +#include + +#include + +template +void GUDHI_TEST_FLOAT_EQUALITY_CHECK(FloatingType a, FloatingType b, + FloatingType epsilon = std::numeric_limits::epsilon()) { +#ifdef DEBUG_TRACES + std::cout << "GUDHI_TEST_FLOAT_EQUALITY_CHECK - " << a << " versus " << b + << " | diff = " << std::fabs(a - b) << " - epsilon = " << epsilon << std::endl; +#endif + BOOST_CHECK(std::fabs(a - b) < epsilon); +} + +#endif // UNITARY_TESTS_UTILS_H_ -- cgit v1.2.3 From dc8a8693966e8a6db45b0d9f142d3ff8e3da7c7f Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 19 Dec 2017 21:06:34 +0000 Subject: Boost minimal version is 1.48.0 (modification rollback) - if boost_version use static_vector (from Boost 1.54.0) git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3090 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 487d902c645793f2647191a0d8f9218184fa19de --- src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp | 9 +++++++++ src/cmake/modules/GUDHI_third_party_libraries.cmake | 2 +- src/common/doc/main_page.h | 2 +- src/cython/doc/installation.rst | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index f4a14ae3..1070d17b 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -20,9 +20,13 @@ * along with this program. If not, see . */ +#include #include #include + +#if BOOST_VERSION >= 105400 #include +#endif #include #include @@ -66,7 +70,12 @@ using Cell_handle = Alpha_shape_3::Cell_handle; using Facet = Alpha_shape_3::Facet; using Edge_3 = Alpha_shape_3::Edge; using Vertex_handle = Alpha_shape_3::Vertex_handle; + +#if BOOST_VERSION >= 105400 using Vertex_list = boost::container::static_vector; +#else +using Vertex_list = std::vector; +#endif // gudhi type definition using ST = Gudhi::Simplex_tree; diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 7696496c..84545f18 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -1,6 +1,6 @@ # This files manage third party libraries required by GUDHI -find_package(Boost 1.56.0 REQUIRED COMPONENTS system filesystem unit_test_framework program_options thread) +find_package(Boost 1.48.0 REQUIRED COMPONENTS system filesystem unit_test_framework program_options thread) if(NOT Boost_FOUND) message(FATAL_ERROR "NOTICE: This program requires Boost and will not be compiled.") diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 7ba8a4b7..148ee670 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -258,7 +258,7 @@ * Examples of GUDHI headers inclusion can be found in \ref demos. * * \section compiling Compiling - * The library uses c++11 and requires
Boost with version 1.56.0 or + * The library uses c++11 and requires Boost with version 1.48.0 or * more recent. It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. * * \subsection demos Demos and examples diff --git a/src/cython/doc/installation.rst b/src/cython/doc/installation.rst index 2f689497..c182f176 100644 --- a/src/cython/doc/installation.rst +++ b/src/cython/doc/installation.rst @@ -5,7 +5,7 @@ Compiling ********* The library uses c++11 and requires `Boost `_ with -version 1.56.0 or more recent. It is a multi-platform library and compiles on +version 1.48.0 or more recent. It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. It also requires cmake to generate makefiles, and cython to compile the library. -- cgit v1.2.3 From 95cbbd98a9b1dcec7142f1b45555991cf0f94b70 Mon Sep 17 00:00:00 2001 From: glisse Date: Fri, 22 Dec 2017 14:18:50 +0000 Subject: Cleanups in Euclidean_distance. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@3102 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 06a14b11149e9c7265b8a3427404a9a0991d51aa --- src/common/include/gudhi/distance_functions.h | 31 +++++++++++++++++++-------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'src/common') diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index c556155e..3a5d1fd5 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -23,6 +23,10 @@ #ifndef DISTANCE_FUNCTIONS_H_ #define DISTANCE_FUNCTIONS_H_ +#include + +#include + #include // for std::sqrt #include // for std::decay #include // for std::begin, std::end @@ -38,20 +42,29 @@ namespace Gudhi { * have the same dimension. */ class Euclidean_distance { public: + // boost::range_value is not SFINAE-friendly so we cannot use it in the return type template< typename Point > - auto operator()(const Point& p1, const Point& p2) const -> typename std::decay::type { - auto it1 = p1.begin(); - auto it2 = p2.begin(); - typename Point::value_type dist = 0.; - for (; it1 != p1.end(); ++it1, ++it2) { - typename Point::value_type tmp = (*it1) - (*it2); + typename std::iterator_traits::type>::value_type + operator()(const Point& p1, const Point& p2) const { + auto it1 = std::begin(p1); + auto it2 = std::begin(p2); + typedef typename boost::range_value::type NT; + NT dist = 0; + for (; it1 != std::end(p1); ++it1, ++it2) { + GUDHI_CHECK(it2 != std::end(p2), "inconsistent point dimensions"); + NT tmp = *it1 - *it2; dist += tmp*tmp; } - return std::sqrt(dist); + GUDHI_CHECK(it2 == std::end(p2), "inconsistent point dimensions"); + using std::sqrt; + return 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)); + T operator() (const std::pair< T, T >& f, const std::pair< T, T >& s) const { + T dx = f.first - s.first; + T dy = f.second - s.second; + using std::sqrt; + return sqrt(dx*dx + dy*dy); } }; -- cgit v1.2.3 From d8f04fab98dcb46ba7b300048311bf9e8b0ab3d2 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 22 Jan 2018 13:51:28 +0000 Subject: Fix cpplint git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3149 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e1cc797f8c24015168a1f84430666e8a156ababa --- src/Bottleneck_distance/include/gudhi/Bottleneck.h | 4 +- .../include/gudhi/Neighbors_finder.h | 1 + .../include/gudhi/read_persistence_from_file.h | 15 ++-- .../utilities/rips_distance_matrix_persistence.cpp | 61 +++++++--------- src/Rips_complex/utilities/rips_persistence.cpp | 60 ++++++--------- .../example/cech_complex_cgal_mini_sphere_3d.cpp | 85 +++++++++------------- .../example/graph_expansion_with_blocker.cpp | 40 +++++----- src/Simplex_tree/example/simple_simplex_tree.cpp | 84 +++++++++------------ .../include/gudhi/Kd_tree_search.h | 3 +- .../example/example_strong_witness_complex_off.cpp | 22 +++--- .../example/example_witness_complex_sphere.cpp | 24 +++--- .../utilities/strong_witness_persistence.cpp | 69 +++++++----------- .../utilities/weak_witness_persistence.cpp | 69 +++++++----------- src/common/include/gudhi/Unitary_tests_utils.h | 1 + 14 files changed, 223 insertions(+), 315 deletions(-) (limited to 'src/common') diff --git a/src/Bottleneck_distance/include/gudhi/Bottleneck.h b/src/Bottleneck_distance/include/gudhi/Bottleneck.h index 8c97dce9..7aee07bb 100644 --- a/src/Bottleneck_distance/include/gudhi/Bottleneck.h +++ b/src/Bottleneck_distance/include/gudhi/Bottleneck.h @@ -46,7 +46,7 @@ double bottleneck_distance_approx(Persistence_graph& g, double e) { if (step <= b_lower_bound || step >= b_upper_bound) // Avoid precision problem break; m.set_r(step); - while (m.multi_augment()) {}; // compute a maximum matching (in the graph corresponding to the current r) + while (m.multi_augment()) {} // compute a maximum matching (in the graph corresponding to the current r) if (m.perfect()) { m = biggest_unperfect; b_upper_bound = step; @@ -68,7 +68,7 @@ double bottleneck_distance_exact(Persistence_graph& g) { while (lower_bound_i != upper_bound_i) { long step = lower_bound_i + static_cast ((upper_bound_i - lower_bound_i - 1) / alpha); m.set_r(sd.at(step)); - while (m.multi_augment()) {}; // compute a maximum matching (in the graph corresponding to the current r) + while (m.multi_augment()) {} // compute a maximum matching (in the graph corresponding to the current r) if (m.perfect()) { m = biggest_unperfect; upper_bound_i = step; diff --git a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h index dc804630..87c7cee5 100644 --- a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h +++ b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h @@ -32,6 +32,7 @@ #include #include +#include // for std::max 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 450c223c..83b89d0e 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -23,6 +23,8 @@ #ifndef READ_PERSISTENCE_FROM_FILE_H_ #define READ_PERSISTENCE_FROM_FILE_H_ +#include + #include #include #include @@ -30,7 +32,7 @@ #include #include #include -#include +#include // for std::numeric_limits<> namespace Gudhi { namespace Persistence_representations { @@ -72,16 +74,9 @@ std::vector > read_persistence_intervals_in_one_dimens std::cout << "COnsidering interval : " << barcode_initial[i].first << " " << barcode_initial[i].second << std::endl; } - // if ( barcode_initial[i].first == barcode_initial[i].second ) - //{ - // if ( dbg )std::cout << "It has zero length \n"; - // continue;//zero length intervals are not relevant, so we skip all of them. - //} - if (barcode_initial[i].first > - barcode_initial[i] - .second) // note that in this case barcode_initial[i].second != std::numeric_limits::infinity() - { + if (barcode_initial[i].first > barcode_initial[i].second) { + // note that in this case barcode_initial[i].second != std::numeric_limits::infinity() if (dbg) std::cout << "Swap and enter \n"; // swap them to make sure that birth < death final_barcode.push_back(std::pair(barcode_initial[i].second, barcode_initial[i].first)); diff --git a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp index d38808c7..ca3c0327 100644 --- a/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_distance_matrix_persistence.cpp @@ -1,5 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ +/* 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, Vincent Rouvreau @@ -36,18 +36,13 @@ using Simplex_tree = Gudhi::Simplex_tree; using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; -using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; using Distance_matrix = std::vector>; -void program_options(int argc, char * argv[] - , std::string & csv_matrix_file - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence); +void program_options(int argc, char* argv[], std::string& csv_matrix_file, std::string& filediag, + Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence); -int main(int argc, char * argv[]) { +int main(int argc, char* argv[]) { std::string csv_matrix_file; std::string filediag; Filtration_value threshold; @@ -88,33 +83,28 @@ int main(int argc, char * argv[]) { return 0; } -void program_options(int argc, char * argv[] - , std::string & csv_matrix_file - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence) { +void program_options(int argc, char* argv[], std::string& csv_matrix_file, std::string& filediag, + Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence) { namespace po = boost::program_options; po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&csv_matrix_file), - "Name of file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'."); + hidden.add_options()( + "input-file", po::value(&csv_matrix_file), + "Name of file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'."); po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-edge-length,r", - po::value(&threshold)->default_value(std::numeric_limits::infinity()), - "Maximal length of an edge for the Rips complex construction.") - ("cpx-dimension,d", po::value(&dim_max)->default_value(1), - "Maximal dimension of the Rips complex we want to compute.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); + visible.add_options()("help,h", "produce help message")( + "output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout")( + "max-edge-length,r", + po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "Maximal length of an edge for the Rips complex construction.")( + "cpx-dimension,d", po::value(&dim_max)->default_value(1), + "Maximal dimension of the Rips complex we want to compute.")( + "field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.")( + "min-persistence,m", po::value(&min_persistence), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length " + "intervals"); po::positional_options_description pos; pos.add("input-file", 1); @@ -123,8 +113,7 @@ void program_options(int argc, char * argv[] all.add(visible).add(hidden); po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); + po::store(po::command_line_parser(argc, argv).options(all).positional(pos).run(), vm); po::notify(vm); if (vm.count("help") || !vm.count("input-file")) { diff --git a/src/Rips_complex/utilities/rips_persistence.cpp b/src/Rips_complex/utilities/rips_persistence.cpp index d504798b..8405c014 100644 --- a/src/Rips_complex/utilities/rips_persistence.cpp +++ b/src/Rips_complex/utilities/rips_persistence.cpp @@ -1,5 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ +/* 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 @@ -37,19 +37,14 @@ using Simplex_tree = Gudhi::Simplex_tree; using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; -using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; using Point = std::vector; using Points_off_reader = Gudhi::Points_off_reader; -void program_options(int argc, char * argv[] - , std::string & off_file_points - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence); +void program_options(int argc, char* argv[], std::string& off_file_points, std::string& filediag, + Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence); -int main(int argc, char * argv[]) { +int main(int argc, char* argv[]) { std::string off_file_points; std::string filediag; Filtration_value threshold; @@ -91,33 +86,27 @@ int main(int argc, char * argv[]) { return 0; } -void program_options(int argc, char * argv[] - , std::string & off_file_points - , std::string & filediag - , Filtration_value & threshold - , int & dim_max - , int & p - , Filtration_value & min_persistence) { +void program_options(int argc, char* argv[], std::string& off_file_points, std::string& filediag, + Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence) { namespace po = boost::program_options; po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&off_file_points), - "Name of an OFF file containing a point set.\n"); + hidden.add_options()("input-file", po::value(&off_file_points), + "Name of an OFF file containing a point set.\n"); po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-edge-length,r", - po::value(&threshold)->default_value(std::numeric_limits::infinity()), - "Maximal length of an edge for the Rips complex construction.") - ("cpx-dimension,d", po::value(&dim_max)->default_value(1), - "Maximal dimension of the Rips complex we want to compute.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals"); + visible.add_options()("help,h", "produce help message")( + "output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout")( + "max-edge-length,r", + po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "Maximal length of an edge for the Rips complex construction.")( + "cpx-dimension,d", po::value(&dim_max)->default_value(1), + "Maximal dimension of the Rips complex we want to compute.")( + "field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.")( + "min-persistence,m", po::value(&min_persistence), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length " + "intervals"); po::positional_options_description pos; pos.add("input-file", 1); @@ -126,8 +115,7 @@ void program_options(int argc, char * argv[] all.add(visible).add(hidden); po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); + po::store(po::command_line_parser(argc, argv).options(all).positional(pos).run(), vm); po::notify(vm); if (vm.count("help") || !vm.count("input-file")) { 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 217e251f..9bd51106 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,5 +1,5 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ +/* 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 @@ -33,7 +33,7 @@ #include #include -#include // infinity +#include // infinity #include // for pair #include @@ -50,15 +50,14 @@ using Vertex_handle = Simplex_tree::Vertex_handle; using Simplex_handle = Simplex_tree::Simplex_handle; using Filtration_value = Simplex_tree::Filtration_value; using Siblings = Simplex_tree::Siblings; -using Graph_t = boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS -, boost::property < Gudhi::vertex_filtration_t, Filtration_value > -, boost::property < Gudhi::edge_filtration_t, Filtration_value > ->; -using Edge_t = std::pair< Vertex_handle, Vertex_handle >; +using Graph_t = boost::adjacency_list, + boost::property >; +using Edge_t = std::pair; -using Kernel = CGAL::Epick_d< CGAL::Dimension_tag<3> >; +using Kernel = CGAL::Epick_d >; using Point = Kernel::Point_d; -using Traits = CGAL::Min_sphere_of_points_d_traits_d; +using Traits = CGAL::Min_sphere_of_points_d_traits_d; using Min_sphere = CGAL::Min_sphere_of_spheres_d; using Points_off_reader = Gudhi::Points_off_reader; @@ -76,7 +75,7 @@ class Cech_blocker { std::cout << vertex << ", "; #endif // DEBUG_TRACES } - Min_sphere ms(points.begin(),points.end()); + Min_sphere ms(points.begin(), points.end()); Filtration_value radius = ms.radius(); #if DEBUG_TRACES std::cout << "] - radius = " << radius << " - returns " << (radius > threshold_) << std::endl; @@ -85,24 +84,20 @@ class Cech_blocker { return (radius > threshold_); } Cech_blocker(Simplex_tree& simplex_tree, Filtration_value threshold, const std::vector& point_cloud) - : simplex_tree_(simplex_tree), - threshold_(threshold), - point_cloud_(point_cloud) { } + : simplex_tree_(simplex_tree), threshold_(threshold), point_cloud_(point_cloud) {} + private: Simplex_tree simplex_tree_; Filtration_value threshold_; std::vector point_cloud_; }; -template< typename InputPointRange> -Graph_t compute_proximity_graph(InputPointRange &points, Filtration_value threshold); +template +Graph_t compute_proximity_graph(InputPointRange& points, Filtration_value threshold); -void program_options(int argc, char * argv[] - , std::string & off_file_points - , Filtration_value & threshold - , int & dim_max); +void program_options(int argc, char* argv[], std::string& off_file_points, Filtration_value& threshold, int& dim_max); -int main(int argc, char * argv[]) { +int main(int argc, char* argv[]) { std::string off_file_points; Filtration_value threshold; int dim_max; @@ -115,7 +110,7 @@ int main(int argc, char * argv[]) { // Compute the proximity graph of the points Graph_t prox_graph = compute_proximity_graph(off_reader.get_point_cloud(), threshold); - //Min_sphere sph1(off_reader.get_point_cloud()[0], off_reader.get_point_cloud()[1], off_reader.get_point_cloud()[2]); + // Min_sphere sph1(off_reader.get_point_cloud()[0], off_reader.get_point_cloud()[1], off_reader.get_point_cloud()[2]); // Construct the Rips complex in a Simplex Tree Simplex_tree st; // insert the proximity graph in the simplex tree @@ -135,7 +130,8 @@ int main(int argc, char * argv[]) { std::cout << "* The complex contains " << st.num_simplices() << " simplices - dimension=" << st.dimension() << "\n"; std::cout << "* Iterator on Simplices in the filtration, with [filtration value]:\n"; for (auto f_simplex : st.filtration_simplex_range()) { - std::cout << " " << "[" << st.filtration(f_simplex) << "] "; + std::cout << " " + << "[" << st.filtration(f_simplex) << "] "; for (auto vertex : st.simplex_vertex_range(f_simplex)) { std::cout << static_cast(vertex) << " "; } @@ -145,24 +141,19 @@ int main(int argc, char * argv[]) { return 0; } -void program_options(int argc, char * argv[] - , std::string & off_file_points - , Filtration_value & threshold - , int & dim_max) { +void program_options(int argc, char* argv[], std::string& off_file_points, Filtration_value& threshold, int& dim_max) { namespace po = boost::program_options; po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&off_file_points), - "Name of an OFF file containing a 3d point set.\n"); + hidden.add_options()("input-file", po::value(&off_file_points), + "Name of an OFF file containing a 3d point set.\n"); po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("max-edge-length,r", - po::value(&threshold)->default_value(std::numeric_limits::infinity()), - "Maximal length of an edge for the Cech complex construction.") - ("cpx-dimension,d", po::value(&dim_max)->default_value(1), - "Maximal dimension of the Cech complex we want to compute."); + visible.add_options()("help,h", "produce help message")( + "max-edge-length,r", + po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "Maximal length of an edge for the Cech complex construction.")( + "cpx-dimension,d", po::value(&dim_max)->default_value(1), + "Maximal dimension of the Cech complex we want to compute."); po::positional_options_description pos; pos.add("input-file", 1); @@ -171,8 +162,7 @@ void program_options(int argc, char * argv[] all.add(visible).add(hidden); po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); + po::store(po::command_line_parser(argc, argv).options(all).positional(pos).run(), vm); po::notify(vm); if (vm.count("help") || !vm.count("input-file")) { @@ -194,10 +184,10 @@ void program_options(int argc, char * argv[] * The type PointCloud furnishes .begin() and .end() methods, that return * iterators with value_type Point. */ -template< typename InputPointRange> -Graph_t compute_proximity_graph(InputPointRange &points, Filtration_value threshold) { - std::vector< Edge_t > edges; - std::vector< Filtration_value > edges_fil; +template +Graph_t compute_proximity_graph(InputPointRange& points, Filtration_value threshold) { + std::vector edges; + std::vector edges_fil; Kernel k; Vertex_handle idx_u, idx_v; @@ -217,16 +207,13 @@ Graph_t compute_proximity_graph(InputPointRange &points, Filtration_value thresh ++idx_u; } - Graph_t skel_graph(edges.begin() - , edges.end() - , edges_fil.begin() - , idx_u); // number of points labeled from 0 to idx_u-1 + Graph_t skel_graph(edges.begin(), edges.end(), edges_fil.begin(), + idx_u); // number of points labeled from 0 to idx_u-1 auto vertex_prop = boost::get(Gudhi::vertex_filtration_t(), skel_graph); boost::graph_traits::vertex_iterator vi, vi_end; - for (std::tie(vi, vi_end) = boost::vertices(skel_graph); - vi != vi_end; ++vi) { + for (std::tie(vi, vi_end) = boost::vertices(skel_graph); vi != vi_end; ++vi) { boost::put(vertex_prop, *vi, 0.); } diff --git a/src/Simplex_tree/example/graph_expansion_with_blocker.cpp b/src/Simplex_tree/example/graph_expansion_with_blocker.cpp index 86bfb8cb..0d458cbd 100644 --- a/src/Simplex_tree/example/graph_expansion_with_blocker.cpp +++ b/src/Simplex_tree/example/graph_expansion_with_blocker.cpp @@ -27,8 +27,7 @@ using Simplex_tree = Gudhi::Simplex_tree<>; using Simplex_handle = Simplex_tree::Simplex_handle; -int main(int argc, char * const argv[]) { - +int main(int argc, char* const argv[]) { // Construct the Simplex Tree with a 1-skeleton graph example Simplex_tree simplexTree; @@ -45,33 +44,32 @@ int main(int argc, char * const argv[]) { simplexTree.insert_simplex({5, 6}, 10.); simplexTree.insert_simplex({6}, 10.); - simplexTree.expansion_with_blockers(3, [&](Simplex_handle sh){ - bool result = false; - std::cout << "Blocker on ["; - // User can loop on the vertices from the given simplex_handle i.e. - for (auto vertex : simplexTree.simplex_vertex_range(sh)) { - // We block the expansion, if the vertex '6' is in the given list of vertices - if (vertex == 6) - result = true; - std::cout << vertex << ", "; - } - std::cout << "] ( " << simplexTree.filtration(sh); - // User can re-assign a new filtration value directly in the blocker (default is the maximal value of boudaries) - simplexTree.assign_filtration(sh, simplexTree.filtration(sh) + 1.); + simplexTree.expansion_with_blockers(3, [&](Simplex_handle sh) { + bool result = false; + std::cout << "Blocker on ["; + // User can loop on the vertices from the given simplex_handle i.e. + for (auto vertex : simplexTree.simplex_vertex_range(sh)) { + // We block the expansion, if the vertex '6' is in the given list of vertices + if (vertex == 6) result = true; + std::cout << vertex << ", "; + } + std::cout << "] ( " << simplexTree.filtration(sh); + // User can re-assign a new filtration value directly in the blocker (default is the maximal value of boudaries) + simplexTree.assign_filtration(sh, simplexTree.filtration(sh) + 1.); - std::cout << " + 1. ) = " << result << std::endl; + std::cout << " + 1. ) = " << result << std::endl; - return result; - }); + return result; + }); std::cout << "********************************************************************\n"; std::cout << "* The complex contains " << simplexTree.num_simplices() << " simplices"; std::cout << " - dimension " << simplexTree.dimension() << "\n"; std::cout << "* Iterator on Simplices in the filtration, with [filtration value]:\n"; for (auto f_simplex : simplexTree.filtration_simplex_range()) { - std::cout << " " << "[" << simplexTree.filtration(f_simplex) << "] "; - for (auto vertex : simplexTree.simplex_vertex_range(f_simplex)) - std::cout << "(" << vertex << ")"; + std::cout << " " + << "[" << simplexTree.filtration(f_simplex) << "] "; + for (auto vertex : simplexTree.simplex_vertex_range(f_simplex)) std::cout << "(" << vertex << ")"; std::cout << std::endl; } diff --git a/src/Simplex_tree/example/simple_simplex_tree.cpp b/src/Simplex_tree/example/simple_simplex_tree.cpp index b6b65b88..828977c2 100644 --- a/src/Simplex_tree/example/simple_simplex_tree.cpp +++ b/src/Simplex_tree/example/simple_simplex_tree.cpp @@ -30,10 +30,10 @@ using Simplex_tree = Gudhi::Simplex_tree<>; using Vertex_handle = Simplex_tree::Vertex_handle; using Filtration_value = Simplex_tree::Filtration_value; -using typeVectorVertex = std::vector< Vertex_handle >; -using typePairSimplexBool = std::pair< Simplex_tree::Simplex_handle, bool >; +using typeVectorVertex = std::vector; +using typePairSimplexBool = std::pair; -int main(int argc, char * const argv[]) { +int main(int argc, char* const argv[]) { const Filtration_value FIRST_FILTRATION_VALUE = 0.1; const Filtration_value SECOND_FILTRATION_VALUE = 0.2; const Filtration_value THIRD_FILTRATION_VALUE = 0.3; @@ -54,7 +54,7 @@ int main(int argc, char * const argv[]) { // ++ FIRST std::cout << " * INSERT 0" << std::endl; - typeVectorVertex firstSimplexVector = { 0 }; + typeVectorVertex firstSimplexVector = {0}; typePairSimplexBool returnValue = simplexTree.insert_simplex(firstSimplexVector, Filtration_value(FIRST_FILTRATION_VALUE)); @@ -66,9 +66,8 @@ int main(int argc, char * const argv[]) { // ++ SECOND std::cout << " * INSERT 1" << std::endl; - typeVectorVertex secondSimplexVector = { 1 }; - returnValue = - simplexTree.insert_simplex(secondSimplexVector, Filtration_value(FIRST_FILTRATION_VALUE)); + typeVectorVertex secondSimplexVector = {1}; + returnValue = simplexTree.insert_simplex(secondSimplexVector, Filtration_value(FIRST_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + 1 INSERTED" << std::endl; @@ -78,9 +77,8 @@ int main(int argc, char * const argv[]) { // ++ THIRD std::cout << " * INSERT (0,1)" << std::endl; - typeVectorVertex thirdSimplexVector = { 0, 1 }; - returnValue = - simplexTree.insert_simplex(thirdSimplexVector, Filtration_value(SECOND_FILTRATION_VALUE)); + typeVectorVertex thirdSimplexVector = {0, 1}; + returnValue = simplexTree.insert_simplex(thirdSimplexVector, Filtration_value(SECOND_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + (0,1) INSERTED" << std::endl; @@ -90,9 +88,8 @@ int main(int argc, char * const argv[]) { // ++ FOURTH std::cout << " * INSERT 2" << std::endl; - typeVectorVertex fourthSimplexVector = { 2 }; - returnValue = - simplexTree.insert_simplex(fourthSimplexVector, Filtration_value(FIRST_FILTRATION_VALUE)); + typeVectorVertex fourthSimplexVector = {2}; + returnValue = simplexTree.insert_simplex(fourthSimplexVector, Filtration_value(FIRST_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + 2 INSERTED" << std::endl; @@ -102,9 +99,8 @@ int main(int argc, char * const argv[]) { // ++ FIFTH std::cout << " * INSERT (2,0)" << std::endl; - typeVectorVertex fifthSimplexVector = { 2, 0 }; - returnValue = - simplexTree.insert_simplex(fifthSimplexVector, Filtration_value(SECOND_FILTRATION_VALUE)); + typeVectorVertex fifthSimplexVector = {2, 0}; + returnValue = simplexTree.insert_simplex(fifthSimplexVector, Filtration_value(SECOND_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + (2,0) INSERTED" << std::endl; @@ -114,9 +110,8 @@ int main(int argc, char * const argv[]) { // ++ SIXTH std::cout << " * INSERT (2,1)" << std::endl; - typeVectorVertex sixthSimplexVector = { 2, 1 }; - returnValue = - simplexTree.insert_simplex(sixthSimplexVector, Filtration_value(SECOND_FILTRATION_VALUE)); + typeVectorVertex sixthSimplexVector = {2, 1}; + returnValue = simplexTree.insert_simplex(sixthSimplexVector, Filtration_value(SECOND_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + (2,1) INSERTED" << std::endl; @@ -126,9 +121,8 @@ int main(int argc, char * const argv[]) { // ++ SEVENTH std::cout << " * INSERT (2,1,0)" << std::endl; - typeVectorVertex seventhSimplexVector = { 2, 1, 0 }; - returnValue = - simplexTree.insert_simplex(seventhSimplexVector, Filtration_value(THIRD_FILTRATION_VALUE)); + typeVectorVertex seventhSimplexVector = {2, 1, 0}; + returnValue = simplexTree.insert_simplex(seventhSimplexVector, Filtration_value(THIRD_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + (2,1,0) INSERTED" << std::endl; @@ -138,9 +132,8 @@ int main(int argc, char * const argv[]) { // ++ EIGHTH std::cout << " * INSERT 3" << std::endl; - typeVectorVertex eighthSimplexVector = { 3 }; - returnValue = - simplexTree.insert_simplex(eighthSimplexVector, Filtration_value(FIRST_FILTRATION_VALUE)); + typeVectorVertex eighthSimplexVector = {3}; + returnValue = simplexTree.insert_simplex(eighthSimplexVector, Filtration_value(FIRST_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + 3 INSERTED" << std::endl; @@ -150,9 +143,8 @@ int main(int argc, char * const argv[]) { // ++ NINETH std::cout << " * INSERT (3,0)" << std::endl; - typeVectorVertex ninethSimplexVector = { 3, 0 }; - returnValue = - simplexTree.insert_simplex(ninethSimplexVector, Filtration_value(SECOND_FILTRATION_VALUE)); + typeVectorVertex ninethSimplexVector = {3, 0}; + returnValue = simplexTree.insert_simplex(ninethSimplexVector, Filtration_value(SECOND_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + (3,0) INSERTED" << std::endl; @@ -162,7 +154,7 @@ int main(int argc, char * const argv[]) { // ++ TENTH std::cout << " * INSERT 0 (already inserted)" << std::endl; - typeVectorVertex tenthSimplexVector = { 0 }; + typeVectorVertex tenthSimplexVector = {0}; // With a different filtration value returnValue = simplexTree.insert_simplex(tenthSimplexVector, Filtration_value(FOURTH_FILTRATION_VALUE)); @@ -174,9 +166,8 @@ int main(int argc, char * const argv[]) { // ++ ELEVENTH std::cout << " * INSERT (2,1,0) (already inserted)" << std::endl; - typeVectorVertex eleventhSimplexVector = { 2, 1, 0 }; - returnValue = - simplexTree.insert_simplex(eleventhSimplexVector, Filtration_value(FOURTH_FILTRATION_VALUE)); + typeVectorVertex eleventhSimplexVector = {2, 1, 0}; + returnValue = simplexTree.insert_simplex(eleventhSimplexVector, Filtration_value(FOURTH_FILTRATION_VALUE)); if (returnValue.second == true) { std::cout << " + (2,1,0) INSERTED" << std::endl; @@ -192,9 +183,9 @@ int main(int argc, char * const argv[]) { std::cout << " - dimension " << simplexTree.dimension() << "\n"; std::cout << "* Iterator on Simplices in the filtration, with [filtration value]:\n"; for (auto f_simplex : simplexTree.filtration_simplex_range()) { - std::cout << " " << "[" << simplexTree.filtration(f_simplex) << "] "; - for (auto vertex : simplexTree.simplex_vertex_range(f_simplex)) - std::cout << "(" << vertex << ")"; + std::cout << " " + << "[" << simplexTree.filtration(f_simplex) << "] "; + for (auto vertex : simplexTree.simplex_vertex_range(f_simplex)) std::cout << "(" << vertex << ")"; std::cout << std::endl; } // [0.1] 0 @@ -217,7 +208,7 @@ int main(int argc, char * const argv[]) { else std::cout << "***- NO IT ISN'T\n"; - typeVectorVertex unknownSimplexVector = { 15 }; + typeVectorVertex unknownSimplexVector = {15}; simplexFound = simplexTree.find(unknownSimplexVector); std::cout << "**************IS THE SIMPLEX {15} IN THE SIMPLEX TREE ?\n"; if (simplexFound != simplexTree.null_simplex()) @@ -232,7 +223,7 @@ int main(int argc, char * const argv[]) { else std::cout << "***- NO IT ISN'T\n"; - typeVectorVertex otherSimplexVector = { 1, 15 }; + typeVectorVertex otherSimplexVector = {1, 15}; simplexFound = simplexTree.find(otherSimplexVector); std::cout << "**************IS THE SIMPLEX {15,1} IN THE SIMPLEX TREE ?\n"; if (simplexFound != simplexTree.null_simplex()) @@ -240,7 +231,7 @@ int main(int argc, char * const argv[]) { else std::cout << "***- NO IT ISN'T\n"; - typeVectorVertex invSimplexVector = { 1, 2, 0 }; + typeVectorVertex invSimplexVector = {1, 2, 0}; simplexFound = simplexTree.find(invSimplexVector); std::cout << "**************IS THE SIMPLEX {1,2,0} IN THE SIMPLEX TREE ?\n"; if (simplexFound != simplexTree.null_simplex()) @@ -248,7 +239,7 @@ int main(int argc, char * const argv[]) { else std::cout << "***- NO IT ISN'T\n"; - simplexFound = simplexTree.find({ 0, 1 }); + simplexFound = simplexTree.find({0, 1}); std::cout << "**************IS THE SIMPLEX {0,1} IN THE SIMPLEX TREE ?\n"; if (simplexFound != simplexTree.null_simplex()) std::cout << "***+ YES IT IS!\n"; @@ -256,23 +247,20 @@ int main(int argc, char * const argv[]) { std::cout << "***- NO IT ISN'T\n"; std::cout << "**************COFACES OF {0,1} IN CODIMENSION 1 ARE\n"; - for (auto& simplex : simplexTree.cofaces_simplex_range(simplexTree.find({0,1}), 1)) { - for (auto vertex : simplexTree.simplex_vertex_range(simplex)) - std::cout << "(" << vertex << ")"; + for (auto& simplex : simplexTree.cofaces_simplex_range(simplexTree.find({0, 1}), 1)) { + for (auto vertex : simplexTree.simplex_vertex_range(simplex)) std::cout << "(" << vertex << ")"; std::cout << std::endl; } std::cout << "**************STARS OF {0,1} ARE\n"; - for (auto& simplex : simplexTree.star_simplex_range(simplexTree.find({0,1}))) { - for (auto vertex : simplexTree.simplex_vertex_range(simplex)) - std::cout << "(" << vertex << ")"; + for (auto& simplex : simplexTree.star_simplex_range(simplexTree.find({0, 1}))) { + for (auto vertex : simplexTree.simplex_vertex_range(simplex)) std::cout << "(" << vertex << ")"; std::cout << std::endl; } std::cout << "**************BOUNDARIES OF {0,1,2} ARE\n"; - for (auto& simplex : simplexTree.boundary_simplex_range(simplexTree.find({0,1,2}))) { - for (auto vertex : simplexTree.simplex_vertex_range(simplex)) - std::cout << "(" << vertex << ")"; + for (auto& simplex : simplexTree.boundary_simplex_range(simplexTree.find({0, 1, 2}))) { + for (auto vertex : simplexTree.simplex_vertex_range(simplex)) std::cout << "(" << vertex << ")"; std::cout << std::endl; } diff --git a/src/Spatial_searching/include/gudhi/Kd_tree_search.h b/src/Spatial_searching/include/gudhi/Kd_tree_search.h index ef428002..96bbeb36 100644 --- a/src/Spatial_searching/include/gudhi/Kd_tree_search.h +++ b/src/Spatial_searching/include/gudhi/Kd_tree_search.h @@ -271,8 +271,7 @@ class Kd_tree_search { m_tree.search(it, Fuzzy_sphere(p, radius, eps, m_tree.traits())); } - int tree_depth() const - { + int tree_depth() const { return m_tree.root()->depth(); } 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 bc069654..346bef6d 100644 --- a/src/Witness_complex/example/example_strong_witness_complex_off.cpp +++ b/src/Witness_complex/example/example_strong_witness_complex_off.cpp @@ -39,10 +39,9 @@ using Point_d = typename K::Point_d; using Witness_complex = Gudhi::witness_complex::Euclidean_strong_witness_complex; using Point_vector = std::vector; -int main(int argc, char * const argv[]) { +int main(int argc, char* const argv[]) { if (argc != 5) { - std::cerr << "Usage: " << argv[0] - << " path_to_point_file number_of_landmarks max_squared_alpha limit_dimension\n"; + std::cerr << "Usage: " << argv[0] << " path_to_point_file number_of_landmarks max_squared_alpha limit_dimension\n"; return 0; } @@ -56,9 +55,9 @@ int main(int argc, char * const argv[]) { Point_vector point_vector, landmarks; Gudhi::Points_off_reader off_reader(file_name); if (!off_reader.is_valid()) { - std::cerr << "Strong witness complex - Unable to read file " << file_name << "\n"; - exit(-1); // ----- >> - } + std::cerr << "Strong witness complex - Unable to read file " << file_name << "\n"; + exit(-1); // ----- >> + } point_vector = Point_vector(off_reader.get_point_cloud()); std::cout << "Successfully read " << point_vector.size() << " points.\n"; @@ -66,16 +65,15 @@ int main(int argc, char * const argv[]) { // Choose landmarks (decomment one of the following two lines) // Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); - Gudhi::subsampling::choose_n_farthest_points(K(), point_vector, nbL, Gudhi::subsampling::random_starting_point, std::back_inserter(landmarks)); - + Gudhi::subsampling::choose_n_farthest_points(K(), point_vector, nbL, Gudhi::subsampling::random_starting_point, + std::back_inserter(landmarks)); + // Compute witness complex start = clock(); - Witness_complex witness_complex(landmarks, - point_vector); + Witness_complex witness_complex(landmarks, point_vector); witness_complex.create_complex(simplex_tree, alpha2, lim_dim); end = clock(); - std::cout << "Strong witness complex took " - << static_cast(end - start) / CLOCKS_PER_SEC << " s. \n"; + std::cout << "Strong witness complex took " << static_cast(end - start) / CLOCKS_PER_SEC << " s. \n"; std::cout << "Number of simplices is: " << simplex_tree.num_simplices() << "\n"; } diff --git a/src/Witness_complex/example/example_witness_complex_sphere.cpp b/src/Witness_complex/example/example_witness_complex_sphere.cpp index a66da3f9..a6e9b11a 100644 --- a/src/Witness_complex/example/example_witness_complex_sphere.cpp +++ b/src/Witness_complex/example/example_witness_complex_sphere.cpp @@ -42,27 +42,25 @@ /** Write a gnuplot readable file. * Data range is a random access range of pairs (arg, value) */ -template < typename Data_range > -void write_data(Data_range & data, std::string filename) { +template +void write_data(Data_range& data, std::string filename) { std::ofstream ofs(filename, std::ofstream::out); - for (auto entry : data) - ofs << entry.first << ", " << entry.second << "\n"; + for (auto entry : data) ofs << entry.first << ", " << entry.second << "\n"; ofs.close(); } -int main(int argc, char * const argv[]) { +int main(int argc, char* const argv[]) { using Kernel = CGAL::Epick_d; using Witness_complex = Gudhi::witness_complex::Euclidean_witness_complex; if (argc != 2) { - std::cerr << "Usage: " << argv[0] - << " number_of_landmarks \n"; + std::cerr << "Usage: " << argv[0] << " number_of_landmarks \n"; return 0; } int number_of_landmarks = atoi(argv[1]); - std::vector< std::pair > l_time; + std::vector > l_time; // Generate points for (int nbP = 500; nbP < 10000; nbP += 500) { @@ -77,16 +75,16 @@ int main(int argc, char * const argv[]) { // Choose landmarks start = clock(); // Gudhi::subsampling::pick_n_random_points(point_vector, number_of_landmarks, std::back_inserter(landmarks)); - Gudhi::subsampling::choose_n_farthest_points(K(), point_vector, number_of_landmarks, Gudhi::subsampling::random_starting_point, std::back_inserter(landmarks)); + Gudhi::subsampling::choose_n_farthest_points(K(), point_vector, number_of_landmarks, + Gudhi::subsampling::random_starting_point, + std::back_inserter(landmarks)); // Compute witness complex - Witness_complex witness_complex(landmarks, - point_vector); + Witness_complex witness_complex(landmarks, point_vector); witness_complex.create_complex(simplex_tree, 0); end = clock(); double time = static_cast(end - start) / CLOCKS_PER_SEC; - std::cout << "Witness complex for " << number_of_landmarks << " landmarks took " - << time << " s. \n"; + std::cout << "Witness complex for " << number_of_landmarks << " landmarks took " << time << " s. \n"; std::cout << "Number of simplices is: " << simplex_tree.num_simplices() << "\n"; l_time.push_back(std::make_pair(nbP, time)); } diff --git a/src/Witness_complex/utilities/strong_witness_persistence.cpp b/src/Witness_complex/utilities/strong_witness_persistence.cpp index e3e0c1ee..2fba631b 100644 --- a/src/Witness_complex/utilities/strong_witness_persistence.cpp +++ b/src/Witness_complex/utilities/strong_witness_persistence.cpp @@ -47,16 +47,10 @@ using Filtration_value = SimplexTree::Filtration_value; using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; -void program_options(int argc, char * argv[] - , int & nbL - , std::string & file_name - , std::string & filediag - , Filtration_value & max_squared_alpha - , int & p - , int & dim_max - , Filtration_value & min_persistence); - -int main(int argc, char * argv[]) { +void program_options(int argc, char* argv[], int& nbL, std::string& file_name, std::string& filediag, + Filtration_value& max_squared_alpha, int& p, int& dim_max, Filtration_value& min_persistence); + +int main(int argc, char* argv[]) { std::string file_name; std::string filediag; Filtration_value max_squared_alpha; @@ -70,8 +64,8 @@ int main(int argc, char * argv[]) { Point_vector witnesses, landmarks; Gudhi::Points_off_reader off_reader(file_name); if (!off_reader.is_valid()) { - std::cerr << "Witness complex - Unable to read file " << file_name << "\n"; - exit(-1); // ----- >> + std::cerr << "Witness complex - Unable to read file " << file_name << "\n"; + exit(-1); // ----- >> } witnesses = Point_vector(off_reader.get_point_cloud()); std::cout << "Successfully read " << witnesses.size() << " points.\n"; @@ -79,11 +73,11 @@ int main(int argc, char * argv[]) { // Choose landmarks (decomment one of the following two lines) // Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); - Gudhi::subsampling::choose_n_farthest_points(K(), witnesses, nbL, Gudhi::subsampling::random_starting_point, std::back_inserter(landmarks)); + Gudhi::subsampling::choose_n_farthest_points(K(), witnesses, nbL, Gudhi::subsampling::random_starting_point, + std::back_inserter(landmarks)); // Compute witness complex - Strong_witness_complex strong_witness_complex(landmarks, - witnesses); + Strong_witness_complex strong_witness_complex(landmarks, witnesses); strong_witness_complex.create_complex(simplex_tree, max_squared_alpha, lim_d); @@ -112,37 +106,28 @@ int main(int argc, char * argv[]) { return 0; } -void program_options(int argc, char * argv[] - , int & nbL - , std::string & file_name - , std::string & filediag - , Filtration_value & max_squared_alpha - , int & p - , int & dim_max - , Filtration_value & min_persistence) { +void program_options(int argc, char* argv[], int& nbL, std::string& file_name, std::string& filediag, + Filtration_value& max_squared_alpha, int& p, int& dim_max, Filtration_value& min_persistence) { namespace po = boost::program_options; po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&file_name), - "Name of file containing a point set in off format."); + hidden.add_options()("input-file", po::value(&file_name), + "Name of file containing a point set in off format."); po::options_description visible("Allowed options", 100); Filtration_value default_alpha = std::numeric_limits::infinity(); - visible.add_options() - ("help,h", "produce help message") - ("landmarks,l", po::value(&nbL), - "Number of landmarks to choose from the point cloud.") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-sq-alpha,a", po::value(&max_squared_alpha)->default_value(default_alpha), - "Maximal squared relaxation parameter.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence)->default_value(0), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals") - ("cpx-dimension,d", po::value(&dim_max)->default_value(std::numeric_limits::max()), - "Maximal dimension of the strong witness complex we want to compute."); + visible.add_options()("help,h", "produce help message")("landmarks,l", po::value(&nbL), + "Number of landmarks to choose from the point cloud.")( + "output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout")( + "max-sq-alpha,a", po::value(&max_squared_alpha)->default_value(default_alpha), + "Maximal squared relaxation parameter.")( + "field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.")( + "min-persistence,m", po::value(&min_persistence)->default_value(0), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length " + "intervals")("cpx-dimension,d", po::value(&dim_max)->default_value(std::numeric_limits::max()), + "Maximal dimension of the strong witness complex we want to compute."); po::positional_options_description pos; pos.add("input-file", 1); @@ -151,8 +136,7 @@ void program_options(int argc, char * argv[] all.add(visible).add(hidden); po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); + po::store(po::command_line_parser(argc, argv).options(all).positional(pos).run(), vm); po::notify(vm); if (vm.count("help") || !vm.count("input-file")) { @@ -170,4 +154,3 @@ void program_options(int argc, char * argv[] std::abort(); } } - diff --git a/src/Witness_complex/utilities/weak_witness_persistence.cpp b/src/Witness_complex/utilities/weak_witness_persistence.cpp index a63b0837..23fa93aa 100644 --- a/src/Witness_complex/utilities/weak_witness_persistence.cpp +++ b/src/Witness_complex/utilities/weak_witness_persistence.cpp @@ -47,16 +47,10 @@ using Filtration_value = SimplexTree::Filtration_value; using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; -void program_options(int argc, char * argv[] - , int & nbL - , std::string & file_name - , std::string & filediag - , Filtration_value & max_squared_alpha - , int & p - , int & dim_max - , Filtration_value & min_persistence); - -int main(int argc, char * argv[]) { +void program_options(int argc, char* argv[], int& nbL, std::string& file_name, std::string& filediag, + Filtration_value& max_squared_alpha, int& p, int& dim_max, Filtration_value& min_persistence); + +int main(int argc, char* argv[]) { std::string file_name; std::string filediag; Filtration_value max_squared_alpha; @@ -70,8 +64,8 @@ int main(int argc, char * argv[]) { Point_vector witnesses, landmarks; Gudhi::Points_off_reader off_reader(file_name); if (!off_reader.is_valid()) { - std::cerr << "Witness complex - Unable to read file " << file_name << "\n"; - exit(-1); // ----- >> + std::cerr << "Witness complex - Unable to read file " << file_name << "\n"; + exit(-1); // ----- >> } witnesses = Point_vector(off_reader.get_point_cloud()); std::cout << "Successfully read " << witnesses.size() << " points.\n"; @@ -79,11 +73,11 @@ int main(int argc, char * argv[]) { // Choose landmarks (decomment one of the following two lines) // Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); - Gudhi::subsampling::choose_n_farthest_points(K(), witnesses, nbL, Gudhi::subsampling::random_starting_point, std::back_inserter(landmarks)); + Gudhi::subsampling::choose_n_farthest_points(K(), witnesses, nbL, Gudhi::subsampling::random_starting_point, + std::back_inserter(landmarks)); // Compute witness complex - Witness_complex witness_complex(landmarks, - witnesses); + Witness_complex witness_complex(landmarks, witnesses); witness_complex.create_complex(simplex_tree, max_squared_alpha, lim_d); @@ -112,38 +106,28 @@ int main(int argc, char * argv[]) { return 0; } - -void program_options(int argc, char * argv[] - , int & nbL - , std::string & file_name - , std::string & filediag - , Filtration_value & max_squared_alpha - , int & p - , int & dim_max - , Filtration_value & min_persistence) { +void program_options(int argc, char* argv[], int& nbL, std::string& file_name, std::string& filediag, + Filtration_value& max_squared_alpha, int& p, int& dim_max, Filtration_value& min_persistence) { namespace po = boost::program_options; po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value(&file_name), - "Name of file containing a point set in off format."); + hidden.add_options()("input-file", po::value(&file_name), + "Name of file containing a point set in off format."); Filtration_value default_alpha = std::numeric_limits::infinity(); po::options_description visible("Allowed options", 100); - visible.add_options() - ("help,h", "produce help message") - ("landmarks,l", po::value(&nbL), - "Number of landmarks to choose from the point cloud.") - ("output-file,o", po::value(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout") - ("max-sq-alpha,a", po::value(&max_squared_alpha)->default_value(default_alpha), - "Maximal squared relaxation parameter.") - ("field-charac,p", po::value(&p)->default_value(11), - "Characteristic p of the coefficient field Z/pZ for computing homology.") - ("min-persistence,m", po::value(&min_persistence)->default_value(0), - "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length intervals") - ("cpx-dimension,d", po::value(&dim_max)->default_value(std::numeric_limits::max()), - "Maximal dimension of the weak witness complex we want to compute."); + visible.add_options()("help,h", "produce help message")("landmarks,l", po::value(&nbL), + "Number of landmarks to choose from the point cloud.")( + "output-file,o", po::value(&filediag)->default_value(std::string()), + "Name of file in which the persistence diagram is written. Default print in std::cout")( + "max-sq-alpha,a", po::value(&max_squared_alpha)->default_value(default_alpha), + "Maximal squared relaxation parameter.")( + "field-charac,p", po::value(&p)->default_value(11), + "Characteristic p of the coefficient field Z/pZ for computing homology.")( + "min-persistence,m", po::value(&min_persistence)->default_value(0), + "Minimal lifetime of homology feature to be recorded. Default is 0. Enter a negative value to see zero length " + "intervals")("cpx-dimension,d", po::value(&dim_max)->default_value(std::numeric_limits::max()), + "Maximal dimension of the weak witness complex we want to compute."); po::positional_options_description pos; pos.add("input-file", 1); @@ -152,8 +136,7 @@ void program_options(int argc, char * argv[] all.add(visible).add(hidden); po::variables_map vm; - po::store(po::command_line_parser(argc, argv). - options(all).positional(pos).run(), vm); + po::store(po::command_line_parser(argc, argv).options(all).positional(pos).run(), vm); po::notify(vm); if (vm.count("help") || !vm.count("input-file")) { diff --git a/src/common/include/gudhi/Unitary_tests_utils.h b/src/common/include/gudhi/Unitary_tests_utils.h index 7ae5d356..8394a062 100644 --- a/src/common/include/gudhi/Unitary_tests_utils.h +++ b/src/common/include/gudhi/Unitary_tests_utils.h @@ -25,6 +25,7 @@ #include #include +#include // for std::numeric_limits<> template void GUDHI_TEST_FLOAT_EQUALITY_CHECK(FloatingType a, FloatingType b, -- cgit v1.2.3 From 06ff6fac211d2823c7d14a6d2f4a4db03f48d2e3 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 26 Jan 2018 14:01:39 +0000 Subject: Seperate installation and examples from main page Move cover complex utilities from examples GIC.cpp example was not compiled, nor tested. It is removed. Persistence representation : no need to link with Boost_SYSTEM git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3164 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: cf2bfa6c6de2ed359aaa165b9f80bca7e06defb1 --- src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 29 -- src/Nerve_GIC/example/CMakeLists.txt | 12 - src/Nerve_GIC/example/GIC.cpp | 95 ----- .../example/KeplerMapperVisuFromTxtFile.py | 72 ---- src/Nerve_GIC/example/Nerve.cpp | 96 ----- src/Nerve_GIC/example/Nerve.txt | 63 ---- src/Nerve_GIC/example/VoronoiGIC.cpp | 90 ----- src/Nerve_GIC/example/km.py | 390 --------------------- src/Nerve_GIC/example/km.py.COPYRIGHT | 26 -- src/Nerve_GIC/utilities/CMakeLists.txt | 22 ++ .../utilities/KeplerMapperVisuFromTxtFile.py | 72 ++++ src/Nerve_GIC/utilities/Nerve.cpp | 96 +++++ src/Nerve_GIC/utilities/Nerve.txt | 63 ++++ src/Nerve_GIC/utilities/VoronoiGIC.cpp | 90 +++++ src/Nerve_GIC/utilities/km.py | 390 +++++++++++++++++++++ src/Nerve_GIC/utilities/km.py.COPYRIGHT | 26 ++ .../example/CMakeLists.txt | 5 - .../test/CMakeLists.txt | 14 +- src/common/doc/examples.h | 99 ++++++ src/common/doc/installation.h | 263 ++++++++++++++ src/common/doc/main_page.h | 305 +--------------- 21 files changed, 1130 insertions(+), 1188 deletions(-) delete mode 100644 src/Nerve_GIC/example/GIC.cpp delete mode 100755 src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py delete mode 100644 src/Nerve_GIC/example/Nerve.cpp delete mode 100644 src/Nerve_GIC/example/Nerve.txt delete mode 100644 src/Nerve_GIC/example/VoronoiGIC.cpp delete mode 100755 src/Nerve_GIC/example/km.py delete mode 100644 src/Nerve_GIC/example/km.py.COPYRIGHT create mode 100644 src/Nerve_GIC/utilities/CMakeLists.txt create mode 100755 src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py create mode 100644 src/Nerve_GIC/utilities/Nerve.cpp create mode 100644 src/Nerve_GIC/utilities/Nerve.txt create mode 100644 src/Nerve_GIC/utilities/VoronoiGIC.cpp create mode 100755 src/Nerve_GIC/utilities/km.py create mode 100644 src/Nerve_GIC/utilities/km.py.COPYRIGHT create mode 100644 src/common/doc/examples.h create mode 100644 src/common/doc/installation.h (limited to 'src/common') diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index 7578cc53..344cb031 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -177,7 +177,6 @@ namespace cover_complex { * \image html "funcGICvisu.jpg" "Visualization with neato" * * \copyright GNU General Public License v3. - * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim */ /** @} */ // end defgroup cover_complex @@ -186,31 +185,3 @@ namespace cover_complex { } // namespace Gudhi #endif // DOC_COVER_COMPLEX_INTRO_COVER_COMPLEX_H_ - - -/* * \subsection gicexample Example with cover from function - * - * This example builds the GIC of a point cloud sampled on a 3D human shape (human.off). - * The cover C comes from the preimages of intervals (with length 0.075 and gain 0) - * covering the height function (coordinate 2), - * and the graph G comes from a Rips complex built with threshold 0.075. - * Note that if the gain is too big, the number of cliques increases a lot, - * which make the computation time much larger. - * - * \include Nerve_GIC/GIC.cpp - * - * When launching: - * - * \code $> ./GIC ../../data/points/human.off 0.075 2 0.075 0 --v - * \endcode - * - * the program outputs SC.txt, which can be visualized with python and firefox as before: - * - * \image html "gicvisu.jpg" "Visualization with KeplerMapper" - * */ - - -/* * Using e.g. - * - * \code $> python KeplerMapperVisuFromTxtFile.py && firefox SC.html - * \endcode */ diff --git a/src/Nerve_GIC/example/CMakeLists.txt b/src/Nerve_GIC/example/CMakeLists.txt index 73728dc0..434637fa 100644 --- a/src/Nerve_GIC/example/CMakeLists.txt +++ b/src/Nerve_GIC/example/CMakeLists.txt @@ -3,26 +3,14 @@ project(Nerve_GIC_examples) if (NOT CGAL_VERSION VERSION_LESS 4.8.1) - add_executable ( Nerve Nerve.cpp ) add_executable ( CoordGIC CoordGIC.cpp ) add_executable ( FuncGIC FuncGIC.cpp ) - add_executable ( VoronoiGIC VoronoiGIC.cpp ) if (TBB_FOUND) - target_link_libraries(Nerve ${TBB_LIBRARIES}) target_link_libraries(CoordGIC ${TBB_LIBRARIES}) target_link_libraries(FuncGIC ${TBB_LIBRARIES}) - target_link_libraries(VoronoiGIC ${TBB_LIBRARIES}) endif() - file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - - add_test(NAME Nerve_GIC_example_nerve COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/human.off" "2" "10" "0.3") - - add_test(NAME Nerve_GIC_example_VoronoiGIC COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/human.off" "100") - add_test(NAME Nerve_GIC_example_CoordGIC COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "0") diff --git a/src/Nerve_GIC/example/GIC.cpp b/src/Nerve_GIC/example/GIC.cpp deleted file mode 100644 index 2bc24a4d..00000000 --- a/src/Nerve_GIC/example/GIC.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Mathieu Carrière - * - * Copyright (C) 2017 INRIA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 - -void usage(int nbArgs, char *const progName) { - std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; - std::cerr << "Usage: " << progName << " filename.off threshold coordinate resolution gain [--v] \n"; - std::cerr << " i.e.: " << progName << " ../../data/points/human.off 0.075 2 0.075 0 --v \n"; - exit(-1); // ----- >> -} - -int main(int argc, char **argv) { - if ((argc != 6) && (argc != 7)) usage(argc, argv[0]); - - using Point = std::vector; - - std::string off_file_name(argv[1]); - double threshold = atof(argv[2]); - int coord = atoi(argv[3]); - double resolution = atof(argv[4]); - double gain = atof(argv[5]); - bool verb = 0; - if (argc == 7) verb = 1; - - // ---------------------------------------------------------------------------- - // Init of a graph induced complex from an OFF file - // ---------------------------------------------------------------------------- - - Gudhi::graph_induced_complex::Graph_induced_complex GIC; - GIC.set_verbose(verb); - - bool check = GIC.read_point_cloud(off_file_name); - - if (!check) { - std::cout << "Incorrect OFF file." << std::endl; - } else { - GIC.set_color_from_coordinate(coord); - GIC.set_function_from_coordinate(coord); - - GIC.set_graph_from_rips(threshold, Gudhi::Euclidean_distance()); - - GIC.set_resolution_with_interval_length(resolution); - GIC.set_gain(gain); - GIC.set_cover_from_function(); - - GIC.find_GIC_simplices(); - - GIC.plot_TXT_for_KeplerMapper(); - - Gudhi::Simplex_tree<> stree; - GIC.create_complex(stree); - - // ---------------------------------------------------------------------------- - // Display information about the graph induced complex - // ---------------------------------------------------------------------------- - - if (verb) { - std::cout << "Graph induced complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() - << " simplices - " << stree.num_vertices() << " vertices." << std::endl; - - std::cout << "Iterator on graph induced complex simplices" << std::endl; - for (auto f_simplex : stree.filtration_simplex_range()) { - for (auto vertex : stree.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; - } - std::cout << std::endl; - } - } - } - - return 0; -} diff --git a/src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py b/src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py deleted file mode 100755 index d2897774..00000000 --- a/src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python - -import km -import numpy as np -from collections import defaultdict - -"""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 - - 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 . -""" - -__author__ = "Mathieu Carriere" -__copyright__ = "Copyright (C) 2017 INRIA" -__license__ = "GPL v3" - -network = {} -mapper = km.KeplerMapper(verbose=0) -data = np.zeros((3,3)) -projected_data = mapper.fit_transform( data, projection="sum", scaler=None ) - -f = open('SC.txt','r') -nodes = defaultdict(list) -links = defaultdict(list) -custom = defaultdict(list) - -dat = f.readline() -lens = f.readline() -color = f.readline(); -param = [float(i) for i in f.readline().split(" ")] - -nums = [int(i) for i in f.readline().split(" ")] -num_nodes = nums[0] -num_edges = nums[1] - -for i in range(0,num_nodes): - point = [float(j) for j in f.readline().split(" ")] - nodes[ str(int(point[0])) ] = [ int(point[0]), point[1], int(point[2]) ] - links[ str(int(point[0])) ] = [] - custom[ int(point[0]) ] = point[1] - -m = min([custom[i] for i in range(0,num_nodes)]) -M = max([custom[i] for i in range(0,num_nodes)]) - -for i in range(0,num_edges): - edge = [int(j) for j in f.readline().split(" ")] - links[ str(edge[0]) ].append( str(edge[1]) ) - links[ str(edge[1]) ].append( str(edge[0]) ) - -network["nodes"] = nodes -network["links"] = links -network["meta"] = lens - -mapper.visualize(network, color_function = color, path_html="SC.html", title=dat, -graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=custom, width_html=0, -height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=param[0],gain=param[1], minimum=m,maximum=M) diff --git a/src/Nerve_GIC/example/Nerve.cpp b/src/Nerve_GIC/example/Nerve.cpp deleted file mode 100644 index 6abdedc7..00000000 --- a/src/Nerve_GIC/example/Nerve.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Mathieu Carrière - * - * Copyright (C) 2017 INRIA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 - -void usage(int nbArgs, char *const progName) { - std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; - std::cerr << "Usage: " << progName << " filename.off coordinate resolution gain [--v] \n"; - std::cerr << " i.e.: " << progName << " ../../data/points/human.off 2 10 0.3 --v \n"; - exit(-1); // ----- >> -} - -int main(int argc, char **argv) { - if ((argc != 5) && (argc != 6)) usage(argc, argv[0]); - - using Point = std::vector; - - std::string off_file_name(argv[1]); - int coord = atoi(argv[2]); - int resolution = atoi(argv[3]); - double gain = atof(argv[4]); - bool verb = 0; - if (argc == 6) verb = 1; - - // -------------------------------- - // Init of a Nerve from an OFF file - // -------------------------------- - - Gudhi::cover_complex::Cover_complex SC; - SC.set_verbose(verb); - - bool check = SC.read_point_cloud(off_file_name); - - if (!check) { - std::cout << "Incorrect OFF file." << std::endl; - } else { - SC.set_type("Nerve"); - - SC.set_color_from_coordinate(coord); - SC.set_function_from_coordinate(coord); - - SC.set_graph_from_OFF(); - SC.set_resolution_with_interval_number(resolution); - SC.set_gain(gain); - SC.set_cover_from_function(); - - SC.find_simplices(); - - SC.write_info(); - - Gudhi::Simplex_tree<> stree; - SC.create_complex(stree); - SC.compute_PD(); - - // ---------------------------------------------------------------------------- - // Display information about the graph induced complex - // ---------------------------------------------------------------------------- - - if (verb) { - std::cout << "Nerve is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - " - << stree.num_vertices() << " vertices." << std::endl; - - std::cout << "Iterator on Nerve simplices" << std::endl; - for (auto f_simplex : stree.filtration_simplex_range()) { - for (auto vertex : stree.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; - } - std::cout << std::endl; - } - } - } - - return 0; -} diff --git a/src/Nerve_GIC/example/Nerve.txt b/src/Nerve_GIC/example/Nerve.txt deleted file mode 100644 index 839ff45e..00000000 --- a/src/Nerve_GIC/example/Nerve.txt +++ /dev/null @@ -1,63 +0,0 @@ -Min function value = -0.979672 and Max function value = 0.816414 -Interval 0 = [-0.979672, -0.761576] -Interval 1 = [-0.838551, -0.581967] -Interval 2 = [-0.658942, -0.402359] -Interval 3 = [-0.479334, -0.22275] -Interval 4 = [-0.299725, -0.0431415] -Interval 5 = [-0.120117, 0.136467] -Interval 6 = [0.059492, 0.316076] -Interval 7 = [0.239101, 0.495684] -Interval 8 = [0.418709, 0.675293] -Interval 9 = [0.598318, 0.816414] -Computing preimages... -Computing connected components... -.txt generated. It can be visualized with e.g. python KeplerMapperVisuFromTxtFile.py and firefox. -5 interval(s) in dimension 0: - [-0.909111, 0.00817529] - [-0.171433, 0.367392] - [-0.171433, 0.367392] - [-0.909111, 0.745853] -0 interval(s) in dimension 1: -Nerve is of dimension 1 - 41 simplices - 21 vertices. -Iterator on Nerve simplices -1 -0 -4 -4 0 -2 -2 1 -8 -8 2 -5 -5 4 -9 -9 8 -13 -13 5 -14 -14 9 -19 -19 13 -25 -32 -20 -32 20 -33 -33 25 -26 -26 14 -26 19 -42 -42 26 -34 -34 33 -27 -27 20 -35 -35 27 -35 34 -42 35 -44 -44 35 -54 -54 44 \ No newline at end of file diff --git a/src/Nerve_GIC/example/VoronoiGIC.cpp b/src/Nerve_GIC/example/VoronoiGIC.cpp deleted file mode 100644 index 32431cc2..00000000 --- a/src/Nerve_GIC/example/VoronoiGIC.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Mathieu Carrière - * - * 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 . - */ - -#include - -#include -#include - -void usage(int nbArgs, char *const progName) { - std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; - std::cerr << "Usage: " << progName << " filename.off N [--v] \n"; - std::cerr << " i.e.: " << progName << " ../../data/points/human.off 100 --v \n"; - exit(-1); // ----- >> -} - -int main(int argc, char **argv) { - if ((argc != 3) && (argc != 4)) usage(argc, argv[0]); - - using Point = std::vector; - - std::string off_file_name(argv[1]); - int m = atoi(argv[2]); - bool verb = 0; - if (argc == 4) verb = 1; - - // ---------------------------------------------------------------------------- - // Init of a graph induced complex from an OFF file - // ---------------------------------------------------------------------------- - - Gudhi::cover_complex::Cover_complex GIC; - GIC.set_verbose(verb); - - bool check = GIC.read_point_cloud(off_file_name); - - if (!check) { - std::cout << "Incorrect OFF file." << std::endl; - } else { - GIC.set_type("GIC"); - - GIC.set_color_from_coordinate(); - - GIC.set_graph_from_OFF(); - GIC.set_cover_from_Voronoi(Gudhi::Euclidean_distance(), m); - - GIC.find_simplices(); - - GIC.plot_OFF(); - - Gudhi::Simplex_tree<> stree; - GIC.create_complex(stree); - - // ---------------------------------------------------------------------------- - // Display information about the graph induced complex - // ---------------------------------------------------------------------------- - - if (verb) { - std::cout << "Graph induced complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() - << " simplices - " << stree.num_vertices() << " vertices." << std::endl; - - std::cout << "Iterator on graph induced complex simplices" << std::endl; - for (auto f_simplex : stree.filtration_simplex_range()) { - for (auto vertex : stree.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; - } - std::cout << std::endl; - } - } - } - - return 0; -} diff --git a/src/Nerve_GIC/example/km.py b/src/Nerve_GIC/example/km.py deleted file mode 100755 index 53024aab..00000000 --- a/src/Nerve_GIC/example/km.py +++ /dev/null @@ -1,390 +0,0 @@ -from __future__ import division -import numpy as np -from collections import defaultdict -import json -import itertools -from sklearn import cluster, preprocessing, manifold -from datetime import datetime -import sys - -class KeplerMapper(object): - # With this class you can build topological networks from (high-dimensional) data. - # - # 1) Fit a projection/lens/function to a dataset and transform it. - # For instance "mean_of_row(x) for x in X" - # 2) Map this projection with overlapping intervals/hypercubes. - # Cluster the points inside the interval - # (Note: we cluster on the inverse image/original data to lessen projection loss). - # If two clusters/nodes have the same members (due to the overlap), then: - # connect these with an edge. - # 3) Visualize the network using HTML and D3.js. - # - # functions - # --------- - # fit_transform: Create a projection (lens) from a dataset - # map: Apply Mapper algorithm on this projection and build a simplicial complex - # visualize: Turns the complex dictionary into a HTML/D3.js visualization - - def __init__(self, verbose=2): - self.verbose = verbose - - self.chunk_dist = [] - self.overlap_dist = [] - self.d = [] - self.nr_cubes = 0 - self.overlap_perc = 0 - self.clusterer = False - - def fit_transform(self, X, projection="sum", scaler=preprocessing.MinMaxScaler()): - # Creates the projection/lens from X. - # - # Input: X. Input features as a numpy array. - # Output: projected_X. original data transformed to a projection (lens). - # - # parameters - # ---------- - # projection: Projection parameter is either a string, - # a scikit class with fit_transform, like manifold.TSNE(), - # or a list of dimension indices. - # scaler: if None, do no scaling, else apply scaling to the projection - # Default: Min-Max scaling - - self.scaler = scaler - self.projection = str(projection) - - # Detect if projection is a class (for scikit-learn) - #if str(type(projection))[1:6] == "class": #TODO: de-ugly-fy - # reducer = projection - # if self.verbose > 0: - # try: - # projection.set_params(**{"verbose":self.verbose}) - # except: - # pass - # print("\n..Projecting data using: \n\t%s\n"%str(projection)) - # X = reducer.fit_transform(X) - - # Detect if projection is a string (for standard functions) - if isinstance(projection, str): - if self.verbose > 0: - print("\n..Projecting data using: %s"%(projection)) - # Stats lenses - if projection == "sum": # sum of row - X = np.sum(X, axis=1).reshape((X.shape[0],1)) - if projection == "mean": # mean of row - X = np.mean(X, axis=1).reshape((X.shape[0],1)) - if projection == "median": # mean of row - X = np.median(X, axis=1).reshape((X.shape[0],1)) - if projection == "max": # max of row - X = np.max(X, axis=1).reshape((X.shape[0],1)) - if projection == "min": # min of row - X = np.min(X, axis=1).reshape((X.shape[0],1)) - if projection == "std": # std of row - X = np.std(X, axis=1).reshape((X.shape[0],1)) - - if projection == "dist_mean": # Distance of x to mean of X - X_mean = np.mean(X, axis=0) - X = np.sum(np.sqrt((X - X_mean)**2), axis=1).reshape((X.shape[0],1)) - - # Detect if projection is a list (with dimension indices) - if isinstance(projection, list): - if self.verbose > 0: - print("\n..Projecting data using: %s"%(str(projection))) - X = X[:,np.array(projection)] - - # Scaling - if scaler is not None: - if self.verbose > 0: - print("\n..Scaling with: %s\n"%str(scaler)) - X = scaler.fit_transform(X) - - return X - - def map(self, projected_X, inverse_X=None, clusterer=cluster.DBSCAN(eps=0.5,min_samples=3), nr_cubes=10, overlap_perc=0.1): - # This maps the data to a simplicial complex. Returns a dictionary with nodes and links. - # - # Input: projected_X. A Numpy array with the projection/lens. - # Output: complex. A dictionary with "nodes", "links" and "meta information" - # - # parameters - # ---------- - # projected_X projected_X. A Numpy array with the projection/lens. Required. - # inverse_X Numpy array or None. If None then the projection itself is used for clustering. - # clusterer Scikit-learn API compatible clustering algorithm. Default: DBSCAN - # nr_cubes Int. The number of intervals/hypercubes to create. - # overlap_perc Float. The percentage of overlap "between" the intervals/hypercubes. - - start = datetime.now() - - # Helper function - def cube_coordinates_all(nr_cubes, nr_dimensions): - # Helper function to get origin coordinates for our intervals/hypercubes - # Useful for looping no matter the number of cubes or dimensions - # Example: if there are 4 cubes per dimension and 3 dimensions - # return the bottom left (origin) coordinates of 64 hypercubes, - # as a sorted list of Numpy arrays - # TODO: elegance-ify... - l = [] - for x in range(nr_cubes): - l += [x] * nr_dimensions - return [np.array(list(f)) for f in sorted(set(itertools.permutations(l,nr_dimensions)))] - - nodes = defaultdict(list) - links = defaultdict(list) - complex = {} - self.nr_cubes = nr_cubes - self.clusterer = clusterer - self.overlap_perc = overlap_perc - - if self.verbose > 0: - print("Mapping on data shaped %s using dimensions\n"%(str(projected_X.shape))) - - # If inverse image is not provided, we use the projection as the inverse image (suffer projection loss) - if inverse_X is None: - inverse_X = projected_X - - # We chop up the min-max column ranges into 'nr_cubes' parts - self.chunk_dist = (np.max(projected_X, axis=0) - np.min(projected_X, axis=0))/nr_cubes - - # We calculate the overlapping windows distance - self.overlap_dist = self.overlap_perc * self.chunk_dist - - # We find our starting point - self.d = np.min(projected_X, axis=0) - - # Use a dimension index array on the projected X - # (For now this uses the entire dimensionality, but we keep for experimentation) - di = np.array([x for x in range(projected_X.shape[1])]) - - # Prefix'ing the data with ID's - ids = np.array([x for x in range(projected_X.shape[0])]) - projected_X = np.c_[ids,projected_X] - inverse_X = np.c_[ids,inverse_X] - - # Subdivide the projected data X in intervals/hypercubes with overlap - if self.verbose > 0: - total_cubes = len(cube_coordinates_all(nr_cubes,projected_X.shape[1])) - print("Creating %s hypercubes."%total_cubes) - - for i, coor in enumerate(cube_coordinates_all(nr_cubes,di.shape[0])): - # Slice the hypercube - hypercube = projected_X[ np.invert(np.any((projected_X[:,di+1] >= self.d[di] + (coor * self.chunk_dist[di])) & - (projected_X[:,di+1] < self.d[di] + (coor * self.chunk_dist[di]) + self.chunk_dist[di] + self.overlap_dist[di]) == False, axis=1 )) ] - - if self.verbose > 1: - print("There are %s points in cube_%s / %s with starting range %s"% - (hypercube.shape[0],i,total_cubes,self.d[di] + (coor * self.chunk_dist[di]))) - - # If at least one sample inside the hypercube - if hypercube.shape[0] > 0: - # Cluster the data point(s) in the cube, skipping the id-column - # Note that we apply clustering on the inverse image (original data samples) that fall inside the cube. - inverse_x = inverse_X[[int(nn) for nn in hypercube[:,0]]] - - clusterer.fit(inverse_x[:,1:]) - - if self.verbose > 1: - print("Found %s clusters in cube_%s\n"%(np.unique(clusterer.labels_[clusterer.labels_ > -1]).shape[0],i)) - - #Now for every (sample id in cube, predicted cluster label) - for a in np.c_[hypercube[:,0],clusterer.labels_]: - if a[1] != -1: #if not predicted as noise - cluster_id = str(coor[0])+"_"+str(i)+"_"+str(a[1])+"_"+str(coor)+"_"+str(self.d[di] + (coor * self.chunk_dist[di])) # TODO: de-rudimentary-ify - nodes[cluster_id].append( int(a[0]) ) # Append the member id's as integers - else: - if self.verbose > 1: - print("Cube_%s is empty.\n"%(i)) - - # Create links when clusters from different hypercubes have members with the same sample id. - candidates = itertools.combinations(nodes.keys(),2) - for candidate in candidates: - # if there are non-unique members in the union - if len(nodes[candidate[0]]+nodes[candidate[1]]) != len(set(nodes[candidate[0]]+nodes[candidate[1]])): - links[candidate[0]].append( candidate[1] ) - - # Reporting - if self.verbose > 0: - nr_links = 0 - for k in links: - nr_links += len(links[k]) - print("\ncreated %s edges and %s nodes in %s."%(nr_links,len(nodes),str(datetime.now()-start))) - - complex["nodes"] = nodes - complex["links"] = links - complex["meta"] = self.projection - - return complex - - def visualize(self, complex, color_function="", path_html="mapper_visualization_output.html", title="My Data", - graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=None, width_html=0, - height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=0,gain=0,minimum=0,maximum=0): - # Turns the dictionary 'complex' in a html file with d3.js - # - # Input: complex. Dictionary (output from calling .map()) - # Output: a HTML page saved as a file in 'path_html'. - # - # parameters - # ---------- - # color_function string. Not fully implemented. Default: "" (distance to origin) - # path_html file path as string. Where to save the HTML page. - # title string. HTML page document title and first heading. - # graph_link_distance int. Edge length. - # graph_gravity float. "Gravity" to center of layout. - # graph_charge int. charge between nodes. - # custom_tooltips None or Numpy Array. You could use "y"-label array for this. - # width_html int. Width of canvas. Default: 0 (full width) - # height_html int. Height of canvas. Default: 0 (full height) - # show_tooltips bool. default:True - # show_title bool. default:True - # show_meta bool. default:True - - # Format JSON for D3 graph - json_s = {} - json_s["nodes"] = [] - json_s["links"] = [] - k2e = {} # a key to incremental int dict, used for id's when linking - - for e, k in enumerate(complex["nodes"]): - # Tooltip and node color formatting, TODO: de-mess-ify - if custom_tooltips is not None: - tooltip_s = "

Cluster %s

"%k + " ".join(str(custom_tooltips[complex["nodes"][k][0]]).split(" ")) - if maximum == minimum: - tooltip_i = 0 - else: - tooltip_i = int(30*(custom_tooltips[complex["nodes"][k][0]]-minimum)/(maximum-minimum)) - json_s["nodes"].append({"name": str(k), "tooltip": tooltip_s, "group": 2 * int(np.log(complex["nodes"][k][2])), "color": tooltip_i}) - else: - tooltip_s = "

Cluster %s

Contains %s members."%(k,len(complex["nodes"][k])) - json_s["nodes"].append({"name": str(k), "tooltip": tooltip_s, "group": 2 * int(np.log(len(complex["nodes"][k]))), "color": str(k.split("_")[0])}) - k2e[k] = e - for k in complex["links"]: - for link in complex["links"][k]: - json_s["links"].append({"source": k2e[k], "target":k2e[link],"value":1}) - - # Width and height of graph in HTML output - if width_html == 0: - width_css = "100%" - width_js = 'document.getElementById("holder").offsetWidth-20' - else: - width_css = "%spx" % width_html - width_js = "%s" % width_html - if height_html == 0: - height_css = "100%" - height_js = 'document.getElementById("holder").offsetHeight-20' - else: - height_css = "%spx" % height_html - height_js = "%s" % height_html - - # Whether to show certain UI elements or not - if show_tooltips == False: - tooltips_display = "display: none;" - else: - tooltips_display = "" - - if show_meta == False: - meta_display = "display: none;" - else: - meta_display = "" - - if show_title == False: - title_display = "display: none;" - else: - title_display = "" - - with open(path_html,"wb") as outfile: - html = """ - - - %s | KeplerMapper - - - -
-

%s

-

- Lens
%s

- Length of intervals
%s

- Overlap percentage
%s%%

- Color Function
%s -

-
- - """%(title,width_css, height_css, title_display, meta_display, tooltips_display, title,complex["meta"],res,gain*100,color_function,width_js,height_js,graph_charge,graph_link_distance,graph_gravity,json.dumps(json_s)) - outfile.write(html.encode("utf-8")) - if self.verbose > 0: - print("\nWrote d3.js graph to '%s'"%path_html) diff --git a/src/Nerve_GIC/example/km.py.COPYRIGHT b/src/Nerve_GIC/example/km.py.COPYRIGHT deleted file mode 100644 index bef7b121..00000000 --- a/src/Nerve_GIC/example/km.py.COPYRIGHT +++ /dev/null @@ -1,26 +0,0 @@ -km.py is a fork of https://github.com/MLWave/kepler-mapper. -Only the visualization part has been kept (Mapper part has been removed). - -This file has te following Copyright : - -The MIT License (MIT) - -Copyright (c) 2015 Triskelion - HJ van Veen - info@mlwave.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/Nerve_GIC/utilities/CMakeLists.txt b/src/Nerve_GIC/utilities/CMakeLists.txt new file mode 100644 index 00000000..a0508dc2 --- /dev/null +++ b/src/Nerve_GIC/utilities/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 2.6) +project(Nerve_GIC_examples) + +if (NOT CGAL_VERSION VERSION_LESS 4.8.1) + + add_executable ( Nerve Nerve.cpp ) + add_executable ( VoronoiGIC VoronoiGIC.cpp ) + + if (TBB_FOUND) + target_link_libraries(Nerve ${TBB_LIBRARIES}) + target_link_libraries(VoronoiGIC ${TBB_LIBRARIES}) + endif() + + file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + + add_test(NAME Nerve_GIC_utilities_nerve COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/human.off" "2" "10" "0.3") + + add_test(NAME Nerve_GIC_utilities_VoronoiGIC COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/human.off" "100") + +endif (NOT CGAL_VERSION VERSION_LESS 4.8.1) diff --git a/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py b/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py new file mode 100755 index 00000000..d2897774 --- /dev/null +++ b/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python + +import km +import numpy as np +from collections import defaultdict + +"""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 + + 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 . +""" + +__author__ = "Mathieu Carriere" +__copyright__ = "Copyright (C) 2017 INRIA" +__license__ = "GPL v3" + +network = {} +mapper = km.KeplerMapper(verbose=0) +data = np.zeros((3,3)) +projected_data = mapper.fit_transform( data, projection="sum", scaler=None ) + +f = open('SC.txt','r') +nodes = defaultdict(list) +links = defaultdict(list) +custom = defaultdict(list) + +dat = f.readline() +lens = f.readline() +color = f.readline(); +param = [float(i) for i in f.readline().split(" ")] + +nums = [int(i) for i in f.readline().split(" ")] +num_nodes = nums[0] +num_edges = nums[1] + +for i in range(0,num_nodes): + point = [float(j) for j in f.readline().split(" ")] + nodes[ str(int(point[0])) ] = [ int(point[0]), point[1], int(point[2]) ] + links[ str(int(point[0])) ] = [] + custom[ int(point[0]) ] = point[1] + +m = min([custom[i] for i in range(0,num_nodes)]) +M = max([custom[i] for i in range(0,num_nodes)]) + +for i in range(0,num_edges): + edge = [int(j) for j in f.readline().split(" ")] + links[ str(edge[0]) ].append( str(edge[1]) ) + links[ str(edge[1]) ].append( str(edge[0]) ) + +network["nodes"] = nodes +network["links"] = links +network["meta"] = lens + +mapper.visualize(network, color_function = color, path_html="SC.html", title=dat, +graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=custom, width_html=0, +height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=param[0],gain=param[1], minimum=m,maximum=M) diff --git a/src/Nerve_GIC/utilities/Nerve.cpp b/src/Nerve_GIC/utilities/Nerve.cpp new file mode 100644 index 00000000..6abdedc7 --- /dev/null +++ b/src/Nerve_GIC/utilities/Nerve.cpp @@ -0,0 +1,96 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Mathieu Carrière + * + * Copyright (C) 2017 INRIA + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +void usage(int nbArgs, char *const progName) { + std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; + std::cerr << "Usage: " << progName << " filename.off coordinate resolution gain [--v] \n"; + std::cerr << " i.e.: " << progName << " ../../data/points/human.off 2 10 0.3 --v \n"; + exit(-1); // ----- >> +} + +int main(int argc, char **argv) { + if ((argc != 5) && (argc != 6)) usage(argc, argv[0]); + + using Point = std::vector; + + std::string off_file_name(argv[1]); + int coord = atoi(argv[2]); + int resolution = atoi(argv[3]); + double gain = atof(argv[4]); + bool verb = 0; + if (argc == 6) verb = 1; + + // -------------------------------- + // Init of a Nerve from an OFF file + // -------------------------------- + + Gudhi::cover_complex::Cover_complex SC; + SC.set_verbose(verb); + + bool check = SC.read_point_cloud(off_file_name); + + if (!check) { + std::cout << "Incorrect OFF file." << std::endl; + } else { + SC.set_type("Nerve"); + + SC.set_color_from_coordinate(coord); + SC.set_function_from_coordinate(coord); + + SC.set_graph_from_OFF(); + SC.set_resolution_with_interval_number(resolution); + SC.set_gain(gain); + SC.set_cover_from_function(); + + SC.find_simplices(); + + SC.write_info(); + + Gudhi::Simplex_tree<> stree; + SC.create_complex(stree); + SC.compute_PD(); + + // ---------------------------------------------------------------------------- + // Display information about the graph induced complex + // ---------------------------------------------------------------------------- + + if (verb) { + std::cout << "Nerve is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - " + << stree.num_vertices() << " vertices." << std::endl; + + std::cout << "Iterator on Nerve simplices" << std::endl; + for (auto f_simplex : stree.filtration_simplex_range()) { + for (auto vertex : stree.simplex_vertex_range(f_simplex)) { + std::cout << vertex << " "; + } + std::cout << std::endl; + } + } + } + + return 0; +} diff --git a/src/Nerve_GIC/utilities/Nerve.txt b/src/Nerve_GIC/utilities/Nerve.txt new file mode 100644 index 00000000..839ff45e --- /dev/null +++ b/src/Nerve_GIC/utilities/Nerve.txt @@ -0,0 +1,63 @@ +Min function value = -0.979672 and Max function value = 0.816414 +Interval 0 = [-0.979672, -0.761576] +Interval 1 = [-0.838551, -0.581967] +Interval 2 = [-0.658942, -0.402359] +Interval 3 = [-0.479334, -0.22275] +Interval 4 = [-0.299725, -0.0431415] +Interval 5 = [-0.120117, 0.136467] +Interval 6 = [0.059492, 0.316076] +Interval 7 = [0.239101, 0.495684] +Interval 8 = [0.418709, 0.675293] +Interval 9 = [0.598318, 0.816414] +Computing preimages... +Computing connected components... +.txt generated. It can be visualized with e.g. python KeplerMapperVisuFromTxtFile.py and firefox. +5 interval(s) in dimension 0: + [-0.909111, 0.00817529] + [-0.171433, 0.367392] + [-0.171433, 0.367392] + [-0.909111, 0.745853] +0 interval(s) in dimension 1: +Nerve is of dimension 1 - 41 simplices - 21 vertices. +Iterator on Nerve simplices +1 +0 +4 +4 0 +2 +2 1 +8 +8 2 +5 +5 4 +9 +9 8 +13 +13 5 +14 +14 9 +19 +19 13 +25 +32 +20 +32 20 +33 +33 25 +26 +26 14 +26 19 +42 +42 26 +34 +34 33 +27 +27 20 +35 +35 27 +35 34 +42 35 +44 +44 35 +54 +54 44 \ No newline at end of file diff --git a/src/Nerve_GIC/utilities/VoronoiGIC.cpp b/src/Nerve_GIC/utilities/VoronoiGIC.cpp new file mode 100644 index 00000000..32431cc2 --- /dev/null +++ b/src/Nerve_GIC/utilities/VoronoiGIC.cpp @@ -0,0 +1,90 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Mathieu Carrière + * + * Copyright (C) 2017 INRIA + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +void usage(int nbArgs, char *const progName) { + std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; + std::cerr << "Usage: " << progName << " filename.off N [--v] \n"; + std::cerr << " i.e.: " << progName << " ../../data/points/human.off 100 --v \n"; + exit(-1); // ----- >> +} + +int main(int argc, char **argv) { + if ((argc != 3) && (argc != 4)) usage(argc, argv[0]); + + using Point = std::vector; + + std::string off_file_name(argv[1]); + int m = atoi(argv[2]); + bool verb = 0; + if (argc == 4) verb = 1; + + // ---------------------------------------------------------------------------- + // Init of a graph induced complex from an OFF file + // ---------------------------------------------------------------------------- + + Gudhi::cover_complex::Cover_complex GIC; + GIC.set_verbose(verb); + + bool check = GIC.read_point_cloud(off_file_name); + + if (!check) { + std::cout << "Incorrect OFF file." << std::endl; + } else { + GIC.set_type("GIC"); + + GIC.set_color_from_coordinate(); + + GIC.set_graph_from_OFF(); + GIC.set_cover_from_Voronoi(Gudhi::Euclidean_distance(), m); + + GIC.find_simplices(); + + GIC.plot_OFF(); + + Gudhi::Simplex_tree<> stree; + GIC.create_complex(stree); + + // ---------------------------------------------------------------------------- + // Display information about the graph induced complex + // ---------------------------------------------------------------------------- + + if (verb) { + std::cout << "Graph induced complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() + << " simplices - " << stree.num_vertices() << " vertices." << std::endl; + + std::cout << "Iterator on graph induced complex simplices" << std::endl; + for (auto f_simplex : stree.filtration_simplex_range()) { + for (auto vertex : stree.simplex_vertex_range(f_simplex)) { + std::cout << vertex << " "; + } + std::cout << std::endl; + } + } + } + + return 0; +} diff --git a/src/Nerve_GIC/utilities/km.py b/src/Nerve_GIC/utilities/km.py new file mode 100755 index 00000000..53024aab --- /dev/null +++ b/src/Nerve_GIC/utilities/km.py @@ -0,0 +1,390 @@ +from __future__ import division +import numpy as np +from collections import defaultdict +import json +import itertools +from sklearn import cluster, preprocessing, manifold +from datetime import datetime +import sys + +class KeplerMapper(object): + # With this class you can build topological networks from (high-dimensional) data. + # + # 1) Fit a projection/lens/function to a dataset and transform it. + # For instance "mean_of_row(x) for x in X" + # 2) Map this projection with overlapping intervals/hypercubes. + # Cluster the points inside the interval + # (Note: we cluster on the inverse image/original data to lessen projection loss). + # If two clusters/nodes have the same members (due to the overlap), then: + # connect these with an edge. + # 3) Visualize the network using HTML and D3.js. + # + # functions + # --------- + # fit_transform: Create a projection (lens) from a dataset + # map: Apply Mapper algorithm on this projection and build a simplicial complex + # visualize: Turns the complex dictionary into a HTML/D3.js visualization + + def __init__(self, verbose=2): + self.verbose = verbose + + self.chunk_dist = [] + self.overlap_dist = [] + self.d = [] + self.nr_cubes = 0 + self.overlap_perc = 0 + self.clusterer = False + + def fit_transform(self, X, projection="sum", scaler=preprocessing.MinMaxScaler()): + # Creates the projection/lens from X. + # + # Input: X. Input features as a numpy array. + # Output: projected_X. original data transformed to a projection (lens). + # + # parameters + # ---------- + # projection: Projection parameter is either a string, + # a scikit class with fit_transform, like manifold.TSNE(), + # or a list of dimension indices. + # scaler: if None, do no scaling, else apply scaling to the projection + # Default: Min-Max scaling + + self.scaler = scaler + self.projection = str(projection) + + # Detect if projection is a class (for scikit-learn) + #if str(type(projection))[1:6] == "class": #TODO: de-ugly-fy + # reducer = projection + # if self.verbose > 0: + # try: + # projection.set_params(**{"verbose":self.verbose}) + # except: + # pass + # print("\n..Projecting data using: \n\t%s\n"%str(projection)) + # X = reducer.fit_transform(X) + + # Detect if projection is a string (for standard functions) + if isinstance(projection, str): + if self.verbose > 0: + print("\n..Projecting data using: %s"%(projection)) + # Stats lenses + if projection == "sum": # sum of row + X = np.sum(X, axis=1).reshape((X.shape[0],1)) + if projection == "mean": # mean of row + X = np.mean(X, axis=1).reshape((X.shape[0],1)) + if projection == "median": # mean of row + X = np.median(X, axis=1).reshape((X.shape[0],1)) + if projection == "max": # max of row + X = np.max(X, axis=1).reshape((X.shape[0],1)) + if projection == "min": # min of row + X = np.min(X, axis=1).reshape((X.shape[0],1)) + if projection == "std": # std of row + X = np.std(X, axis=1).reshape((X.shape[0],1)) + + if projection == "dist_mean": # Distance of x to mean of X + X_mean = np.mean(X, axis=0) + X = np.sum(np.sqrt((X - X_mean)**2), axis=1).reshape((X.shape[0],1)) + + # Detect if projection is a list (with dimension indices) + if isinstance(projection, list): + if self.verbose > 0: + print("\n..Projecting data using: %s"%(str(projection))) + X = X[:,np.array(projection)] + + # Scaling + if scaler is not None: + if self.verbose > 0: + print("\n..Scaling with: %s\n"%str(scaler)) + X = scaler.fit_transform(X) + + return X + + def map(self, projected_X, inverse_X=None, clusterer=cluster.DBSCAN(eps=0.5,min_samples=3), nr_cubes=10, overlap_perc=0.1): + # This maps the data to a simplicial complex. Returns a dictionary with nodes and links. + # + # Input: projected_X. A Numpy array with the projection/lens. + # Output: complex. A dictionary with "nodes", "links" and "meta information" + # + # parameters + # ---------- + # projected_X projected_X. A Numpy array with the projection/lens. Required. + # inverse_X Numpy array or None. If None then the projection itself is used for clustering. + # clusterer Scikit-learn API compatible clustering algorithm. Default: DBSCAN + # nr_cubes Int. The number of intervals/hypercubes to create. + # overlap_perc Float. The percentage of overlap "between" the intervals/hypercubes. + + start = datetime.now() + + # Helper function + def cube_coordinates_all(nr_cubes, nr_dimensions): + # Helper function to get origin coordinates for our intervals/hypercubes + # Useful for looping no matter the number of cubes or dimensions + # Example: if there are 4 cubes per dimension and 3 dimensions + # return the bottom left (origin) coordinates of 64 hypercubes, + # as a sorted list of Numpy arrays + # TODO: elegance-ify... + l = [] + for x in range(nr_cubes): + l += [x] * nr_dimensions + return [np.array(list(f)) for f in sorted(set(itertools.permutations(l,nr_dimensions)))] + + nodes = defaultdict(list) + links = defaultdict(list) + complex = {} + self.nr_cubes = nr_cubes + self.clusterer = clusterer + self.overlap_perc = overlap_perc + + if self.verbose > 0: + print("Mapping on data shaped %s using dimensions\n"%(str(projected_X.shape))) + + # If inverse image is not provided, we use the projection as the inverse image (suffer projection loss) + if inverse_X is None: + inverse_X = projected_X + + # We chop up the min-max column ranges into 'nr_cubes' parts + self.chunk_dist = (np.max(projected_X, axis=0) - np.min(projected_X, axis=0))/nr_cubes + + # We calculate the overlapping windows distance + self.overlap_dist = self.overlap_perc * self.chunk_dist + + # We find our starting point + self.d = np.min(projected_X, axis=0) + + # Use a dimension index array on the projected X + # (For now this uses the entire dimensionality, but we keep for experimentation) + di = np.array([x for x in range(projected_X.shape[1])]) + + # Prefix'ing the data with ID's + ids = np.array([x for x in range(projected_X.shape[0])]) + projected_X = np.c_[ids,projected_X] + inverse_X = np.c_[ids,inverse_X] + + # Subdivide the projected data X in intervals/hypercubes with overlap + if self.verbose > 0: + total_cubes = len(cube_coordinates_all(nr_cubes,projected_X.shape[1])) + print("Creating %s hypercubes."%total_cubes) + + for i, coor in enumerate(cube_coordinates_all(nr_cubes,di.shape[0])): + # Slice the hypercube + hypercube = projected_X[ np.invert(np.any((projected_X[:,di+1] >= self.d[di] + (coor * self.chunk_dist[di])) & + (projected_X[:,di+1] < self.d[di] + (coor * self.chunk_dist[di]) + self.chunk_dist[di] + self.overlap_dist[di]) == False, axis=1 )) ] + + if self.verbose > 1: + print("There are %s points in cube_%s / %s with starting range %s"% + (hypercube.shape[0],i,total_cubes,self.d[di] + (coor * self.chunk_dist[di]))) + + # If at least one sample inside the hypercube + if hypercube.shape[0] > 0: + # Cluster the data point(s) in the cube, skipping the id-column + # Note that we apply clustering on the inverse image (original data samples) that fall inside the cube. + inverse_x = inverse_X[[int(nn) for nn in hypercube[:,0]]] + + clusterer.fit(inverse_x[:,1:]) + + if self.verbose > 1: + print("Found %s clusters in cube_%s\n"%(np.unique(clusterer.labels_[clusterer.labels_ > -1]).shape[0],i)) + + #Now for every (sample id in cube, predicted cluster label) + for a in np.c_[hypercube[:,0],clusterer.labels_]: + if a[1] != -1: #if not predicted as noise + cluster_id = str(coor[0])+"_"+str(i)+"_"+str(a[1])+"_"+str(coor)+"_"+str(self.d[di] + (coor * self.chunk_dist[di])) # TODO: de-rudimentary-ify + nodes[cluster_id].append( int(a[0]) ) # Append the member id's as integers + else: + if self.verbose > 1: + print("Cube_%s is empty.\n"%(i)) + + # Create links when clusters from different hypercubes have members with the same sample id. + candidates = itertools.combinations(nodes.keys(),2) + for candidate in candidates: + # if there are non-unique members in the union + if len(nodes[candidate[0]]+nodes[candidate[1]]) != len(set(nodes[candidate[0]]+nodes[candidate[1]])): + links[candidate[0]].append( candidate[1] ) + + # Reporting + if self.verbose > 0: + nr_links = 0 + for k in links: + nr_links += len(links[k]) + print("\ncreated %s edges and %s nodes in %s."%(nr_links,len(nodes),str(datetime.now()-start))) + + complex["nodes"] = nodes + complex["links"] = links + complex["meta"] = self.projection + + return complex + + def visualize(self, complex, color_function="", path_html="mapper_visualization_output.html", title="My Data", + graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=None, width_html=0, + height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=0,gain=0,minimum=0,maximum=0): + # Turns the dictionary 'complex' in a html file with d3.js + # + # Input: complex. Dictionary (output from calling .map()) + # Output: a HTML page saved as a file in 'path_html'. + # + # parameters + # ---------- + # color_function string. Not fully implemented. Default: "" (distance to origin) + # path_html file path as string. Where to save the HTML page. + # title string. HTML page document title and first heading. + # graph_link_distance int. Edge length. + # graph_gravity float. "Gravity" to center of layout. + # graph_charge int. charge between nodes. + # custom_tooltips None or Numpy Array. You could use "y"-label array for this. + # width_html int. Width of canvas. Default: 0 (full width) + # height_html int. Height of canvas. Default: 0 (full height) + # show_tooltips bool. default:True + # show_title bool. default:True + # show_meta bool. default:True + + # Format JSON for D3 graph + json_s = {} + json_s["nodes"] = [] + json_s["links"] = [] + k2e = {} # a key to incremental int dict, used for id's when linking + + for e, k in enumerate(complex["nodes"]): + # Tooltip and node color formatting, TODO: de-mess-ify + if custom_tooltips is not None: + tooltip_s = "

Cluster %s

"%k + " ".join(str(custom_tooltips[complex["nodes"][k][0]]).split(" ")) + if maximum == minimum: + tooltip_i = 0 + else: + tooltip_i = int(30*(custom_tooltips[complex["nodes"][k][0]]-minimum)/(maximum-minimum)) + json_s["nodes"].append({"name": str(k), "tooltip": tooltip_s, "group": 2 * int(np.log(complex["nodes"][k][2])), "color": tooltip_i}) + else: + tooltip_s = "

Cluster %s

Contains %s members."%(k,len(complex["nodes"][k])) + json_s["nodes"].append({"name": str(k), "tooltip": tooltip_s, "group": 2 * int(np.log(len(complex["nodes"][k]))), "color": str(k.split("_")[0])}) + k2e[k] = e + for k in complex["links"]: + for link in complex["links"][k]: + json_s["links"].append({"source": k2e[k], "target":k2e[link],"value":1}) + + # Width and height of graph in HTML output + if width_html == 0: + width_css = "100%" + width_js = 'document.getElementById("holder").offsetWidth-20' + else: + width_css = "%spx" % width_html + width_js = "%s" % width_html + if height_html == 0: + height_css = "100%" + height_js = 'document.getElementById("holder").offsetHeight-20' + else: + height_css = "%spx" % height_html + height_js = "%s" % height_html + + # Whether to show certain UI elements or not + if show_tooltips == False: + tooltips_display = "display: none;" + else: + tooltips_display = "" + + if show_meta == False: + meta_display = "display: none;" + else: + meta_display = "" + + if show_title == False: + title_display = "display: none;" + else: + title_display = "" + + with open(path_html,"wb") as outfile: + html = """ + + + %s | KeplerMapper + + + +
+

%s

+

+ Lens
%s

+ Length of intervals
%s

+ Overlap percentage
%s%%

+ Color Function
%s +

+
+ + """%(title,width_css, height_css, title_display, meta_display, tooltips_display, title,complex["meta"],res,gain*100,color_function,width_js,height_js,graph_charge,graph_link_distance,graph_gravity,json.dumps(json_s)) + outfile.write(html.encode("utf-8")) + if self.verbose > 0: + print("\nWrote d3.js graph to '%s'"%path_html) diff --git a/src/Nerve_GIC/utilities/km.py.COPYRIGHT b/src/Nerve_GIC/utilities/km.py.COPYRIGHT new file mode 100644 index 00000000..bef7b121 --- /dev/null +++ b/src/Nerve_GIC/utilities/km.py.COPYRIGHT @@ -0,0 +1,26 @@ +km.py is a fork of https://github.com/MLWave/kepler-mapper. +Only the visualization part has been kept (Mapper part has been removed). + +This file has te following Copyright : + +The MIT License (MIT) + +Copyright (c) 2015 Triskelion - HJ van Veen - info@mlwave.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/Persistence_representations/example/CMakeLists.txt b/src/Persistence_representations/example/CMakeLists.txt index b8ce8ea6..eb3258f8 100644 --- a/src/Persistence_representations/example/CMakeLists.txt +++ b/src/Persistence_representations/example/CMakeLists.txt @@ -2,28 +2,23 @@ cmake_minimum_required(VERSION 2.6) project(Persistence_representations_example) add_executable ( Persistence_representations_example_landscape_on_grid persistence_landscape_on_grid.cpp ) -target_link_libraries(Persistence_representations_example_landscape_on_grid ${Boost_SYSTEM_LIBRARY}) add_test(NAME Persistence_representations_example_landscape_on_grid COMMAND $) add_executable ( Persistence_representations_example_landscape persistence_landscape.cpp ) -target_link_libraries(Persistence_representations_example_landscape ${Boost_SYSTEM_LIBRARY}) add_test(NAME Persistence_representations_example_landscape COMMAND $) add_executable ( Persistence_representations_example_intervals persistence_intervals.cpp ) -target_link_libraries(Persistence_representations_example_intervals ${Boost_SYSTEM_LIBRARY}) add_test(NAME Persistence_representations_example_intervals COMMAND $ "${CMAKE_SOURCE_DIR}/data/persistence_diagram/first.pers") add_executable ( Persistence_representations_example_vectors persistence_vectors.cpp ) -target_link_libraries(Persistence_representations_example_vectors ${Boost_SYSTEM_LIBRARY}) add_test(NAME Persistence_representations_example_vectors COMMAND $) add_executable ( Persistence_representations_example_heat_maps persistence_heat_maps.cpp ) -target_link_libraries(Persistence_representations_example_heat_maps ${Boost_SYSTEM_LIBRARY}) add_test(NAME Persistence_representations_example_heat_maps COMMAND $) diff --git a/src/Persistence_representations/test/CMakeLists.txt b/src/Persistence_representations/test/CMakeLists.txt index 4483de07..335a71ef 100644 --- a/src/Persistence_representations/test/CMakeLists.txt +++ b/src/Persistence_representations/test/CMakeLists.txt @@ -6,38 +6,38 @@ include(GUDHI_test_coverage) # copy data directory for tests purpose. file(COPY data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) add_executable ( Persistence_intervals_test_unit persistence_intervals_test.cpp ) -target_link_libraries(Persistence_intervals_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Persistence_intervals_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) gudhi_add_coverage_test(Persistence_intervals_test_unit) add_executable (Vector_representation_test_unit vector_representation_test.cpp ) -target_link_libraries(Vector_representation_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Vector_representation_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) gudhi_add_coverage_test(Vector_representation_test_unit) add_executable (Persistence_lanscapes_test_unit persistence_lanscapes_test.cpp ) -target_link_libraries(Persistence_lanscapes_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Persistence_lanscapes_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) gudhi_add_coverage_test(Persistence_lanscapes_test_unit) add_executable ( Persistence_lanscapes_on_grid_test_unit persistence_lanscapes_on_grid_test.cpp ) -target_link_libraries(Persistence_lanscapes_on_grid_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Persistence_lanscapes_on_grid_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) gudhi_add_coverage_test(Persistence_lanscapes_on_grid_test_unit) add_executable (Persistence_heat_maps_test_unit persistence_heat_maps_test.cpp ) -target_link_libraries(Persistence_heat_maps_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Persistence_heat_maps_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) gudhi_add_coverage_test(Persistence_heat_maps_test_unit) add_executable ( Read_persistence_from_file_test_unit read_persistence_from_file_test.cpp ) -target_link_libraries(Read_persistence_from_file_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Read_persistence_from_file_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) gudhi_add_coverage_test(Read_persistence_from_file_test_unit) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) add_executable (Persistence_intervals_with_distances_test_unit persistence_intervals_with_distances_test.cpp ) - target_link_libraries(Persistence_intervals_with_distances_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) + target_link_libraries(Persistence_intervals_with_distances_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Persistence_intervals_with_distances_test_unit ${TBB_LIBRARIES}) endif(TBB_FOUND) diff --git a/src/common/doc/examples.h b/src/common/doc/examples.h new file mode 100644 index 00000000..40f202c7 --- /dev/null +++ b/src/common/doc/examples.h @@ -0,0 +1,99 @@ +// List of GUDHI examples - Doxygen needs at least a file tag to analyse comments +// In user_version, `find . -name "*.cpp"` in example and utilities folders +/*! @file Examples + * @example Alpha_complex/Alpha_complex_from_off.cpp + * @example Alpha_complex/Alpha_complex_from_points.cpp + * @example Bottleneck_distance/bottleneck_basic_example.cpp + * @example Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp + * @example Witness_complex/example_nearest_landmark_table.cpp + * @example Witness_complex/example_witness_complex_off.cpp + * @example Witness_complex/example_witness_complex_sphere.cpp + * @example Witness_complex/example_strong_witness_complex_off.cpp + * @example Simplex_tree/mini_simplex_tree.cpp + * @example Simplex_tree/graph_expansion_with_blocker.cpp + * @example Simplex_tree/simple_simplex_tree.cpp + * @example Simplex_tree/simplex_tree_from_cliques_of_graph.cpp + * @example Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp + * @example Simplex_tree/cech_complex_cgal_mini_sphere_3d.cpp + * @example Persistent_cohomology/plain_homology.cpp + * @example Persistent_cohomology/persistence_from_file.cpp + * @example Persistent_cohomology/rips_persistence_step_by_step.cpp + * @example Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp + * @example Persistent_cohomology/custom_persistence_sort.cpp + * @example Persistent_cohomology/persistence_from_simple_simplex_tree.cpp + * @example Persistent_cohomology/rips_multifield_persistence.cpp + * @example Skeleton_blocker/Skeleton_blocker_from_simplices.cpp + * @example Skeleton_blocker/Skeleton_blocker_iteration.cpp + * @example Skeleton_blocker/Skeleton_blocker_link.cpp + * @example Contraction/Garland_heckbert.cpp + * @example Contraction/Rips_contraction.cpp + * @example Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp + * @example common/example_CGAL_3D_points_off_reader.cpp + * @example common/example_vector_double_points_off_reader.cpp + * @example common/example_CGAL_points_off_reader.cpp + * @example Rips_complex/example_one_skeleton_rips_from_distance_matrix.cpp + * @example Rips_complex/example_one_skeleton_rips_from_points.cpp + * @example Rips_complex/example_rips_complex_from_csv_distance_matrix_file.cpp + * @example Rips_complex/example_rips_complex_from_off_file.cpp + * @example Persistence_representations/persistence_intervals.cpp + * @example Persistence_representations/persistence_vectors.cpp + * @example Persistence_representations/persistence_heat_maps.cpp + * @example Persistence_representations/persistence_landscape_on_grid.cpp + * @example Persistence_representations/persistence_landscape.cpp + * @example Tangential_complex/example_basic.cpp + * @example Tangential_complex/example_with_perturb.cpp + * @example Subsampling/example_custom_kernel.cpp + * @example Subsampling/example_choose_n_farthest_points.cpp + * @example Subsampling/example_sparsify_point_set.cpp + * @example Subsampling/example_pick_n_random_points.cpp + * @example Nerve_GIC/CoordGIC.cpp + * @example Nerve_GIC/Nerve.cpp + * @example Nerve_GIC/FuncGIC.cpp + * @example Nerve_GIC/VoronoiGIC.cpp + * @example Spatial_searching/example_spatial_searching.cpp + * @example Alpha_complex/alpha_complex_3d_persistence.cpp + * @example Alpha_complex/alpha_complex_persistence.cpp + * @example Alpha_complex/weighted_periodic_alpha_complex_3d_persistence.cpp + * @example Alpha_complex/weighted_alpha_complex_3d_persistence.cpp + * @example Alpha_complex/periodic_alpha_complex_3d_persistence.cpp + * @example Alpha_complex/exact_alpha_complex_3d_persistence.cpp + * @example Bottleneck_distance/bottleneck_distance.cpp + * @example Witness_complex/weak_witness_persistence.cpp + * @example Witness_complex/strong_witness_persistence.cpp + * @example Bitmap_cubical_complex/cubical_complex_persistence.cpp + * @example Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp + * @example common/off_file_from_shape_generator.cpp + * @example Rips_complex/rips_distance_matrix_persistence.cpp + * @example Rips_complex/rips_persistence.cpp + * @example Persistence_representations/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp + * @example Persistence_representations/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp + * @example Persistence_representations/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp + * @example Persistence_representations/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp + * @example Persistence_representations/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp + * @example Persistence_representations/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp + * @example Persistence_representations/persistence_intervals/compute_number_of_dominant_intervals.cpp + * @example Persistence_representations/persistence_intervals/plot_persistence_Betti_numbers.cpp + * @example Persistence_representations/persistence_intervals/plot_persistence_intervals.cpp + * @example Persistence_representations/persistence_intervals/plot_histogram_of_intervals_lengths.cpp + * @example Persistence_representations/persistence_intervals/compute_bottleneck_distance.cpp + * @example Persistence_representations/persistence_heat_maps/create_pssk.cpp + * @example Persistence_representations/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp + * @example Persistence_representations/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp + * @example Persistence_representations/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp + * @example Persistence_representations/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp + * @example Persistence_representations/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp + * @example Persistence_representations/persistence_heat_maps/average_persistence_heat_maps.cpp + * @example Persistence_representations/persistence_heat_maps/plot_persistence_heat_map.cpp + * @example Persistence_representations/persistence_heat_maps/create_persistence_heat_maps.cpp + * @example Persistence_representations/persistence_vectors/plot_persistence_vectors.cpp + * @example Persistence_representations/persistence_vectors/compute_distance_of_persistence_vectors.cpp + * @example Persistence_representations/persistence_vectors/average_persistence_vectors.cpp + * @example Persistence_representations/persistence_vectors/create_persistence_vectors.cpp + * @example Persistence_representations/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp + * @example Persistence_representations/persistence_landscapes/average_landscapes.cpp + * @example Persistence_representations/persistence_landscapes/compute_scalar_product_of_landscapes.cpp + * @example Persistence_representations/persistence_landscapes/create_landscapes.cpp + * @example Persistence_representations/persistence_landscapes/compute_distance_of_landscapes.cpp + * @example Persistence_representations/persistence_landscapes/plot_landscapes.cpp + */ + diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h new file mode 100644 index 00000000..25675cc5 --- /dev/null +++ b/src/common/doc/installation.h @@ -0,0 +1,263 @@ +/*! \page installation GUDHI installation + * \tableofcontents + * As GUDHI is a header only library, there is no need to install the library. + * + * Examples of GUDHI headers inclusion can be found in \ref demos. + * + * \section compiling Compiling + * The library uses c++11 and requires Boost with version 1.48.0 or + * more recent. It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. + * + * \subsection demos Demos and examples + * To build the demos and examples, run the following commands in a terminal: +\verbatim cd /path-to-gudhi/ +mkdir build +cd build/ +cmake .. +make \endverbatim + * A list of examples is available here. + * + * \subsection testsuites Test suites + * To test your build, run the following command in a terminal: + * \verbatim make test \endverbatim + * + * \subsection documentationgeneration Documentation + * To generate the documentation, Doxygen is required. + * Run the following command in a terminal: +\verbatim +make doxygen +# Documentation will be generated in the folder YYYY-MM-DD-hh-mm-ss_GUDHI_X.Y.Z/doc/html/ +# You can customize the directory name by calling `cmake -DUSER_VERSION_DIR=/my/custom/folder` +\endverbatim + * + * \section optionallibrary Optional third-party library + * \subsection gmp GMP + * The multi-field persistent homology algorithm requires GMP which is a free library for arbitrary-precision + * arithmetic, operating on signed integers, rational numbers, and floating point numbers. + * + * The following example requires the GNU Multiple Precision Arithmetic + * Library (GMP) and will not be built if GMP is not installed: + * \li + * Persistent_cohomology/rips_multifield_persistence.cpp + * + * Having GMP version 4.2 or higher installed is recommended. + * + * \subsection cgal CGAL + * The \ref alpha_complex data structure, \ref bottleneck_distance, and few examples requires CGAL, which is a C++ + * library which provides easy access to efficient and reliable geometric algorithms. + * + * \note There is no need to install CGAL, you can just cmake . && make CGAL (or even + * cmake -DCGAL_HEADER_ONLY=ON . for CGAL version ≥ 4.8.0), thereafter you will be able to compile + * GUDHI by calling cmake -DCGAL_DIR=/your/path/to/CGAL-X.Y .. && make + * + * Having CGAL version 4.4.0 or higher installed is recommended. The procedure to install this library according to + * your operating system is detailed here http://doc.cgal.org/latest/Manual/installation.html + * + * The following examples/utilities require the Computational Geometry Algorithms + * Library (CGAL \cite cgal:eb-15b) and will not be built if CGAL is not installed: + * \li + * Alpha_complex/alpha_complex_3d_persistence.cpp + * \li + * Alpha_complex/exact_alpha_complex_3d_persistence.cpp + * \li + * Alpha_complex/weighted_alpha_complex_3d_persistence.cpp + * \li + * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp + * + * The following examples/utilities require CGAL version ≥ 4.6.0: + * \li + * Witness_complex/strong_witness_persistence.cpp + * \li + * Witness_complex/weak_witness_persistence.cpp + * \li + * Witness_complex/example_strong_witness_complex_off.cpp + * \li + * Witness_complex/example_witness_complex_off.cpp + * \li + * Witness_complex/example_witness_complex_sphere.cpp + * + * The following example requires CGAL version ≥ 4.7.0: + * \li + * Alpha_complex/Alpha_complex_from_off.cpp + * \li + * Alpha_complex/Alpha_complex_from_points.cpp + * \li + * Alpha_complex/alpha_complex_persistence.cpp + * \li + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp + * \li + * Persistent_cohomology/custom_persistence_sort.cpp + * + * The following example requires CGAL version ≥ 4.8.1: + * \li + * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp + * \li + * Bottleneck_distance/bottleneck_basic_example.cpp + * \li + * Bottleneck_distance/bottleneck_distance.cpp + * \li + * Nerve_GIC/CoordGIC.cpp + * \li + * Nerve_GIC/FuncGIC.cpp + * \li + * Nerve_GIC/Nerve.cpp + * \li + * Nerve_GIC/VoronoiGIC.cpp + * \li + * Spatial_searching/example_spatial_searching.cpp + * \li + * Subsampling/example_choose_n_farthest_points.cpp + * \li + * Subsampling/example_custom_kernel.cpp + * \li + * Subsampling/example_pick_n_random_points.cpp + * \li + * Subsampling/example_sparsify_point_set.cpp + * \li + * Tangential_complex/example_basic.cpp + * \li + * Tangential_complex/example_with_perturb.cpp + * + * \subsection eigen3 Eigen3 + * The \ref alpha_complex data structure and few examples requires + * Eigen3 is a C++ template library for linear algebra: + * matrices, vectors, numerical solvers, and related algorithms. + * + * The following examples/utilities require the Eigen3 and will not be + * built if Eigen3 is not installed: + * \li + * Alpha_complex/Alpha_complex_from_off.cpp + * \li + * Alpha_complex/Alpha_complex_from_points.cpp + * \li + * Alpha_complex/alpha_complex_persistence.cpp + * \li + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp + * \li + * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp + * \li + * Persistent_cohomology/custom_persistence_sort.cpp + * \li + * Spatial_searching/example_spatial_searching.cpp + * \li + * Subsampling/example_choose_n_farthest_points.cpp + * \li + * Subsampling/example_custom_kernel.cpp + * \li + * Subsampling/example_pick_n_random_points.cpp + * \li + * Subsampling/example_sparsify_point_set.cpp + * \li + * Tangential_complex/example_basic.cpp + * \li + * Tangential_complex/example_with_perturb.cpp + * \li + * Witness_complex/strong_witness_persistence.cpp + * \li + * Witness_complex/weak_witness_persistence.cpp + * \li + * Witness_complex/example_strong_witness_complex_off.cpp + * \li + * Witness_complex/example_witness_complex_off.cpp + * \li + * Witness_complex/example_witness_complex_sphere.cpp + * + * \subsection tbb Threading Building Blocks + * Intel® TBB lets you easily write parallel + * C++ programs that take full advantage of multicore performance, that are portable and composable, and that have + * future-proof scalability. + * + * Having Intel® TBB installed is recommended to parallelize and accelerate some GUDHI computations. + * + * The following examples/utilities are using Intel® TBB if installed: + * \li + * Alpha_complex/Alpha_complex_from_off.cpp + * \li + * Alpha_complex/Alpha_complex_from_points.cpp + * \li + * Alpha_complex/alpha_complex_3d_persistence.cpp + * \li + * Alpha_complex/alpha_complex_persistence.cpp + * \li + * Alpha_complex/exact_alpha_complex_3d_persistence.cpp + * \li + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp + * \li + * Alpha_complex/weighted_alpha_complex_3d_persistence.cpp + * \li + * Bitmap_cubical_complex/cubical_complex_persistence.cpp + * \li + * Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp + * \li + * Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp + * \li + * Nerve_GIC/CoordGIC.cpp + * \li + * Nerve_GIC/FuncGIC.cpp + * \li + * Nerve_GIC/Nerve.cpp + * \li + * Nerve_GIC/VoronoiGIC.cpp + * \li + * Simplex_tree/simple_simplex_tree.cpp + * \li + * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp + * \li + * Simplex_tree/simplex_tree_from_cliques_of_graph.cpp + * \li + * Simplex_tree/graph_expansion_with_blocker.cpp + * \li + * Persistent_cohomology/alpha_complex_3d_persistence.cpp + * \li + * Persistent_cohomology/alpha_complex_persistence.cpp + * \li + * Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp + * \li + * Persistent_cohomology/persistence_from_file.cpp + * \li + * Persistent_cohomology/persistence_from_simple_simplex_tree.cpp + * \li + * Persistent_cohomology/plain_homology.cpp + * \li + * Persistent_cohomology/rips_multifield_persistence.cpp + * \li + * Persistent_cohomology/rips_persistence_step_by_step.cpp + * \li + * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp + * \li + * Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp + * \li + * Persistent_cohomology/custom_persistence_sort.cpp + * \li + * Rips_complex/example_one_skeleton_rips_from_points.cpp + * \li + * Rips_complex/example_rips_complex_from_off_file.cpp + * \li + * Rips_complex/rips_distance_matrix_persistence.cpp + * \li + * Rips_complex/rips_persistence.cpp + * \li + * Witness_complex/strong_witness_persistence.cpp + * \li + * Witness_complex/weak_witness_persistence.cpp + * \li + * Witness_complex/example_nearest_landmark_table.cpp + * + * \section Contributions Bug reports and contributions + * Please help us improving the quality of the GUDHI library. You may report bugs or suggestions to: + * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim + * + * GUDHI is open to external contributions. If you want to join our development team, please contact us. + * +*/ + +/*! \page Citation Acknowledging the GUDHI library + * We kindly ask users to cite the GUDHI library as appropriately as possible in their papers, and to mention the use + * of the GUDHI library on the web pages of their projects using GUDHI and provide us with links to these web pages. + * Feel free to contact us in case you have any question or remark on this topic. + * + * We provide \ref GudhiBibtex entries for the modules of the User and Reference Manual, as well as for publications + * directly related to the GUDHI library. + * \section GudhiBibtex GUDHI bibtex + * \verbinclude biblio/how_to_cite_gudhi.bib +*/ diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 148ee670..b3e9ea03 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -93,7 +93,7 @@ - \subsection CoverComplexDataStructure Cover Complexes: Nerves and Graph Induced Complexes + \subsection CoverComplexDataStructure Cover Complexes \image html "gicvisu.jpg" "Graph Induced Complex of a point cloud." @@ -101,6 +101,7 @@ Author: Mathieu Carrière
Introduced in: GUDHI 2.1.0
Copyright: GPL v3
+ Requires: \ref cgal ≥ 4.8.1
Nerves and Graph Induced Complexes are cover complexes, i.e. simplicial complexes that provably contain @@ -250,305 +251,3 @@
*/ - -/*! \page installation GUDHI installation - * \tableofcontents - * As GUDHI is a header only library, there is no need to install the library. - * - * Examples of GUDHI headers inclusion can be found in \ref demos. - * - * \section compiling Compiling - * The library uses c++11 and requires Boost with version 1.48.0 or - * more recent. It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. - * - * \subsection demos Demos and examples - * To build the demos and examples, run the following commands in a terminal: -\verbatim cd /path-to-gudhi/ -mkdir build -cd build/ -cmake .. -make \endverbatim - * A list of examples is available here. - * - * \subsection testsuites Test suites - * To test your build, run the following command in a terminal: - * \verbatim make test \endverbatim - * - * \subsection documentationgeneration Documentation - * To generate the documentation, Doxygen is required. - * Run the following command in a terminal: -\verbatim -make doxygen -# Documentation will be generated in the folder YYYY-MM-DD-hh-mm-ss_GUDHI_X.Y.Z/doc/html/ -# You can customize the directory name by calling `cmake -DUSER_VERSION_DIR=/my/custom/folder` -\endverbatim - * - * \section optionallibrary Optional third-party library - * \subsection gmp GMP - * The multi-field persistent homology algorithm requires GMP which is a free library for arbitrary-precision - * arithmetic, operating on signed integers, rational numbers, and floating point numbers. - * - * The following example requires the GNU Multiple Precision Arithmetic - * Library (GMP) and will not be built if GMP is not installed: - * \li - * Persistent_cohomology/rips_multifield_persistence.cpp - * - * Having GMP version 4.2 or higher installed is recommended. - * - * \subsection cgal CGAL - * The \ref alpha_complex data structure, \ref bottleneck_distance, and few examples requires CGAL, which is a C++ - * library which provides easy access to efficient and reliable geometric algorithms. - * - * \note There is no need to install CGAL, you can just cmake . && make CGAL (or even - * cmake -DCGAL_HEADER_ONLY=ON . for CGAL version ≥ 4.8.0), thereafter you will be able to compile - * GUDHI by calling cmake -DCGAL_DIR=/your/path/to/CGAL-X.Y .. && make - * - * Having CGAL version 4.4.0 or higher installed is recommended. The procedure to install this library according to - * your operating system is detailed here http://doc.cgal.org/latest/Manual/installation.html - * - * The following examples/utilities require the Computational Geometry Algorithms - * Library (CGAL \cite cgal:eb-15b) and will not be built if CGAL is not installed: - * \li - * Alpha_complex/alpha_complex_3d_persistence.cpp - * \li - * Alpha_complex/exact_alpha_complex_3d_persistence.cpp - * \li - * Alpha_complex/weighted_alpha_complex_3d_persistence.cpp - * \li - * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp - * - * The following examples/utilities require CGAL version ≥ 4.6.0: - * \li - * Witness_complex/strong_witness_persistence.cpp - * \li - * Witness_complex/weak_witness_persistence.cpp - * \li - * Witness_complex/example_strong_witness_complex_off.cpp - * \li - * Witness_complex/example_witness_complex_off.cpp - * \li - * Witness_complex/example_witness_complex_sphere.cpp - * - * The following example requires CGAL version ≥ 4.7.0: - * \li - * Alpha_complex/Alpha_complex_from_off.cpp - * \li - * Alpha_complex/Alpha_complex_from_points.cpp - * \li - * Alpha_complex/alpha_complex_persistence.cpp - * \li - * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp - * \li - * Persistent_cohomology/custom_persistence_sort.cpp - * - * The following example requires CGAL version ≥ 4.8.1: - * \li - * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp - * \li - * Bottleneck_distance/bottleneck_basic_example.cpp - * \li - * Bottleneck_distance/bottleneck_distance.cpp - * \li - * Spatial_searching/example_spatial_searching.cpp - * \li - * Subsampling/example_choose_n_farthest_points.cpp - * \li - * Subsampling/example_custom_kernel.cpp - * \li - * Subsampling/example_pick_n_random_points.cpp - * \li - * Subsampling/example_sparsify_point_set.cpp - * \li - * Tangential_complex/example_basic.cpp - * \li - * Tangential_complex/example_with_perturb.cpp - * - * \subsection eigen3 Eigen3 - * The \ref alpha_complex data structure and few examples requires - * Eigen3 is a C++ template library for linear algebra: - * matrices, vectors, numerical solvers, and related algorithms. - * - * The following examples/utilities require the Eigen3 and will not be - * built if Eigen3 is not installed: - * \li - * Alpha_complex/Alpha_complex_from_off.cpp - * \li - * Alpha_complex/Alpha_complex_from_points.cpp - * \li - * Alpha_complex/alpha_complex_persistence.cpp - * \li - * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp - * \li - * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp - * \li - * Persistent_cohomology/custom_persistence_sort.cpp - * \li - * Spatial_searching/example_spatial_searching.cpp - * \li - * Subsampling/example_choose_n_farthest_points.cpp - * \li - * Subsampling/example_custom_kernel.cpp - * \li - * Subsampling/example_pick_n_random_points.cpp - * \li - * Subsampling/example_sparsify_point_set.cpp - * \li - * Tangential_complex/example_basic.cpp - * \li - * Tangential_complex/example_with_perturb.cpp - * \li - * Witness_complex/strong_witness_persistence.cpp - * \li - * Witness_complex/weak_witness_persistence.cpp - * \li - * Witness_complex/example_strong_witness_complex_off.cpp - * \li - * Witness_complex/example_witness_complex_off.cpp - * \li - * Witness_complex/example_witness_complex_sphere.cpp - * - * \subsection tbb Threading Building Blocks - * Intel® TBB lets you easily write parallel - * C++ programs that take full advantage of multicore performance, that are portable and composable, and that have - * future-proof scalability. - * - * Having Intel® TBB installed is recommended to parallelize and accelerate some GUDHI computations. - * - * The following examples/utilities are using Intel® TBB if installed: - * \li - * Alpha_complex/Alpha_complex_from_off.cpp - * \li - * Alpha_complex/Alpha_complex_from_points.cpp - * \li - * Alpha_complex/alpha_complex_3d_persistence.cpp - * \li - * Alpha_complex/alpha_complex_persistence.cpp - * \li - * Alpha_complex/exact_alpha_complex_3d_persistence.cpp - * \li - * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp - * \li - * Alpha_complex/weighted_alpha_complex_3d_persistence.cpp - * \li - * Bitmap_cubical_complex/cubical_complex_persistence.cpp - * \li - * Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp - * \li - * Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp - * \li - * Simplex_tree/simple_simplex_tree.cpp - * \li - * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp - * \li - * Simplex_tree/simplex_tree_from_cliques_of_graph.cpp - * \li - * Simplex_tree/graph_expansion_with_blocker.cpp - * \li - * Persistent_cohomology/alpha_complex_3d_persistence.cpp - * \li - * Persistent_cohomology/alpha_complex_persistence.cpp - * \li - * Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp - * \li - * Persistent_cohomology/persistence_from_file.cpp - * \li - * Persistent_cohomology/persistence_from_simple_simplex_tree.cpp - * \li - * Persistent_cohomology/plain_homology.cpp - * \li - * Persistent_cohomology/rips_multifield_persistence.cpp - * \li - * Persistent_cohomology/rips_persistence_step_by_step.cpp - * \li - * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp - * \li - * Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp - * \li - * Persistent_cohomology/custom_persistence_sort.cpp - * \li - * Rips_complex/example_one_skeleton_rips_from_points.cpp - * \li - * Rips_complex/example_rips_complex_from_off_file.cpp - * \li - * Rips_complex/rips_distance_matrix_persistence.cpp - * \li - * Rips_complex/rips_persistence.cpp - * \li - * Witness_complex/strong_witness_persistence.cpp - * \li - * Witness_complex/weak_witness_persistence.cpp - * \li - * Witness_complex/example_nearest_landmark_table.cpp - * - * \section Contributions Bug reports and contributions - * Please help us improving the quality of the GUDHI library. You may report bugs or suggestions to: - * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim - * - * GUDHI is open to external contributions. If you want to join our development team, please contact us. - * -*/ - -/*! \page Citation Acknowledging the GUDHI library - * We kindly ask users to cite the GUDHI library as appropriately as possible in their papers, and to mention the use - * of the GUDHI library on the web pages of their projects using GUDHI and provide us with links to these web pages. - * Feel free to contact us in case you have any question or remark on this topic. - * - * We provide \ref GudhiBibtex entries for the modules of the User and Reference Manual, as well as for publications - * directly related to the GUDHI library. - * \section GudhiBibtex GUDHI bibtex - * \verbinclude biblio/how_to_cite_gudhi.bib -*/ - -// List of GUDHI examples - Doxygen needs at least a file tag to analyse comments -/*! @file Examples - * @example Alpha_complex/Alpha_complex_from_off.cpp - * @example Alpha_complex/Alpha_complex_from_points.cpp - * @example Alpha_complex/alpha_complex_3d_persistence.cpp - * @example Alpha_complex/alpha_complex_persistence.cpp - * @example Alpha_complex/exact_alpha_complex_3d_persistence.cpp - * @example Alpha_complex/periodic_alpha_complex_3d_persistence.cpp - * @example Alpha_complex/weighted_alpha_complex_3d_persistence.cpp - * @example Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp - * @example Bottleneck_distance/bottleneck_basic_example.cpp - * @example Bottleneck_distance/bottleneck_distance.cpp - * @example Bitmap_cubical_complex/cubical_complex_persistence.cpp - * @example Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp - * @example Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp - * @example common/example_CGAL_3D_points_off_reader.cpp - * @example common/example_CGAL_points_off_reader.cpp - * @example Contraction/Garland_heckbert.cpp - * @example Contraction/Rips_contraction.cpp - * @example Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp - * @example Persistent_cohomology/persistence_from_file.cpp - * @example Persistent_cohomology/persistence_from_simple_simplex_tree.cpp - * @example Persistent_cohomology/plain_homology.cpp - * @example Persistent_cohomology/rips_multifield_persistence.cpp - * @example Persistent_cohomology/custom_persistence_sort.cpp - * @example Persistent_cohomology/rips_persistence_step_by_step.cpp - * @example Rips_complex/example_one_skeleton_rips_from_points.cpp - * @example Rips_complex/example_rips_complex_from_off_file.cpp - * @example Rips_complex/rips_persistence.cpp - * @example Rips_complex/rips_distance_matrix_persistence.cpp - * @example Simplex_tree/mini_simplex_tree.cpp - * @example Simplex_tree/simple_simplex_tree.cpp - * @example Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp - * @example Simplex_tree/simplex_tree_from_cliques_of_graph.cpp - * @example Simplex_tree/graph_expansion_with_blocker.cpp - * @example Skeleton_blocker/Skeleton_blocker_from_simplices.cpp - * @example Skeleton_blocker/Skeleton_blocker_iteration.cpp - * @example Skeleton_blocker/Skeleton_blocker_link.cpp - * @example Spatial_searching/example_spatial_searching.cpp - * @example Subsampling/example_choose_n_farthest_points.cpp - * @example Subsampling/example_custom_kernel.cpp - * @example Subsampling/example_pick_n_random_points.cpp - * @example Subsampling/example_sparsify_point_set.cpp - * @example Tangential_complex/example_basic.cpp - * @example Tangential_complex/example_with_perturb.cpp - * @example Witness_complex/example_nearest_landmark_table.cpp - * @example Witness_complex/example_strong_witness_complex_off.cpp - * @example Witness_complex/example_witness_complex_off.cpp - * @example Witness_complex/example_witness_complex_sphere.cpp - * @example Witness_complex/weak_witness_persistence.cpp - * @example Witness_complex/strong_witness_persistence.cpp - */ - -- cgit v1.2.3 From b674e9a5fae8bdbb22eadb9a7c0013ce84451743 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 26 Jan 2018 14:55:28 +0000 Subject: Move documentation Copyright in footer Removed from each module git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3167 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7595f2d18cdc3773bbd96fa9fed414876ff9fdc7 --- src/Alpha_complex/doc/Intro_alpha_complex.h | 4 +--- src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h | 1 - src/Contraction/include/gudhi/Edge_contraction.h | 4 ---- src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 1 - .../doc/Persistence_representations_doc.h | 1 - src/Persistent_cohomology/doc/Intro_persistent_cohomology.h | 1 - src/Rips_complex/doc/Intro_rips_complex.h | 2 -- src/Simplex_tree/doc/Intro_simplex_tree.h | 1 - src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h | 3 --- src/Spatial_searching/doc/Intro_spatial_searching.h | 2 -- src/Subsampling/doc/Intro_subsampling.h | 2 -- src/Tangential_complex/doc/Intro_tangential_complex.h | 2 -- src/Witness_complex/doc/Witness_complex_doc.h | 3 --- src/common/doc/footer.html | 10 ++-------- 14 files changed, 3 insertions(+), 34 deletions(-) (limited to 'src/common') diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index cf1a946a..a08663ca 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -31,7 +31,7 @@ namespace alpha_complex { /** \defgroup alpha_complex Alpha complex * * \author Vincent Rouvreau - * + * * @{ * * \section definition Definition @@ -195,8 +195,6 @@ namespace alpha_complex { * * \include Alpha_complex/alphaoffreader_for_doc_32.txt * - * \copyright GNU General Public License v3. - * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim */ /** @} */ // end defgroup alpha_complex 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 ee84e201..a5d7b60f 100644 --- a/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h +++ b/src/Bitmap_cubical_complex/doc/Gudhi_Cubical_Complex_doc.h @@ -105,7 +105,6 @@ namespace cubical_complex { * \section BitmapExamples Examples * End user programs are available in example/Bitmap_cubical_complex and utilities/Bitmap_cubical_complex folders. * - * \copyright GNU General Public License v3. */ /** @} */ // end defgroup cubical_complex diff --git a/src/Contraction/include/gudhi/Edge_contraction.h b/src/Contraction/include/gudhi/Edge_contraction.h index 61f2d945..cf9a2c27 100644 --- a/src/Contraction/include/gudhi/Edge_contraction.h +++ b/src/Contraction/include/gudhi/Edge_contraction.h @@ -210,7 +210,6 @@ int main (int argc, char *argv[]) } \endcode - \verbatim ./example/Contraction/RipsContraction ../../data/SO3_10000.off 0.3 [ 50%] [100%] Built target SkeletonBlockerIteration @@ -223,9 +222,6 @@ Time to simplify and enumerate simplices: 3.166621s wall, 3.150000s user + 0.010000s system = 3.160000s CPU (99.8%) \endverbatim - - -\copyright GNU General Public License v3. */ /** @} */ // end defgroup } // namespace contraction diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index 344cb031..f2409087 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -176,7 +176,6 @@ namespace cover_complex { * * \image html "funcGICvisu.jpg" "Visualization with neato" * - * \copyright GNU General Public License v3. */ /** @} */ // end defgroup cover_complex diff --git a/src/Persistence_representations/doc/Persistence_representations_doc.h b/src/Persistence_representations/doc/Persistence_representations_doc.h index 978fb5bd..d781211a 100644 --- a/src/Persistence_representations/doc/Persistence_representations_doc.h +++ b/src/Persistence_representations/doc/Persistence_representations_doc.h @@ -250,7 +250,6 @@ namespace Persistence_representations { 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. */ /** @} */ // end defgroup Persistence_representations diff --git a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h index ceaea505..4dbe82c7 100644 --- a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h +++ b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h @@ -248,7 +248,6 @@ Simplex_tree dim: 3 Persistent_cohomology/plain_homology.cpp computes the plain homology of a simple simplicial complex without filtration values. - \copyright GNU General Public License v3. */ } // namespace persistent_cohomology diff --git a/src/Rips_complex/doc/Intro_rips_complex.h b/src/Rips_complex/doc/Intro_rips_complex.h index 124dfec9..8c517516 100644 --- a/src/Rips_complex/doc/Intro_rips_complex.h +++ b/src/Rips_complex/doc/Intro_rips_complex.h @@ -146,8 +146,6 @@ namespace rips_complex { * * \include Rips_complex/full_skeleton_rips_for_doc.txt * - * \copyright GNU General Public License v3. - * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim */ /** @} */ // end defgroup rips_complex diff --git a/src/Simplex_tree/doc/Intro_simplex_tree.h b/src/Simplex_tree/doc/Intro_simplex_tree.h index 769491d9..6b80d1c9 100644 --- a/src/Simplex_tree/doc/Intro_simplex_tree.h +++ b/src/Simplex_tree/doc/Intro_simplex_tree.h @@ -79,7 +79,6 @@ Number of vertices = 10 Number of simplices = 98 \endcode * 1 incidence relations in a complex. It is consequently faster when accessing the boundary of a simplex, but is less * compact and harder to construct from scratch. * - * \copyright GNU General Public License v3. * @} */ diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h index 32fe411c..aca2aa57 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h @@ -239,9 +239,6 @@ their collaboration to write the two initial papers about this data-structure and also Dominique for leaving him use a prototype. - -\copyright GNU General Public License v3. - @} */ } // namespace skeleton_blocker diff --git a/src/Spatial_searching/doc/Intro_spatial_searching.h b/src/Spatial_searching/doc/Intro_spatial_searching.h index 1ee5e92e..52ed65e4 100644 --- a/src/Spatial_searching/doc/Intro_spatial_searching.h +++ b/src/Spatial_searching/doc/Intro_spatial_searching.h @@ -50,8 +50,6 @@ namespace spatial_searching { * * \include Spatial_searching/example_spatial_searching.cpp * - * \copyright GNU General Public License v3. - * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim */ /** @} */ // end defgroup spatial_searching diff --git a/src/Subsampling/doc/Intro_subsampling.h b/src/Subsampling/doc/Intro_subsampling.h index c84616dd..ab9cdc37 100644 --- a/src/Subsampling/doc/Intro_subsampling.h +++ b/src/Subsampling/doc/Intro_subsampling.h @@ -58,8 +58,6 @@ namespace subsampling { * This example outputs a subset of 100 points picked randomly. * * \include Subsampling/example_pick_n_random_points.cpp - * \copyright GNU General Public License v3. - * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim */ /** @} */ // end defgroup subsampling diff --git a/src/Tangential_complex/doc/Intro_tangential_complex.h b/src/Tangential_complex/doc/Intro_tangential_complex.h index 3d687c1d..00e00c52 100644 --- a/src/Tangential_complex/doc/Intro_tangential_complex.h +++ b/src/Tangential_complex/doc/Intro_tangential_complex.h @@ -107,8 +107,6 @@ dimensions are known at compile-time. \include Tangential_complex/example_with_perturb.cpp -\copyright GNU General Public License v3. -\verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim */ /** @} */ // end defgroup tangential_complex diff --git a/src/Witness_complex/doc/Witness_complex_doc.h b/src/Witness_complex/doc/Witness_complex_doc.h index 5d5c0735..62203054 100644 --- a/src/Witness_complex/doc/Witness_complex_doc.h +++ b/src/Witness_complex/doc/Witness_complex_doc.h @@ -117,9 +117,6 @@ int main(int argc, char * const argv[]) { \include Witness_complex/example_nearest_landmark_table.cpp - \copyright GNU General Public License v3. - - */ #endif // WITNESS_COMPLEX_DOC_H_ diff --git a/src/common/doc/footer.html b/src/common/doc/footer.html index 7b4cdc5c..a557922b 100644 --- a/src/common/doc/footer.html +++ b/src/common/doc/footer.html @@ -6,24 +6,18 @@ $projectname  Version $projectnumber  - $projectbrief + - Copyright : GPL v3 $generatedby - doxygen $doxygenversion + Doxygen $doxygenversion - - - -- cgit v1.2.3 From c2d46e0e6cfea1927875219bd5e03962cef7b010 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 29 Jan 2018 16:31:18 +0000 Subject: Fix doc issue for utilities part on the web site git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3176 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 3bafd9e13a5646ca93023144705d3ac7ed7c9b3a --- src/Alpha_complex/utilities/README | 148 ++++++++++----------- src/Bitmap_cubical_complex/utilities/README | 42 ++++-- src/Bottleneck_distance/utilities/README | 32 ++++- src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 6 +- src/Nerve_GIC/include/gudhi/GIC.h | 11 +- .../utilities/KeplerMapperVisuFromTxtFile.py | 97 ++++++++------ src/Nerve_GIC/utilities/covercomplex.md | 73 ++++++++++ src/Rips_complex/utilities/README | 67 ++++------ src/Witness_complex/utilities/README | 70 +++++----- src/common/utilities/README | 46 +++++-- 10 files changed, 365 insertions(+), 227 deletions(-) create mode 100644 src/Nerve_GIC/utilities/covercomplex.md (limited to 'src/common') diff --git a/src/Alpha_complex/utilities/README b/src/Alpha_complex/utilities/README index 1cd2ca95..56bce602 100644 --- a/src/Alpha_complex/utilities/README +++ b/src/Alpha_complex/utilities/README @@ -1,16 +1,35 @@ -# Alpha_complex # - -## `alpha_complex_3d_persistence` ## +--- +layout: page +title: "Alpha complex" +meta_title: "alphacomplex" +subheadline: "" +teaser: "" +permalink: "/alphacomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + + +## alpha_complex_3d_persistence ## This program computes the persistent homology with coefficient field Z/pZ of the 3D alpha complex built from a 3D point cloud. The output diagram contains one bar per line, written with the convention: -`p dim birth death` +``` +p dim birth death +``` where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). **Usage** -`alpha_complex_3d_persistence [options] ` -where -`` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). + +``` + alpha_complex_3d_persistence [options] +``` + +where `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). **Allowed options** @@ -20,43 +39,38 @@ where * `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. **Example** -`alpha_complex_3d_persistence ../../data/points/tore3D_300.off -p 2 -m 0.45` -outputs: ``` -Simplex_tree dim: 3 -2 0 0 inf -2 1 0.0682162 1.0001 -2 1 0.0934117 1.00003 -2 2 0.56444 1.03938 +alpha_complex_3d_persistence ../../data/points/tore3D_300.off -p 2 -m 0.45 ``` -Here we retrieve expected Betti numbers on a tore 3D: -``` -Betti numbers[0] = 1 -Betti numbers[1] = 2 -Betti numbers[2] = 1 -``` +N.B.: -N.B.: * `alpha_complex_3d_persistence` only accepts OFF files in dimension 3. * Filtration values are alpha square values. +## exact_alpha_complex_3d_persistence ## + +Same as `alpha_complex_3d_persistence`, but using exact computation. +It is slower, but it is necessary when points are on a grid for instance. -## `exact_alpha_complex_3d_persistence` ## -Same as `alpha_complex_3d_persistence`, but using exact computation. It is slower, but it is necessary when points are on a grid for instance. +## weighted_alpha_complex_3d_persistence ## -## `weighted_alpha_complex_3d_persistence` ## Same as `alpha_complex_3d_persistence`, but using weighted points. **Usage** -`weighted_alpha_complex_3d_persistence [options] ` + +``` + weighted_alpha_complex_3d_persistence [options] +``` + where -`` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). -`` is the path to the file containing the weights of the points (one value per line). + +* `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). +* `` is the path to the file containing the weights of the points (one value per line). **Allowed options** @@ -66,32 +80,33 @@ where * `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. **Example** -`weighted_alpha_complex_3d_persistence ../../data/points/tore3D_300.off ../../data/points/tore3D_300.weights -p 2 -m 0.45` -outputs: ``` -Simplex_tree dim: 3 -2 0 -1 inf -2 1 -0.931784 0.000103311 -2 1 -0.906588 2.60165e-05 -2 2 -0.43556 0.0393798 + weighted_alpha_complex_3d_persistence ../../data/points/tore3D_300.off ../../data/points/tore3D_300.weights -p 2 -m 0.45 ``` + N.B.: + * Weights values are explained on CGAL [Alpha shape](https://doc.cgal.org/latest/Alpha_shapes_3/index.html#title0) and [Regular triangulation](https://doc.cgal.org/latest/Triangulation_3/index.html#Triangulation3secclassRegulartriangulation) documentation. * Filtration values are alpha square values. -## `periodic_alpha_complex_3d_persistence` ## +## periodic_alpha_complex_3d_persistence ## Same as `alpha_complex_3d_persistence`, but using periodic alpha shape 3d. Refer to the [CGAL's 3D Periodic Triangulations User Manual](https://doc.cgal.org/latest/Periodic_3_triangulation_3/index.html) for more details. **Usage** -`periodic_alpha_complex_3d_persistence [options] ` + +``` + periodic_alpha_complex_3d_persistence [options] +``` + where -`` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). -`` is the path to the file describing the periodic domain. It must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsIsoCuboid). + +* `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). +* `` is the path to the file describing the periodic domain. It must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsIsoCuboid). **Allowed options** @@ -102,46 +117,36 @@ where **Example** -`periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off ../../data/points/iso_cuboid_3_in_0_1.txt -p 3 -m 1.0` -outputs: ``` -Periodic Delaunay computed. -Simplex_tree dim: 3 -3 0 0 inf -3 1 0.0025 inf -3 1 0.0025 inf -3 1 0.0025 inf -3 2 0.005 inf -3 2 0.005 inf -3 2 0.005 inf -3 3 0.0075 inf +periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off ../../data/points/iso_cuboid_3_in_0_1.txt -p 3 -m 1.0 ``` -Here we retrieve expected Betti numbers on an 3D iso-oriented cuboids: -``` -Betti numbers[0] = 1 -Betti numbers[1] = 3 -Betti numbers[2] = 3 -Betti numbers[3] = 1 -``` +N.B.: -N.B.: * Cuboid file must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsIsoCuboid). * Filtration values are alpha square values. +## alpha_complex_persistence ## -## `alpha_complex_persistence` ## -This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. The output diagram contains one bar per line, written with the convention: +This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. +The output diagram contains one bar per line, written with the convention: -`p dim birth death` +``` + p dim birth death +``` -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, +and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). **Usage** -`alpha_complex_persistence [options] ` + +``` + alpha_complex_persistence [options] +``` + where `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). @@ -154,24 +159,11 @@ where * `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. **Example** -`alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off` -outputs: ``` -Alpha complex is of dimension 3 - 9273 simplices - 300 vertices. -Simplex_tree dim: 3 -2 0 0 inf -2 1 0.0682162 1.0001 -2 1 0.0934117 1.00003 -2 2 0.56444 1.03938 -``` - -Here we retrieve expected Betti numbers on a tore 3D: -``` -Betti numbers[0] = 1 -Betti numbers[1] = 2 -Betti numbers[2] = 1 + alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off ``` N.B.: + * Filtration values are alpha square values. diff --git a/src/Bitmap_cubical_complex/utilities/README b/src/Bitmap_cubical_complex/utilities/README index ddff7034..393b2654 100644 --- a/src/Bitmap_cubical_complex/utilities/README +++ b/src/Bitmap_cubical_complex/utilities/README @@ -1,18 +1,40 @@ -# Bitmap_cubical_complex # +--- +layout: page +title: "Bitmap cubical complex" +meta_title: "cubicalcomplex" +subheadline: "" +teaser: "" +permalink: "/cubicalcomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} -## `cubical_complex_persistence` ## -This program computes persistent homology, by using the Bitmap_cubical_complex class, of cubical complexes provided in text files in Perseus style. See [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPerseus) for a description of the file format. -Example: +## cubical_complex_persistence ## +This program computes persistent homology, by using the Bitmap_cubical_complex class, of cubical complexes provided in text files in Perseus style. +See [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPerseus) for a description of the file format. -* Create a Cubical Complex from the Perseus style file `CubicalTwoSphere.txt`, computes Persistence cohomology from it and writes the results in a persistence file `CubicalTwoSphere.txt_persistence`: -`cubical_complex_persistence data/bitmap/CubicalTwoSphere.txt` +**Example** -## `periodic_cubical_complex_persistence` ## +``` + cubical_complex_persistence data/bitmap/CubicalTwoSphere.txt +``` + +* Creates a Cubical Complex from the Perseus style file `CubicalTwoSphere.txt`, +computes Persistence cohomology from it and writes the results in a persistence file `CubicalTwoSphere.txt_persistence`. + +## periodic_cubical_complex_persistence ## Same as above, but with periodic boundary conditions. -Example: +**Example** + +``` + periodic_cubical_complex_persistence data/bitmap/3d_torus.txt +``` -* Create a Periodical Cubical Complex from the Perseus style file `3d_torus.txt`, computes Persistence cohomology from it and writes the results in a persistence file `3d_torus.txt_persistence`: -`periodic_cubical_complex_persistence data/bitmap/3d_torus.txt` +* Creates a Periodical Cubical Complex from the Perseus style file `3d_torus.txt`, +computes Persistence cohomology from it and writes the results in a persistence file `3d_torus.txt_persistence`. diff --git a/src/Bottleneck_distance/utilities/README b/src/Bottleneck_distance/utilities/README index d9fdd252..04e1c4bd 100644 --- a/src/Bottleneck_distance/utilities/README +++ b/src/Bottleneck_distance/utilities/README @@ -1,10 +1,30 @@ -# Bottleneck_distance # +--- +layout: page +title: "Bottleneck distance" +meta_title: "bottleneckdistance" +subheadline: "" +teaser: "" +permalink: "/bottleneckdistance/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + + +## bottleneck_read_file_example ## -## `bottleneck_read_file_example` ## This program computes the Bottleneck distance between two persistence diagram files. -Usage: -`bottleneck_read_file_example []` +**Usage** + +``` + bottleneck_read_file_example [] +``` + where -`` and `` must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPers). -`` is an error bound on the bottleneck distance (set by default to the smallest positive double value). + +* `` and `` must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPers). +* `` is an error bound on the bottleneck distance (set by default to the smallest positive double value). diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index f2409087..474f0f0e 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -77,8 +77,8 @@ namespace cover_complex { * * \include Nerve_GIC/Nerve.txt * - * The program also writes a file SC.txt. The first three lines in this file are the location of the input point cloud - * and the function used to compute the cover. + * The program also writes a file ../../data/points/human_sc.txt. The first three lines in this file are the location + * of the input point cloud and the function used to compute the cover. * The fourth line contains the number of vertices nv and edges ne of the Nerve. * The next nv lines represent the vertices. Each line contains the vertex ID, * the number of data points it contains, and their average color function value. @@ -118,7 +118,7 @@ namespace cover_complex { * * the program outputs SC.off. Using e.g. * - * \code $> geomview SC.off + * \code $> geomview ../../data/points/human_sc.off * \endcode * * one can obtain the following visualization: diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index 58831bbf..ff95b913 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -934,7 +934,7 @@ class Cover_complex { } graphic << "}"; graphic.close(); - std::cout << ".dot file generated. It can be visualized with e.g. neato." << std::endl; + std::cout << mapp << " file generated. It can be visualized with e.g. neato." << std::endl; } public: // Create a .txt file that can be compiled with KeplerMapper. @@ -944,7 +944,7 @@ class Cover_complex { void write_info() { int num_simplices = simplices.size(); int num_edges = 0; - std::string mapp = point_cloud_name + "_sc.dot"; + std::string mapp = point_cloud_name + "_sc.txt"; std::ofstream graphic(mapp.c_str()); for (int i = 0; i < num_simplices; i++) @@ -970,7 +970,8 @@ class Cover_complex { if (cover_color[simplices[i][0]].first > mask && cover_color[simplices[i][1]].first > mask) graphic << name2id[simplices[i][0]] << " " << name2id[simplices[i][1]] << std::endl; graphic.close(); - std::cout << ".txt generated. It can be visualized with e.g. python KeplerMapperVisuFromTxtFile.py and firefox." + std::cout << mapp + << " generated. It can be visualized with e.g. python KeplerMapperVisuFromTxtFile.py and firefox." << std::endl; } @@ -988,7 +989,7 @@ class Cover_complex { std::vector > edges, faces; int numsimplices = simplices.size(); - std::string mapp = point_cloud_name + "_sc.dot"; + std::string mapp = point_cloud_name + "_sc.off"; std::ofstream graphic(mapp.c_str()); graphic << "OFF" << std::endl; @@ -1016,7 +1017,7 @@ class Cover_complex { for (int i = 0; i < numfaces; i++) graphic << 3 << " " << faces[i][0] << " " << faces[i][1] << " " << faces[i][2] << std::endl; graphic.close(); - std::cout << ".off generated. It can be visualized with e.g. geomview." << std::endl; + std::cout << mapp << " generated. It can be visualized with e.g. geomview." << std::endl; } // ******************************************************************************************************************* diff --git a/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py b/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py index d2897774..c811f610 100755 --- a/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py +++ b/src/Nerve_GIC/utilities/KeplerMapperVisuFromTxtFile.py @@ -3,6 +3,7 @@ import km 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++ @@ -30,43 +31,59 @@ __author__ = "Mathieu Carriere" __copyright__ = "Copyright (C) 2017 INRIA" __license__ = "GPL v3" -network = {} -mapper = km.KeplerMapper(verbose=0) -data = np.zeros((3,3)) -projected_data = mapper.fit_transform( data, projection="sum", scaler=None ) - -f = open('SC.txt','r') -nodes = defaultdict(list) -links = defaultdict(list) -custom = defaultdict(list) - -dat = f.readline() -lens = f.readline() -color = f.readline(); -param = [float(i) for i in f.readline().split(" ")] - -nums = [int(i) for i in f.readline().split(" ")] -num_nodes = nums[0] -num_edges = nums[1] - -for i in range(0,num_nodes): - point = [float(j) for j in f.readline().split(" ")] - nodes[ str(int(point[0])) ] = [ int(point[0]), point[1], int(point[2]) ] - links[ str(int(point[0])) ] = [] - custom[ int(point[0]) ] = point[1] - -m = min([custom[i] for i in range(0,num_nodes)]) -M = max([custom[i] for i in range(0,num_nodes)]) - -for i in range(0,num_edges): - edge = [int(j) for j in f.readline().split(" ")] - links[ str(edge[0]) ].append( str(edge[1]) ) - links[ str(edge[1]) ].append( str(edge[0]) ) - -network["nodes"] = nodes -network["links"] = links -network["meta"] = lens - -mapper.visualize(network, color_function = color, path_html="SC.html", title=dat, -graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=custom, width_html=0, -height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=param[0],gain=param[1], minimum=m,maximum=M) +parser = argparse.ArgumentParser(description='Creates an html Keppler Mapper ' + 'file to visualize a SC.txt file.', + epilog='Example: ' + './KeplerMapperVisuFromTxtFile.py ' + '-f ../../data/points/human.off_sc.txt' + '- Constructs an human.off_sc.html file.') +parser.add_argument("-f", "--file", type=str, required=True) + +args = parser.parse_args() + +with open(args.file, 'r') as f: + network = {} + mapper = km.KeplerMapper(verbose=0) + data = np.zeros((3,3)) + projected_data = mapper.fit_transform( data, projection="sum", scaler=None ) + + nodes = defaultdict(list) + links = defaultdict(list) + custom = defaultdict(list) + + dat = f.readline() + lens = f.readline() + color = f.readline(); + param = [float(i) for i in f.readline().split(" ")] + + nums = [int(i) for i in f.readline().split(" ")] + num_nodes = nums[0] + num_edges = nums[1] + + for i in range(0,num_nodes): + point = [float(j) for j in f.readline().split(" ")] + nodes[ str(int(point[0])) ] = [ int(point[0]), point[1], int(point[2]) ] + links[ str(int(point[0])) ] = [] + custom[ int(point[0]) ] = point[1] + + m = min([custom[i] for i in range(0,num_nodes)]) + M = max([custom[i] for i in range(0,num_nodes)]) + + for i in range(0,num_edges): + edge = [int(j) for j in f.readline().split(" ")] + links[ str(edge[0]) ].append( str(edge[1]) ) + links[ str(edge[1]) ].append( str(edge[0]) ) + + network["nodes"] = nodes + network["links"] = links + network["meta"] = lens + + html_output_filename = args.file.rsplit('.', 1)[0] + '.html' + mapper.visualize(network, color_function = color, path_html=html_output_filename, title=dat, + graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=custom, width_html=0, + height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=param[0],gain=param[1], minimum=m,maximum=M) + message = repr(html_output_filename) + " is generated. You can now use your favorite web browser to visualize it." + print(message) + + + f.close() diff --git a/src/Nerve_GIC/utilities/covercomplex.md b/src/Nerve_GIC/utilities/covercomplex.md new file mode 100644 index 00000000..692e44e7 --- /dev/null +++ b/src/Nerve_GIC/utilities/covercomplex.md @@ -0,0 +1,73 @@ +--- +layout: page +title: "Cover complex" +meta_title: "covercomplex" +subheadline: "" +teaser: "" +permalink: "/covercomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + + +## Nerve ## +This program builds the Nerve of a point cloud sampled on an OFF file. +The cover C comes from the preimages of intervals covering a coordinate function, +which are then refined into their connected components using the triangulation of the .OFF file. + +The program also writes a file SC.txt. +The first three lines in this file are the location of the input point cloud and the function used to compute the cover. +The fourth line contains the number of vertices nv and edges ne of the Nerve. The next nv lines represent the vertices. +Each line contains the vertex ID, the number of data points it contains, and their average color function value. +Finally, the next ne lines represent the edges, characterized by the ID of their vertices. + +**Usage** + +`Nerve coordinate resolution gain [--v]` + +where + +* `coordinate` is the coordinate function to cover +* `resolution` is the number of the intervals +* `gain` is the gain for each interval +* `--v` is optional, it activates verbose mode. + +**Example** + +`Nerve ../../data/points/human.off 2 10 0.3` + +* Builds the Nerve of a point cloud sampled on a 3D human shape (human.off). +The cover C comes from the preimages of intervals (10 intervals with gain 0.3) covering the height function (coordinate 2). + +`python KeplerMapperVisuFromTxtFile.py -f ../../data/points/human.off_sc.txt` + +* Constructs `human.off_sc.html` file. You can now use your favorite web browser to visualize it. + +## VoronoiGIC ## + +This util builds the Graph Induced Complex (GIC) of a point cloud. +It subsamples *N* points in the point cloud, which act as seeds of a geodesic Voronoï diagram. +Each cell of the diagram is then an element of C. + +The program also writes a file `*_sc.off`, that is an OFF file that can be visualized with GeomView. + +**Usage** + +`VoroniGIC samples_number [--v]` + +where + +* `samples_number` is the number of samples to take from the point cloud +* `--v` is optional, it activates verbose mode. + +**Example** + +`VoroniGIC ../../data/points/human.off 700` + +* Builds the Voronoi Graph Induced Complex with 700 subsamples from `human.off` file. +`../../data/points/human_sc.off` can be visualized with GeomView. + diff --git a/src/Rips_complex/utilities/README b/src/Rips_complex/utilities/README index 4d20c806..44a37543 100644 --- a/src/Rips_complex/utilities/README +++ b/src/Rips_complex/utilities/README @@ -1,6 +1,20 @@ -# Rips_complex # - -## `rips_persistence` ## +--- +layout: page +title: "Rips complex" +meta_title: "ripscomplex" +subheadline: "" +teaser: "" +permalink: "/ripscomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + + +## rips_persistence ## This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: `p dim birth death` @@ -8,6 +22,7 @@ This program computes the persistent homology with coefficient field *Z/pZ* of a where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). **Usage** + `rips_persistence [options] ` **Allowed options** @@ -22,53 +37,25 @@ where `dim` is the dimension of the homological feature, `birth` and `death` are Beware: this program may use a lot of RAM and take a lot of time if `max-edge-length` is set to a large value. **Example 1 with Z/2Z coefficients** -`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2` -outputs: -``` -2 0 0 inf -2 1 0.0983494 inf -2 1 0.104347 inf -2 2 0.138335 inf -``` +`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2` **Example 2 with Z/3Z coefficients** -rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3 - -outputs: -``` -3 0 0 inf -3 1 0.0983494 inf -3 1 0.104347 inf -3 2 0.138335 inf -``` +`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3` +## rips_distance_matrix_persistence ## +Same as `rips_persistence` but taking a distance matrix as input. -## `rips_distance_matrix_persistence` ## -Same as `rips_persistence` but taking a distance matrix as input. - **Usage** -`rips_persistence [options] ` -where + +`rips_persistence [options] ` + +where `` is the path to the file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'. **Example** -`rips_distance_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0` -outputs: -``` -The complex contains 46 simplices - and has dimension 3 -3 0 0 inf -3 0 0 8.94427 -3 0 0 7.28011 -3 0 0 6.08276 -3 0 0 5.83095 -3 0 0 5.38516 -3 0 0 5 -3 1 11 12.0416 -3 1 6.32456 6.7082 -``` +`rips_distance_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0` diff --git a/src/Witness_complex/utilities/README b/src/Witness_complex/utilities/README index 1141033e..5cdb1f88 100644 --- a/src/Witness_complex/utilities/README +++ b/src/Witness_complex/utilities/README @@ -1,18 +1,34 @@ -# Witness_complex # +--- +layout: page +title: "Witness complex" +meta_title: "witnesscomplex" +subheadline: "" +teaser: "" +permalink: "/witnesscomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + For more details about the witness complex, please read the [user manual of the package](http://gudhi.gforge.inria.fr/doc/latest/group__witness__complex.html). -## `weak_witness_persistence` ## -This program computes the persistent homology with coefficient field *Z/pZ* of a Weak witness complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: +## weak_witness_persistence ## +This program computes the persistent homology with coefficient field *Z/pZ* of a Weak witness complex defined on a set of input points. +The output diagram contains one bar per line, written with the convention: `p dim birth death` -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, +and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. + +**Usage** -*Usage* `weak_witness_persistence [options] ` -*Allowed options* +**Allowed options** * `-h [ --help ]` Produce help message * `-l [ --landmarks ]` Number of landmarks to choose from the point cloud. @@ -22,33 +38,28 @@ where `dim` is the dimension of the homological feature, `birth` and `death` are * `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. * `-d [ --cpx-dimension ]` (default = 2147483647) Maximal dimension of the weak witness complex we want to compute. -*Example* -`weak_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.006` +**Example** -outputs: -``` -Successfully read 1307 points. -Ambient dimension is 3. -The complex contains 732 simplices and has dimension 8 -11 0 0 inf -11 1 0 inf -11 2 0.0275251 0.0534586 -11 1 0 0.0239952 -``` +`weak_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.006` N.B.: output is random as the 20 landmarks are chosen randomly. -## `strong_witness_persistence` ## -This program computes the persistent homology with coefficient field *Z/pZ* of a Strong witness complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: + +## strong_witness_persistence ## + +This program computes the persistent homology with coefficient field *Z/pZ* of a Strong witness complex defined on a set of input points. +The output diagram contains one bar per line, written with the convention: `p dim birth death` -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, +and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. + +**Usage** -*Usage* `strong_witness_persistence [options] ` -*Allowed options* +**Allowed options** * `-h [ --help ]` Produce help message * `-l [ --landmarks ]` Number of landmarks to choose from the point cloud. @@ -58,17 +69,8 @@ where `dim` is the dimension of the homological feature, `birth` and `death` are * `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. * `-d [ --cpx-dimension ]` (default = 2147483647) Maximal dimension of the weak witness complex we want to compute. -*Example* -`strong_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.06` +**Example** -outputs: -``` -Successfully read 1307 points. -Ambient dimension is 3. -The complex contains 1836 simplices and has dimension 8 -11 0 0 inf -11 1 0.00674748 inf -11 2 0.0937751 0.235354 -``` +`strong_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.06` N.B.: output is random as the 20 landmarks are chosen randomly. diff --git a/src/common/utilities/README b/src/common/utilities/README index 18fa8cc4..f39c63b8 100644 --- a/src/common/utilities/README +++ b/src/common/utilities/README @@ -1,19 +1,43 @@ -# Pointset generator # +--- +layout: page +title: "Pointset generator" +meta_title: "pointsetgenerator" +subheadline: "" +teaser: "" +permalink: "/pointsetgenerator/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} -## `off_file_from_shape_generator` ## +## off_file_from_shape_generator ## Generates a pointset and save it in an OFF file. Command-line is: -`off_file_from_shape_generator on|in sphere|cube|curve|torus|klein ...` + +``` +off_file_from_shape_generator on|in sphere|cube|curve|torus|klein ... +``` Warning: "on cube" generator is not available! -Examples: +**Examples** + +``` +off_file_from_shape_generator on sphere onSphere.off 1000 3 15.2 +``` + +* Generates an onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2. + +``` +off_file_from_shape_generator in sphere inSphere.off 100 2 +``` + +* Generates an inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default). -* Generate an onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2: -`off_file_from_shape_generator on sphere onSphere.off 1000 3 15.2` - -* Generate an inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default): -`off_file_from_shape_generator in sphere inSphere.off 100 2` +``` +off_file_from_shape_generator in cube inCube.off 10000 3 5.8 +``` -* Generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8: -`off_file_from_shape_generator in cube inCube.off 10000 3 5.8` +* Generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8. -- cgit v1.2.3 From c50ac9a8e5d1f506cc79b9c1e623228fffd545bf Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 29 Jan 2018 16:34:16 +0000 Subject: Rename README files for web site generation conformity git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3177 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 632b264790c30accb42e731c4a4f6744a2f7ba11 --- src/Alpha_complex/utilities/README | 169 --------------------- src/Alpha_complex/utilities/alphacomplex.md | 169 +++++++++++++++++++++ src/Bitmap_cubical_complex/utilities/README | 40 ----- .../utilities/cubicalcomplex.md | 40 +++++ src/Bottleneck_distance/utilities/README | 30 ---- .../utilities/bottleneckdistance.md | 30 ++++ src/Rips_complex/utilities/README | 61 -------- src/Rips_complex/utilities/ripscomplex.md | 61 ++++++++ src/Witness_complex/utilities/README | 76 --------- src/Witness_complex/utilities/witnesscomplex.md | 76 +++++++++ src/common/utilities/README | 43 ------ src/common/utilities/pointsetgenerator.md | 43 ++++++ 12 files changed, 419 insertions(+), 419 deletions(-) delete mode 100644 src/Alpha_complex/utilities/README create mode 100644 src/Alpha_complex/utilities/alphacomplex.md delete mode 100644 src/Bitmap_cubical_complex/utilities/README create mode 100644 src/Bitmap_cubical_complex/utilities/cubicalcomplex.md delete mode 100644 src/Bottleneck_distance/utilities/README create mode 100644 src/Bottleneck_distance/utilities/bottleneckdistance.md delete mode 100644 src/Rips_complex/utilities/README create mode 100644 src/Rips_complex/utilities/ripscomplex.md delete mode 100644 src/Witness_complex/utilities/README create mode 100644 src/Witness_complex/utilities/witnesscomplex.md delete mode 100644 src/common/utilities/README create mode 100644 src/common/utilities/pointsetgenerator.md (limited to 'src/common') diff --git a/src/Alpha_complex/utilities/README b/src/Alpha_complex/utilities/README deleted file mode 100644 index 56bce602..00000000 --- a/src/Alpha_complex/utilities/README +++ /dev/null @@ -1,169 +0,0 @@ ---- -layout: page -title: "Alpha complex" -meta_title: "alphacomplex" -subheadline: "" -teaser: "" -permalink: "/alphacomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} - - - -## alpha_complex_3d_persistence ## -This program computes the persistent homology with coefficient field Z/pZ of the 3D alpha complex built from a 3D point cloud. The output diagram contains one bar per line, written with the convention: - -``` -p dim birth death -``` - -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). - -**Usage** - -``` - alpha_complex_3d_persistence [options] -``` - -where `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. -* `-p [ --field-charac ]` (default=11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. - -**Example** - -``` -alpha_complex_3d_persistence ../../data/points/tore3D_300.off -p 2 -m 0.45 -``` - -N.B.: - -* `alpha_complex_3d_persistence` only accepts OFF files in dimension 3. -* Filtration values are alpha square values. - - -## exact_alpha_complex_3d_persistence ## - -Same as `alpha_complex_3d_persistence`, but using exact computation. -It is slower, but it is necessary when points are on a grid for instance. - - - -## weighted_alpha_complex_3d_persistence ## - -Same as `alpha_complex_3d_persistence`, but using weighted points. - -**Usage** - -``` - weighted_alpha_complex_3d_persistence [options] -``` - -where - -* `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). -* `` is the path to the file containing the weights of the points (one value per line). - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. -* `-p [ --field-charac ]` (default=11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. - -**Example** - -``` - weighted_alpha_complex_3d_persistence ../../data/points/tore3D_300.off ../../data/points/tore3D_300.weights -p 2 -m 0.45 -``` - - -N.B.: - -* Weights values are explained on CGAL [Alpha shape](https://doc.cgal.org/latest/Alpha_shapes_3/index.html#title0) -and [Regular triangulation](https://doc.cgal.org/latest/Triangulation_3/index.html#Triangulation3secclassRegulartriangulation) documentation. -* Filtration values are alpha square values. - - -## periodic_alpha_complex_3d_persistence ## -Same as `alpha_complex_3d_persistence`, but using periodic alpha shape 3d. -Refer to the [CGAL's 3D Periodic Triangulations User Manual](https://doc.cgal.org/latest/Periodic_3_triangulation_3/index.html) for more details. - -**Usage** - -``` - periodic_alpha_complex_3d_persistence [options] -``` - -where - -* `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). -* `` is the path to the file describing the periodic domain. It must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsIsoCuboid). - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. -* `-p [ --field-charac ]` (default=11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals - - -**Example** - -``` -periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off ../../data/points/iso_cuboid_3_in_0_1.txt -p 3 -m 1.0 -``` - -N.B.: - -* Cuboid file must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsIsoCuboid). -* Filtration values are alpha square values. - - - -## alpha_complex_persistence ## - -This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. -The output diagram contains one bar per line, written with the convention: - -``` - p dim birth death -``` - -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, -and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). - -**Usage** - -``` - alpha_complex_persistence [options] -``` - -where -`` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. -* `-r [ --max-alpha-square-value ]` (default = inf) Maximal alpha square value for the Alpha complex construction. -* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. - -**Example** - -``` - alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off -``` - -N.B.: - -* Filtration values are alpha square values. diff --git a/src/Alpha_complex/utilities/alphacomplex.md b/src/Alpha_complex/utilities/alphacomplex.md new file mode 100644 index 00000000..56bce602 --- /dev/null +++ b/src/Alpha_complex/utilities/alphacomplex.md @@ -0,0 +1,169 @@ +--- +layout: page +title: "Alpha complex" +meta_title: "alphacomplex" +subheadline: "" +teaser: "" +permalink: "/alphacomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + + +## alpha_complex_3d_persistence ## +This program computes the persistent homology with coefficient field Z/pZ of the 3D alpha complex built from a 3D point cloud. The output diagram contains one bar per line, written with the convention: + +``` +p dim birth death +``` + +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). + +**Usage** + +``` + alpha_complex_3d_persistence [options] +``` + +where `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. +* `-p [ --field-charac ]` (default=11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. + +**Example** + +``` +alpha_complex_3d_persistence ../../data/points/tore3D_300.off -p 2 -m 0.45 +``` + +N.B.: + +* `alpha_complex_3d_persistence` only accepts OFF files in dimension 3. +* Filtration values are alpha square values. + + +## exact_alpha_complex_3d_persistence ## + +Same as `alpha_complex_3d_persistence`, but using exact computation. +It is slower, but it is necessary when points are on a grid for instance. + + + +## weighted_alpha_complex_3d_persistence ## + +Same as `alpha_complex_3d_persistence`, but using weighted points. + +**Usage** + +``` + weighted_alpha_complex_3d_persistence [options] +``` + +where + +* `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). +* `` is the path to the file containing the weights of the points (one value per line). + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. +* `-p [ --field-charac ]` (default=11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. + +**Example** + +``` + weighted_alpha_complex_3d_persistence ../../data/points/tore3D_300.off ../../data/points/tore3D_300.weights -p 2 -m 0.45 +``` + + +N.B.: + +* Weights values are explained on CGAL [Alpha shape](https://doc.cgal.org/latest/Alpha_shapes_3/index.html#title0) +and [Regular triangulation](https://doc.cgal.org/latest/Triangulation_3/index.html#Triangulation3secclassRegulartriangulation) documentation. +* Filtration values are alpha square values. + + +## periodic_alpha_complex_3d_persistence ## +Same as `alpha_complex_3d_persistence`, but using periodic alpha shape 3d. +Refer to the [CGAL's 3D Periodic Triangulations User Manual](https://doc.cgal.org/latest/Periodic_3_triangulation_3/index.html) for more details. + +**Usage** + +``` + periodic_alpha_complex_3d_persistence [options] +``` + +where + +* `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). +* `` is the path to the file describing the periodic domain. It must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsIsoCuboid). + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. +* `-p [ --field-charac ]` (default=11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals + + +**Example** + +``` +periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off ../../data/points/iso_cuboid_3_in_0_1.txt -p 3 -m 1.0 +``` + +N.B.: + +* Cuboid file must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsIsoCuboid). +* Filtration values are alpha square values. + + + +## alpha_complex_persistence ## + +This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. +The output diagram contains one bar per line, written with the convention: + +``` + p dim birth death +``` + +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, +and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). + +**Usage** + +``` + alpha_complex_persistence [options] +``` + +where +`` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. +* `-r [ --max-alpha-square-value ]` (default = inf) Maximal alpha square value for the Alpha complex construction. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. + +**Example** + +``` + alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off +``` + +N.B.: + +* Filtration values are alpha square values. diff --git a/src/Bitmap_cubical_complex/utilities/README b/src/Bitmap_cubical_complex/utilities/README deleted file mode 100644 index 393b2654..00000000 --- a/src/Bitmap_cubical_complex/utilities/README +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: page -title: "Bitmap cubical complex" -meta_title: "cubicalcomplex" -subheadline: "" -teaser: "" -permalink: "/cubicalcomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} - - -## cubical_complex_persistence ## -This program computes persistent homology, by using the Bitmap_cubical_complex class, of cubical complexes provided in text files in Perseus style. -See [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPerseus) for a description of the file format. - -**Example** - -``` - cubical_complex_persistence data/bitmap/CubicalTwoSphere.txt -``` - -* Creates a Cubical Complex from the Perseus style file `CubicalTwoSphere.txt`, -computes Persistence cohomology from it and writes the results in a persistence file `CubicalTwoSphere.txt_persistence`. - -## periodic_cubical_complex_persistence ## - -Same as above, but with periodic boundary conditions. - -**Example** - -``` - periodic_cubical_complex_persistence data/bitmap/3d_torus.txt -``` - -* Creates a Periodical Cubical Complex from the Perseus style file `3d_torus.txt`, -computes Persistence cohomology from it and writes the results in a persistence file `3d_torus.txt_persistence`. diff --git a/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md b/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md new file mode 100644 index 00000000..393b2654 --- /dev/null +++ b/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md @@ -0,0 +1,40 @@ +--- +layout: page +title: "Bitmap cubical complex" +meta_title: "cubicalcomplex" +subheadline: "" +teaser: "" +permalink: "/cubicalcomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + +## cubical_complex_persistence ## +This program computes persistent homology, by using the Bitmap_cubical_complex class, of cubical complexes provided in text files in Perseus style. +See [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPerseus) for a description of the file format. + +**Example** + +``` + cubical_complex_persistence data/bitmap/CubicalTwoSphere.txt +``` + +* Creates a Cubical Complex from the Perseus style file `CubicalTwoSphere.txt`, +computes Persistence cohomology from it and writes the results in a persistence file `CubicalTwoSphere.txt_persistence`. + +## periodic_cubical_complex_persistence ## + +Same as above, but with periodic boundary conditions. + +**Example** + +``` + periodic_cubical_complex_persistence data/bitmap/3d_torus.txt +``` + +* Creates a Periodical Cubical Complex from the Perseus style file `3d_torus.txt`, +computes Persistence cohomology from it and writes the results in a persistence file `3d_torus.txt_persistence`. diff --git a/src/Bottleneck_distance/utilities/README b/src/Bottleneck_distance/utilities/README deleted file mode 100644 index 04e1c4bd..00000000 --- a/src/Bottleneck_distance/utilities/README +++ /dev/null @@ -1,30 +0,0 @@ ---- -layout: page -title: "Bottleneck distance" -meta_title: "bottleneckdistance" -subheadline: "" -teaser: "" -permalink: "/bottleneckdistance/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} - - - -## bottleneck_read_file_example ## - -This program computes the Bottleneck distance between two persistence diagram files. - -**Usage** - -``` - bottleneck_read_file_example [] -``` - -where - -* `` and `` must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPers). -* `` is an error bound on the bottleneck distance (set by default to the smallest positive double value). diff --git a/src/Bottleneck_distance/utilities/bottleneckdistance.md b/src/Bottleneck_distance/utilities/bottleneckdistance.md new file mode 100644 index 00000000..04e1c4bd --- /dev/null +++ b/src/Bottleneck_distance/utilities/bottleneckdistance.md @@ -0,0 +1,30 @@ +--- +layout: page +title: "Bottleneck distance" +meta_title: "bottleneckdistance" +subheadline: "" +teaser: "" +permalink: "/bottleneckdistance/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + + +## bottleneck_read_file_example ## + +This program computes the Bottleneck distance between two persistence diagram files. + +**Usage** + +``` + bottleneck_read_file_example [] +``` + +where + +* `` and `` must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPers). +* `` is an error bound on the bottleneck distance (set by default to the smallest positive double value). diff --git a/src/Rips_complex/utilities/README b/src/Rips_complex/utilities/README deleted file mode 100644 index 44a37543..00000000 --- a/src/Rips_complex/utilities/README +++ /dev/null @@ -1,61 +0,0 @@ ---- -layout: page -title: "Rips complex" -meta_title: "ripscomplex" -subheadline: "" -teaser: "" -permalink: "/ripscomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} - - - -## rips_persistence ## -This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: - -`p dim birth death` - -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). - -**Usage** - -`rips_persistence [options] ` - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. -* `-r [ --max-edge-length ]` (default = inf) Maximal length of an edge for the Rips complex construction. -* `-d [ --cpx-dimension ]` (default = 1) Maximal dimension of the Rips complex we want to compute. -* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. - -Beware: this program may use a lot of RAM and take a lot of time if `max-edge-length` is set to a large value. - -**Example 1 with Z/2Z coefficients** - -`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2` - -**Example 2 with Z/3Z coefficients** - -`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3` - - -## rips_distance_matrix_persistence ## - -Same as `rips_persistence` but taking a distance matrix as input. - -**Usage** - -`rips_persistence [options] ` - -where -`` is the path to the file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'. - -**Example** - -`rips_distance_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0` diff --git a/src/Rips_complex/utilities/ripscomplex.md b/src/Rips_complex/utilities/ripscomplex.md new file mode 100644 index 00000000..44a37543 --- /dev/null +++ b/src/Rips_complex/utilities/ripscomplex.md @@ -0,0 +1,61 @@ +--- +layout: page +title: "Rips complex" +meta_title: "ripscomplex" +subheadline: "" +teaser: "" +permalink: "/ripscomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + + +## rips_persistence ## +This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: + +`p dim birth death` + +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). + +**Usage** + +`rips_persistence [options] ` + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. +* `-r [ --max-edge-length ]` (default = inf) Maximal length of an edge for the Rips complex construction. +* `-d [ --cpx-dimension ]` (default = 1) Maximal dimension of the Rips complex we want to compute. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. + +Beware: this program may use a lot of RAM and take a lot of time if `max-edge-length` is set to a large value. + +**Example 1 with Z/2Z coefficients** + +`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2` + +**Example 2 with Z/3Z coefficients** + +`rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3` + + +## rips_distance_matrix_persistence ## + +Same as `rips_persistence` but taking a distance matrix as input. + +**Usage** + +`rips_persistence [options] ` + +where +`` is the path to the file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'. + +**Example** + +`rips_distance_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0` diff --git a/src/Witness_complex/utilities/README b/src/Witness_complex/utilities/README deleted file mode 100644 index 5cdb1f88..00000000 --- a/src/Witness_complex/utilities/README +++ /dev/null @@ -1,76 +0,0 @@ ---- -layout: page -title: "Witness complex" -meta_title: "witnesscomplex" -subheadline: "" -teaser: "" -permalink: "/witnesscomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} - - -For more details about the witness complex, please read the [user manual of the package](http://gudhi.gforge.inria.fr/doc/latest/group__witness__complex.html). - -## weak_witness_persistence ## -This program computes the persistent homology with coefficient field *Z/pZ* of a Weak witness complex defined on a set of input points. -The output diagram contains one bar per line, written with the convention: - -`p dim birth death` - -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, -and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. - -**Usage** - -`weak_witness_persistence [options] ` - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-l [ --landmarks ]` Number of landmarks to choose from the point cloud. -* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in std::cout. -* `-a [ --max-sq-alpha ]` (default = inf) Maximal squared relaxation parameter. -* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. -* `-d [ --cpx-dimension ]` (default = 2147483647) Maximal dimension of the weak witness complex we want to compute. - -**Example** - -`weak_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.006` - -N.B.: output is random as the 20 landmarks are chosen randomly. - - -## strong_witness_persistence ## - -This program computes the persistent homology with coefficient field *Z/pZ* of a Strong witness complex defined on a set of input points. -The output diagram contains one bar per line, written with the convention: - -`p dim birth death` - -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, -and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. - -**Usage** - -`strong_witness_persistence [options] ` - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-l [ --landmarks ]` Number of landmarks to choose from the point cloud. -* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in std::cout. -* `-a [ --max-sq-alpha ]` (default = inf) Maximal squared relaxation parameter. -* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. -* `-d [ --cpx-dimension ]` (default = 2147483647) Maximal dimension of the weak witness complex we want to compute. - -**Example** - -`strong_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.06` - -N.B.: output is random as the 20 landmarks are chosen randomly. diff --git a/src/Witness_complex/utilities/witnesscomplex.md b/src/Witness_complex/utilities/witnesscomplex.md new file mode 100644 index 00000000..5cdb1f88 --- /dev/null +++ b/src/Witness_complex/utilities/witnesscomplex.md @@ -0,0 +1,76 @@ +--- +layout: page +title: "Witness complex" +meta_title: "witnesscomplex" +subheadline: "" +teaser: "" +permalink: "/witnesscomplex/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + + +For more details about the witness complex, please read the [user manual of the package](http://gudhi.gforge.inria.fr/doc/latest/group__witness__complex.html). + +## weak_witness_persistence ## +This program computes the persistent homology with coefficient field *Z/pZ* of a Weak witness complex defined on a set of input points. +The output diagram contains one bar per line, written with the convention: + +`p dim birth death` + +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, +and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. + +**Usage** + +`weak_witness_persistence [options] ` + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-l [ --landmarks ]` Number of landmarks to choose from the point cloud. +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in std::cout. +* `-a [ --max-sq-alpha ]` (default = inf) Maximal squared relaxation parameter. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. +* `-d [ --cpx-dimension ]` (default = 2147483647) Maximal dimension of the weak witness complex we want to compute. + +**Example** + +`weak_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.006` + +N.B.: output is random as the 20 landmarks are chosen randomly. + + +## strong_witness_persistence ## + +This program computes the persistent homology with coefficient field *Z/pZ* of a Strong witness complex defined on a set of input points. +The output diagram contains one bar per line, written with the convention: + +`p dim birth death` + +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, +and `p` is the characteristic of the field *Z/pZ* used for homology coefficients. + +**Usage** + +`strong_witness_persistence [options] ` + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-l [ --landmarks ]` Number of landmarks to choose from the point cloud. +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in std::cout. +* `-a [ --max-sq-alpha ]` (default = inf) Maximal squared relaxation parameter. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. +* `-d [ --cpx-dimension ]` (default = 2147483647) Maximal dimension of the weak witness complex we want to compute. + +**Example** + +`strong_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.06` + +N.B.: output is random as the 20 landmarks are chosen randomly. diff --git a/src/common/utilities/README b/src/common/utilities/README deleted file mode 100644 index f39c63b8..00000000 --- a/src/common/utilities/README +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: page -title: "Pointset generator" -meta_title: "pointsetgenerator" -subheadline: "" -teaser: "" -permalink: "/pointsetgenerator/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} - -## off_file_from_shape_generator ## - -Generates a pointset and save it in an OFF file. Command-line is: - -``` -off_file_from_shape_generator on|in sphere|cube|curve|torus|klein ... -``` - -Warning: "on cube" generator is not available! - -**Examples** - -``` -off_file_from_shape_generator on sphere onSphere.off 1000 3 15.2 -``` - -* Generates an onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2. - -``` -off_file_from_shape_generator in sphere inSphere.off 100 2 -``` - -* Generates an inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default). - -``` -off_file_from_shape_generator in cube inCube.off 10000 3 5.8 -``` - -* Generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8. diff --git a/src/common/utilities/pointsetgenerator.md b/src/common/utilities/pointsetgenerator.md new file mode 100644 index 00000000..f39c63b8 --- /dev/null +++ b/src/common/utilities/pointsetgenerator.md @@ -0,0 +1,43 @@ +--- +layout: page +title: "Pointset generator" +meta_title: "pointsetgenerator" +subheadline: "" +teaser: "" +permalink: "/pointsetgenerator/" +--- +{::comment} +These flags above are here for web site generation, please let them. +cf. https://gitlab.inria.fr/GUDHI/website +Must be in conformity with _data/navigation.yml +{:/comment} + +## off_file_from_shape_generator ## + +Generates a pointset and save it in an OFF file. Command-line is: + +``` +off_file_from_shape_generator on|in sphere|cube|curve|torus|klein ... +``` + +Warning: "on cube" generator is not available! + +**Examples** + +``` +off_file_from_shape_generator on sphere onSphere.off 1000 3 15.2 +``` + +* Generates an onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2. + +``` +off_file_from_shape_generator in sphere inSphere.off 100 2 +``` + +* Generates an inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default). + +``` +off_file_from_shape_generator in cube inCube.off 10000 3 5.8 +``` + +* Generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8. -- cgit v1.2.3 From 37ded65d83935d417fc3bc484594a83b36f63514 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 30 Jan 2018 17:05:03 +0000 Subject: Fix after web review git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3189 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fd42bab9b27a3c086adeaf75068c83a911ede000 --- src/Alpha_complex/utilities/alphacomplex.md | 100 +++++++++------------ .../utilities/cubicalcomplex.md | 17 +--- .../utilities/bottleneckdistance.md | 16 +--- src/Nerve_GIC/utilities/covercomplex.md | 15 +--- src/Rips_complex/utilities/ripscomplex.md | 16 +--- src/Witness_complex/utilities/witnesscomplex.md | 22 ++--- src/common/utilities/pointsetgenerator.md | 16 +--- 7 files changed, 62 insertions(+), 140 deletions(-) (limited to 'src/common') diff --git a/src/Alpha_complex/utilities/alphacomplex.md b/src/Alpha_complex/utilities/alphacomplex.md index 0e500e53..aace85d3 100644 --- a/src/Alpha_complex/utilities/alphacomplex.md +++ b/src/Alpha_complex/utilities/alphacomplex.md @@ -1,18 +1,47 @@ ---- -layout: page -title: "Alpha complex" -meta_title: "alphacomplex" -subheadline: "" -teaser: "" -permalink: "/alphacomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} +# Alpha complex # + + +## alpha_complex_persistence ## + +This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. +The output diagram contains one bar per line, written with the convention: + +``` + p dim birth death +``` + +where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, +and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). + +**Usage** + +``` + alpha_complex_persistence [options] +``` + +where +`` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). + +**Allowed options** + +* `-h [ --help ]` Produce help message +* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. +* `-r [ --max-alpha-square-value ]` (default = inf) Maximal alpha square value for the Alpha complex construction. +* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. +* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. + +**Example** + +``` + alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off +``` + +N.B.: + +* Filtration values are alpha square values. + ## alpha_complex_3d_persistence ## This program computes the persistent homology with coefficient field Z/pZ of the 3D alpha complex built from a 3D point cloud. The output diagram contains one bar per line, written with the convention: @@ -107,7 +136,7 @@ where * `` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). * `` is the path to the file describing the periodic domain. It must be in the format described -[here](../doc/latest/fileformats.html#FileFormatsIsoCuboid). +[here](/doc/latest/fileformats.html#FileFormatsIsoCuboid). **Allowed options** @@ -125,46 +154,5 @@ periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off N.B.: -* Cuboid file must be in the format described [here](../doc/latest/fileformats.html#FileFormatsIsoCuboid). -* Filtration values are alpha square values. - - - -## alpha_complex_persistence ## - -This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. -The output diagram contains one bar per line, written with the convention: - -``` - p dim birth death -``` - -where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, -and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number). - -**Usage** - -``` - alpha_complex_persistence [options] -``` - -where -`` is the path to the input point cloud in [nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). - -**Allowed options** - -* `-h [ --help ]` Produce help message -* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output. -* `-r [ --max-alpha-square-value ]` (default = inf) Maximal alpha square value for the Alpha complex construction. -* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology. -* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals. - -**Example** - -``` - alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off -``` - -N.B.: - +* Cuboid file must be in the format described [here](/doc/latest/fileformats.html#FileFormatsIsoCuboid). * Filtration values are alpha square values. diff --git a/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md b/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md index 3a9e6aac..6e1b2578 100644 --- a/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md +++ b/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md @@ -1,21 +1,10 @@ ---- -layout: page -title: "Bitmap cubical complex" -meta_title: "cubicalcomplex" -subheadline: "" -teaser: "" -permalink: "/cubicalcomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} +# Cubical complex# + ## cubical_complex_persistence ## This program computes persistent homology, by using the Bitmap_cubical_complex class, of cubical complexes provided in text files in Perseus style. -See [here](../doc/latest/fileformats.html#FileFormatsPerseus) for a description of the file format. +See [here](/doc/latest/fileformats.html#FileFormatsPerseus) for a description of the file format. **Example** diff --git a/src/Bottleneck_distance/utilities/bottleneckdistance.md b/src/Bottleneck_distance/utilities/bottleneckdistance.md index e9079058..526f5822 100644 --- a/src/Bottleneck_distance/utilities/bottleneckdistance.md +++ b/src/Bottleneck_distance/utilities/bottleneckdistance.md @@ -1,18 +1,6 @@ ---- -layout: page -title: "Bottleneck distance" -meta_title: "bottleneckdistance" -subheadline: "" -teaser: "" -permalink: "/bottleneckdistance/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} +# Bottleneck distance # ## bottleneck_read_file_example ## @@ -26,5 +14,5 @@ This program computes the Bottleneck distance between two persistence diagram fi where -* `` and `` must be in the format described [here](../doc/latest/fileformats.html#FileFormatsPers). +* `` and `` must be in the format described [here](/doc/latest/fileformats.html#FileFormatsPers). * `` is an error bound on the bottleneck distance (set by default to the smallest positive double value). diff --git a/src/Nerve_GIC/utilities/covercomplex.md b/src/Nerve_GIC/utilities/covercomplex.md index 41489b66..f33cb2e0 100644 --- a/src/Nerve_GIC/utilities/covercomplex.md +++ b/src/Nerve_GIC/utilities/covercomplex.md @@ -1,18 +1,7 @@ ---- -layout: page -title: "Cover complex" -meta_title: "covercomplex" -subheadline: "" -teaser: "" -permalink: "/covercomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} +# Cover complex # + ## Nerve ## This program builds the Nerve of a point cloud sampled on an OFF file. diff --git a/src/Rips_complex/utilities/ripscomplex.md b/src/Rips_complex/utilities/ripscomplex.md index 44a37543..4291fae7 100644 --- a/src/Rips_complex/utilities/ripscomplex.md +++ b/src/Rips_complex/utilities/ripscomplex.md @@ -1,21 +1,9 @@ ---- -layout: page -title: "Rips complex" -meta_title: "ripscomplex" -subheadline: "" -teaser: "" -permalink: "/ripscomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} +# Rips complex # ## rips_persistence ## -This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention: +This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points, using Euclidean distance. The output diagram contains one bar per line, written with the convention: `p dim birth death` diff --git a/src/Witness_complex/utilities/witnesscomplex.md b/src/Witness_complex/utilities/witnesscomplex.md index 40864871..2341759b 100644 --- a/src/Witness_complex/utilities/witnesscomplex.md +++ b/src/Witness_complex/utilities/witnesscomplex.md @@ -1,19 +1,9 @@ ---- -layout: page -title: "Witness complex" -meta_title: "witnesscomplex" -subheadline: "" -teaser: "" -permalink: "/witnesscomplex/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} - - -For more details about the witness complex, please read the [user manual of the package](../doc/latest/group__witness__complex.html). + + +# Witness complex # + + +For more details about the witness complex, please read the [user manual of the package](/doc/latest/group__witness__complex.html). ## weak_witness_persistence ## This program computes the persistent homology with coefficient field *Z/pZ* of a Weak witness complex defined on a set of input points. diff --git a/src/common/utilities/pointsetgenerator.md b/src/common/utilities/pointsetgenerator.md index f39c63b8..284715d4 100644 --- a/src/common/utilities/pointsetgenerator.md +++ b/src/common/utilities/pointsetgenerator.md @@ -1,16 +1,6 @@ ---- -layout: page -title: "Pointset generator" -meta_title: "pointsetgenerator" -subheadline: "" -teaser: "" -permalink: "/pointsetgenerator/" ---- -{::comment} -These flags above are here for web site generation, please let them. -cf. https://gitlab.inria.fr/GUDHI/website -Must be in conformity with _data/navigation.yml -{:/comment} + + +# common # ## off_file_from_shape_generator ## -- cgit v1.2.3 From e15408b4af5cba8966aa8773f6ee6884942c1d95 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 31 Jan 2018 08:18:58 +0000 Subject: Modify header (cpp and python) to fit with the new website sections git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3192 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1dc2f0745020db4a27649c55dc1d01397b0a403c --- src/common/doc/header.html | 4 ++++ src/cython/doc/_templates/layout.html | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src/common') diff --git a/src/common/doc/header.html b/src/common/doc/header.html index 53b5c0a2..9c514381 100644 --- a/src/common/doc/header.html +++ b/src/common/doc/header.html @@ -56,6 +56,8 @@ $extrastylesheet
  • @@ -66,6 +68,8 @@ $extrastylesheet
  • C++ installation manual
  • Python documentation
  • Python installation manual
  • +
  • Utilities
  • +
  • Tutorial
  • diff --git a/src/cython/doc/_templates/layout.html b/src/cython/doc/_templates/layout.html index fd3e1cfd..8e4eba40 100644 --- a/src/cython/doc/_templates/layout.html +++ b/src/cython/doc/_templates/layout.html @@ -198,6 +198,8 @@
  • @@ -208,6 +210,8 @@
  • C++ installation manual
  • Python documentation
  • Python installation manual
  • +
  • Utilities
  • +
  • Tutorial
  • -- cgit v1.2.3 From 265484997185f3bf900744406206a2d64ca0a20d Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 2 Feb 2018 14:15:49 +0000 Subject: Fix after version release of Cover complex and Persistence representation installations Fix utils download link git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3211 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9596df8b0d0cdc3d8df79aa367a26b34a96d7f5e --- src/Nerve_GIC/example/CMakeLists.txt | 3 +++ src/Nerve_GIC/utilities/CMakeLists.txt | 4 ++++ src/Persistence_representations/example/CMakeLists.txt | 8 +++++--- src/Persistence_representations/utilities/CMakeLists.txt | 6 ++++++ .../utilities/persistence_intervals/CMakeLists.txt | 6 ++++++ src/common/doc/header.html | 4 ++-- src/cython/doc/_templates/layout.html | 4 ++-- 7 files changed, 28 insertions(+), 7 deletions(-) (limited to 'src/common') diff --git a/src/Nerve_GIC/example/CMakeLists.txt b/src/Nerve_GIC/example/CMakeLists.txt index f2626927..542c6af4 100644 --- a/src/Nerve_GIC/example/CMakeLists.txt +++ b/src/Nerve_GIC/example/CMakeLists.txt @@ -23,4 +23,7 @@ if (NOT CGAL_VERSION VERSION_LESS 4.8.1) "lucky_cat.off" "lucky_cat_PCA1") + install(TARGETS CoordGIC DESTINATION bin) + install(TARGETS FuncGIC DESTINATION bin) + endif (NOT CGAL_VERSION VERSION_LESS 4.8.1) diff --git a/src/Nerve_GIC/utilities/CMakeLists.txt b/src/Nerve_GIC/utilities/CMakeLists.txt index 7762c8a0..7a838a8c 100644 --- a/src/Nerve_GIC/utilities/CMakeLists.txt +++ b/src/Nerve_GIC/utilities/CMakeLists.txt @@ -21,4 +21,8 @@ if (NOT CGAL_VERSION VERSION_LESS 4.8.1) add_test(NAME Nerve_GIC_utilities_VoronoiGIC COMMAND $ "human.off" "100") + install(TARGETS Nerve DESTINATION bin) + install(TARGETS VoronoiGIC DESTINATION bin) + install(FILES KeplerMapperVisuFromTxtFile.py km.py km.py.COPYRIGHT DESTINATION bin) + endif (NOT CGAL_VERSION VERSION_LESS 4.8.1) diff --git a/src/Persistence_representations/example/CMakeLists.txt b/src/Persistence_representations/example/CMakeLists.txt index eb3258f8..54d719ac 100644 --- a/src/Persistence_representations/example/CMakeLists.txt +++ b/src/Persistence_representations/example/CMakeLists.txt @@ -4,24 +4,26 @@ project(Persistence_representations_example) add_executable ( Persistence_representations_example_landscape_on_grid persistence_landscape_on_grid.cpp ) add_test(NAME Persistence_representations_example_landscape_on_grid COMMAND $) +install(TARGETS Persistence_representations_example_landscape_on_grid DESTINATION bin) add_executable ( Persistence_representations_example_landscape persistence_landscape.cpp ) add_test(NAME Persistence_representations_example_landscape COMMAND $) +install(TARGETS Persistence_representations_example_landscape DESTINATION bin) add_executable ( Persistence_representations_example_intervals persistence_intervals.cpp ) add_test(NAME Persistence_representations_example_intervals COMMAND $ "${CMAKE_SOURCE_DIR}/data/persistence_diagram/first.pers") +install(TARGETS Persistence_representations_example_intervals DESTINATION bin) add_executable ( Persistence_representations_example_vectors persistence_vectors.cpp ) add_test(NAME Persistence_representations_example_vectors COMMAND $) +install(TARGETS Persistence_representations_example_vectors DESTINATION bin) add_executable ( Persistence_representations_example_heat_maps persistence_heat_maps.cpp ) add_test(NAME Persistence_representations_example_heat_maps COMMAND $) - - - +install(TARGETS Persistence_representations_example_heat_maps DESTINATION bin) diff --git a/src/Persistence_representations/utilities/CMakeLists.txt b/src/Persistence_representations/utilities/CMakeLists.txt index 137eb0c1..fc51b1d6 100644 --- a/src/Persistence_representations/utilities/CMakeLists.txt +++ b/src/Persistence_representations/utilities/CMakeLists.txt @@ -10,6 +10,8 @@ function(add_persistence_representation_creation_utility creation_utility) add_test(NAME Persistence_representation_utilities_${creation_utility} COMMAND $ ${ARGN} "${CMAKE_CURRENT_BINARY_DIR}/../first.pers" "${CMAKE_CURRENT_BINARY_DIR}/../second.pers") + + install(TARGETS ${creation_utility} DESTINATION bin) endfunction(add_persistence_representation_creation_utility) function(add_persistence_representation_plot_utility plot_utility tool_extension) @@ -26,6 +28,8 @@ function(add_persistence_representation_plot_utility plot_utility tool_extension #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() + + install(TARGETS ${plot_utility} DESTINATION bin) endfunction(add_persistence_representation_plot_utility) function(add_persistence_representation_function_utility function_utility tool_extension) @@ -44,6 +48,8 @@ function(add_persistence_representation_function_utility function_utility tool_e "${CMAKE_CURRENT_BINARY_DIR}/../first.pers${tool_extension}" "${CMAKE_CURRENT_BINARY_DIR}/../second.pers${tool_extension}") endif() + + install(TARGETS ${function_utility} DESTINATION bin) endfunction(add_persistence_representation_function_utility) add_subdirectory(persistence_heat_maps) diff --git a/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt index 897e12a3..875ff45e 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt @@ -7,6 +7,8 @@ add_executable ( plot_histogram_of_intervals_lengths plot_histogram_of_intervals add_test(NAME plot_histogram_of_intervals_lengths COMMAND $ "${CMAKE_CURRENT_BINARY_DIR}/../first.pers" "-1") +install(TARGETS plot_histogram_of_intervals_lengths DESTINATION bin) + add_persistence_representation_plot_utility(plot_persistence_intervals "") add_persistence_representation_plot_utility(plot_persistence_Betti_numbers "") @@ -18,6 +20,8 @@ add_test(NAME Persistence_representation_utilities_compute_number_of_dominant_in COMMAND $ "${CMAKE_CURRENT_BINARY_DIR}/../first.pers" "-1" "2") +install(TARGETS compute_number_of_dominant_intervals DESTINATION bin) + if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) add_executable ( compute_bottleneck_distance compute_bottleneck_distance.cpp ) @@ -29,4 +33,6 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) "-1" "${CMAKE_CURRENT_BINARY_DIR}/../first.pers" "${CMAKE_CURRENT_BINARY_DIR}/../second.pers") + + install(TARGETS compute_bottleneck_distance DESTINATION bin) endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/common/doc/header.html b/src/common/doc/header.html index 9c514381..d69b28fa 100644 --- a/src/common/doc/header.html +++ b/src/common/doc/header.html @@ -56,8 +56,8 @@ $extrastylesheet
  • diff --git a/src/cython/doc/_templates/layout.html b/src/cython/doc/_templates/layout.html index 8e4eba40..c9356116 100644 --- a/src/cython/doc/_templates/layout.html +++ b/src/cython/doc/_templates/layout.html @@ -198,8 +198,8 @@
  • -- cgit v1.2.3 From fe97343e5b53fe9d93e6aab3312021c53f2f0923 Mon Sep 17 00:00:00 2001 From: pdlotko Date: Thu, 8 Feb 2018 09:57:19 +0000 Subject: Commit to remove one file. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@3231 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 5795ef0322c1ba328e8bee068009a27f18b7224c --- src/common/include/gudhi/file_writer.h | 19 +-- .../include/gudhi/writing_persistence_to_file.h | 158 +++++++++++++++++++++ 2 files changed, 168 insertions(+), 9 deletions(-) create mode 100644 src/common/include/gudhi/writing_persistence_to_file.h (limited to 'src/common') diff --git a/src/common/include/gudhi/file_writer.h b/src/common/include/gudhi/file_writer.h index 1b59ae46..53c83533 100644 --- a/src/common/include/gudhi/file_writer.h +++ b/src/common/include/gudhi/file_writer.h @@ -41,24 +41,24 @@ class Persistence_interval_common public: Persistence_interval_common( Filtration_type birth , Filtration_type death ): birth_(birth),death_(death),dimension_(std::numeric_limits::max), - Arith_element_(std::numeric_limits::max() ){} + arith_element_(std::numeric_limits::max() ){} Persistence_interval_common( Filtration_type birth , Filtration_type death, unsigned dim ): birth_(birth),death_(death),dimension_(dim), - Arith_element_(std::numeric_limits::max()){} + arith_element_(std::numeric_limits::max()){} Persistence_interval_common( Filtration_type birth , Filtration_type death, unsigned dim , Coefficient_field field ): birth_(birth),death_(death),dimension_(dim), - Arith_element_(field){} + arith_element_(field){} inline bool operator == ( const Persistence_interval_common &i2) { return ( (this->birth_ == i2.birth_) && (this->death_ == i2.death_) && - (this->dimension_ == i2.dimension_) && (this->Arith_element_ == i2.Arith_element_) + (this->dimension_ == i2.dimension_) && (this->arith_element_ == i2.arith_element_) ); } @@ -116,9 +116,9 @@ public: friend std::ostream& operator<<(std::ostream& out, const Persistence_interval_common& it) { - if ( it.Arith_element_ != std::numeric_limits::max() ) + if ( it.arith_element_ != std::numeric_limits::max() ) { - out << it.Arith_element_ << " "; + out << it.arith_element_ << " "; } if ( it.dimension_ != std::numeric_limits::max() ) { @@ -132,7 +132,7 @@ private: Filtration_type birth_; Filtration_type death_; unsigned dimension_; - Coefficient_field Arith_element_; + Coefficient_field arith_element_; };//Persistence_interval_common @@ -141,12 +141,13 @@ private: **/ template void write_persistence_intervals_to_stream( -const std::vector< Persistence_interval_common >& intervals, +//const std::vector< Persistence_interval_common >& intervals, + std::ostream& out = std::cout ) { for ( auto interval : intervals ) { - out << interval << std::endl; + out << interval << "\n"; } }//write_persistence_intervals_to_stream diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h new file mode 100644 index 00000000..53c83533 --- /dev/null +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -0,0 +1,158 @@ +/* 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) 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 . + */ + +#ifndef FILE_WRITER_ +#define FILE_WRITER_ + +#include +#include +#include + +namespace Gudhi { + + +/** +* This is a class to store persistence intervals. Its main purpose is to +* exchange data in between different packages and provide unified way +* of writing a collection of persistence intervals to file. +**/ +template +class Persistence_interval_common +{ +public: + Persistence_interval_common( Filtration_type birth , Filtration_type death ): + birth_(birth),death_(death),dimension_(std::numeric_limits::max), + arith_element_(std::numeric_limits::max() ){} + + Persistence_interval_common( Filtration_type birth , Filtration_type death, + unsigned dim ): + birth_(birth),death_(death),dimension_(dim), + arith_element_(std::numeric_limits::max()){} + + Persistence_interval_common( Filtration_type birth , Filtration_type death, + unsigned dim , Coefficient_field field ): + birth_(birth),death_(death),dimension_(dim), + arith_element_(field){} + + + inline bool operator == ( const Persistence_interval_common &i2) + { + return ( + (this->birth_ == i2.birth_) && (this->death_ == i2.death_) && + (this->dimension_ == i2.dimension_) && (this->arith_element_ == i2.arith_element_) + ); + } + + inline bool operator != ( const Persistence_interval_common &i2) + { + return (!((*this)==i2)); + } + + + /** + * Note that this operator do not take Arith_element into account when doing comparisions. + **/ + inline bool operator < ( const Persistence_interval_common &i2) + { + if ( this->birth_ < i2.birth_ ) + { + return true; + } + else + { + if ( this->birth_ > i2.birth_ ) + { + return false; + } + else + { + //in this case this->birth_ == i2.birth_ + if ( this->death_ > i2.death_ ) + { + return true; + } + else + { + if ( this->death_ < i2.death_ ) + { + return false; + } + else + { + //in this case this->death_ == i2.death_ + if ( this->dimension_ < i2.dimension_ ) + { + return true; + } + else + { + //in this case this->dimension >= i2.dimension + return false; + } + } + } + } + } + } + + friend std::ostream& operator<<(std::ostream& out, const Persistence_interval_common& it) + { + if ( it.arith_element_ != std::numeric_limits::max() ) + { + out << it.arith_element_ << " "; + } + if ( it.dimension_ != std::numeric_limits::max() ) + { + out << it.dimension_ << " "; + } + out << it.birth_ << " " << it.death_ << " "; + return out; + } + +private: + Filtration_type birth_; + Filtration_type death_; + unsigned dimension_; + Coefficient_field arith_element_; +};//Persistence_interval_common + + +/** + * This function write a vector to a stream +**/ +template +void write_persistence_intervals_to_stream( +//const std::vector< Persistence_interval_common >& intervals, + + std::ostream& out = std::cout ) +{ + for ( auto interval : intervals ) + { + out << interval << "\n"; + } +}//write_persistence_intervals_to_stream + + + +} + +#endif //FILE_WRITER_ -- cgit v1.2.3 From 82764fe1fa117f5a3d1cce0eb7dc7dddd7af974f Mon Sep 17 00:00:00 2001 From: pdlotko Date: Thu, 8 Feb 2018 09:57:39 +0000 Subject: The file has been removed. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@3232 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4e6e6b2c1939506e19bb76a7bb507f869160577b --- src/common/include/gudhi/file_writer.h | 158 --------------------------------- 1 file changed, 158 deletions(-) delete mode 100644 src/common/include/gudhi/file_writer.h (limited to 'src/common') diff --git a/src/common/include/gudhi/file_writer.h b/src/common/include/gudhi/file_writer.h deleted file mode 100644 index 53c83533..00000000 --- a/src/common/include/gudhi/file_writer.h +++ /dev/null @@ -1,158 +0,0 @@ -/* This file is part of the Gudhi Library. The Gudhi library - * (Geometric Understanding in Higher Dimensions) is a generic C++ - * library for computational topology. - * - * Author(s): Pawel Dlotko - * - * Copyright (C) 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 . - */ - -#ifndef FILE_WRITER_ -#define FILE_WRITER_ - -#include -#include -#include - -namespace Gudhi { - - -/** -* This is a class to store persistence intervals. Its main purpose is to -* exchange data in between different packages and provide unified way -* of writing a collection of persistence intervals to file. -**/ -template -class Persistence_interval_common -{ -public: - Persistence_interval_common( Filtration_type birth , Filtration_type death ): - birth_(birth),death_(death),dimension_(std::numeric_limits::max), - arith_element_(std::numeric_limits::max() ){} - - Persistence_interval_common( Filtration_type birth , Filtration_type death, - unsigned dim ): - birth_(birth),death_(death),dimension_(dim), - arith_element_(std::numeric_limits::max()){} - - Persistence_interval_common( Filtration_type birth , Filtration_type death, - unsigned dim , Coefficient_field field ): - birth_(birth),death_(death),dimension_(dim), - arith_element_(field){} - - - inline bool operator == ( const Persistence_interval_common &i2) - { - return ( - (this->birth_ == i2.birth_) && (this->death_ == i2.death_) && - (this->dimension_ == i2.dimension_) && (this->arith_element_ == i2.arith_element_) - ); - } - - inline bool operator != ( const Persistence_interval_common &i2) - { - return (!((*this)==i2)); - } - - - /** - * Note that this operator do not take Arith_element into account when doing comparisions. - **/ - inline bool operator < ( const Persistence_interval_common &i2) - { - if ( this->birth_ < i2.birth_ ) - { - return true; - } - else - { - if ( this->birth_ > i2.birth_ ) - { - return false; - } - else - { - //in this case this->birth_ == i2.birth_ - if ( this->death_ > i2.death_ ) - { - return true; - } - else - { - if ( this->death_ < i2.death_ ) - { - return false; - } - else - { - //in this case this->death_ == i2.death_ - if ( this->dimension_ < i2.dimension_ ) - { - return true; - } - else - { - //in this case this->dimension >= i2.dimension - return false; - } - } - } - } - } - } - - friend std::ostream& operator<<(std::ostream& out, const Persistence_interval_common& it) - { - if ( it.arith_element_ != std::numeric_limits::max() ) - { - out << it.arith_element_ << " "; - } - if ( it.dimension_ != std::numeric_limits::max() ) - { - out << it.dimension_ << " "; - } - out << it.birth_ << " " << it.death_ << " "; - return out; - } - -private: - Filtration_type birth_; - Filtration_type death_; - unsigned dimension_; - Coefficient_field arith_element_; -};//Persistence_interval_common - - -/** - * This function write a vector to a stream -**/ -template -void write_persistence_intervals_to_stream( -//const std::vector< Persistence_interval_common >& intervals, - - std::ostream& out = std::cout ) -{ - for ( auto interval : intervals ) - { - out << interval << "\n"; - } -}//write_persistence_intervals_to_stream - - - -} - -#endif //FILE_WRITER_ -- cgit v1.2.3 From b5667b282e8cee9e1d2bfcf90bdfbbf2bc0030b2 Mon Sep 17 00:00:00 2001 From: pdlotko Date: Thu, 8 Feb 2018 10:00:57 +0000 Subject: random commit. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@3233 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9a3ccdd8a000bd3fd79bab61b35e50bd707cfb29 --- .../include/gudhi/Bitmap_cubical_complex.h | 2 +- ...e_one_skeleton_rips_from_correlation_matrix.cpp | 23 +++++++++++----------- .../include/gudhi/writing_persistence_to_file.h | 10 +++++----- 3 files changed, 18 insertions(+), 17 deletions(-) (limited to 'src/common') 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 969daba6..770eb55f 100644 --- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h +++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h @@ -383,7 +383,7 @@ class Bitmap_cubical_complex : public T { std::vector bdry = this->get_boundary_of_a_cell(sh); if (globalDbg) { std::cerr << "std::pair endpoints( Simplex_handle sh )\n"; - std::cerr << "bdry.size() : " << bdry.size() << std::endl; + std::cerr << "bdry.size() : " << bdry.size() << "\n"; } // this method returns two first elements from the boundary of sh. if (bdry.size() < 2) diff --git a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp index 0da1dc20..f66c4b04 100644 --- a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp +++ b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp @@ -31,26 +31,27 @@ int main() { // ---------------------------------------------------------------------------- // Convert correlation matrix to a distance matrix: // ---------------------------------------------------------------------------- + double threshold = 0; for (size_t i = 0; i != correlations.size(); ++i) { for (size_t j = 0; j != correlations[i].size(); ++j) { - correlations[i][j] = 1 - correlations[i][j]; - if (correlations[i][j] < 0) { - std::cerr << "The input matrix is not a correlation matrix. \n"; - throw "The input matrix is not a correlation matrix. \n"; - } + //Here we check if our data comes from corelation matrix. + if ( (correlations[i][j]<-1) || (correlations[i][j]>1) ) + { + std::cerr << "The input matrix is not a correlation matrix. The program will now terminate.\n"; + throw "The input matrix is not a correlation matrix. The program will now terminate.\n"; + } + correlations[i][j] = 1 - correlations[i][j]; } + //Here we make sure that we will get the treshold value equal to maximal + //distance in the matrix. + if ( correlations[i][j] > threshold )threshold = correlations[i][j]; } //----------------------------------------------------------------------------- // Now the correlation matrix is a distance matrix and can be processed further. //----------------------------------------------------------------------------- Distance_matrix distances = correlations; - - //------------------------------------------------------------------------------ - // Note that this treshold mean that the points in the distance 1, i.e. corelation - // 0 will be connected. - //------------------------------------------------------------------------------ - double threshold = 1.0; + Rips_complex rips_complex_from_points(distances, threshold); diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index 53c83533..5767c06e 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef FILE_WRITER_ -#define FILE_WRITER_ +#ifndef WRITING_PERSISTENCE_TO_FILE_H +#define WRITING_PERSISTENCE_TO_FILE_H #include #include @@ -141,8 +141,8 @@ private: **/ template void write_persistence_intervals_to_stream( -//const std::vector< Persistence_interval_common >& intervals, - +const std::vector< Persistence_interval_common >& intervals, +//TODO: change to ranges when it is clear how to do that. std::ostream& out = std::cout ) { for ( auto interval : intervals ) @@ -155,4 +155,4 @@ void write_persistence_intervals_to_stream( } -#endif //FILE_WRITER_ +#endif //WRITING_PERSISTENCE_TO_FILE_H -- cgit v1.2.3 From 82c0652b06949b0b002781688565d7ecf30f04fe Mon Sep 17 00:00:00 2001 From: pdlotko Date: Thu, 8 Feb 2018 10:37:21 +0000 Subject: Fixed comments from Marc and Vincent. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@3234 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8b5e08c38cd05512ba8b2824f13a62d35f39bac3 --- ...e_one_skeleton_rips_from_correlation_matrix.cpp | 10 +- .../rips_correlation_matrix_persistence.cpp | 40 ++++---- .../include/gudhi/writing_persistence_to_file.h | 102 ++++++++++++--------- 3 files changed, 86 insertions(+), 66 deletions(-) (limited to 'src/common') diff --git a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp index f66c4b04..a34ce15c 100644 --- a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp +++ b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp @@ -40,11 +40,11 @@ int main() { std::cerr << "The input matrix is not a correlation matrix. The program will now terminate.\n"; throw "The input matrix is not a correlation matrix. The program will now terminate.\n"; } - correlations[i][j] = 1 - correlations[i][j]; - } - //Here we make sure that we will get the treshold value equal to maximal - //distance in the matrix. - if ( correlations[i][j] > threshold )threshold = correlations[i][j]; + correlations[i][j] = 1 - correlations[i][j]; + //Here we make sure that we will get the treshold value equal to maximal + //distance in the matrix. + if ( correlations[i][j] > threshold )threshold = correlations[i][j]; + } } //----------------------------------------------------------------------------- diff --git a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp index 3fe0edb0..95bce491 100644 --- a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include @@ -57,28 +57,23 @@ int main(int argc, char* argv[]) { Correlation_matrix correlations = Gudhi::read_lower_triangular_matrix_from_csv_file(csv_matrix_file); + Filtration_value threshold = 0; + // Given a correlation matrix M, we compute component-wise M'[i,j] = 1-M[i,j] to get a distance matrix: for (size_t i = 0; i != correlations.size(); ++i) { for (size_t j = 0; j != correlations[i].size(); ++j) { correlations[i][j] = 1 - correlations[i][j]; - if (correlations[i][j] < 0) { - std::cerr << "The input matrix is not a correlation matrix. \n"; - throw "The input matrix is not a correlation matrix. \n"; + //Here we make sure that the values of corelations lie between -1 and 1. + //If not, we throw an exception. + if ((correlations[i][j] < -1) || (correlations[i][j] > 1)) + { + std::cerr << "The input matrix is not a correlation matrix. The program will now terminate. \n"; + throw "The input matrix is not a correlation matrix. The program will now terminate. \n"; } + if ( correlations[i][j] > threshold ) threshold = correlations[i][j]; } } - Filtration_value threshold; - // If the correlation_min, being minimal corelation is in the range [0,1], - // change it to 1-correlation_min - if ((correlation_min >= 0) && (correlation_min <= 1)) { - threshold = 1 - correlation_min; - } else { - std::cout - << "Wrong value of the treshold corelation (should be between 0 and 1). The program will now terminate.\n"; - return 1; - } - Rips_complex rips_complex_from_file(correlations, threshold); // Construct the Rips complex in a Simplex Tree @@ -95,10 +90,16 @@ int main(int argc, char* argv[]) { Persistent_cohomology pcoh(simplex_tree); // initializes the coefficient field for homology pcoh.init_coefficients(p); - // compute persistence + //compute persistence pcoh.compute_persistent_cohomology(min_persistence); - - // invert the persistence diagram + + + //invert the persistence diagram. The reason for this procedure is the following: + //The input to the program is a corelation matrix M. When processing it, it is + //turned into 1-M and the obtained persistence intervals are in '1-M' units. + //Below we reverse every (birth,death) pair into (1-birth, 1-death) pair + //so that the input and the output to the program is expressed in the same + //units. auto pairs = pcoh.get_persistent_pairs(); std::vector processed_persistence_intervals; processed_persistence_intervals.reserve(pairs.size()); @@ -118,8 +119,7 @@ int main(int argc, char* argv[]) { write_persistence_intervals_to_stream(processed_persistence_intervals); } else { std::ofstream out(filediag); - write_persistence_intervals_to_stream(processed_persistence_intervals, out); - out.close(); + write_persistence_intervals_to_stream(processed_persistence_intervals, out); } return 0; } diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index 5767c06e..5457cf48 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -39,21 +39,35 @@ template class Persistence_interval_common { public: + /** + * Constructor taking as an input birth and death of the pair. + **/ Persistence_interval_common( Filtration_type birth , Filtration_type death ): birth_(birth),death_(death),dimension_(std::numeric_limits::max), arith_element_(std::numeric_limits::max() ){} + /** + * Constructor taking as an input birth, death and dimension of the pair. + **/ Persistence_interval_common( Filtration_type birth , Filtration_type death, unsigned dim ): birth_(birth),death_(death),dimension_(dim), arith_element_(std::numeric_limits::max()){} + /** + * Constructor taking as an input birth, death, dimension of the pair as well + * as the number p such that this interval is present over Z_p field. + **/ Persistence_interval_common( Filtration_type birth , Filtration_type death, unsigned dim , Coefficient_field field ): birth_(birth),death_(death),dimension_(dim), arith_element_(field){} - + /** + * Operator to compare two persistence pairs. During the comparision all the + * fields: birth, death, dimensiona and arith_element_ are taken into account + * and they all have to be equal for two pairs to be equal. + **/ inline bool operator == ( const Persistence_interval_common &i2) { return ( @@ -62,6 +76,9 @@ public: ); } + /** + * Check if two persistence paris are not equal. + **/ inline bool operator != ( const Persistence_interval_common &i2) { return (!((*this)==i2)); @@ -69,49 +86,52 @@ public: /** + * Operator to compare objects of a type Persistence_interval_common. + * One intervals is smaller than the other if it has lower persistence. * Note that this operator do not take Arith_element into account when doing comparisions. **/ inline bool operator < ( const Persistence_interval_common &i2) - { - if ( this->birth_ < i2.birth_ ) - { - return true; - } - else - { - if ( this->birth_ > i2.birth_ ) - { - return false; - } - else - { - //in this case this->birth_ == i2.birth_ - if ( this->death_ > i2.death_ ) - { - return true; - } - else - { - if ( this->death_ < i2.death_ ) - { - return false; - } - else - { - //in this case this->death_ == i2.death_ - if ( this->dimension_ < i2.dimension_ ) - { - return true; - } - else - { - //in this case this->dimension >= i2.dimension - return false; - } - } - } - } - } + { + return fabs( this->death_-this->birth_ ) < fabs( i2.death_-i2.birth_ ); + //if ( this->birth_ < i2.birth_ ) + //{ + // return true; + //} + //else + //{ + // if ( this->birth_ > i2.birth_ ) + // { + // return false; + // } + // else + // { + // //in this case this->birth_ == i2.birth_ + // if ( this->death_ > i2.death_ ) + // { + // return true; + // } + // else + // { + // if ( this->death_ < i2.death_ ) + // { + // return false; + // } + // else + // { + // //in this case this->death_ == i2.death_ + // if ( this->dimension_ < i2.dimension_ ) + // { + // return true; + // } + // else + // { + // //in this case this->dimension >= i2.dimension + // return false; + // } + // } + // } + // } + //} } friend std::ostream& operator<<(std::ostream& out, const Persistence_interval_common& it) -- cgit v1.2.3 From 753ab8e366bb7d44b6cbe5e26d95c13317fc48c9 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 13 Feb 2018 16:55:41 +0000 Subject: Add documentation tests for example_vector_double_points_off_reader Fix Marc's comments about reader git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/offreaderfix_vincent@3243 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7dfb928c064c1286c1903cb91600ebace7a8fd47 --- src/common/example/CMakeLists.txt | 11 +++++++- src/common/example/cgaloffreader_result.txt | 7 ------ .../example/example_CGAL_3D_points_off_reader.cpp | 6 ++--- .../example/example_CGAL_points_off_reader.cpp | 6 ++--- .../example_vector_double_points_off_reader.cpp | 14 ++++++----- .../example/vectordoubleoffreader_result.txt | 7 ++++++ src/common/include/gudhi/Off_reader.h | 29 ++++++++++++---------- src/common/include/gudhi/Points_off_io.h | 4 +-- 8 files changed, 49 insertions(+), 35 deletions(-) delete mode 100644 src/common/example/cgaloffreader_result.txt create mode 100644 src/common/example/vectordoubleoffreader_result.txt (limited to 'src/common') diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt index afe865d4..1273c699 100644 --- a/src/common/example/CMakeLists.txt +++ b/src/common/example/CMakeLists.txt @@ -3,11 +3,20 @@ project(Common_examples) add_executable ( vector_double_off_reader example_vector_double_points_off_reader.cpp ) target_link_libraries(vector_double_off_reader ${CGAL_LIBRARY}) +file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) add_test(NAME Common_example_vector_double_off_reader COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/SO3_10000.off") + "alphacomplexdoc.off") install(TARGETS vector_double_off_reader DESTINATION bin) +if (DIFF_PATH) + # Do not forget to copy test results files in current binary dir + file(COPY "vectordoubleoffreader_result.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + + add_test(Common_example_vector_double_off_reader_diff_files ${DIFF_PATH} + ${CMAKE_CURRENT_BINARY_DIR}/vectordoubleoffreader_result.txt ${CMAKE_CURRENT_BINARY_DIR}/alphacomplexdoc.off.txt) +endif() + if(CGAL_FOUND) add_executable ( cgal_3D_off_reader example_CGAL_3D_points_off_reader.cpp ) target_link_libraries(cgal_3D_off_reader ${CGAL_LIBRARY}) diff --git a/src/common/example/cgaloffreader_result.txt b/src/common/example/cgaloffreader_result.txt deleted file mode 100644 index 1deb8dbd..00000000 --- a/src/common/example/cgaloffreader_result.txt +++ /dev/null @@ -1,7 +0,0 @@ -Point[0] = 1 1 -Point[1] = 7 0 -Point[2] = 4 6 -Point[3] = 9 6 -Point[4] = 0 14 -Point[5] = 2 19 -Point[6] = 9 17 diff --git a/src/common/example/example_CGAL_3D_points_off_reader.cpp b/src/common/example/example_CGAL_3D_points_off_reader.cpp index 665b7a29..4658d8d5 100644 --- a/src/common/example/example_CGAL_3D_points_off_reader.cpp +++ b/src/common/example/example_CGAL_3D_points_off_reader.cpp @@ -20,12 +20,12 @@ int main(int argc, char **argv) { usage(argv[0]); } - std::string offInputFile(argv[1]); + std::string off_input_file(argv[1]); // Read the OFF file (input file name given as parameter) and triangulate points - Gudhi::Points_3D_off_reader off_reader(offInputFile); + Gudhi::Points_3D_off_reader off_reader(off_input_file); // Check the read operation was correct if (!off_reader.is_valid()) { - std::cerr << "Unable to read file " << offInputFile << std::endl; + std::cerr << "Unable to read file " << off_input_file << std::endl; usage(argv[0]); } diff --git a/src/common/example/example_CGAL_points_off_reader.cpp b/src/common/example/example_CGAL_points_off_reader.cpp index 8c6a6b54..f45683a5 100644 --- a/src/common/example/example_CGAL_points_off_reader.cpp +++ b/src/common/example/example_CGAL_points_off_reader.cpp @@ -22,12 +22,12 @@ int main(int argc, char **argv) { usage(argv[0]); } - std::string offInputFile(argv[1]); + std::string off_input_file(argv[1]); // Read the OFF file (input file name given as parameter) and triangulate points - Gudhi::Points_off_reader off_reader(offInputFile); + Gudhi::Points_off_reader off_reader(off_input_file); // Check the read operation was correct if (!off_reader.is_valid()) { - std::cerr << "Unable to read file " << offInputFile << std::endl; + std::cerr << "Unable to read file " << off_input_file << std::endl; usage(argv[0]); } diff --git a/src/common/example/example_vector_double_points_off_reader.cpp b/src/common/example/example_vector_double_points_off_reader.cpp index 8aecb26e..5093da85 100644 --- a/src/common/example/example_vector_double_points_off_reader.cpp +++ b/src/common/example/example_vector_double_points_off_reader.cpp @@ -17,25 +17,27 @@ int main(int argc, char **argv) { usage(argv[0]); } - std::string offInputFile(argv[1]); + std::string off_input_file(argv[1]); // Read the OFF file (input file name given as parameter) and triangulate points - Gudhi::Points_off_reader off_reader(offInputFile); + Gudhi::Points_off_reader off_reader(off_input_file); // Check the read operation was correct if (!off_reader.is_valid()) { - std::cerr << "Unable to read file " << offInputFile << std::endl; + std::cerr << "Unable to read file " << off_input_file << std::endl; usage(argv[0]); } // Retrieve the triangulation std::vector point_cloud = off_reader.get_point_cloud(); + std::ofstream output_file(off_input_file + ".txt"); int n {0}; for (auto point : point_cloud) { - std::cout << "Point[" << n << "] = "; + output_file << "Point[" << n << "] = "; for (std::size_t i {0}; i < point.size(); i++) - std::cout << point[i] << " "; - std::cout << "\n"; + output_file << point[i] << " "; + output_file << "\n"; ++n; } + output_file.close(); return 0; } diff --git a/src/common/example/vectordoubleoffreader_result.txt b/src/common/example/vectordoubleoffreader_result.txt new file mode 100644 index 00000000..1deb8dbd --- /dev/null +++ b/src/common/example/vectordoubleoffreader_result.txt @@ -0,0 +1,7 @@ +Point[0] = 1 1 +Point[1] = 7 0 +Point[2] = 4 6 +Point[3] = 9 6 +Point[4] = 0 14 +Point[5] = 2 19 +Point[6] = 9 17 diff --git a/src/common/include/gudhi/Off_reader.h b/src/common/include/gudhi/Off_reader.h index 4fcd2af2..32320e4d 100644 --- a/src/common/include/gudhi/Off_reader.h +++ b/src/common/include/gudhi/Off_reader.h @@ -105,25 +105,26 @@ class Off_reader { bool is_off_file = (line.find("OFF") != std::string::npos); bool is_noff_file = (line.find("nOFF") != std::string::npos); + + if (!is_off_file && !is_noff_file) { std::cerr << line << std::endl; std::cerr << "missing off header\n"; return false; } + if (is_noff_file) { + // Should be on a separate line, but we accept it on the same line as the number of vertices + stream_ >> off_info_.dim; + } else { + off_info_.dim = 3; + } + if (!goto_next_uncomment_line(line)) return false; std::istringstream iss(line); - if ((is_off_file) && (!is_noff_file)) { - off_info_.dim = 3; - if (!(iss >> off_info_.num_vertices >> off_info_.num_faces >> off_info_.num_edges)) { - std::cerr << "incorrect number of vertices/faces/edges\n"; - return false; - } - } else { - if (!(iss >> off_info_.dim >> off_info_.num_vertices >> off_info_.num_faces >> off_info_.num_edges)) { + if (!(iss >> off_info_.num_vertices >> off_info_.num_faces >> off_info_.num_edges)) { std::cerr << "incorrect number of vertices/faces/edges\n"; return false; - } } off_visitor.init(off_info_.dim, off_info_.num_vertices, off_info_.num_faces, off_info_.num_edges); @@ -131,10 +132,12 @@ class Off_reader { } bool goto_next_uncomment_line(std::string& uncomment_line) { - uncomment_line.clear(); - do - std::getline(stream_, uncomment_line); while (uncomment_line[0] == '%'); - return (uncomment_line.size() > 0 && uncomment_line[0] != '%'); + do { + // skip whitespace, including empty lines + if (!std::ifstream::sentry(stream_)) return false; + std::getline(stream_, uncomment_line); + } while (uncomment_line[0] == '#'); + return (bool)stream_; } template diff --git a/src/common/include/gudhi/Points_off_io.h b/src/common/include/gudhi/Points_off_io.h index 29af8a8a..08f324c6 100644 --- a/src/common/include/gudhi/Points_off_io.h +++ b/src/common/include/gudhi/Points_off_io.h @@ -126,9 +126,9 @@ class Points_off_visitor_reader { * \code $> ./vector_double_off_reader ../../data/points/alphacomplexdoc.off * \endcode * - * the program output is: + * the program outputs a file ../../data/points/alphacomplexdoc.off.txt: * - * \include common/cgaloffreader_result.txt + * \include common/vectordoubleoffreader_result.txt */ template class Points_off_reader { -- cgit v1.2.3 From 3cd1e01f0b0d4fdb46f49ec640c389374ca2fe70 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 22 Feb 2018 23:16:55 +0000 Subject: Fix Cech with radius distance Add a meta generation script for off_file_generator git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3256 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fb13baa124ddc97c0dc61835ab0c72595d666155 --- scripts/metagen.sh | 15 ++ src/Cech_complex/benchmark/CMakeLists.txt | 12 ++ .../benchmark/cech_complex_benchmark.cpp | 153 +++++++++++++++++++++ src/Cech_complex/doc/cech_one_skeleton.png | Bin 47651 -> 12070 bytes .../example/cech_complex_example_from_points.cpp | 43 ++---- .../example/cech_complex_step_by_step.cpp | 32 ++--- src/Cech_complex/include/gudhi/Cech_complex.h | 33 ++--- .../include/gudhi/Cech_complex_blocker.h | 19 +-- src/Cech_complex/test/test_cech_complex.cpp | 38 ++--- src/Cech_complex/utilities/CMakeLists.txt | 2 +- src/Cech_complex/utilities/cech_persistence.cpp | 14 +- src/common/include/gudhi/distance_functions.h | 33 +++++ 12 files changed, 284 insertions(+), 110 deletions(-) create mode 100755 scripts/metagen.sh create mode 100644 src/Cech_complex/benchmark/CMakeLists.txt create mode 100644 src/Cech_complex/benchmark/cech_complex_benchmark.cpp (limited to 'src/common') diff --git a/scripts/metagen.sh b/scripts/metagen.sh new file mode 100755 index 00000000..4483d24e --- /dev/null +++ b/scripts/metagen.sh @@ -0,0 +1,15 @@ +#!/bin/bash +sep="_" +for geom in "sphere" "klein" "torus" +do + for number in 10 100 1000 + do + for dim in {3..5} + do + echo "./off_file_from_shape_generator on $geom $geom$sep$number$sep$dim.off $number $dim" + ./off_file_from_shape_generator on $geom $geom$sep$number$sep$dim.off $number $dim + done + done +done + +#./off_file_from_shape_generator in|on sphere|cube off_file_name points_number[integer > 0] dimension[integer > 1] radius[double > 0.0 | default = 1.0] diff --git a/src/Cech_complex/benchmark/CMakeLists.txt b/src/Cech_complex/benchmark/CMakeLists.txt new file mode 100644 index 00000000..2a65865b --- /dev/null +++ b/src/Cech_complex/benchmark/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 2.6) +project(Cech_complex_benchmark) + +# Do not forget to copy test files in current binary dir +#file(COPY "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + +add_executable(cech_complex_benchmark cech_complex_benchmark.cpp) +target_link_libraries(cech_complex_benchmark ${Boost_FILESYSTEM_LIBRARY}) + +if (TBB_FOUND) + target_link_libraries(cech_complex_benchmark ${TBB_LIBRARIES}) +endif() diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp new file mode 100644 index 00000000..71c88982 --- /dev/null +++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp @@ -0,0 +1,153 @@ +/* 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) 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 . + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "boost/filesystem.hpp" // includes all needed Boost.Filesystem declarations + +#include +#include + + +// Types definition +using Simplex_tree = Gudhi::Simplex_tree<>; +using Filtration_value = Simplex_tree::Filtration_value; +using Point = std::vector; +using Point_cloud = std::vector; +using Points_off_reader = Gudhi::Points_off_reader; +using Proximity_graph = Gudhi::Proximity_graph; +using Rips_complex = Gudhi::rips_complex::Rips_complex; +using Cech_complex = Gudhi::cech_complex::Cech_complex; + + +class Radius_distance { + public: + // boost::range_value is not SFINAE-friendly so we cannot use it in the return type + template< typename Point > + typename std::iterator_traits::type>::value_type + operator()(const Point& p1, const Point& p2) const { + // Type def + using Point_cloud = std::vector; + using Point_iterator = typename Point_cloud::const_iterator; + using Coordinate_iterator = typename Point::const_iterator; + using Min_sphere = typename Miniball::Miniball>; + + Point_cloud point_cloud; + point_cloud.push_back(p1); + point_cloud.push_back(p2); + + GUDHI_CHECK((p1.end()-p1.begin()) != (p2.end()-p2.begin()), "inconsistent point dimensions"); + Min_sphere min_sphere(p1.end()-p1.begin(), point_cloud.begin(),point_cloud.end()); + + return std::sqrt(min_sphere.squared_radius()); + } +}; + + +int main(int argc, char * argv[]) { + std::string off_file_points = "tore3D_1307.off"; + Filtration_value threshold = 1e20; + + // Extract the points from the file filepoints + Points_off_reader off_reader(off_file_points); + + Gudhi::Clock euclidean_clock("Gudhi::Euclidean_distance"); + // Compute the proximity graph of the points + Proximity_graph euclidean_prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), + threshold, + Gudhi::Euclidean_distance()); + + std::cout << euclidean_clock << std::endl; + + Gudhi::Clock radius_clock("Radius_distance"); + // Compute the proximity graph of the points + Proximity_graph radius_prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), + threshold, + Radius_distance()); + std::cout << radius_clock << std::endl; + + Gudhi::Clock squared_radius_clock("Gudhi::Radius_distance()"); + // Compute the proximity graph of the points + Proximity_graph sq_radius_prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), + threshold, + Gudhi::Radius_distance()); + std::cout << squared_radius_clock << std::endl; + + + boost::filesystem::path full_path(boost::filesystem::current_path()); + std::cout << "Current path is : " << full_path << std::endl; + + + std::cout << "File name;Radius;Rips time;Cech time; Ratio Rips/Cech time;Rips nb simplices;Cech nb simplices;" << std::endl; + boost::filesystem::directory_iterator end_itr; // default construction yields past-the-end + for ( boost::filesystem::directory_iterator itr( boost::filesystem::current_path() ); + itr != end_itr; + ++itr ) + { + if ( ! boost::filesystem::is_directory(itr->status()) ) + { + if ( itr->path().extension() == ".off" ) // see below + { + Points_off_reader off_reader(itr->path().string()); + + for (Filtration_value radius = 0.1; radius < 0.4; radius += 0.1) { + std::cout << itr->path().stem() << ";"; + std::cout << radius << ";"; + Gudhi::Clock rips_clock("Rips computation"); + Rips_complex rips_complex_from_points(off_reader.get_point_cloud(), radius, Gudhi::Radius_distance()); + Simplex_tree rips_stree; + rips_complex_from_points.create_complex(rips_stree, 2); + // ------------------------------------------ + // Display information about the Rips complex + // ------------------------------------------ + double rips_sec = rips_clock.num_seconds(); + std::cout << rips_sec << ";"; + + Gudhi::Clock cech_clock("Cech computation"); + Cech_complex cech_complex_from_points(off_reader.get_point_cloud(), radius); + Simplex_tree cech_stree; + cech_complex_from_points.create_complex(cech_stree, 2); + // ------------------------------------------ + // Display information about the Cech complex + // ------------------------------------------ + double cech_sec = cech_clock.num_seconds(); + std::cout << cech_sec << ";"; + std::cout << cech_sec / rips_sec << ";"; + + std::cout << rips_stree.num_simplices() << ";"; + std::cout << cech_stree.num_simplices() << ";" << std::endl; + } + } + } + } + + + return 0; +} diff --git a/src/Cech_complex/doc/cech_one_skeleton.png b/src/Cech_complex/doc/cech_one_skeleton.png index 1028770e..ffa9c329 100644 Binary files a/src/Cech_complex/doc/cech_one_skeleton.png and b/src/Cech_complex/doc/cech_one_skeleton.png differ diff --git a/src/Cech_complex/example/cech_complex_example_from_points.cpp b/src/Cech_complex/example/cech_complex_example_from_points.cpp index 882849c3..97327e69 100644 --- a/src/Cech_complex/example/cech_complex_example_from_points.cpp +++ b/src/Cech_complex/example/cech_complex_example_from_points.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): 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 . - */ - #include #include #include @@ -37,23 +15,22 @@ int main() { using Cech_complex = Gudhi::cech_complex::Cech_complex; Point_cloud points; - points.push_back({1.0, 1.0}); - points.push_back({7.0, 0.0}); - points.push_back({4.0, 6.0}); - points.push_back({9.0, 6.0}); - points.push_back({0.0, 14.0}); - points.push_back({2.0, 19.0}); - points.push_back({9.0, 17.0}); + points.push_back({0., 0.}); + points.push_back({0., 2.}); + points.push_back({std::sqrt(3.), 1.}); + points.push_back({1., 0.}); + points.push_back({1., 2.}); + points.push_back({1. - std::sqrt(3.), 1.}); // ---------------------------------------------------------------------------- // Init of a Cech complex from points // ---------------------------------------------------------------------------- - // 7.1 is a magic number to force one blocker, and one non-blocker - Filtration_value threshold = 7.1; - Cech_complex cech_complex_from_points(points, threshold, Gudhi::Euclidean_distance()); + // 5. is a magic number to force one blocker, and one non-blocker + Filtration_value max_radius = 12.; + Cech_complex cech_complex_from_points(points, max_radius); Simplex_tree stree; - cech_complex_from_points.create_complex(stree, 2); + cech_complex_from_points.create_complex(stree, -1); // ---------------------------------------------------------------------------- // Display information about the one skeleton Cech complex // ---------------------------------------------------------------------------- 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 e71086b6..8705a3e5 100644 --- a/src/Cech_complex/example/cech_complex_step_by_step.cpp +++ b/src/Cech_complex/example/cech_complex_step_by_step.cpp @@ -65,23 +65,22 @@ class Cech_blocker { std::cout << "#(" << vertex << ")#"; #endif // DEBUG_TRACES } - Min_sphere ms(dimension_, points.begin(),points.end()); - Filtration_value radius = std::sqrt(ms.squared_radius()); + Filtration_value radius = Gudhi::Radius_distance()(points); #ifdef DEBUG_TRACES - std::cout << "radius = " << radius << " - " << (radius > threshold_) << std::endl; + std::cout << "radius = " << radius << " - " << (radius > max_radius_) << std::endl; #endif // DEBUG_TRACES simplex_tree_.assign_filtration(sh, radius); - return (radius > threshold_); + return (radius > max_radius_); } - Cech_blocker(Simplex_tree& simplex_tree, Filtration_value threshold, const std::vector& point_cloud) + Cech_blocker(Simplex_tree& simplex_tree, Filtration_value max_radius, const std::vector& point_cloud) : simplex_tree_(simplex_tree), - threshold_(threshold), + max_radius_(max_radius), point_cloud_(point_cloud) { dimension_ = point_cloud_[0].size(); } private: Simplex_tree simplex_tree_; - Filtration_value threshold_; + Filtration_value max_radius_; std::vector point_cloud_; int dimension_; }; @@ -89,31 +88,31 @@ class Cech_blocker { void program_options(int argc, char * argv[] , std::string & off_file_points - , Filtration_value & threshold + , Filtration_value & max_radius , int & dim_max); int main(int argc, char * argv[]) { std::string off_file_points; - Filtration_value threshold; + Filtration_value max_radius; int dim_max; - program_options(argc, argv, off_file_points, threshold, dim_max); + program_options(argc, argv, off_file_points, max_radius, dim_max); // Extract the points from the file filepoints Points_off_reader off_reader(off_file_points); // Compute the proximity graph of the points Proximity_graph prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), - threshold, - Gudhi::Euclidean_distance()); + max_radius, + Gudhi::Radius_distance()); // Construct the Rips complex in a Simplex Tree Simplex_tree st; // insert the proximity graph in the simplex tree st.insert_graph(prox_graph); // expand the graph until dimension dim_max - st.expansion_with_blockers(dim_max, Cech_blocker(st, threshold, off_reader.get_point_cloud())); + st.expansion_with_blockers(dim_max, Cech_blocker(st, max_radius, off_reader.get_point_cloud())); std::cout << "The complex contains " << st.num_simplices() << " simplices \n"; std::cout << " and has dimension " << st.dimension() << " \n"; @@ -123,7 +122,6 @@ int main(int argc, char * argv[]) { #if DEBUG_TRACES std::cout << "********************************************************************\n"; - // Display the Simplex_tree - Can not be done in the middle of 2 inserts std::cout << "* The complex contains " << st.num_simplices() << " simplices - dimension=" << st.dimension() << "\n"; std::cout << "* Iterator on Simplices in the filtration, with [filtration value]:\n"; for (auto f_simplex : st.filtration_simplex_range()) { @@ -140,7 +138,7 @@ int main(int argc, char * argv[]) { void program_options(int argc, char * argv[] , std::string & off_file_points - , Filtration_value & threshold + , Filtration_value & max_radius , int & dim_max) { namespace po = boost::program_options; po::options_description hidden("Hidden options"); @@ -151,8 +149,8 @@ void program_options(int argc, char * argv[] po::options_description visible("Allowed options", 100); visible.add_options() ("help,h", "produce help message") - ("max-edge-length,r", - po::value(&threshold)->default_value(std::numeric_limits::infinity()), + ("max-radius,r", + po::value(&max_radius)->default_value(std::numeric_limits::infinity()), "Maximal length of an edge for the Rips complex construction.") ("cpx-dimension,d", po::value(&dim_max)->default_value(1), "Maximal dimension of the Rips complex we want to compute."); diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h index e847c97f..a50ed9fa 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex.h +++ b/src/Cech_complex/include/gudhi/Cech_complex.h @@ -23,12 +23,12 @@ #ifndef CECH_COMPLEX_H_ #define CECH_COMPLEX_H_ +#include // for Gudhi::Squared_radius #include // for Gudhi::Proximity_graph #include // for GUDHI_CHECK #include // for Gudhi::cech_complex::Cech_blocker #include -#include // for std::size_t #include // for exception management namespace Gudhi { @@ -43,7 +43,7 @@ namespace cech_complex { * * \details * The data structure is a proximity graph, containing edges when the edge length is less or equal - * to a given threshold. Edge length is computed from a user given point cloud with a given distance function. + * to a given max_radius. Edge length is computed from `Gudhi::Squared_radius` distance function. * * \tparam SimplicialComplexForProximityGraph furnishes `Vertex_handle` and `Filtration_value` type definition required * by `Gudhi::Proximity_graph`. @@ -62,23 +62,18 @@ class Cech_complex { /** \brief Cech_complex constructor from a list of points. * * @param[in] points Range of points. - * @param[in] threshold Rips value. - * @param[in] distance distance function that returns a `Filtration_value` from 2 given points. + * @param[in] max_radius Maximal radius value. * * \tparam ForwardPointRange must be a range for which `.size()`, `.begin()` and `.end()` methods return input * iterators on a point. `.begin()` and `.end()` methods are required for a point. * - * \tparam Distance furnishes `operator()(const Point& p1, const Point& p2)`, where - * `Point` is a point from the `ForwardPointRange`, and that returns a `Filtration_value`. */ - template - Cech_complex(const ForwardPointRange& points, Filtration_value threshold, Distance distance) - : threshold_(threshold), + Cech_complex(const ForwardPointRange& points, Filtration_value max_radius) + : max_radius_(max_radius), point_cloud_(points) { - dimension_ = points.begin()->end() - points.begin()->begin(); cech_skeleton_graph_ = Gudhi::compute_proximity_graph(point_cloud_, - threshold_, - distance); + max_radius_, + Gudhi::Radius_distance()); } /** \brief Initializes the simplicial complex from the proximity graph and expands it until a given maximal @@ -101,14 +96,9 @@ class Cech_complex { Cech_blocker(complex, this)); } - /** @return Threshold value given at construction. */ - Filtration_value threshold() const { - return threshold_; - } - - /** @return Dimension value given at construction by the first point dimension. */ - std::size_t dimension() const { - return dimension_; + /** @return max_radius value given at construction. */ + Filtration_value max_radius() const { + return max_radius_; } /** @param[in] vertex Point position in the range. @@ -123,9 +113,8 @@ class Cech_complex { private: Proximity_graph cech_skeleton_graph_; - Filtration_value threshold_; + Filtration_value max_radius_; ForwardPointRange point_cloud_; - std::size_t dimension_; }; } // namespace cech_complex diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h index fb52f712..d718b56e 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h +++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h @@ -23,9 +23,8 @@ #ifndef CECH_COMPLEX_BLOCKER_H_ #define CECH_COMPLEX_BLOCKER_H_ -#include // Cech_blocker is using a pointer on Gudhi::cech_complex::Cech_complex - -#include +#include // Cech_blocker is using a pointer on Gudhi::cech_complex::Cech_complex +#include // for Gudhi::Squared_radius #include #include @@ -58,9 +57,6 @@ class Cech_blocker { private: using Point = std::vector; using Point_cloud = std::vector; - using Point_iterator = Point_cloud::const_iterator; - using Coordinate_iterator = Point::const_iterator; - using Min_sphere = Miniball::Miniball>; using Simplex_handle = typename SimplicialComplexForCech::Simplex_handle; using Filtration_value = typename SimplicialComplexForCech::Filtration_value; using Cech_complex = Gudhi::cech_complex::Cech_complex; @@ -69,7 +65,7 @@ class Cech_blocker { /** \internal \brief Cech complex blocker operator() - the oracle - assigns the filtration value from the simplex * radius and returns if the simplex expansion must be blocked. * \param[in] sh The Simplex_handle. - * \return true if the simplex radius is greater than the Cech_complex threshold*/ + * \return true if the simplex radius is greater than the Cech_complex max_radius*/ bool operator()(Simplex_handle sh) { Point_cloud points; for (auto vertex : simplicial_complex_.simplex_vertex_range(sh)) { @@ -79,13 +75,12 @@ class Cech_blocker { std::cout << "#(" << vertex << ")#"; #endif // DEBUG_TRACES } - Min_sphere ms(cc_ptr_->dimension(), points.begin(),points.end()); - Filtration_value diameter = 2 * std::sqrt(ms.squared_radius()); + Filtration_value squared_radius = Gudhi::Radius_distance()(points); #ifdef DEBUG_TRACES - std::cout << "diameter = " << diameter << " - " << (diameter > cc_ptr_->threshold()) << std::endl; + std::cout << "squared_radius = " << squared_radius << " - " << (squared_radius > cc_ptr_->max_radius()) << std::endl; #endif // DEBUG_TRACES - simplicial_complex_.assign_filtration(sh, diameter); - return (diameter > cc_ptr_->threshold()); + simplicial_complex_.assign_filtration(sh, squared_radius); + return (squared_radius > cc_ptr_->max_radius()); } /** \internal \brief Cech complex blocker constructor. */ diff --git a/src/Cech_complex/test/test_cech_complex.cpp b/src/Cech_complex/test/test_cech_complex.cpp index aa42d322..626f1d82 100644 --- a/src/Cech_complex/test/test_cech_complex.cpp +++ b/src/Cech_complex/test/test_cech_complex.cpp @@ -58,14 +58,15 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { // // ---------------------------------------------------------------------------- std::string off_file_name("alphacomplexdoc.off"); - double threshold = 12.0; - std::cout << "========== OFF FILE NAME = " << off_file_name << " - Cech threshold=" << - threshold << "==========" << std::endl; + double max_radius = 12.0; + std::cout << "========== OFF FILE NAME = " << off_file_name << " - Cech max_radius=" << + max_radius << "==========" << std::endl; Points_off_reader off_reader(off_file_name); Point_cloud point_cloud = off_reader.get_point_cloud(); - Cech_complex cech_complex_from_file(point_cloud, threshold, Gudhi::Euclidean_distance()); + Cech_complex cech_complex_from_file(point_cloud, max_radius); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(cech_complex_from_file.max_radius(), max_radius); std::size_t i = 0; for (; i < point_cloud.size(); i++) { BOOST_CHECK(point_cloud[i] == *(cech_complex_from_file.point_iterator(i))); @@ -101,10 +102,10 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { std::cout << vertex << ","; vp.push_back(off_reader.get_point_cloud().at(vertex)); } - std::cout << ") - distance =" << Gudhi::Euclidean_distance()(vp.at(0), vp.at(1)) << + std::cout << ") - distance =" << Gudhi::Radius_distance()(vp.at(0), vp.at(1)) << " - filtration =" << st.filtration(f_simplex) << std::endl; BOOST_CHECK(vp.size() == 2); - GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), Gudhi::Euclidean_distance()(vp.at(0), vp.at(1))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), Gudhi::Radius_distance()(vp.at(0), vp.at(1))); } } @@ -125,7 +126,8 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { points012.push_back(Point(cech_complex_from_file.point_iterator(vertex)->begin(), cech_complex_from_file.point_iterator(vertex)->end())); } - Min_sphere ms012(cech_complex_from_file.dimension(), points012.begin(),points012.end()); + std::size_t dimension = point_cloud[0].end() - point_cloud[0].begin(); + Min_sphere ms012(dimension, points012.begin(),points012.end()); Simplex_tree::Filtration_value f012 = st2.filtration(st2.find({0, 1, 2})); std::cout << "f012= " << f012 << " | ms012_radius= " << std::sqrt(ms012.squared_radius()) << std::endl; @@ -137,7 +139,7 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { points456.push_back(Point(cech_complex_from_file.point_iterator(vertex)->begin(), cech_complex_from_file.point_iterator(vertex)->end())); } - Min_sphere ms456(cech_complex_from_file.dimension(), points456.begin(),points456.end()); + Min_sphere ms456(dimension, points456.begin(),points456.end()); Simplex_tree::Filtration_value f456 = st2.filtration(st2.find({4, 5, 6})); std::cout << "f456= " << f456 << " | ms456_radius= " << std::sqrt(ms456.squared_radius()) << std::endl; @@ -161,7 +163,7 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { points0123.push_back(Point(cech_complex_from_file.point_iterator(vertex)->begin(), cech_complex_from_file.point_iterator(vertex)->end())); } - Min_sphere ms0123(cech_complex_from_file.dimension(), points0123.begin(),points0123.end()); + Min_sphere ms0123(dimension, points0123.begin(),points0123.end()); Simplex_tree::Filtration_value f0123 = st3.filtration(st3.find({0, 1, 2, 3})); std::cout << "f0123= " << f0123 << " | ms0123_radius= " << std::sqrt(ms0123.squared_radius()) << std::endl; @@ -175,7 +177,7 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { points01.push_back(Point(cech_complex_from_file.point_iterator(vertex)->begin(), cech_complex_from_file.point_iterator(vertex)->end())); } - Min_sphere ms01(cech_complex_from_file.dimension(), points01.begin(),points01.end()); + Min_sphere ms01(dimension, points01.begin(),points01.end()); Simplex_tree::Filtration_value f01 = st2.filtration(st2.find({0, 1})); std::cout << "f01= " << f01 << " | ms01_radius= " << std::sqrt(ms01.squared_radius()) << std::endl; @@ -199,7 +201,7 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_points) { // ---------------------------------------------------------------------------- // Init of a Cech complex from the list of points // ---------------------------------------------------------------------------- - Cech_complex cech_complex_from_points(points, 2.0, Gudhi::Euclidean_distance()); + Cech_complex cech_complex_from_points(points, 2.0); std::cout << "========== cech_complex_from_points ==========" << std::endl; Simplex_tree st; @@ -234,13 +236,13 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_points) { GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.0); break; case 1: - GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 1.41421, .00001); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.5); break; case 2: - GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.816497, .00001); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.666667, .00001); break; case 3: - GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.866025, .00001); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.75); break; default: BOOST_CHECK(false); // Shall not happen @@ -257,12 +259,12 @@ BOOST_AUTO_TEST_CASE(Cech_create_complex_throw) { // // ---------------------------------------------------------------------------- std::string off_file_name("alphacomplexdoc.off"); - double threshold = 12.0; - std::cout << "========== OFF FILE NAME = " << off_file_name << " - Cech threshold=" << - threshold << "==========" << std::endl; + double max_radius = 12.0; + std::cout << "========== OFF FILE NAME = " << off_file_name << " - Cech max_radius=" << + max_radius << "==========" << std::endl; Gudhi::Points_off_reader off_reader(off_file_name); - Cech_complex cech_complex_from_file(off_reader.get_point_cloud(), threshold, Gudhi::Euclidean_distance()); + Cech_complex cech_complex_from_file(off_reader.get_point_cloud(), max_radius); Simplex_tree stree; std::vector simplex = {0, 1, 2}; diff --git a/src/Cech_complex/utilities/CMakeLists.txt b/src/Cech_complex/utilities/CMakeLists.txt index a4f89d2c..30b99729 100644 --- a/src/Cech_complex/utilities/CMakeLists.txt +++ b/src/Cech_complex/utilities/CMakeLists.txt @@ -9,6 +9,6 @@ if (TBB_FOUND) endif() add_test(NAME Cech_complex_utility_from_rips_on_tore_3D COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3") + "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3") install(TARGETS cech_persistence DESTINATION bin) diff --git a/src/Cech_complex/utilities/cech_persistence.cpp b/src/Cech_complex/utilities/cech_persistence.cpp index e93596d4..93a200ff 100644 --- a/src/Cech_complex/utilities/cech_persistence.cpp +++ b/src/Cech_complex/utilities/cech_persistence.cpp @@ -43,20 +43,20 @@ using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; void program_options(int argc, char* argv[], std::string& off_file_points, std::string& filediag, - Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence); + Filtration_value& max_radius, int& dim_max, int& p, Filtration_value& min_persistence); int main(int argc, char* argv[]) { std::string off_file_points; std::string filediag; - Filtration_value threshold; + Filtration_value max_radius; int dim_max; int p; Filtration_value min_persistence; - program_options(argc, argv, off_file_points, filediag, threshold, dim_max, p, min_persistence); + program_options(argc, argv, off_file_points, filediag, max_radius, dim_max, p, min_persistence); Points_off_reader off_reader(off_file_points); - Cech_complex cech_complex_from_file(off_reader.get_point_cloud(), threshold, Gudhi::Euclidean_distance()); + Cech_complex cech_complex_from_file(off_reader.get_point_cloud(), max_radius); // Construct the Cech complex in a Simplex Tree Simplex_tree simplex_tree; @@ -88,7 +88,7 @@ int main(int argc, char* argv[]) { } void program_options(int argc, char* argv[], std::string& off_file_points, std::string& filediag, - Filtration_value& threshold, int& dim_max, int& p, Filtration_value& min_persistence) { + Filtration_value& max_radius, int& dim_max, int& p, Filtration_value& min_persistence) { namespace po = boost::program_options; po::options_description hidden("Hidden options"); hidden.add_options()("input-file", po::value(&off_file_points), @@ -98,8 +98,8 @@ void program_options(int argc, char* argv[], std::string& off_file_points, std:: visible.add_options()("help,h", "produce help message")( "output-file,o", po::value(&filediag)->default_value(std::string()), "Name of file in which the persistence diagram is written. Default print in std::cout")( - "max-edge-length,r", - po::value(&threshold)->default_value(std::numeric_limits::infinity()), + "max-radius,r", + po::value(&max_radius)->default_value(std::numeric_limits::infinity()), "Maximal length of an edge for the Cech complex construction.")( "cpx-dimension,d", po::value(&dim_max)->default_value(1), "Maximal dimension of the Cech complex we want to compute.")( diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 3a5d1fd5..3ce51ad1 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -25,6 +25,8 @@ #include +#include + #include #include // for std::sqrt @@ -68,6 +70,37 @@ class Euclidean_distance { } }; +/** @brief Compute the squared radius between Points given by a range of coordinates. The points are assumed to + * have the same dimension. */ +class Radius_distance { + public: + // boost::range_value is not SFINAE-friendly so we cannot use it in the return type + template< typename Point > + typename std::iterator_traits::type>::value_type + operator()(const Point& p1, const Point& p2) const { + return Euclidean_distance()(p1, p2) / 2.; + } + // boost::range_value is not SFINAE-friendly so we cannot use it in the return type + template< typename Point_cloud, + typename Point_iterator = typename boost::range_const_iterator::type, + typename Point= typename std::iterator_traits::value_type, + typename Coordinate_iterator = typename boost::range_const_iterator::type, + typename Coordinate = typename std::iterator_traits::value_type> + Coordinate + operator()(const Point_cloud& point_cloud) const { + using Min_sphere = Miniball::Miniball>; + + //Min_sphere ms(point_cloud.begin()->end() - point_cloud.begin()->begin(), point_cloud.begin(),point_cloud.end()); + Min_sphere ms(point_cloud.end() - point_cloud.begin(), point_cloud.begin(),point_cloud.end()); +#ifdef DEBUG_TRACES + std::cout << "Radius on " << point_cloud.end() - point_cloud.begin() << " points = " + << std::sqrt(ms.squared_radius()) << std::endl; +#endif // DEBUG_TRACES + + return std::sqrt(ms.squared_radius()); + } +}; + } // namespace Gudhi #endif // DISTANCE_FUNCTIONS_H_ -- cgit v1.2.3 From b3a64294af818c977804c4b67a317782d872e2b5 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 5 Mar 2018 13:38:57 +0000 Subject: Fix doc and tests git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3262 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c76eb981f5960938221aa2498cb87b0707391733 --- .../benchmark/cech_complex_benchmark.cpp | 10 +- src/Cech_complex/doc/Intro_cech_complex.h | 52 ++++--- .../doc/cech_complex_representation.ipe | 160 +++++++++++---------- .../doc/cech_complex_representation.png | Bin 15677 -> 54399 bytes src/Cech_complex/doc/cech_one_skeleton.ipe | 154 +++++++++----------- src/Cech_complex/doc/cech_one_skeleton.png | Bin 12070 -> 29354 bytes .../example/cech_complex_example_from_points.cpp | 22 +-- .../cech_complex_example_from_points_for_doc.txt | 45 ++++-- src/Cech_complex/include/gudhi/Cech_complex.h | 4 +- .../include/gudhi/Cech_complex_blocker.h | 11 +- src/Cech_complex/test/test_cech_complex.cpp | 12 +- src/Doxyfile | 3 +- src/common/include/gudhi/distance_functions.h | 8 +- 13 files changed, 255 insertions(+), 226 deletions(-) (limited to 'src/common') diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp index 71c88982..83ef9dca 100644 --- a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp +++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp @@ -93,12 +93,12 @@ int main(int argc, char * argv[]) { Radius_distance()); std::cout << radius_clock << std::endl; - Gudhi::Clock squared_radius_clock("Gudhi::Radius_distance()"); + Gudhi::Clock common_radius_clock("Gudhi::Radius_distance()"); // Compute the proximity graph of the points Proximity_graph sq_radius_prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), threshold, Gudhi::Radius_distance()); - std::cout << squared_radius_clock << std::endl; + std::cout << common_radius_clock << std::endl; boost::filesystem::path full_path(boost::filesystem::current_path()); @@ -116,6 +116,7 @@ int main(int argc, char * argv[]) { if ( itr->path().extension() == ".off" ) // see below { Points_off_reader off_reader(itr->path().string()); + Point p0 = off_reader.get_point_cloud()[0]; for (Filtration_value radius = 0.1; radius < 0.4; radius += 0.1) { std::cout << itr->path().stem() << ";"; @@ -123,7 +124,7 @@ int main(int argc, char * argv[]) { Gudhi::Clock rips_clock("Rips computation"); Rips_complex rips_complex_from_points(off_reader.get_point_cloud(), radius, Gudhi::Radius_distance()); Simplex_tree rips_stree; - rips_complex_from_points.create_complex(rips_stree, 2); + rips_complex_from_points.create_complex(rips_stree, p0.size() - 1); // ------------------------------------------ // Display information about the Rips complex // ------------------------------------------ @@ -133,7 +134,7 @@ int main(int argc, char * argv[]) { Gudhi::Clock cech_clock("Cech computation"); Cech_complex cech_complex_from_points(off_reader.get_point_cloud(), radius); Simplex_tree cech_stree; - cech_complex_from_points.create_complex(cech_stree, 2); + cech_complex_from_points.create_complex(cech_stree, p0.size() - 1); // ------------------------------------------ // Display information about the Cech complex // ------------------------------------------ @@ -141,6 +142,7 @@ int main(int argc, char * argv[]) { std::cout << cech_sec << ";"; std::cout << cech_sec / rips_sec << ";"; + assert(rips_stree.num_simplices() >= cech_stree.num_simplices()); std::cout << rips_stree.num_simplices() << ";"; std::cout << cech_stree.num_simplices() << ";" << std::endl; } diff --git a/src/Cech_complex/doc/Intro_cech_complex.h b/src/Cech_complex/doc/Intro_cech_complex.h index f2052763..8b6c7851 100644 --- a/src/Cech_complex/doc/Intro_cech_complex.h +++ b/src/Cech_complex/doc/Intro_cech_complex.h @@ -29,7 +29,7 @@ namespace cech_complex { /** \defgroup cech_complex Cech complex * - * \author Clément Maria, Pawel Dlotko, Vincent Rouvreau + * \author Vincent Rouvreau * * @{ * @@ -40,40 +40,54 @@ namespace cech_complex { * proximity graph that allows to construct a * simplicial complex * from it. - * The input can be a point cloud with a given distance function. + * The input shall be a point cloud in an Euclidean space. * - * The filtration value of each edge is computed from a user-given distance function. + * The filtration value of each edge of the `Gudhi::Proximity_graph` is computed from `Gudhi::Radius_distance` function. * - * All edges that have a filtration value strictly greater than a given threshold value are not inserted into - * the complex. + * All edges that have a filtration value strictly greater than a user given maximal radius value, \f$max\_radius\f$, + * are not inserted into the complex. * - * When creating a simplicial complex from this proximity graph, Cech inserts the proximity graph into the data - * structure, and then expands the simplicial complex when required. - * * Vertex name correspond to the index of the point in the given range (aka. the point cloud). * - * \image html "cech_complex_representation.png" "Cech complex proximity graph representation" - * - * On this example, as edges (4,5), (4,6) and (5,6) are in the complex, simplex (4,5,6) is added with the filtration - * value set with \f$max(filtration(4,5), filtration(4,6), filtration(5,6))\f$. - * And so on for simplex (0,1,2,3). + * \image html "cech_one_skeleton.png" "Cech complex proximity graph representation" * + * When creating a simplicial complex from this proximity graph, Cech inserts the proximity graph into the simplicial + * complex data structure, and then expands the simplicial complex when required. + * + * On this example, as edges \f$(x,y)\f$, \f$(y,z)\f$ and \f$(z,y)\f$ are in the complex, the minimal ball radius + * containing the points \f$(x,y,z)\f$ is computed. + * + * \f$(x,y,z)\f$ is inserted to the simplicial complex with the filtration value set with + * \f$mini\_ball\_radius(x,y,z))\f$ iff \f$mini\_ball\_radius(x,y,z)) \leq max\_radius\f$. + * + * And so on for higher dimensions. + * + * \image html "cech_complex_representation.png" "Cech complex expansion" + * + * The minimal ball radius computation is insured by + * + * the miniball software (V3.0) - Smallest Enclosing Balls of Points - and distributed with GUDHI. + * + * Please refer to + * + * the miniball software design description for more information about this computation. + * * If the Cech_complex interfaces are not detailed enough for your need, please refer to - * - * cech_persistence_step_by_step.cpp example, where the graph construction over the Simplex_tree is more detailed. + * + * cech_complex_step_by_step.cpp example, where the graph construction over the Simplex_tree is more detailed. * - * \section cechpointsdistance Point cloud and distance function + * \section cechpointsdistance Point cloud * - * \subsection cechpointscloudexample Example from a point cloud and a distance function + * \subsection cechpointscloudexample Example from a point cloud * - * This example builds the proximity graph from the given points, threshold value, and distance function. + * This example builds the proximity graph from the given points, and maximal radius values. * Then it creates a `Simplex_tree` with it. * * Then, it is asked to display information about the simplicial complex. * * \include Cech_complex/cech_complex_example_from_points.cpp * - * When launching (Cech maximal distance between 2 points is 7.1, is expanded until dimension 2): + * When launching (Cech maximal distance between 2 points is 1., is expanded until dimension 2): * * \code $> ./Cech_complex_example_from_points * \endcode diff --git a/src/Cech_complex/doc/cech_complex_representation.ipe b/src/Cech_complex/doc/cech_complex_representation.ipe index 7f6028f4..c64d7596 100644 --- a/src/Cech_complex/doc/cech_complex_representation.ipe +++ b/src/Cech_complex/doc/cech_complex_representation.ipe @@ -1,7 +1,7 @@ - + @@ -232,95 +232,99 @@ h - -109.771 601.912 m -159.595 601.797 l -140.058 541.915 l + +48 640 m +80 672 l +48 672 l h - -79.8776 552.169 m -109.756 601.699 l -139.812 542.209 l +Cech complex +0 +1 +2 +3 +4 +5 +6 + + + + + + + + + + + + + +32 0 0 32 304 672 e + + +304 672 m +336 672 l + +Maximal radius +7 +8 +9 + +112 576 m +144 608 l + + +144 672 m +144 608 l +200 640 l h - -69.8453 682.419 m -159.925 712.208 l -90.12 732.039 l + +48 576 m +112 576 l +80 544 l h -Rips complex -0 -1 -2 -3 -4 -5 -6 - -60 710 m -40 660 l - - -40 660 m -130 690 l - - -130 690 m -60 710 l - - -40 660 m -80 580 l - - -80 580 m -130 580 l -130 580 l - - -130 580 m -110 520 l - - -110 520 m -50 530 l -50 530 l -50 530 l + + +80 672 m +144 672 l +112 728 l +h - -50 530 m -80 580 l + + + + +48 576 m +48 640 l +32 608 l +h - -130 580 m -130 690 l + + + + + + + +32 0 0 32 80 576 e - - - - - - -150.038 609.9 m -179.929 549.727 l + +22.6274 0 0 22.6274 64 656 e - - - -158.7 593.269 m -81.4925 544.805 l + +37.1429 0 0 37.1429 112 690.857 e - -256.324 639.958 m -370.055 639.958 l + +37.1429 0 0 37.1429 162.857 640 e - -56.8567 0 0 56.8567 313.217 639.756 e + +10 + +32 0 0 32 48 608 e - - -Rips threshold + + diff --git a/src/Cech_complex/doc/cech_complex_representation.png b/src/Cech_complex/doc/cech_complex_representation.png index e901d92e..4d103a56 100644 Binary files a/src/Cech_complex/doc/cech_complex_representation.png and b/src/Cech_complex/doc/cech_complex_representation.png differ diff --git a/src/Cech_complex/doc/cech_one_skeleton.ipe b/src/Cech_complex/doc/cech_one_skeleton.ipe index 3a35970c..345e6d7b 100644 --- a/src/Cech_complex/doc/cech_one_skeleton.ipe +++ b/src/Cech_complex/doc/cech_one_skeleton.ipe @@ -1,7 +1,7 @@ - + @@ -232,95 +232,83 @@ h - -109.771 601.912 m -159.595 601.797 l -140.058 541.915 l +Proximity graph +0 +1 + +304 672 m +336 672 l + +2 +3 +4 +5 +6 + + + + + + + + + + + +32 0 0 32 304 672 e + +Maximal radius +7 +8 +9 + +112 576 m +144 608 l + + +144 672 m +144 608 l +200 640 l h - -79.8776 552.169 m -109.756 601.699 l -139.812 542.209 l + +48 640 m +80 672 l +48 672 l h - -69.8453 682.419 m -159.925 712.208 l -90.12 732.039 l + +48 576 m +112 576 l +80 544 l h -One skeleton graph -0 -1 -2 -3 -4 -5 -6 - -60 710 m -40 660 l - - -40 660 m -130 690 l - - -130 690 m -60 710 l - - -40 660 m -80 580 l - - -80 580 m -130 580 l -130 580 l - - -130 580 m -110 520 l - - -110 520 m -50 530 l -50 530 l -50 530 l - - -50 530 m -80 580 l - - -130 580 m -130 690 l - - - - - - - -150.038 609.9 m -179.929 549.727 l - - - - -158.7 593.269 m -81.4925 544.805 l - - -256.324 639.958 m -370.055 639.958 l + + +80 672 m +144 672 l +112 728 l +h - -56.8567 0 0 56.8567 313.217 639.756 e + + +48 576 m +48 640 l +32 608 l +h - - -Rips threshold + + + + + + + + + + +10 + + diff --git a/src/Cech_complex/doc/cech_one_skeleton.png b/src/Cech_complex/doc/cech_one_skeleton.png index ffa9c329..807e0936 100644 Binary files a/src/Cech_complex/doc/cech_one_skeleton.png and b/src/Cech_complex/doc/cech_one_skeleton.png differ diff --git a/src/Cech_complex/example/cech_complex_example_from_points.cpp b/src/Cech_complex/example/cech_complex_example_from_points.cpp index 97327e69..3b889d56 100644 --- a/src/Cech_complex/example/cech_complex_example_from_points.cpp +++ b/src/Cech_complex/example/cech_complex_example_from_points.cpp @@ -15,22 +15,26 @@ int main() { using Cech_complex = Gudhi::cech_complex::Cech_complex; Point_cloud points; - points.push_back({0., 0.}); - points.push_back({0., 2.}); - points.push_back({std::sqrt(3.), 1.}); - points.push_back({1., 0.}); - points.push_back({1., 2.}); - points.push_back({1. - std::sqrt(3.), 1.}); + points.push_back({1., 0.}); // 0 + points.push_back({0., 1.}); // 1 + points.push_back({2., 1.}); // 2 + points.push_back({3., 2.}); // 3 + points.push_back({0., 3.}); // 4 + points.push_back({3. + std::sqrt(3.), 3.}); // 5 + points.push_back({1., 4.}); // 6 + points.push_back({3., 4.}); // 7 + points.push_back({2., 4. + std::sqrt(3.)}); // 8 + points.push_back({0., 4.}); // 9 + points.push_back({-0.5, 2.}); // 10 // ---------------------------------------------------------------------------- // Init of a Cech complex from points // ---------------------------------------------------------------------------- - // 5. is a magic number to force one blocker, and one non-blocker - Filtration_value max_radius = 12.; + Filtration_value max_radius = 1.; Cech_complex cech_complex_from_points(points, max_radius); Simplex_tree stree; - cech_complex_from_points.create_complex(stree, -1); + cech_complex_from_points.create_complex(stree, 2); // ---------------------------------------------------------------------------- // Display information about the one skeleton Cech complex // ---------------------------------------------------------------------------- diff --git a/src/Cech_complex/example/cech_complex_example_from_points_for_doc.txt b/src/Cech_complex/example/cech_complex_example_from_points_for_doc.txt index 684e120b..be0afc76 100644 --- a/src/Cech_complex/example/cech_complex_example_from_points_for_doc.txt +++ b/src/Cech_complex/example/cech_complex_example_from_points_for_doc.txt @@ -1,16 +1,31 @@ -Cech complex is of dimension 2 - 14 simplices - 7 vertices. Iterator on Cech complex simplices in the filtration order, with [filtration value]: - ( 0 ) -> [0] - ( 1 ) -> [0] - ( 2 ) -> [0] - ( 3 ) -> [0] - ( 4 ) -> [0] - ( 5 ) -> [0] - ( 6 ) -> [0] - ( 3 2 ) -> [5] - ( 5 4 ) -> [5.38516] - ( 2 0 ) -> [5.83095] - ( 1 0 ) -> [6.08276] - ( 3 1 ) -> [6.32456] - ( 2 1 ) -> [6.7082] - ( 3 2 1 ) -> [7.07107] + ( 0 ) -> [0] + ( 1 ) -> [0] + ( 2 ) -> [0] + ( 3 ) -> [0] + ( 4 ) -> [0] + ( 5 ) -> [0] + ( 6 ) -> [0] + ( 7 ) -> [0] + ( 8 ) -> [0] + ( 9 ) -> [0] + ( 10 ) -> [0] + ( 9 4 ) -> [0.5] + ( 9 6 ) -> [0.5] + ( 10 1 ) -> [0.559017] + ( 10 4 ) -> [0.559017] + ( 1 0 ) -> [0.707107] + ( 2 0 ) -> [0.707107] + ( 3 2 ) -> [0.707107] + ( 6 4 ) -> [0.707107] + ( 9 6 4 ) -> [0.707107] + ( 2 1 ) -> [1] + ( 2 1 0 ) -> [1] + ( 4 1 ) -> [1] + ( 5 3 ) -> [1] + ( 7 3 ) -> [1] + ( 7 5 ) -> [1] + ( 7 6 ) -> [1] + ( 8 6 ) -> [1] + ( 8 7 ) -> [1] + ( 10 4 1 ) -> [1] diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h index a50ed9fa..612c73c3 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex.h +++ b/src/Cech_complex/include/gudhi/Cech_complex.h @@ -23,7 +23,7 @@ #ifndef CECH_COMPLEX_H_ #define CECH_COMPLEX_H_ -#include // for Gudhi::Squared_radius +#include // for Gudhi::Radius_distance #include // for Gudhi::Proximity_graph #include // for GUDHI_CHECK #include // for Gudhi::cech_complex::Cech_blocker @@ -43,7 +43,7 @@ namespace cech_complex { * * \details * The data structure is a proximity graph, containing edges when the edge length is less or equal - * to a given max_radius. Edge length is computed from `Gudhi::Squared_radius` distance function. + * to a given max_radius. Edge length is computed from `Gudhi::Radius_distance` distance function. * * \tparam SimplicialComplexForProximityGraph furnishes `Vertex_handle` and `Filtration_value` type definition required * by `Gudhi::Proximity_graph`. diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h index d718b56e..5ba17c51 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h +++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h @@ -24,7 +24,7 @@ #define CECH_COMPLEX_BLOCKER_H_ #include // Cech_blocker is using a pointer on Gudhi::cech_complex::Cech_complex -#include // for Gudhi::Squared_radius +#include // for Gudhi::Radius_distance #include #include @@ -75,12 +75,13 @@ class Cech_blocker { std::cout << "#(" << vertex << ")#"; #endif // DEBUG_TRACES } - Filtration_value squared_radius = Gudhi::Radius_distance()(points); + Filtration_value radius = Gudhi::Radius_distance()(points); #ifdef DEBUG_TRACES - std::cout << "squared_radius = " << squared_radius << " - " << (squared_radius > cc_ptr_->max_radius()) << std::endl; + if (radius > cc_ptr_->max_radius()) + std::cout << "radius > max_radius => expansion is blocked\n"; #endif // DEBUG_TRACES - simplicial_complex_.assign_filtration(sh, squared_radius); - return (squared_radius > cc_ptr_->max_radius()); + simplicial_complex_.assign_filtration(sh, radius); + return (radius > cc_ptr_->max_radius()); } /** \internal \brief Cech complex blocker constructor. */ diff --git a/src/Cech_complex/test/test_cech_complex.cpp b/src/Cech_complex/test/test_cech_complex.cpp index 626f1d82..eae8778c 100644 --- a/src/Cech_complex/test/test_cech_complex.cpp +++ b/src/Cech_complex/test/test_cech_complex.cpp @@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { BOOST_CHECK(st.num_vertices() == NUMBER_OF_VERTICES); std::cout << "st.num_simplices()=" << st.num_simplices() << std::endl; - BOOST_CHECK(st.num_simplices() == 18); + BOOST_CHECK(st.num_simplices() == 28); // Check filtration values of vertices is 0.0 for (auto f_simplex : st.skeleton_simplex_range(0)) { @@ -119,7 +119,7 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { BOOST_CHECK(st2.num_vertices() == NUMBER_OF_VERTICES); std::cout << "st2.num_simplices()=" << st2.num_simplices() << std::endl; - BOOST_CHECK(st2.num_simplices() == 23); + BOOST_CHECK(st2.num_simplices() == 63); Point_cloud points012; for (std::size_t vertex = 0; vertex <= 2; vertex++) { @@ -156,7 +156,7 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { BOOST_CHECK(st3.num_vertices() == NUMBER_OF_VERTICES); std::cout << "st3.num_simplices()=" << st3.num_simplices() << std::endl; - BOOST_CHECK(st3.num_simplices() == 24); + BOOST_CHECK(st3.num_simplices() == 98); Point_cloud points0123; for (std::size_t vertex = 0; vertex <= 3; vertex++) { @@ -236,13 +236,13 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_points) { GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.0); break; case 1: - GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.5); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.707107, .00001); break; case 2: - GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.666667, .00001); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.816497, .00001); break; case 3: - GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.75); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), 0.866025, .00001); break; default: BOOST_CHECK(false); // Shall not happen diff --git a/src/Doxyfile b/src/Doxyfile index f1981e2e..52de65b0 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -843,7 +843,8 @@ EXAMPLE_RECURSIVE = NO IMAGE_PATH = doc/Skeleton_blocker/ \ doc/Alpha_complex/ \ doc/common/ \ - doc/Contraction/ \ + doc/Cech_complex/ \ + doc/Contraction/ \ doc/Simplex_tree/ \ doc/Persistent_cohomology/ \ doc/Witness_complex/ \ diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 3ce51ad1..7749b98e 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -90,11 +90,11 @@ class Radius_distance { operator()(const Point_cloud& point_cloud) const { using Min_sphere = Miniball::Miniball>; - //Min_sphere ms(point_cloud.begin()->end() - point_cloud.begin()->begin(), point_cloud.begin(),point_cloud.end()); - Min_sphere ms(point_cloud.end() - point_cloud.begin(), point_cloud.begin(),point_cloud.end()); + Min_sphere ms(point_cloud.begin()->end() - point_cloud.begin()->begin(), point_cloud.begin(),point_cloud.end()); #ifdef DEBUG_TRACES - std::cout << "Radius on " << point_cloud.end() - point_cloud.begin() << " points = " - << std::sqrt(ms.squared_radius()) << std::endl; + std::cout << "Radius_distance = " << std::sqrt(ms.squared_radius()) << " | nb points = " + << point_cloud.end() - point_cloud.begin() << " | dimension = " + << point_cloud.begin()->end() - point_cloud.begin()->begin() << std::endl; #endif // DEBUG_TRACES return std::sqrt(ms.squared_radius()); -- cgit v1.2.3 From 2a9f6eb628979a9634c647be93e575e3177c15da Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 5 Mar 2018 15:43:13 +0000 Subject: Fix documentation git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3264 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: af6241dfe42d988b542224b9dae7364f3f22b6fd --- src/Cech_complex/doc/Intro_cech_complex.h | 4 +- .../doc/cech_complex_representation.ipe | 4 +- .../doc/cech_complex_representation.png | Bin 54399 -> 39938 bytes src/Cech_complex/doc/cech_one_skeleton.ipe | 4 +- src/Cech_complex/doc/cech_one_skeleton.png | Bin 29354 -> 24662 bytes src/Cech_complex/test/test_cech_complex.cpp | 124 ++++++++++----------- src/common/doc/main_page.h | 18 ++- 7 files changed, 85 insertions(+), 69 deletions(-) (limited to 'src/common') diff --git a/src/Cech_complex/doc/Intro_cech_complex.h b/src/Cech_complex/doc/Intro_cech_complex.h index 8b6c7851..ec0d35e2 100644 --- a/src/Cech_complex/doc/Intro_cech_complex.h +++ b/src/Cech_complex/doc/Intro_cech_complex.h @@ -67,11 +67,13 @@ namespace cech_complex { * The minimal ball radius computation is insured by * * the miniball software (V3.0) - Smallest Enclosing Balls of Points - and distributed with GUDHI. - * * Please refer to * * the miniball software design description for more information about this computation. * + * This radius computation is the reason why the Cech_complex is taking much more time to be computed than the + * \ref rips_complex but it offers more topological guarantees. + * * If the Cech_complex interfaces are not detailed enough for your need, please refer to * * cech_complex_step_by_step.cpp example, where the graph construction over the Simplex_tree is more detailed. diff --git a/src/Cech_complex/doc/cech_complex_representation.ipe b/src/Cech_complex/doc/cech_complex_representation.ipe index c64d7596..377745a3 100644 --- a/src/Cech_complex/doc/cech_complex_representation.ipe +++ b/src/Cech_complex/doc/cech_complex_representation.ipe @@ -1,7 +1,7 @@ - + @@ -267,7 +267,7 @@ h Maximal radius 7 -8 +8 9 112 576 m diff --git a/src/Cech_complex/doc/cech_complex_representation.png b/src/Cech_complex/doc/cech_complex_representation.png index 4d103a56..d0eb85a5 100644 Binary files a/src/Cech_complex/doc/cech_complex_representation.png and b/src/Cech_complex/doc/cech_complex_representation.png differ diff --git a/src/Cech_complex/doc/cech_one_skeleton.ipe b/src/Cech_complex/doc/cech_one_skeleton.ipe index 345e6d7b..ed66e132 100644 --- a/src/Cech_complex/doc/cech_one_skeleton.ipe +++ b/src/Cech_complex/doc/cech_one_skeleton.ipe @@ -1,7 +1,7 @@ - + @@ -259,7 +259,7 @@ h Maximal radius 7 -8 +8 9 112 576 m diff --git a/src/Cech_complex/doc/cech_one_skeleton.png b/src/Cech_complex/doc/cech_one_skeleton.png index 807e0936..cc636616 100644 Binary files a/src/Cech_complex/doc/cech_one_skeleton.png and b/src/Cech_complex/doc/cech_one_skeleton.png differ diff --git a/src/Cech_complex/test/test_cech_complex.cpp b/src/Cech_complex/test/test_cech_complex.cpp index eae8778c..8cbfe431 100644 --- a/src/Cech_complex/test/test_cech_complex.cpp +++ b/src/Cech_complex/test/test_cech_complex.cpp @@ -42,7 +42,7 @@ // Type definitions using Simplex_tree = Gudhi::Simplex_tree<>; using Filtration_value = Simplex_tree::Filtration_value; -using Point = std::vector; +using Point = std::vector; using Point_cloud = std::vector; using Points_off_reader = Gudhi::Points_off_reader; using Cech_complex = Gudhi::cech_complex::Cech_complex; @@ -51,42 +51,52 @@ using Point_iterator = Point_cloud::const_iterator; using Coordinate_iterator = Point::const_iterator; using Min_sphere = Miniball::Miniball>; -BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { +BOOST_AUTO_TEST_CASE(Cech_complex_for_documentation) { // ---------------------------------------------------------------------------- // - // Init of a Cech complex from a OFF file + // Init of a Cech complex from a point cloud // // ---------------------------------------------------------------------------- - std::string off_file_name("alphacomplexdoc.off"); - double max_radius = 12.0; - std::cout << "========== OFF FILE NAME = " << off_file_name << " - Cech max_radius=" << + Point_cloud points; + points.push_back({1., 0.}); // 0 + points.push_back({0., 1.}); // 1 + points.push_back({2., 1.}); // 2 + points.push_back({3., 2.}); // 3 + points.push_back({0., 3.}); // 4 + points.push_back({3. + std::sqrt(3.), 3.}); // 5 + points.push_back({1., 4.}); // 6 + points.push_back({3., 4.}); // 7 + points.push_back({2., 4. + std::sqrt(3.)}); // 8 + points.push_back({0., 4.}); // 9 + points.push_back({-0.5, 2.}); // 10 + + Filtration_value max_radius = 1.0; + std::cout << "========== NUMBER OF POINTS = " << points.size() << " - Cech max_radius = " << max_radius << "==========" << std::endl; - Points_off_reader off_reader(off_file_name); - Point_cloud point_cloud = off_reader.get_point_cloud(); - Cech_complex cech_complex_from_file(point_cloud, max_radius); + Cech_complex cech_complex_for_doc(points, max_radius); - GUDHI_TEST_FLOAT_EQUALITY_CHECK(cech_complex_from_file.max_radius(), max_radius); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(cech_complex_for_doc.max_radius(), max_radius); std::size_t i = 0; - for (; i < point_cloud.size(); i++) { - BOOST_CHECK(point_cloud[i] == *(cech_complex_from_file.point_iterator(i))); + for (; i < points.size(); i++) { + BOOST_CHECK(points[i] == *(cech_complex_for_doc.point_iterator(i))); } #ifdef GUDHI_DEBUG - BOOST_CHECK_THROW (cech_complex_from_file.point_iterator(i+1), std::out_of_range); + BOOST_CHECK_THROW (cech_complex_for_doc.point_iterator(i+1), std::out_of_range); #endif // GUDHI_DEBUG const int DIMENSION_1 = 1; Simplex_tree st; - cech_complex_from_file.create_complex(st, DIMENSION_1); + cech_complex_for_doc.create_complex(st, DIMENSION_1); std::cout << "st.dimension()=" << st.dimension() << std::endl; BOOST_CHECK(st.dimension() == DIMENSION_1); - const int NUMBER_OF_VERTICES = 7; + const int NUMBER_OF_VERTICES = 11; std::cout << "st.num_vertices()=" << st.num_vertices() << std::endl; BOOST_CHECK(st.num_vertices() == NUMBER_OF_VERTICES); std::cout << "st.num_simplices()=" << st.num_simplices() << std::endl; - BOOST_CHECK(st.num_simplices() == 28); + BOOST_CHECK(st.num_simplices() == 27); // Check filtration values of vertices is 0.0 for (auto f_simplex : st.skeleton_simplex_range(0)) { @@ -100,7 +110,7 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { std::cout << "vertex = ("; for (auto vertex : st.simplex_vertex_range(f_simplex)) { std::cout << vertex << ","; - vp.push_back(off_reader.get_point_cloud().at(vertex)); + vp.push_back(points.at(vertex)); } std::cout << ") - distance =" << Gudhi::Radius_distance()(vp.at(0), vp.at(1)) << " - filtration =" << st.filtration(f_simplex) << std::endl; @@ -110,8 +120,13 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { } const int DIMENSION_2 = 2; + +#ifdef GUDHI_DEBUG + BOOST_CHECK_THROW (cech_complex_for_doc.create_complex(st, DIMENSION_2), std::invalid_argument); +#endif + Simplex_tree st2; - cech_complex_from_file.create_complex(st2, DIMENSION_2); + cech_complex_for_doc.create_complex(st2, DIMENSION_2); std::cout << "st2.dimension()=" << st2.dimension() << std::endl; BOOST_CHECK(st2.dimension() == DIMENSION_2); @@ -119,14 +134,14 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { BOOST_CHECK(st2.num_vertices() == NUMBER_OF_VERTICES); std::cout << "st2.num_simplices()=" << st2.num_simplices() << std::endl; - BOOST_CHECK(st2.num_simplices() == 63); + BOOST_CHECK(st2.num_simplices() == 30); Point_cloud points012; for (std::size_t vertex = 0; vertex <= 2; vertex++) { - points012.push_back(Point(cech_complex_from_file.point_iterator(vertex)->begin(), - cech_complex_from_file.point_iterator(vertex)->end())); + points012.push_back(Point(cech_complex_for_doc.point_iterator(vertex)->begin(), + cech_complex_for_doc.point_iterator(vertex)->end())); } - std::size_t dimension = point_cloud[0].end() - point_cloud[0].begin(); + std::size_t dimension = points[0].end() - points[0].begin(); Min_sphere ms012(dimension, points012.begin(),points012.end()); Simplex_tree::Filtration_value f012 = st2.filtration(st2.find({0, 1, 2})); @@ -134,53 +149,36 @@ BOOST_AUTO_TEST_CASE(Cech_complex_from_file) { GUDHI_TEST_FLOAT_EQUALITY_CHECK(f012, std::sqrt(ms012.squared_radius())); - Point_cloud points456; - for (std::size_t vertex = 4; vertex <= 6; vertex++) { - points456.push_back(Point(cech_complex_from_file.point_iterator(vertex)->begin(), - cech_complex_from_file.point_iterator(vertex)->end())); - } - Min_sphere ms456(dimension, points456.begin(),points456.end()); - - Simplex_tree::Filtration_value f456 = st2.filtration(st2.find({4, 5, 6})); - std::cout << "f456= " << f456 << " | ms456_radius= " << std::sqrt(ms456.squared_radius()) << std::endl; + Point_cloud points1410; + points1410.push_back(Point(cech_complex_for_doc.point_iterator(1)->begin(), + cech_complex_for_doc.point_iterator(1)->end())); + points1410.push_back(Point(cech_complex_for_doc.point_iterator(4)->begin(), + cech_complex_for_doc.point_iterator(4)->end())); + points1410.push_back(Point(cech_complex_for_doc.point_iterator(10)->begin(), + cech_complex_for_doc.point_iterator(10)->end())); + Min_sphere ms1410(dimension, points1410.begin(),points1410.end()); - GUDHI_TEST_FLOAT_EQUALITY_CHECK(f456, std::sqrt(ms456.squared_radius())); + Simplex_tree::Filtration_value f1410 = st2.filtration(st2.find({1, 4, 10})); + std::cout << "f1410= " << f1410 << " | ms1410_radius= " << std::sqrt(ms1410.squared_radius()) << std::endl; - const int DIMENSION_3 = 3; - Simplex_tree st3; - cech_complex_from_file.create_complex(st3, DIMENSION_3); - std::cout << "st3.dimension()=" << st3.dimension() << std::endl; - BOOST_CHECK(st3.dimension() == DIMENSION_3); - - std::cout << "st3.num_vertices()=" << st3.num_vertices() << std::endl; - BOOST_CHECK(st3.num_vertices() == NUMBER_OF_VERTICES); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(f1410, std::sqrt(ms1410.squared_radius())); - std::cout << "st3.num_simplices()=" << st3.num_simplices() << std::endl; - BOOST_CHECK(st3.num_simplices() == 98); - - Point_cloud points0123; - for (std::size_t vertex = 0; vertex <= 3; vertex++) { - points0123.push_back(Point(cech_complex_from_file.point_iterator(vertex)->begin(), - cech_complex_from_file.point_iterator(vertex)->end())); - } - Min_sphere ms0123(dimension, points0123.begin(),points0123.end()); + Point_cloud points469; + points469.push_back(Point(cech_complex_for_doc.point_iterator(4)->begin(), + cech_complex_for_doc.point_iterator(4)->end())); + points469.push_back(Point(cech_complex_for_doc.point_iterator(6)->begin(), + cech_complex_for_doc.point_iterator(6)->end())); + points469.push_back(Point(cech_complex_for_doc.point_iterator(9)->begin(), + cech_complex_for_doc.point_iterator(9)->end())); + Min_sphere ms469(dimension, points469.begin(),points469.end()); - Simplex_tree::Filtration_value f0123 = st3.filtration(st3.find({0, 1, 2, 3})); - std::cout << "f0123= " << f0123 << " | ms0123_radius= " << std::sqrt(ms0123.squared_radius()) << std::endl; + Simplex_tree::Filtration_value f469 = st2.filtration(st2.find({4, 6, 9})); + std::cout << "f469= " << f469 << " | ms469_radius= " << std::sqrt(ms469.squared_radius()) << std::endl; - GUDHI_TEST_FLOAT_EQUALITY_CHECK(f0123, std::sqrt(ms0123.squared_radius())); - - - - Point_cloud points01; - for (std::size_t vertex = 0; vertex <= 1; vertex++) { - points01.push_back(Point(cech_complex_from_file.point_iterator(vertex)->begin(), - cech_complex_from_file.point_iterator(vertex)->end())); - } - Min_sphere ms01(dimension, points01.begin(),points01.end()); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(f469, std::sqrt(ms469.squared_radius())); - Simplex_tree::Filtration_value f01 = st2.filtration(st2.find({0, 1})); - std::cout << "f01= " << f01 << " | ms01_radius= " << std::sqrt(ms01.squared_radius()) << std::endl; + BOOST_CHECK((st2.find({6, 7, 8}) == st2.null_simplex())); + BOOST_CHECK((st2.find({3, 5, 7}) == st2.null_simplex())); } diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index b3e9ea03..3851dde7 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -41,6 +41,22 @@ User manual: \ref alpha_complex - Reference manual: Gudhi::alpha_complex::Alpha_complex + + \subsection CechComplexDataStructure Cech complex + \image html "cech_complex_representation.png" "Cech complex representation" + + + + +
    + Author: Vincent Rouvreau
    + Introduced in: GUDHI 2.2.0
    + Copyright: GPL v3
    +
    + The Cech complex is a proximity graph that allows to construct a simplicial complex from it. + It guarantees the simplices inserted are inside a ball of a given radius.
    + User manual: \ref cech_complex - Reference manual: Gudhi::cech_complex::Cech_complex +
    \subsection CubicalComplexDataStructure Cubical complex \image html "Cubical_complex_representation.png" "Cubical complex representation" @@ -57,6 +73,7 @@ User manual: \ref cubical_complex - Reference manual: Gudhi::cubical_complex::Bitmap_cubical_complex + \subsection RipsComplexDataStructure Rips complex \image html "rips_complex_representation.png" "Rips complex representation" @@ -74,7 +91,6 @@ User manual: \ref rips_complex - Reference manual: Gudhi::rips_complex::Rips_complex -
    \subsection SimplexTreeDataStructure Simplex tree \image html "Simplex_tree_representation.png" "Simplex tree representation" -- cgit v1.2.3 From f95d9eb65491241f953a5dcaef57f1dbf077bd60 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 6 Mar 2018 15:56:04 +0000 Subject: Add offline_header.html for Debian package generation that requires self-contained documentation. Command for generation : ( cat Doxyfile ; echo "HTML_HEADER = doc/common/offline_header.html" ) | doxygen - git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3266 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7bd88e71f56b8c7929cfc8475dd49ff2b0901b53 --- src/common/doc/offline_header.html | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/common/doc/offline_header.html (limited to 'src/common') diff --git a/src/common/doc/offline_header.html b/src/common/doc/offline_header.html new file mode 100644 index 00000000..6a02a895 --- /dev/null +++ b/src/common/doc/offline_header.html @@ -0,0 +1,41 @@ + + + + + + + + +$projectname: $title +$title + + + + +$treeview +$search +$mathjax + +$extrastylesheet + + + + +
    + + +
    + + + + + + + + + + +
    $searchbox
    +
    + + -- cgit v1.2.3 From b77699a3188d6674427cffaa35f26ec57aadec8b Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 8 Mar 2018 17:13:25 +0000 Subject: Web site review after Editorial Board Do not need to import gudhi twice in py git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3270 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7d7a4bba27f4cbcad5f8b18cb86587a15e6a8435 --- src/Alpha_complex/utilities/alphacomplex.md | 10 ++++++++++ src/Bitmap_cubical_complex/utilities/cubicalcomplex.md | 10 ++++++++++ src/Bottleneck_distance/utilities/bottleneckdistance.md | 10 ++++++++++ src/Nerve_GIC/utilities/covercomplex.md | 10 ++++++++++ src/Rips_complex/utilities/ripscomplex.md | 10 ++++++++++ src/Witness_complex/utilities/witnesscomplex.md | 10 ++++++++++ src/common/utilities/pointsetgenerator.md | 16 +++++++++++++--- src/cython/example/bottleneck_basic_example.py | 2 -- 8 files changed, 73 insertions(+), 5 deletions(-) (limited to 'src/common') diff --git a/src/Alpha_complex/utilities/alphacomplex.md b/src/Alpha_complex/utilities/alphacomplex.md index aace85d3..ede749a9 100644 --- a/src/Alpha_complex/utilities/alphacomplex.md +++ b/src/Alpha_complex/utilities/alphacomplex.md @@ -1,3 +1,13 @@ +--- +layout: page +title: "Alpha complex" +meta_title: "Alpha complex" +teaser: "" +permalink: /alphacomplex/ +--- +{::comment} +Leave the lines above as it is required by the web site generator 'Jekyll' +{:/comment} # Alpha complex # diff --git a/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md b/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md index 6e1b2578..a1bb9007 100644 --- a/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md +++ b/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md @@ -1,3 +1,13 @@ +--- +layout: page +title: "Cubical complex" +meta_title: "Cubical complex" +teaser: "" +permalink: /cubicalcomplex/ +--- +{::comment} +Leave the lines above as it is required by the web site generator 'Jekyll' +{:/comment} # Cubical complex# diff --git a/src/Bottleneck_distance/utilities/bottleneckdistance.md b/src/Bottleneck_distance/utilities/bottleneckdistance.md index 526f5822..f2749acc 100644 --- a/src/Bottleneck_distance/utilities/bottleneckdistance.md +++ b/src/Bottleneck_distance/utilities/bottleneckdistance.md @@ -1,3 +1,13 @@ +--- +layout: page +title: "Bottleneck distance" +meta_title: "Bottleneck distance" +teaser: "" +permalink: /bottleneckdistance/ +--- +{::comment} +Leave the lines above as it is required by the web site generator 'Jekyll' +{:/comment} # Bottleneck distance # diff --git a/src/Nerve_GIC/utilities/covercomplex.md b/src/Nerve_GIC/utilities/covercomplex.md index f33cb2e0..6d16d16f 100644 --- a/src/Nerve_GIC/utilities/covercomplex.md +++ b/src/Nerve_GIC/utilities/covercomplex.md @@ -1,3 +1,13 @@ +--- +layout: page +title: "Cover complex" +meta_title: "Cover complex" +teaser: "" +permalink: /covercomplex/ +--- +{::comment} +Leave the lines above as it is required by the web site generator 'Jekyll' +{:/comment} # Cover complex # diff --git a/src/Rips_complex/utilities/ripscomplex.md b/src/Rips_complex/utilities/ripscomplex.md index 4291fae7..c1f2210e 100644 --- a/src/Rips_complex/utilities/ripscomplex.md +++ b/src/Rips_complex/utilities/ripscomplex.md @@ -1,3 +1,13 @@ +--- +layout: page +title: "Rips complex" +meta_title: "Rips complex" +teaser: "" +permalink: /ripscomplex/ +--- +{::comment} +Leave the lines above as it is required by the web site generator 'Jekyll' +{:/comment} # Rips complex # diff --git a/src/Witness_complex/utilities/witnesscomplex.md b/src/Witness_complex/utilities/witnesscomplex.md index 2341759b..3be9bc55 100644 --- a/src/Witness_complex/utilities/witnesscomplex.md +++ b/src/Witness_complex/utilities/witnesscomplex.md @@ -1,3 +1,13 @@ +--- +layout: page +title: "Witness complex" +meta_title: "Witness complex" +teaser: "" +permalink: /witnesscomplex/ +--- +{::comment} +Leave the lines above as it is required by the web site generator 'Jekyll' +{:/comment} # Witness complex # diff --git a/src/common/utilities/pointsetgenerator.md b/src/common/utilities/pointsetgenerator.md index 284715d4..3b23e668 100644 --- a/src/common/utilities/pointsetgenerator.md +++ b/src/common/utilities/pointsetgenerator.md @@ -1,6 +1,16 @@ - - -# common # +--- +layout: page +title: "OFF point set generator" +meta_title: "OFF point set generator" +teaser: "" +permalink: /pointsetgenerator/ +--- +{::comment} +Leave the lines above as it is required by the web site generator 'Jekyll' +{:/comment} + + +# Miscellaneous # ## off_file_from_shape_generator ## diff --git a/src/cython/example/bottleneck_basic_example.py b/src/cython/example/bottleneck_basic_example.py index 31cecb29..a7fa01c1 100755 --- a/src/cython/example/bottleneck_basic_example.py +++ b/src/cython/example/bottleneck_basic_example.py @@ -28,8 +28,6 @@ __author__ = "Francois Godi, Vincent Rouvreau" __copyright__ = "Copyright (C) 2016 INRIA" __license__ = "GPL v3" -import gudhi - diag1 = [[2.7, 3.7],[9.6, 14.],[34.2, 34.974], [3.,float('Inf')]] diag2 = [[2.8, 4.45],[9.5, 14.1],[3.2,float('Inf')]] -- cgit v1.2.3 From 0d0ca116e7fef77cc950b7e85380495661311d91 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 22 Mar 2018 08:36:00 +0000 Subject: Move Miniball in gudhi git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3302 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 736e5c33a9593e4dfb5b19ddc745ab9852d71b40 --- src/CMakeLists.txt | 1 - .../benchmark/cech_complex_benchmark.cpp | 5 +- src/Cech_complex/example/CMakeLists.txt | 2 + .../example/cech_complex_step_by_step.cpp | 4 +- .../include/Miniball/Miniball.COPYRIGHT | 4 - src/Cech_complex/include/Miniball/Miniball.README | 23 - src/Cech_complex/include/Miniball/Miniball.hpp | 520 -------------------- src/Cech_complex/include/gudhi/Miniball.COPYRIGHT | 4 + src/Cech_complex/include/gudhi/Miniball.README | 23 + src/Cech_complex/include/gudhi/Miniball.hpp | 523 +++++++++++++++++++++ src/Cech_complex/test/test_cech_complex.cpp | 5 +- src/common/include/gudhi/distance_functions.h | 2 +- 12 files changed, 559 insertions(+), 557 deletions(-) delete mode 100644 src/Cech_complex/include/Miniball/Miniball.COPYRIGHT delete mode 100644 src/Cech_complex/include/Miniball/Miniball.README delete mode 100644 src/Cech_complex/include/Miniball/Miniball.hpp create mode 100644 src/Cech_complex/include/gudhi/Miniball.COPYRIGHT create mode 100644 src/Cech_complex/include/gudhi/Miniball.README create mode 100644 src/Cech_complex/include/gudhi/Miniball.hpp (limited to 'src/common') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ff7acafc..7cccb19f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -105,5 +105,4 @@ install(FILES # install the include file on "make install" install(DIRECTORY include/gudhi DESTINATION include) -install(DIRECTORY include/Miniball DESTINATION include) #--------------------------------------------------------------------------------------- diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp index 83ef9dca..6ba52419 100644 --- a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp +++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp @@ -27,8 +27,7 @@ #include #include #include - -#include +#include #include "boost/filesystem.hpp" // includes all needed Boost.Filesystem declarations @@ -57,7 +56,7 @@ class Radius_distance { using Point_cloud = std::vector; using Point_iterator = typename Point_cloud::const_iterator; using Coordinate_iterator = typename Point::const_iterator; - using Min_sphere = typename Miniball::Miniball>; + using Min_sphere = typename Gudhi::Miniball::Miniball>; Point_cloud point_cloud; point_cloud.push_back(p1); diff --git a/src/Cech_complex/example/CMakeLists.txt b/src/Cech_complex/example/CMakeLists.txt index ac32ff95..ab391215 100644 --- a/src/Cech_complex/example/CMakeLists.txt +++ b/src/Cech_complex/example/CMakeLists.txt @@ -6,6 +6,8 @@ target_link_libraries(Cech_complex_example_step_by_step ${Boost_PROGRAM_OPTIONS_ if (TBB_FOUND) target_link_libraries(Cech_complex_example_step_by_step ${TBB_LIBRARIES}) endif() +add_test(NAME Cech_complex_utility_from_rips_on_tore_3D COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "-r" "0.25" "-d" "3") add_executable ( Cech_complex_example_from_points cech_complex_example_from_points.cpp) if (TBB_FOUND) 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 8705a3e5..0e7c4bbd 100644 --- a/src/Cech_complex/example/cech_complex_step_by_step.cpp +++ b/src/Cech_complex/example/cech_complex_step_by_step.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include @@ -55,7 +55,7 @@ class Cech_blocker { using Point_cloud = std::vector; using Point_iterator = Point_cloud::const_iterator; using Coordinate_iterator = Point::const_iterator; - using Min_sphere = Miniball::Miniball >; + using Min_sphere = Gudhi::Miniball::Miniball >; public: bool operator()(Simplex_handle sh) { std::vector points; diff --git a/src/Cech_complex/include/Miniball/Miniball.COPYRIGHT b/src/Cech_complex/include/Miniball/Miniball.COPYRIGHT deleted file mode 100644 index dbe4c553..00000000 --- a/src/Cech_complex/include/Miniball/Miniball.COPYRIGHT +++ /dev/null @@ -1,4 +0,0 @@ -The miniball software is available under the GNU General Public License (GPLv3 - https://www.gnu.org/copyleft/gpl.html). -If your intended use is not compliant with this license, please buy a commercial license (EUR 500 - https://people.inf.ethz.ch/gaertner/subdir/software/miniball/license.html). -You need a license if the software that you develop using Miniball V3.0 is not open source. - diff --git a/src/Cech_complex/include/Miniball/Miniball.README b/src/Cech_complex/include/Miniball/Miniball.README deleted file mode 100644 index 86a96f08..00000000 --- a/src/Cech_complex/include/Miniball/Miniball.README +++ /dev/null @@ -1,23 +0,0 @@ -https://people.inf.ethz.ch/gaertner/subdir/software/miniball.html - -Smallest Enclosing Balls of Points - Fast and Robust in C++. -(high-quality software for smallest enclosing balls of balls is available in the computational geometry algorithms library CGAL) - - -This is the miniball software (V3.0) for computing smallest enclosing balls of points in arbitrary dimensions. It consists of a C++ header file Miniball.hpp (around 500 lines of code) and two example programs miniball_example.cpp and miniball_example_containers.cpp that demonstrate the usage. The first example stores the coordinates of the input points in a two-dimensional array, the second example uses a list of vectors to show how generic containers can be used. - -Credits: Aditya Gupta and Alexandros Konstantinakis-Karmis have significantly contributed to this version of the software. - -Changes - https://people.inf.ethz.ch/gaertner/subdir/software/miniball/changes.txt - from previous versions. - -The theory - https://people.inf.ethz.ch/gaertner/subdir/texts/own_work/esa99_final.pdf - behind the miniball software (Proc. 7th Annual European Symposium on Algorithms (ESA), Lecture Notes in Computer Science 1643, Springer-Verlag, pp.325-338, 1999). - -Main Features: - - Very fast in low dimensions. 1 million points in 5-space are processed within 0.05 seconds on any recent machine. - - High numerical stability. Almost all input degeneracies (cospherical points, multiple points, points very close together) are routinely handled. - - Easily integrates into your code. You can freely choose the coordinate type of your points and the container to store the points. If you still need to adapt the code, the header is small and readable and contains documentation for all major methods. - - diff --git a/src/Cech_complex/include/Miniball/Miniball.hpp b/src/Cech_complex/include/Miniball/Miniball.hpp deleted file mode 100644 index a42d62a7..00000000 --- a/src/Cech_complex/include/Miniball/Miniball.hpp +++ /dev/null @@ -1,520 +0,0 @@ -// Copright (C) 1999-2013, Bernd Gaertner -// $Rev: 3581 $ -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// -// Contact: -// -------- -// Bernd Gaertner -// Institute of Theoretical Computer Science -// ETH Zuerich -// CAB G31.1 -// CH-8092 Zuerich, Switzerland -// http://www.inf.ethz.ch/personal/gaertner - -#ifndef MINIBALL_HPP_ -#define MINIBALL_HPP_ - -#include -#include -#include -#include -#include - -namespace Miniball { - - // Global Functions - // ================ - template - inline NT mb_sqr (NT r) {return r*r;} - - // Functors - // ======== - - // functor to map a point iterator to the corresponding coordinate iterator; - // generic version for points whose coordinate containers have begin() - template < typename Pit_, typename Cit_ > - struct CoordAccessor { - typedef Pit_ Pit; - typedef Cit_ Cit; - inline Cit operator() (Pit it) const { return (*it).begin(); } - }; - - // partial specialization for points whose coordinate containers are arrays - template < typename Pit_, typename Cit_ > - struct CoordAccessor { - typedef Pit_ Pit; - typedef Cit_* Cit; - inline Cit operator() (Pit it) const { return *it; } - }; - - // Class Declaration - // ================= - - template - class Miniball { - private: - // types - // The iterator type to go through the input points - typedef typename CoordAccessor::Pit Pit; - // The iterator type to go through the coordinates of a single point. - typedef typename CoordAccessor::Cit Cit; - // The coordinate type - typedef typename std::iterator_traits::value_type NT; - // The iterator to go through the support points - typedef typename std::list::iterator Sit; - - // data members... - const int d; // dimension - Pit points_begin; - Pit points_end; - CoordAccessor coord_accessor; - double time; - const NT nt0; // NT(0) - - //...for the algorithms - std::list L; - Sit support_end; - int fsize; // number of forced points - int ssize; // number of support points - - // ...for the ball updates - NT* current_c; - NT current_sqr_r; - NT** c; - NT* sqr_r; - - // helper arrays - NT* q0; - NT* z; - NT* f; - NT** v; - NT** a; - - public: - // The iterator type to go through the support points - typedef typename std::list::const_iterator SupportPointIterator; - - // PRE: [begin, end) is a nonempty range - // POST: computes the smallest enclosing ball of the points in the range - // [begin, end); the functor a maps a point iterator to an iterator - // through the d coordinates of the point - Miniball (int d_, Pit begin, Pit end, CoordAccessor ca = CoordAccessor()); - - // POST: returns a pointer to the first element of an array that holds - // the d coordinates of the center of the computed ball - const NT* center () const; - - // POST: returns the squared radius of the computed ball - NT squared_radius () const; - - // POST: returns the number of support points of the computed ball; - // the support points form a minimal set with the same smallest - // enclosing ball as the input set; in particular, the support - // points are on the boundary of the computed ball, and their - // number is at most d+1 - int nr_support_points () const; - - // POST: returns an iterator to the first support point - SupportPointIterator support_points_begin () const; - - // POST: returns a past-the-end iterator for the range of support points - SupportPointIterator support_points_end () const; - - // POST: returns the maximum excess of any input point w.r.t. the computed - // ball, divided by the squared radius of the computed ball. The - // excess of a point is the difference between its squared distance - // from the center and the squared radius; Ideally, the return value - // is 0. subopt is set to the absolute value of the most negative - // coefficient in the affine combination of the support points that - // yields the center. Ideally, this is a convex combination, and there - // is no negative coefficient in which case subopt is set to 0. - NT relative_error (NT& subopt) const; - - // POST: return true if the relative error is at most tol, and the - // suboptimality is 0; the default tolerance is 10 times the - // coordinate type's machine epsilon - bool is_valid (NT tol = NT(10) * std::numeric_limits::epsilon()) const; - - // POST: returns the time in seconds taken by the constructor call for - // computing the smallest enclosing ball - double get_time() const; - - // POST: deletes dynamically allocated arrays - ~Miniball(); - - private: - void mtf_mb (Sit n); - void mtf_move_to_front (Sit j); - void pivot_mb (Pit n); - void pivot_move_to_front (Pit j); - NT excess (Pit pit) const; - void pop (); - bool push (Pit pit); - NT suboptimality () const; - void create_arrays(); - void delete_arrays(); - }; - - // Class Definition - // ================ - template - Miniball::Miniball (int d_, Pit begin, Pit end, - CoordAccessor ca) - : d (d_), - points_begin (begin), - points_end (end), - coord_accessor (ca), - time (clock()), - nt0 (NT(0)), - L(), - support_end (L.begin()), - fsize(0), - ssize(0), - current_c (NULL), - current_sqr_r (NT(-1)), - c (NULL), - sqr_r (NULL), - q0 (NULL), - z (NULL), - f (NULL), - v (NULL), - a (NULL) - { - assert (points_begin != points_end); - create_arrays(); - - // set initial center - for (int j=0; j - Miniball::~Miniball() - { - delete_arrays(); - } - - template - void Miniball::create_arrays() - { - c = new NT*[d+1]; - v = new NT*[d+1]; - a = new NT*[d+1]; - for (int i=0; i - void Miniball::delete_arrays() - { - delete[] f; - delete[] z; - delete[] q0; - delete[] sqr_r; - for (int i=0; i - const typename Miniball::NT* - Miniball::center () const - { - return current_c; - } - - template - typename Miniball::NT - Miniball::squared_radius () const - { - return current_sqr_r; - } - - template - int Miniball::nr_support_points () const - { - assert (ssize < d+2); - return ssize; - } - - template - typename Miniball::SupportPointIterator - Miniball::support_points_begin () const - { - return L.begin(); - } - - template - typename Miniball::SupportPointIterator - Miniball::support_points_end () const - { - return support_end; - } - - template - typename Miniball::NT - Miniball::relative_error (NT& subopt) const - { - NT e, max_e = nt0; - // compute maximum absolute excess of support points - for (SupportPointIterator it = support_points_begin(); - it != support_points_end(); ++it) { - e = excess (*it); - if (e < nt0) e = -e; - if (e > max_e) { - max_e = e; - } - } - // compute maximum excess of any point - for (Pit i = points_begin; i != points_end; ++i) - if ((e = excess (i)) > max_e) - max_e = e; - - subopt = suboptimality(); - assert (current_sqr_r > nt0 || max_e == nt0); - return (current_sqr_r == nt0 ? nt0 : max_e / current_sqr_r); - } - - template - bool Miniball::is_valid (NT tol) const - { - NT suboptimality; - return ( (relative_error (suboptimality) <= tol) && (suboptimality == 0) ); - } - - template - double Miniball::get_time() const - { - return time; - } - - template - void Miniball::mtf_mb (Sit n) - { - // Algorithm 1: mtf_mb (L_{n-1}, B), where L_{n-1} = [L.begin, n) - // B: the set of forced points, defining the current ball - // S: the superset of support points computed by the algorithm - // -------------------------------------------------------------- - // from B. Gaertner, Fast and Robust Smallest Enclosing Balls, ESA 1999, - // http://www.inf.ethz.ch/personal/gaertner/texts/own_work/esa99_final.pdf - - // PRE: B = S - assert (fsize == ssize); - - support_end = L.begin(); - if ((fsize) == d+1) return; - - // incremental construction - for (Sit i = L.begin(); i != n;) - { - // INV: (support_end - L.begin() == |S|-|B|) - assert (std::distance (L.begin(), support_end) == ssize - fsize); - - Sit j = i++; - if (excess(*j) > nt0) - if (push(*j)) { // B := B + p_i - mtf_mb (j); // mtf_mb (L_{i-1}, B + p_i) - pop(); // B := B - p_i - mtf_move_to_front(j); - } - } - // POST: the range [L.begin(), support_end) stores the set S\B - } - - template - void Miniball::mtf_move_to_front (Sit j) - { - if (support_end == j) - support_end++; - L.splice (L.begin(), L, j); - } - - template - void Miniball::pivot_mb (Pit n) - { - // Algorithm 2: pivot_mb (L_{n-1}), where L_{n-1} = [L.begin, n) - // -------------------------------------------------------------- - // from B. Gaertner, Fast and Robust Smallest Enclosing Balls, ESA 1999, - // http://www.inf.ethz.ch/personal/gaertner/texts/own_work/esa99_final.pdf - NT old_sqr_r; - const NT* c; - Pit pivot, k; - NT e, max_e, sqr_r; - Cit p; - do { - old_sqr_r = current_sqr_r; - sqr_r = current_sqr_r; - - pivot = points_begin; - max_e = nt0; - for (k = points_begin; k != n; ++k) { - p = coord_accessor(k); - e = -sqr_r; - c = current_c; - for (int j=0; j(*p++-*c++); - if (e > max_e) { - max_e = e; - pivot = k; - } - } - - if (max_e > nt0) { - // check if the pivot is already contained in the support set - if (std::find(L.begin(), support_end, pivot) == support_end) { - assert (fsize == 0); - if (push (pivot)) { - mtf_mb(support_end); - pop(); - pivot_move_to_front(pivot); - } - } - } - } while (old_sqr_r < current_sqr_r); - } - - template - void Miniball::pivot_move_to_front (Pit j) - { - L.push_front(j); - if (std::distance(L.begin(), support_end) == d+2) - support_end--; - } - - template - inline typename Miniball::NT - Miniball::excess (Pit pit) const - { - Cit p = coord_accessor(pit); - NT e = -current_sqr_r; - NT* c = current_c; - for (int k=0; k(*p++-*c++); - } - return e; - } - - template - void Miniball::pop () - { - --fsize; - } - - template - bool Miniball::push (Pit pit) - { - int i, j; - NT eps = mb_sqr(std::numeric_limits::epsilon()); - - Cit cit = coord_accessor(pit); - Cit p = cit; - - if (fsize==0) { - for (i=0; i(v[fsize][j]); - z[fsize]*=2; - - // reject push if z_fsize too small - if (z[fsize](*p++-c[fsize-1][i]); - f[fsize]=e/z[fsize]; - - for (i=0; i - typename Miniball::NT - Miniball::suboptimality () const - { - NT* l = new NT[d+1]; - NT min_l = nt0; - l[0] = NT(1); - for (int i=ssize-1; i>0; --i) { - l[i] = f[i]; - for (int k=ssize-1; k>i; --k) - l[i]-=a[k][i]*l[k]; - if (l[i] < min_l) min_l = l[i]; - l[0] -= l[i]; - } - if (l[0] < min_l) min_l = l[0]; - delete[] l; - if (min_l < nt0) - return -min_l; - return nt0; - } - -} // end Namespace Miniball - -#endif // MINIBALL_HPP_ diff --git a/src/Cech_complex/include/gudhi/Miniball.COPYRIGHT b/src/Cech_complex/include/gudhi/Miniball.COPYRIGHT new file mode 100644 index 00000000..dbe4c553 --- /dev/null +++ b/src/Cech_complex/include/gudhi/Miniball.COPYRIGHT @@ -0,0 +1,4 @@ +The miniball software is available under the GNU General Public License (GPLv3 - https://www.gnu.org/copyleft/gpl.html). +If your intended use is not compliant with this license, please buy a commercial license (EUR 500 - https://people.inf.ethz.ch/gaertner/subdir/software/miniball/license.html). +You need a license if the software that you develop using Miniball V3.0 is not open source. + diff --git a/src/Cech_complex/include/gudhi/Miniball.README b/src/Cech_complex/include/gudhi/Miniball.README new file mode 100644 index 00000000..86a96f08 --- /dev/null +++ b/src/Cech_complex/include/gudhi/Miniball.README @@ -0,0 +1,23 @@ +https://people.inf.ethz.ch/gaertner/subdir/software/miniball.html + +Smallest Enclosing Balls of Points - Fast and Robust in C++. +(high-quality software for smallest enclosing balls of balls is available in the computational geometry algorithms library CGAL) + + +This is the miniball software (V3.0) for computing smallest enclosing balls of points in arbitrary dimensions. It consists of a C++ header file Miniball.hpp (around 500 lines of code) and two example programs miniball_example.cpp and miniball_example_containers.cpp that demonstrate the usage. The first example stores the coordinates of the input points in a two-dimensional array, the second example uses a list of vectors to show how generic containers can be used. + +Credits: Aditya Gupta and Alexandros Konstantinakis-Karmis have significantly contributed to this version of the software. + +Changes - https://people.inf.ethz.ch/gaertner/subdir/software/miniball/changes.txt - from previous versions. + +The theory - https://people.inf.ethz.ch/gaertner/subdir/texts/own_work/esa99_final.pdf - behind the miniball software (Proc. 7th Annual European Symposium on Algorithms (ESA), Lecture Notes in Computer Science 1643, Springer-Verlag, pp.325-338, 1999). + +Main Features: + + Very fast in low dimensions. 1 million points in 5-space are processed within 0.05 seconds on any recent machine. + + High numerical stability. Almost all input degeneracies (cospherical points, multiple points, points very close together) are routinely handled. + + Easily integrates into your code. You can freely choose the coordinate type of your points and the container to store the points. If you still need to adapt the code, the header is small and readable and contains documentation for all major methods. + + diff --git a/src/Cech_complex/include/gudhi/Miniball.hpp b/src/Cech_complex/include/gudhi/Miniball.hpp new file mode 100644 index 00000000..ce6cbb5b --- /dev/null +++ b/src/Cech_complex/include/gudhi/Miniball.hpp @@ -0,0 +1,523 @@ +// Copright (C) 1999-2013, Bernd Gaertner +// $Rev: 3581 $ +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// Contact: +// -------- +// Bernd Gaertner +// Institute of Theoretical Computer Science +// ETH Zuerich +// CAB G31.1 +// CH-8092 Zuerich, Switzerland +// http://www.inf.ethz.ch/personal/gaertner + +#ifndef MINIBALL_HPP_ +#define MINIBALL_HPP_ + +#include +#include +#include +#include +#include + +namespace Gudhi { + +namespace Miniball { + + // Global Functions + // ================ + template + inline NT mb_sqr (NT r) {return r*r;} + + // Functors + // ======== + + // functor to map a point iterator to the corresponding coordinate iterator; + // generic version for points whose coordinate containers have begin() + template < typename Pit_, typename Cit_ > + struct CoordAccessor { + typedef Pit_ Pit; + typedef Cit_ Cit; + inline Cit operator() (Pit it) const { return (*it).begin(); } + }; + + // partial specialization for points whose coordinate containers are arrays + template < typename Pit_, typename Cit_ > + struct CoordAccessor { + typedef Pit_ Pit; + typedef Cit_* Cit; + inline Cit operator() (Pit it) const { return *it; } + }; + + // Class Declaration + // ================= + + template + class Miniball { + private: + // types + // The iterator type to go through the input points + typedef typename CoordAccessor::Pit Pit; + // The iterator type to go through the coordinates of a single point. + typedef typename CoordAccessor::Cit Cit; + // The coordinate type + typedef typename std::iterator_traits::value_type NT; + // The iterator to go through the support points + typedef typename std::list::iterator Sit; + + // data members... + const int d; // dimension + Pit points_begin; + Pit points_end; + CoordAccessor coord_accessor; + double time; + const NT nt0; // NT(0) + + //...for the algorithms + std::list L; + Sit support_end; + int fsize; // number of forced points + int ssize; // number of support points + + // ...for the ball updates + NT* current_c; + NT current_sqr_r; + NT** c; + NT* sqr_r; + + // helper arrays + NT* q0; + NT* z; + NT* f; + NT** v; + NT** a; + + public: + // The iterator type to go through the support points + typedef typename std::list::const_iterator SupportPointIterator; + + // PRE: [begin, end) is a nonempty range + // POST: computes the smallest enclosing ball of the points in the range + // [begin, end); the functor a maps a point iterator to an iterator + // through the d coordinates of the point + Miniball (int d_, Pit begin, Pit end, CoordAccessor ca = CoordAccessor()); + + // POST: returns a pointer to the first element of an array that holds + // the d coordinates of the center of the computed ball + const NT* center () const; + + // POST: returns the squared radius of the computed ball + NT squared_radius () const; + + // POST: returns the number of support points of the computed ball; + // the support points form a minimal set with the same smallest + // enclosing ball as the input set; in particular, the support + // points are on the boundary of the computed ball, and their + // number is at most d+1 + int nr_support_points () const; + + // POST: returns an iterator to the first support point + SupportPointIterator support_points_begin () const; + + // POST: returns a past-the-end iterator for the range of support points + SupportPointIterator support_points_end () const; + + // POST: returns the maximum excess of any input point w.r.t. the computed + // ball, divided by the squared radius of the computed ball. The + // excess of a point is the difference between its squared distance + // from the center and the squared radius; Ideally, the return value + // is 0. subopt is set to the absolute value of the most negative + // coefficient in the affine combination of the support points that + // yields the center. Ideally, this is a convex combination, and there + // is no negative coefficient in which case subopt is set to 0. + NT relative_error (NT& subopt) const; + + // POST: return true if the relative error is at most tol, and the + // suboptimality is 0; the default tolerance is 10 times the + // coordinate type's machine epsilon + bool is_valid (NT tol = NT(10) * std::numeric_limits::epsilon()) const; + + // POST: returns the time in seconds taken by the constructor call for + // computing the smallest enclosing ball + double get_time() const; + + // POST: deletes dynamically allocated arrays + ~Miniball(); + + private: + void mtf_mb (Sit n); + void mtf_move_to_front (Sit j); + void pivot_mb (Pit n); + void pivot_move_to_front (Pit j); + NT excess (Pit pit) const; + void pop (); + bool push (Pit pit); + NT suboptimality () const; + void create_arrays(); + void delete_arrays(); + }; + + // Class Definition + // ================ + template + Miniball::Miniball (int d_, Pit begin, Pit end, + CoordAccessor ca) + : d (d_), + points_begin (begin), + points_end (end), + coord_accessor (ca), + time (clock()), + nt0 (NT(0)), + L(), + support_end (L.begin()), + fsize(0), + ssize(0), + current_c (NULL), + current_sqr_r (NT(-1)), + c (NULL), + sqr_r (NULL), + q0 (NULL), + z (NULL), + f (NULL), + v (NULL), + a (NULL) + { + assert (points_begin != points_end); + create_arrays(); + + // set initial center + for (int j=0; j + Miniball::~Miniball() + { + delete_arrays(); + } + + template + void Miniball::create_arrays() + { + c = new NT*[d+1]; + v = new NT*[d+1]; + a = new NT*[d+1]; + for (int i=0; i + void Miniball::delete_arrays() + { + delete[] f; + delete[] z; + delete[] q0; + delete[] sqr_r; + for (int i=0; i + const typename Miniball::NT* + Miniball::center () const + { + return current_c; + } + + template + typename Miniball::NT + Miniball::squared_radius () const + { + return current_sqr_r; + } + + template + int Miniball::nr_support_points () const + { + assert (ssize < d+2); + return ssize; + } + + template + typename Miniball::SupportPointIterator + Miniball::support_points_begin () const + { + return L.begin(); + } + + template + typename Miniball::SupportPointIterator + Miniball::support_points_end () const + { + return support_end; + } + + template + typename Miniball::NT + Miniball::relative_error (NT& subopt) const + { + NT e, max_e = nt0; + // compute maximum absolute excess of support points + for (SupportPointIterator it = support_points_begin(); + it != support_points_end(); ++it) { + e = excess (*it); + if (e < nt0) e = -e; + if (e > max_e) { + max_e = e; + } + } + // compute maximum excess of any point + for (Pit i = points_begin; i != points_end; ++i) + if ((e = excess (i)) > max_e) + max_e = e; + + subopt = suboptimality(); + assert (current_sqr_r > nt0 || max_e == nt0); + return (current_sqr_r == nt0 ? nt0 : max_e / current_sqr_r); + } + + template + bool Miniball::is_valid (NT tol) const + { + NT suboptimality; + return ( (relative_error (suboptimality) <= tol) && (suboptimality == 0) ); + } + + template + double Miniball::get_time() const + { + return time; + } + + template + void Miniball::mtf_mb (Sit n) + { + // Algorithm 1: mtf_mb (L_{n-1}, B), where L_{n-1} = [L.begin, n) + // B: the set of forced points, defining the current ball + // S: the superset of support points computed by the algorithm + // -------------------------------------------------------------- + // from B. Gaertner, Fast and Robust Smallest Enclosing Balls, ESA 1999, + // http://www.inf.ethz.ch/personal/gaertner/texts/own_work/esa99_final.pdf + + // PRE: B = S + assert (fsize == ssize); + + support_end = L.begin(); + if ((fsize) == d+1) return; + + // incremental construction + for (Sit i = L.begin(); i != n;) + { + // INV: (support_end - L.begin() == |S|-|B|) + assert (std::distance (L.begin(), support_end) == ssize - fsize); + + Sit j = i++; + if (excess(*j) > nt0) + if (push(*j)) { // B := B + p_i + mtf_mb (j); // mtf_mb (L_{i-1}, B + p_i) + pop(); // B := B - p_i + mtf_move_to_front(j); + } + } + // POST: the range [L.begin(), support_end) stores the set S\B + } + + template + void Miniball::mtf_move_to_front (Sit j) + { + if (support_end == j) + support_end++; + L.splice (L.begin(), L, j); + } + + template + void Miniball::pivot_mb (Pit n) + { + // Algorithm 2: pivot_mb (L_{n-1}), where L_{n-1} = [L.begin, n) + // -------------------------------------------------------------- + // from B. Gaertner, Fast and Robust Smallest Enclosing Balls, ESA 1999, + // http://www.inf.ethz.ch/personal/gaertner/texts/own_work/esa99_final.pdf + NT old_sqr_r; + const NT* c; + Pit pivot, k; + NT e, max_e, sqr_r; + Cit p; + do { + old_sqr_r = current_sqr_r; + sqr_r = current_sqr_r; + + pivot = points_begin; + max_e = nt0; + for (k = points_begin; k != n; ++k) { + p = coord_accessor(k); + e = -sqr_r; + c = current_c; + for (int j=0; j(*p++-*c++); + if (e > max_e) { + max_e = e; + pivot = k; + } + } + + if (max_e > nt0) { + // check if the pivot is already contained in the support set + if (std::find(L.begin(), support_end, pivot) == support_end) { + assert (fsize == 0); + if (push (pivot)) { + mtf_mb(support_end); + pop(); + pivot_move_to_front(pivot); + } + } + } + } while (old_sqr_r < current_sqr_r); + } + + template + void Miniball::pivot_move_to_front (Pit j) + { + L.push_front(j); + if (std::distance(L.begin(), support_end) == d+2) + support_end--; + } + + template + inline typename Miniball::NT + Miniball::excess (Pit pit) const + { + Cit p = coord_accessor(pit); + NT e = -current_sqr_r; + NT* c = current_c; + for (int k=0; k(*p++-*c++); + } + return e; + } + + template + void Miniball::pop () + { + --fsize; + } + + template + bool Miniball::push (Pit pit) + { + int i, j; + NT eps = mb_sqr(std::numeric_limits::epsilon()); + + Cit cit = coord_accessor(pit); + Cit p = cit; + + if (fsize==0) { + for (i=0; i(v[fsize][j]); + z[fsize]*=2; + + // reject push if z_fsize too small + if (z[fsize](*p++-c[fsize-1][i]); + f[fsize]=e/z[fsize]; + + for (i=0; i + typename Miniball::NT + Miniball::suboptimality () const + { + NT* l = new NT[d+1]; + NT min_l = nt0; + l[0] = NT(1); + for (int i=ssize-1; i>0; --i) { + l[i] = f[i]; + for (int k=ssize-1; k>i; --k) + l[i]-=a[k][i]*l[k]; + if (l[i] < min_l) min_l = l[i]; + l[0] -= l[i]; + } + if (l[0] < min_l) min_l = l[0]; + delete[] l; + if (min_l < nt0) + return -min_l; + return nt0; + } +} // namespace Miniball + +} // namespace Gudhi + +#endif // MINIBALL_HPP_ diff --git a/src/Cech_complex/test/test_cech_complex.cpp b/src/Cech_complex/test/test_cech_complex.cpp index 8cbfe431..4aa85057 100644 --- a/src/Cech_complex/test/test_cech_complex.cpp +++ b/src/Cech_complex/test/test_cech_complex.cpp @@ -36,8 +36,7 @@ #include #include #include - -#include +#include // Type definitions using Simplex_tree = Gudhi::Simplex_tree<>; @@ -49,7 +48,7 @@ using Cech_complex = Gudhi::cech_complex::Cech_complex>; +using Min_sphere = Gudhi::Miniball::Miniball>; BOOST_AUTO_TEST_CASE(Cech_complex_for_documentation) { // ---------------------------------------------------------------------------- diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 7749b98e..93956a69 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -25,7 +25,7 @@ #include -#include +#include #include -- cgit v1.2.3 From 1f3716292673a56413d3501b4b98b54416d193ed Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 22 Mar 2018 10:10:08 +0000 Subject: code review : Rename Radius_distance Minimal_enclosing_ball_radius git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3304 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 204aa7a7098773b2d290e35a12a1c92449743d7d --- .../benchmark/cech_complex_benchmark.cpp | 32 ++++++++++++---------- .../example/cech_complex_step_by_step.cpp | 4 +-- src/Cech_complex/include/gudhi/Cech_complex.h | 11 ++++---- .../include/gudhi/Cech_complex_blocker.h | 4 +-- src/Cech_complex/test/test_cech_complex.cpp | 4 +-- src/common/include/gudhi/distance_functions.h | 8 +++--- 6 files changed, 34 insertions(+), 29 deletions(-) (limited to 'src/common') diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp index 6ba52419..2fa255ed 100644 --- a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp +++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp @@ -46,7 +46,7 @@ using Rips_complex = Gudhi::rips_complex::Rips_complex; using Cech_complex = Gudhi::cech_complex::Cech_complex; -class Radius_distance { +class Minimal_enclosing_ball_radius { public: // boost::range_value is not SFINAE-friendly so we cannot use it in the return type template< typename Point > @@ -80,24 +80,26 @@ int main(int argc, char * argv[]) { Gudhi::Clock euclidean_clock("Gudhi::Euclidean_distance"); // Compute the proximity graph of the points Proximity_graph euclidean_prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), - threshold, - Gudhi::Euclidean_distance()); + threshold, + Gudhi::Euclidean_distance()); std::cout << euclidean_clock << std::endl; - Gudhi::Clock radius_clock("Radius_distance"); + Gudhi::Clock miniball_clock("Minimal_enclosing_ball_radius"); // Compute the proximity graph of the points - Proximity_graph radius_prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), - threshold, - Radius_distance()); - std::cout << radius_clock << std::endl; + Proximity_graph miniball_prox_graph = + Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), + threshold, + Minimal_enclosing_ball_radius()); + std::cout << miniball_clock << std::endl; - Gudhi::Clock common_radius_clock("Gudhi::Radius_distance()"); + Gudhi::Clock common_miniball_clock("Gudhi::Minimal_enclosing_ball_radius()"); // Compute the proximity graph of the points - Proximity_graph sq_radius_prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), - threshold, - Gudhi::Radius_distance()); - std::cout << common_radius_clock << std::endl; + Proximity_graph common_miniball_prox_graph = + Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), + threshold, + Gudhi::Minimal_enclosing_ball_radius()); + std::cout << common_miniball_clock << std::endl; boost::filesystem::path full_path(boost::filesystem::current_path()); @@ -121,7 +123,9 @@ int main(int argc, char * argv[]) { std::cout << itr->path().stem() << ";"; std::cout << radius << ";"; Gudhi::Clock rips_clock("Rips computation"); - Rips_complex rips_complex_from_points(off_reader.get_point_cloud(), radius, Gudhi::Radius_distance()); + Rips_complex rips_complex_from_points(off_reader.get_point_cloud(), + radius, + Gudhi::Minimal_enclosing_ball_radius()); Simplex_tree rips_stree; rips_complex_from_points.create_complex(rips_stree, p0.size() - 1); // ------------------------------------------ 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 0e7c4bbd..760b53dc 100644 --- a/src/Cech_complex/example/cech_complex_step_by_step.cpp +++ b/src/Cech_complex/example/cech_complex_step_by_step.cpp @@ -65,7 +65,7 @@ class Cech_blocker { std::cout << "#(" << vertex << ")#"; #endif // DEBUG_TRACES } - Filtration_value radius = Gudhi::Radius_distance()(points); + Filtration_value radius = Gudhi::Minimal_enclosing_ball_radius()(points); #ifdef DEBUG_TRACES std::cout << "radius = " << radius << " - " << (radius > max_radius_) << std::endl; #endif // DEBUG_TRACES @@ -105,7 +105,7 @@ int main(int argc, char * argv[]) { // Compute the proximity graph of the points Proximity_graph prox_graph = Gudhi::compute_proximity_graph(off_reader.get_point_cloud(), max_radius, - Gudhi::Radius_distance()); + Gudhi::Minimal_enclosing_ball_radius()); // Construct the Rips complex in a Simplex Tree Simplex_tree st; diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h index 612c73c3..8b1a9221 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex.h +++ b/src/Cech_complex/include/gudhi/Cech_complex.h @@ -23,7 +23,7 @@ #ifndef CECH_COMPLEX_H_ #define CECH_COMPLEX_H_ -#include // for Gudhi::Radius_distance +#include // for Gudhi::Minimal_enclosing_ball_radius #include // for Gudhi::Proximity_graph #include // for GUDHI_CHECK #include // for Gudhi::cech_complex::Cech_blocker @@ -43,7 +43,7 @@ namespace cech_complex { * * \details * The data structure is a proximity graph, containing edges when the edge length is less or equal - * to a given max_radius. Edge length is computed from `Gudhi::Radius_distance` distance function. + * to a given max_radius. Edge length is computed from `Gudhi::Minimal_enclosing_ball_radius` distance function. * * \tparam SimplicialComplexForProximityGraph furnishes `Vertex_handle` and `Filtration_value` type definition required * by `Gudhi::Proximity_graph`. @@ -71,9 +71,10 @@ class Cech_complex { Cech_complex(const ForwardPointRange& points, Filtration_value max_radius) : max_radius_(max_radius), point_cloud_(points) { - cech_skeleton_graph_ = Gudhi::compute_proximity_graph(point_cloud_, - max_radius_, - Gudhi::Radius_distance()); + cech_skeleton_graph_ = + Gudhi::compute_proximity_graph(point_cloud_, + max_radius_, + Gudhi::Minimal_enclosing_ball_radius()); } /** \brief Initializes the simplicial complex from the proximity graph and expands it until a given maximal diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h index 5ba17c51..c082815d 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h +++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h @@ -24,7 +24,7 @@ #define CECH_COMPLEX_BLOCKER_H_ #include // Cech_blocker is using a pointer on Gudhi::cech_complex::Cech_complex -#include // for Gudhi::Radius_distance +#include // for Gudhi::Minimal_enclosing_ball_radius #include #include @@ -75,7 +75,7 @@ class Cech_blocker { std::cout << "#(" << vertex << ")#"; #endif // DEBUG_TRACES } - Filtration_value radius = Gudhi::Radius_distance()(points); + Filtration_value radius = Gudhi::Minimal_enclosing_ball_radius()(points); #ifdef DEBUG_TRACES if (radius > cc_ptr_->max_radius()) std::cout << "radius > max_radius => expansion is blocked\n"; diff --git a/src/Cech_complex/test/test_cech_complex.cpp b/src/Cech_complex/test/test_cech_complex.cpp index 4aa85057..8658729b 100644 --- a/src/Cech_complex/test/test_cech_complex.cpp +++ b/src/Cech_complex/test/test_cech_complex.cpp @@ -111,10 +111,10 @@ BOOST_AUTO_TEST_CASE(Cech_complex_for_documentation) { std::cout << vertex << ","; vp.push_back(points.at(vertex)); } - std::cout << ") - distance =" << Gudhi::Radius_distance()(vp.at(0), vp.at(1)) << + std::cout << ") - distance =" << Gudhi::Minimal_enclosing_ball_radius()(vp.at(0), vp.at(1)) << " - filtration =" << st.filtration(f_simplex) << std::endl; BOOST_CHECK(vp.size() == 2); - GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), Gudhi::Radius_distance()(vp.at(0), vp.at(1))); + GUDHI_TEST_FLOAT_EQUALITY_CHECK(st.filtration(f_simplex), Gudhi::Minimal_enclosing_ball_radius()(vp.at(0), vp.at(1))); } } diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 93956a69..429a5fa7 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -70,9 +70,9 @@ class Euclidean_distance { } }; -/** @brief Compute the squared radius between Points given by a range of coordinates. The points are assumed to - * have the same dimension. */ -class Radius_distance { +/** @brief Compute the radius of the minimal enclosing ball between Points given by a range of coordinates. + * The points are assumed to have the same dimension. */ +class Minimal_enclosing_ball_radius { public: // boost::range_value is not SFINAE-friendly so we cannot use it in the return type template< typename Point > @@ -92,7 +92,7 @@ class Radius_distance { Min_sphere ms(point_cloud.begin()->end() - point_cloud.begin()->begin(), point_cloud.begin(),point_cloud.end()); #ifdef DEBUG_TRACES - std::cout << "Radius_distance = " << std::sqrt(ms.squared_radius()) << " | nb points = " + std::cout << "Minimal_enclosing_ball_radius = " << std::sqrt(ms.squared_radius()) << " | nb points = " << point_cloud.end() - point_cloud.begin() << " | dimension = " << point_cloud.begin()->end() - point_cloud.begin()->begin() << std::endl; #endif // DEBUG_TRACES -- cgit v1.2.3 From b69cc713465675a9bab998cb0688eb91390978a6 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 22 Mar 2018 15:12:17 +0000 Subject: code review : use std::begin, std::end and boost::size git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3305 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e59699bc13ae66476001ef5f648759fef68ee76a --- src/Cech_complex/include/gudhi/Cech_complex.h | 12 ++++++------ src/common/include/gudhi/distance_functions.h | 9 ++++----- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'src/common') diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h index 8b1a9221..bfad8b77 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex.h +++ b/src/Cech_complex/include/gudhi/Cech_complex.h @@ -48,8 +48,8 @@ namespace cech_complex { * \tparam SimplicialComplexForProximityGraph furnishes `Vertex_handle` and `Filtration_value` type definition required * by `Gudhi::Proximity_graph`. * - * \tparam ForwardPointRange furnishes `.size()`, `.begin()` and `.end()` methods, and a `const_iterator` type - * definition. + * \tparam ForwardPointRange must be a range for which `std::begin()` and `std::end()` methods return input + * iterators on a point. `std::begin()` and `std::end()` methods are also required for a point. */ template class Cech_complex { @@ -64,8 +64,8 @@ class Cech_complex { * @param[in] points Range of points. * @param[in] max_radius Maximal radius value. * - * \tparam ForwardPointRange must be a range for which `.size()`, `.begin()` and `.end()` methods return input - * iterators on a point. `.begin()` and `.end()` methods are required for a point. + * \tparam ForwardPointRange must be a range for which `std::begin()` and `std::end()` methods return input + * iterators on a point. `std::begin()` and `std::end()` methods are also required for a point. * */ Cech_complex(const ForwardPointRange& points, Filtration_value max_radius) @@ -107,9 +107,9 @@ class Cech_complex { * @exception std::out_of_range In debug mode, if point position in the range is out. */ typename ForwardPointRange::const_iterator point_iterator(std::size_t vertex) const { - GUDHI_CHECK((point_cloud_.begin() + vertex) < point_cloud_.end(), + GUDHI_CHECK((std::begin(point_cloud_) + vertex) < std::end(point_cloud_), std::out_of_range("Cech_complex::point - simplicial complex is not empty")); - return (point_cloud_.begin() + vertex); + return (std::begin(point_cloud_) + vertex); } private: diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 429a5fa7..20b04000 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -28,6 +28,7 @@ #include #include +#include #include // for std::sqrt #include // for std::decay @@ -74,13 +75,11 @@ class Euclidean_distance { * The points are assumed to have the same dimension. */ class Minimal_enclosing_ball_radius { public: - // boost::range_value is not SFINAE-friendly so we cannot use it in the return type template< typename Point > typename std::iterator_traits::type>::value_type operator()(const Point& p1, const Point& p2) const { return Euclidean_distance()(p1, p2) / 2.; } - // boost::range_value is not SFINAE-friendly so we cannot use it in the return type template< typename Point_cloud, typename Point_iterator = typename boost::range_const_iterator::type, typename Point= typename std::iterator_traits::value_type, @@ -90,11 +89,11 @@ class Minimal_enclosing_ball_radius { operator()(const Point_cloud& point_cloud) const { using Min_sphere = Miniball::Miniball>; - Min_sphere ms(point_cloud.begin()->end() - point_cloud.begin()->begin(), point_cloud.begin(),point_cloud.end()); + Min_sphere ms(boost::size(*point_cloud.begin()), point_cloud.begin(),point_cloud.end()); #ifdef DEBUG_TRACES std::cout << "Minimal_enclosing_ball_radius = " << std::sqrt(ms.squared_radius()) << " | nb points = " - << point_cloud.end() - point_cloud.begin() << " | dimension = " - << point_cloud.begin()->end() - point_cloud.begin()->begin() << std::endl; + << boost::size(point_cloud) << " | dimension = " + << boost::size(*point_cloud.begin()) << std::endl; #endif // DEBUG_TRACES return std::sqrt(ms.squared_radius()); -- cgit v1.2.3 From 564427b6cad42ad98e9633589b128c07674c1dd6 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 28 Mar 2018 09:58:12 +0000 Subject: Fix header that was not pointing on the correct web site. Cpp documentation header was not good git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3310 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 520635bb2f09419b4b70f71c0838d45ae15354b3 --- src/common/doc/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/doc/header.html b/src/common/doc/header.html index d69b28fa..2f54e68d 100644 --- a/src/common/doc/header.html +++ b/src/common/doc/header.html @@ -9,7 +9,7 @@ $projectname: $title $title - + -- cgit v1.2.3 From a6b1719067462f93a7ee3b7f8f632b85fe27117d Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 3 Apr 2018 08:40:05 +0000 Subject: Add warnings for rips persistence from correlation matrix (points under the diagonal). Use range instead of vector in write_persistence_intervals_to_stream git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@3326 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ea0fdc32c91f1927c5a9f2a3864360895ce8128a --- src/Rips_complex/doc/Intro_rips_complex.h | 3 + src/Rips_complex/utilities/ripscomplex.md | 5 + .../include/gudhi/writing_persistence_to_file.h | 212 ++++++++------------- src/cython/doc/rips_complex_user.rst | 5 + ...istence_from_correlation_matrix_file_example.py | 5 + 5 files changed, 93 insertions(+), 137 deletions(-) (limited to 'src/common') diff --git a/src/Rips_complex/doc/Intro_rips_complex.h b/src/Rips_complex/doc/Intro_rips_complex.h index 3f02206b..496c4218 100644 --- a/src/Rips_complex/doc/Intro_rips_complex.h +++ b/src/Rips_complex/doc/Intro_rips_complex.h @@ -170,6 +170,9 @@ namespace rips_complex { * All the other constructions discussed for Rips complex for distance matrix can be also performed for Rips complexes * construction from correlation matrices. * + * @warning As persistence diagrams points will be under the diagonal, bottleneck distance and persistence graphical + * tool will not work properly, this is a known issue. + * */ /** @} */ // end defgroup rips_complex diff --git a/src/Rips_complex/utilities/ripscomplex.md b/src/Rips_complex/utilities/ripscomplex.md index 3f064e67..857e6293 100644 --- a/src/Rips_complex/utilities/ripscomplex.md +++ b/src/Rips_complex/utilities/ripscomplex.md @@ -68,3 +68,8 @@ Please refer to data/correlation_matrix/lower_triangular_correlation_matrix.csv **Example** `rips_correlation_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0` + +**Warning** + +As persistence diagrams points will be under the diagonal, bottleneck distance and persistence graphical tool will not work +properly, this is a known issue. diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index 5457cf48..5020b5fb 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -29,150 +29,88 @@ namespace Gudhi { - /** -* This is a class to store persistence intervals. Its main purpose is to +* This is a class to store persistence intervals. Its main purpose is to * exchange data in between different packages and provide unified way -* of writing a collection of persistence intervals to file. +* of writing a collection of persistence intervals to file. **/ -template -class Persistence_interval_common -{ -public: - /** - * Constructor taking as an input birth and death of the pair. - **/ - Persistence_interval_common( Filtration_type birth , Filtration_type death ): - birth_(birth),death_(death),dimension_(std::numeric_limits::max), - arith_element_(std::numeric_limits::max() ){} - - /** - * Constructor taking as an input birth, death and dimension of the pair. - **/ - Persistence_interval_common( Filtration_type birth , Filtration_type death, - unsigned dim ): - birth_(birth),death_(death),dimension_(dim), - arith_element_(std::numeric_limits::max()){} - - /** - * Constructor taking as an input birth, death, dimension of the pair as well - * as the number p such that this interval is present over Z_p field. - **/ - Persistence_interval_common( Filtration_type birth , Filtration_type death, - unsigned dim , Coefficient_field field ): - birth_(birth),death_(death),dimension_(dim), - arith_element_(field){} - - /** - * Operator to compare two persistence pairs. During the comparision all the - * fields: birth, death, dimensiona and arith_element_ are taken into account - * and they all have to be equal for two pairs to be equal. - **/ - inline bool operator == ( const Persistence_interval_common &i2) - { - return ( - (this->birth_ == i2.birth_) && (this->death_ == i2.death_) && - (this->dimension_ == i2.dimension_) && (this->arith_element_ == i2.arith_element_) - ); - } - - /** - * Check if two persistence paris are not equal. - **/ - inline bool operator != ( const Persistence_interval_common &i2) - { - return (!((*this)==i2)); - } - - - /** - * Operator to compare objects of a type Persistence_interval_common. - * One intervals is smaller than the other if it has lower persistence. - * Note that this operator do not take Arith_element into account when doing comparisions. - **/ - inline bool operator < ( const Persistence_interval_common &i2) - { - return fabs( this->death_-this->birth_ ) < fabs( i2.death_-i2.birth_ ); - //if ( this->birth_ < i2.birth_ ) - //{ - // return true; - //} - //else - //{ - // if ( this->birth_ > i2.birth_ ) - // { - // return false; - // } - // else - // { - // //in this case this->birth_ == i2.birth_ - // if ( this->death_ > i2.death_ ) - // { - // return true; - // } - // else - // { - // if ( this->death_ < i2.death_ ) - // { - // return false; - // } - // else - // { - // //in this case this->death_ == i2.death_ - // if ( this->dimension_ < i2.dimension_ ) - // { - // return true; - // } - // else - // { - // //in this case this->dimension >= i2.dimension - // return false; - // } - // } - // } - // } - //} - } - - friend std::ostream& operator<<(std::ostream& out, const Persistence_interval_common& it) - { - if ( it.arith_element_ != std::numeric_limits::max() ) - { - out << it.arith_element_ << " "; - } - if ( it.dimension_ != std::numeric_limits::max() ) - { - out << it.dimension_ << " "; - } - out << it.birth_ << " " << it.death_ << " "; - return out; - } - -private: - Filtration_type birth_; - Filtration_type death_; - unsigned dimension_; - Coefficient_field arith_element_; -};//Persistence_interval_common +template +class Persistence_interval_common { + public: + /** + * Constructor taking as an input birth and death of the pair. + **/ + Persistence_interval_common(Filtration_type birth, Filtration_type death) + : birth_(birth), + death_(death), + dimension_(std::numeric_limits::max), + arith_element_(std::numeric_limits::max()) {} + /** + * Constructor taking as an input birth, death and dimension of the pair. + **/ + Persistence_interval_common(Filtration_type birth, Filtration_type death, unsigned dim) + : birth_(birth), death_(death), dimension_(dim), arith_element_(std::numeric_limits::max()) {} -/** - * This function write a vector to a stream -**/ -template -void write_persistence_intervals_to_stream( -const std::vector< Persistence_interval_common >& intervals, -//TODO: change to ranges when it is clear how to do that. - std::ostream& out = std::cout ) -{ - for ( auto interval : intervals ) - { - out << interval << "\n"; - } -}//write_persistence_intervals_to_stream + /** +* Constructor taking as an input birth, death, dimension of the pair as well +* as the number p such that this interval is present over Z_p field. +**/ + Persistence_interval_common(Filtration_type birth, Filtration_type death, unsigned dim, Coefficient_field field) + : birth_(birth), death_(death), dimension_(dim), arith_element_(field) {} + + /** + * Operator to compare two persistence pairs. During the comparision all the + * fields: birth, death, dimensiona and arith_element_ are taken into account + * and they all have to be equal for two pairs to be equal. + **/ + inline bool operator==(const Persistence_interval_common& i2) { + return ((this->birth_ == i2.birth_) && (this->death_ == i2.death_) && (this->dimension_ == i2.dimension_) && + (this->arith_element_ == i2.arith_element_)); + } + + /** + * Check if two persistence paris are not equal. + **/ + inline bool operator!=(const Persistence_interval_common& i2) { return (!((*this) == i2)); } + /** + * Operator to compare objects of a type Persistence_interval_common. + * One intervals is smaller than the other if it has lower persistence. + * Note that this operator do not take Arith_element into account when doing comparisions. + **/ + inline bool operator<(const Persistence_interval_common& i2) { + return fabs(this->death_ - this->birth_) < fabs(i2.death_ - i2.birth_); + } + friend std::ostream& operator<<(std::ostream& out, const Persistence_interval_common& it) { + if (it.arith_element_ != std::numeric_limits::max()) { + out << it.arith_element_ << " "; + } + if (it.dimension_ != std::numeric_limits::max()) { + out << it.dimension_ << " "; + } + out << it.birth_ << " " << it.death_ << " "; + return out; + } + private: + Filtration_type birth_; + Filtration_type death_; + unsigned dimension_; + Coefficient_field arith_element_; +}; + +/** + * This function write a vector to a stream +**/ +template +void write_persistence_intervals_to_stream(const Persistence_interval_range& intervals, + std::ostream& out = std::cout) { + for (auto interval : intervals) { + out << interval << "\n"; + } +} } -#endif //WRITING_PERSISTENCE_TO_FILE_H +#endif // WRITING_PERSISTENCE_TO_FILE_H diff --git a/src/cython/doc/rips_complex_user.rst b/src/cython/doc/rips_complex_user.rst index b80ff7fe..7738aef0 100644 --- a/src/cython/doc/rips_complex_user.rst +++ b/src/cython/doc/rips_complex_user.rst @@ -305,3 +305,8 @@ until dimension 1 - one skeleton graph in other words), the output is: [2, 4] -> 0.97 [0, 3] -> 0.99 [1, 3] -> 0.99 + +.. note:: + As persistence diagrams points will be under the diagonal, + bottleneck distance and persistence graphical tool will not work properly, + this is a known issue. 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 ad990fdc..aa82ef71 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 @@ -49,6 +49,11 @@ if not (-1. < args.min_edge_correlation < 1.): print("Wrong value of the treshold corelation (should be between -1 and 1).") sys.exit(1) +print("#####################################################################") +print("Caution: as persistence diagrams points will be under the diagonal,") +print("bottleneck distance and persistence graphical tool will not work") +print("properly, this is a known issue.") + print("#####################################################################") print("RipsComplex creation from correlation matrix read in a csv file") -- cgit v1.2.3 From f9fa3467af7d1cb3e1797170d62c0cc6f87f8cf4 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 3 Apr 2018 14:45:54 +0000 Subject: Add explicit operator< to fix sort bug git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3331 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d1a70cdbae311f1376e24d61568471d81b7f0df1 --- src/common/include/gudhi/writing_persistence_to_file.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common') diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index 5020b5fb..49ccef84 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -101,6 +101,11 @@ class Persistence_interval_common { Coefficient_field arith_element_; }; +template +bool operator<(const Persistence_interval_common& i1, + const Persistence_interval_common& i2) { + return i1.operator<(i2); + } /** * This function write a vector to a stream **/ -- cgit v1.2.3 From 423e06352d4498361ee81d6a23aa2c77dd58d1c8 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 3 Apr 2018 15:05:53 +0000 Subject: Try to fix operator< for std::sort on CentOS git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3332 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: caaeb02c38a8adc8c09321e534f9b73181450acf --- src/common/include/gudhi/writing_persistence_to_file.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/common') diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index 49ccef84..766dd317 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -79,7 +79,7 @@ class Persistence_interval_common { * One intervals is smaller than the other if it has lower persistence. * Note that this operator do not take Arith_element into account when doing comparisions. **/ - inline bool operator<(const Persistence_interval_common& i2) { + bool operator<(const Persistence_interval_common& i2) const { return fabs(this->death_ - this->birth_) < fabs(i2.death_ - i2.birth_); } @@ -101,11 +101,6 @@ class Persistence_interval_common { Coefficient_field arith_element_; }; -template -bool operator<(const Persistence_interval_common& i1, - const Persistence_interval_common& i2) { - return i1.operator<(i2); - } /** * This function write a vector to a stream **/ @@ -116,6 +111,7 @@ void write_persistence_intervals_to_stream(const Persistence_interval_range& int out << interval << "\n"; } } + } #endif // WRITING_PERSISTENCE_TO_FILE_H -- cgit v1.2.3 From c06596e61c92f54a01756e1ba1babaff800f0f02 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 3 Apr 2018 15:25:23 +0000 Subject: Modify the correct signature to operator== and != git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3333 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 936c6abcb75e16cc569368e45e87feaa409e0890 --- src/common/include/gudhi/writing_persistence_to_file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index 766dd317..0e79704b 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -64,7 +64,7 @@ class Persistence_interval_common { * fields: birth, death, dimensiona and arith_element_ are taken into account * and they all have to be equal for two pairs to be equal. **/ - inline bool operator==(const Persistence_interval_common& i2) { + bool operator==(const Persistence_interval_common& i2) const { return ((this->birth_ == i2.birth_) && (this->death_ == i2.death_) && (this->dimension_ == i2.dimension_) && (this->arith_element_ == i2.arith_element_)); } @@ -72,7 +72,7 @@ class Persistence_interval_common { /** * Check if two persistence paris are not equal. **/ - inline bool operator!=(const Persistence_interval_common& i2) { return (!((*this) == i2)); } + bool operator!=(const Persistence_interval_common& i2) const { return (!((*this) == i2)); } /** * Operator to compare objects of a type Persistence_interval_common. -- cgit v1.2.3 From dc1a4ce409292138cf1380ca673a72eaae67675a Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 4 Apr 2018 08:11:52 +0000 Subject: Fix max issue on MacOS clang git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3337 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 89cd68f9abd58a43553d9ca2d54e776374557f26 --- src/common/include/gudhi/writing_persistence_to_file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h index 0e79704b..4c5ce918 100644 --- a/src/common/include/gudhi/writing_persistence_to_file.h +++ b/src/common/include/gudhi/writing_persistence_to_file.h @@ -43,7 +43,7 @@ class Persistence_interval_common { Persistence_interval_common(Filtration_type birth, Filtration_type death) : birth_(birth), death_(death), - dimension_(std::numeric_limits::max), + dimension_(std::numeric_limits::max()), arith_element_(std::numeric_limits::max()) {} /** -- cgit v1.2.3 From d9b4497284de73f14387a170388bf8bcd4207436 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 4 Apr 2018 09:12:15 +0000 Subject: No need to repeat title, automatically done by the website git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3338 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 51d295377d2b3235e9316f199bf95d3c5aeaeab3 --- src/Alpha_complex/utilities/alphacomplex.md | 3 --- src/Bitmap_cubical_complex/utilities/cubicalcomplex.md | 2 -- src/Bottleneck_distance/utilities/bottleneckdistance.md | 2 -- src/Nerve_GIC/utilities/covercomplex.md | 3 --- src/Rips_complex/utilities/ripscomplex.md | 2 -- src/Witness_complex/utilities/witnesscomplex.md | 3 --- src/common/utilities/pointsetgenerator.md | 4 ---- 7 files changed, 19 deletions(-) (limited to 'src/common') diff --git a/src/Alpha_complex/utilities/alphacomplex.md b/src/Alpha_complex/utilities/alphacomplex.md index ede749a9..0fe98837 100644 --- a/src/Alpha_complex/utilities/alphacomplex.md +++ b/src/Alpha_complex/utilities/alphacomplex.md @@ -10,9 +10,6 @@ Leave the lines above as it is required by the web site generator 'Jekyll' {:/comment} -# Alpha complex # - - ## alpha_complex_persistence ## This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. diff --git a/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md b/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md index a1bb9007..5b0404c3 100644 --- a/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md +++ b/src/Bitmap_cubical_complex/utilities/cubicalcomplex.md @@ -10,8 +10,6 @@ Leave the lines above as it is required by the web site generator 'Jekyll' {:/comment} -# Cubical complex# - ## cubical_complex_persistence ## This program computes persistent homology, by using the Bitmap_cubical_complex class, of cubical complexes provided in text files in Perseus style. See [here](/doc/latest/fileformats.html#FileFormatsPerseus) for a description of the file format. diff --git a/src/Bottleneck_distance/utilities/bottleneckdistance.md b/src/Bottleneck_distance/utilities/bottleneckdistance.md index f2749acc..939eb911 100644 --- a/src/Bottleneck_distance/utilities/bottleneckdistance.md +++ b/src/Bottleneck_distance/utilities/bottleneckdistance.md @@ -10,8 +10,6 @@ Leave the lines above as it is required by the web site generator 'Jekyll' {:/comment} -# Bottleneck distance # - ## bottleneck_read_file_example ## This program computes the Bottleneck distance between two persistence diagram files. diff --git a/src/Nerve_GIC/utilities/covercomplex.md b/src/Nerve_GIC/utilities/covercomplex.md index 6d16d16f..683c1b75 100644 --- a/src/Nerve_GIC/utilities/covercomplex.md +++ b/src/Nerve_GIC/utilities/covercomplex.md @@ -10,9 +10,6 @@ Leave the lines above as it is required by the web site generator 'Jekyll' {:/comment} -# Cover complex # - - ## Nerve ## This program builds the Nerve of a point cloud sampled on an OFF file. The cover C comes from the preimages of intervals covering a coordinate function, diff --git a/src/Rips_complex/utilities/ripscomplex.md b/src/Rips_complex/utilities/ripscomplex.md index 84f40cc1..6df49310 100644 --- a/src/Rips_complex/utilities/ripscomplex.md +++ b/src/Rips_complex/utilities/ripscomplex.md @@ -10,8 +10,6 @@ Leave the lines above as it is required by the web site generator 'Jekyll' {:/comment} -# Rips complex # - ## rips_persistence ## This program computes the persistent homology with coefficient field *Z/pZ* of a Rips complex defined on a set of input points, using Euclidean distance. The output diagram contains one bar per line, written with the convention: diff --git a/src/Witness_complex/utilities/witnesscomplex.md b/src/Witness_complex/utilities/witnesscomplex.md index 3be9bc55..da453cce 100644 --- a/src/Witness_complex/utilities/witnesscomplex.md +++ b/src/Witness_complex/utilities/witnesscomplex.md @@ -10,9 +10,6 @@ Leave the lines above as it is required by the web site generator 'Jekyll' {:/comment} -# Witness complex # - - For more details about the witness complex, please read the [user manual of the package](/doc/latest/group__witness__complex.html). ## weak_witness_persistence ## diff --git a/src/common/utilities/pointsetgenerator.md b/src/common/utilities/pointsetgenerator.md index 3b23e668..c8c819b7 100644 --- a/src/common/utilities/pointsetgenerator.md +++ b/src/common/utilities/pointsetgenerator.md @@ -10,10 +10,6 @@ Leave the lines above as it is required by the web site generator 'Jekyll' {:/comment} -# Miscellaneous # - -## off_file_from_shape_generator ## - Generates a pointset and save it in an OFF file. Command-line is: ``` -- cgit v1.2.3 From 1648030e27e828f92c6ae109c96190f986cdec8b Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 9 Apr 2018 08:53:50 +0000 Subject: Doc review: Fix main page cech complex explaination git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3354 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 0871ae5a851c40e880625a08f470277f93476864 --- src/common/doc/main_page.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 3851dde7..30d4e71b 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -42,8 +42,8 @@ - \subsection CechComplexDataStructure Cech complex - \image html "cech_complex_representation.png" "Cech complex representation" + \subsection CechComplexDataStructure ÄŒech complex + \image html "cech_complex_representation.png" "ÄŒech complex representation" -- cgit v1.2.3 From be6997e1cb3b7e6feeb3ece37437f02e6c60a18b Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 10 Apr 2018 16:06:27 +0000 Subject: Doc review : Gudhi::Proximity_graph and Gudhi::Radius_distance must be links in the doc git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3370 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fc57faf137316ae07e06491482e0756fbacaf479 --- src/common/include/gudhi/distance_functions.h | 22 ++++++++++++++++++++-- .../include/gudhi/graph_simplicial_complex.h | 6 ++++++ 2 files changed, 26 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 20b04000..9ab35fb1 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -75,11 +75,29 @@ class Euclidean_distance { * The points are assumed to have the same dimension. */ class Minimal_enclosing_ball_radius { public: + /** \brief Minimal_enclosing_ball_radius from two points. + * + * @param[in] point_1 First point. + * @param[in] point_2 second point. + * @return The minimal enclosing ball radius for the two points (aka. Euclidean distance / 2.). + * + * \tparam Point must be a range of Cartesian coordinates. + * + */ template< typename Point > typename std::iterator_traits::type>::value_type - operator()(const Point& p1, const Point& p2) const { - return Euclidean_distance()(p1, p2) / 2.; + operator()(const Point& point_1, const Point& point_2) const { + return Euclidean_distance()(point_1, point_2) / 2.; } + /** \brief Minimal_enclosing_ball_radius from a point cloud. + * + * @param[in] point_cloud The points. + * @return The minimal enclosing ball radius for the points. + * + * \tparam Point_cloud must be a range of points with Cartesian coordinates. + * Point_cloud is a range over a range of Coordinate. + * + */ template< typename Point_cloud, typename Point_iterator = typename boost::range_const_iterator::type, typename Point= typename std::iterator_traits::value_type, diff --git a/src/common/include/gudhi/graph_simplicial_complex.h b/src/common/include/gudhi/graph_simplicial_complex.h index d84421b2..a6126182 100644 --- a/src/common/include/gudhi/graph_simplicial_complex.h +++ b/src/common/include/gudhi/graph_simplicial_complex.h @@ -42,6 +42,12 @@ struct vertex_filtration_t { typedef boost::vertex_property_tag kind; }; +/** \brief Proximity_graph contains the vertices and edges with their filtration values in order to store the result + * of `Gudhi::compute_proximity_graph` function. + * + * \tparam SimplicialComplexForProximityGraph furnishes `Filtration_value` type definition. + * + */ template using Proximity_graph = typename boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS , boost::property < vertex_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value > -- 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/common') 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 00a3424bd68ced3e2d159acf8b2e73f515a3d88b Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 15 May 2018 19:55:31 +0000 Subject: CMake minimal version is now 3.1 Compilation flags are now externalized in cmake/modules Add NO_POLICY_SCOPE for GUDHI_third_parties to fix warnings Try to fix CGAL 4.12 that is no more setting CGAL_LIBRARIES git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cmake_v3_vincent@3445 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 0ac7613f016e28cc634606f76e85ecaf5bacb2d4 --- CMakeLists.txt | 29 ++++------------ src/Alpha_complex/example/CMakeLists.txt | 1 - src/Alpha_complex/test/CMakeLists.txt | 1 - src/Alpha_complex/utilities/CMakeLists.txt | 1 - src/Bitmap_cubical_complex/example/CMakeLists.txt | 1 - src/Bitmap_cubical_complex/test/CMakeLists.txt | 1 - .../utilities/CMakeLists.txt | 1 - src/Bottleneck_distance/benchmark/CMakeLists.txt | 1 - src/Bottleneck_distance/example/CMakeLists.txt | 1 - src/Bottleneck_distance/test/CMakeLists.txt | 1 - src/Bottleneck_distance/utilities/CMakeLists.txt | 1 - src/CMakeLists.txt | 39 ++++++---------------- src/Contraction/example/CMakeLists.txt | 1 - src/GudhUI/CMakeLists.txt | 3 +- src/Nerve_GIC/example/CMakeLists.txt | 7 ++-- src/Nerve_GIC/test/CMakeLists.txt | 1 - src/Nerve_GIC/utilities/CMakeLists.txt | 1 - .../example/CMakeLists.txt | 1 - .../test/CMakeLists.txt | 1 - .../utilities/persistence_heat_maps/CMakeLists.txt | 1 - .../utilities/persistence_intervals/CMakeLists.txt | 1 - .../persistence_landscapes/CMakeLists.txt | 1 - .../persistence_landscapes_on_grid/CMakeLists.txt | 1 - .../utilities/persistence_vectors/CMakeLists.txt | 1 - src/Persistent_cohomology/benchmark/CMakeLists.txt | 2 -- src/Persistent_cohomology/example/CMakeLists.txt | 1 - src/Persistent_cohomology/test/CMakeLists.txt | 1 - src/Rips_complex/example/CMakeLists.txt | 1 - src/Rips_complex/test/CMakeLists.txt | 1 - src/Rips_complex/utilities/CMakeLists.txt | 1 - src/Simplex_tree/example/CMakeLists.txt | 1 - src/Simplex_tree/test/CMakeLists.txt | 1 - src/Skeleton_blocker/example/CMakeLists.txt | 1 - src/Skeleton_blocker/test/CMakeLists.txt | 1 - src/Spatial_searching/example/CMakeLists.txt | 1 - src/Spatial_searching/test/CMakeLists.txt | 1 - src/Subsampling/example/CMakeLists.txt | 1 - src/Subsampling/test/CMakeLists.txt | 1 - src/Tangential_complex/benchmark/CMakeLists.txt | 1 - src/Tangential_complex/example/CMakeLists.txt | 1 - src/Tangential_complex/test/CMakeLists.txt | 1 - src/Witness_complex/example/CMakeLists.txt | 1 - src/Witness_complex/test/CMakeLists.txt | 1 - src/Witness_complex/utilities/CMakeLists.txt | 1 - src/cmake/modules/GUDHI_compilation_flags.cmake | 36 ++++++++++++++++++++ src/common/example/CMakeLists.txt | 1 - src/common/test/CMakeLists.txt | 1 - src/common/utilities/CMakeLists.txt | 1 - src/cython/CMakeLists.txt | 6 ++-- 49 files changed, 60 insertions(+), 104 deletions(-) create mode 100644 src/cmake/modules/GUDHI_compilation_flags.cmake (limited to 'src/common') diff --git a/CMakeLists.txt b/CMakeLists.txt index 10373f75..08291b54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,35 +1,18 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.1) + project(GUDHIdev) include(CMakeGUDHIVersion.txt) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/cmake/modules/") -enable_testing() - -# This variable is used by Cython CMakeLists.txt to know its path +# This variable is used by Cython CMakeLists.txt and by GUDHI_third_party_libraries to know its path set(GUDHI_CYTHON_PATH "src/cython") -# For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH -include(GUDHI_third_party_libraries) - -if(MSVC) - # Turn off some VC++ warnings - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4668 /wd4311 /wd4800 /wd4820 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018") -else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic") -endif() -if(CMAKE_BUILD_TYPE MATCHES Debug) - message("++ Debug compilation flags are: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") -else() - message("++ Release compilation flags are: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") -endif() +# For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH +include(GUDHI_third_party_libraries NO_POLICY_SCOPE) -if (DEBUG_TRACES) - # For programs to be more verbose - message(STATUS "DEBUG_TRACES are activated") - add_definitions(-DDEBUG_TRACES) -endif() +include(GUDHI_compilation_flags) # Add your new module in the list, order is not important include(GUDHI_modules) diff --git a/src/Alpha_complex/example/CMakeLists.txt b/src/Alpha_complex/example/CMakeLists.txt index 5bf553e9..2fc62452 100644 --- a/src/Alpha_complex/example/CMakeLists.txt +++ b/src/Alpha_complex/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Alpha_complex_examples) # need CGAL 4.7 diff --git a/src/Alpha_complex/test/CMakeLists.txt b/src/Alpha_complex/test/CMakeLists.txt index 9e0b3b3c..9255d3db 100644 --- a/src/Alpha_complex/test/CMakeLists.txt +++ b/src/Alpha_complex/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Alpha_complex_tests) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) diff --git a/src/Alpha_complex/utilities/CMakeLists.txt b/src/Alpha_complex/utilities/CMakeLists.txt index a2dfac20..7ace6064 100644 --- a/src/Alpha_complex/utilities/CMakeLists.txt +++ b/src/Alpha_complex/utilities/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Alpha_complex_utilities) if(CGAL_FOUND) diff --git a/src/Bitmap_cubical_complex/example/CMakeLists.txt b/src/Bitmap_cubical_complex/example/CMakeLists.txt index 99304aa4..dc659f2d 100644 --- a/src/Bitmap_cubical_complex/example/CMakeLists.txt +++ b/src/Bitmap_cubical_complex/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Bitmap_cubical_complex_examples) add_executable ( Random_bitmap_cubical_complex Random_bitmap_cubical_complex.cpp ) diff --git a/src/Bitmap_cubical_complex/test/CMakeLists.txt b/src/Bitmap_cubical_complex/test/CMakeLists.txt index 02b026f2..8b43632a 100644 --- a/src/Bitmap_cubical_complex/test/CMakeLists.txt +++ b/src/Bitmap_cubical_complex/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Bitmap_cubical_complex_tests) include(GUDHI_test_coverage) diff --git a/src/Bitmap_cubical_complex/utilities/CMakeLists.txt b/src/Bitmap_cubical_complex/utilities/CMakeLists.txt index 676a730a..416db67f 100644 --- a/src/Bitmap_cubical_complex/utilities/CMakeLists.txt +++ b/src/Bitmap_cubical_complex/utilities/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Bitmap_cubical_complex_utilities) add_executable ( cubical_complex_persistence cubical_complex_persistence.cpp ) diff --git a/src/Bottleneck_distance/benchmark/CMakeLists.txt b/src/Bottleneck_distance/benchmark/CMakeLists.txt index 20a4e47b..3105a1d5 100644 --- a/src/Bottleneck_distance/benchmark/CMakeLists.txt +++ b/src/Bottleneck_distance/benchmark/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Bottleneck_distance_benchmark) if (NOT CGAL_VERSION VERSION_LESS 4.8.1) diff --git a/src/Bottleneck_distance/example/CMakeLists.txt b/src/Bottleneck_distance/example/CMakeLists.txt index 6095d6eb..c6f10127 100644 --- a/src/Bottleneck_distance/example/CMakeLists.txt +++ b/src/Bottleneck_distance/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Bottleneck_distance_examples) if (NOT CGAL_VERSION VERSION_LESS 4.8.1) diff --git a/src/Bottleneck_distance/test/CMakeLists.txt b/src/Bottleneck_distance/test/CMakeLists.txt index 2676b82c..bb739280 100644 --- a/src/Bottleneck_distance/test/CMakeLists.txt +++ b/src/Bottleneck_distance/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Bottleneck_distance_tests) if (NOT CGAL_VERSION VERSION_LESS 4.8.1) diff --git a/src/Bottleneck_distance/utilities/CMakeLists.txt b/src/Bottleneck_distance/utilities/CMakeLists.txt index d19e3b1c..2f35885c 100644 --- a/src/Bottleneck_distance/utilities/CMakeLists.txt +++ b/src/Bottleneck_distance/utilities/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Bottleneck_distance_utilities) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 94587044..5d543018 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,12 +1,19 @@ -cmake_minimum_required(VERSION 2.6) -project(GUDHI) +cmake_minimum_required(VERSION 3.1) -include("CMakeGUDHIVersion.txt") +project(GUDHI) -enable_testing() +include(CMakeGUDHIVersion.txt) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") +# This variable is used by Cython CMakeLists.txt and by GUDHI_third_party_libraries to know its path +set(GUDHI_CYTHON_PATH "cython") + +# For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH +include(GUDHI_third_party_libraries NO_POLICY_SCOPE) + +include(GUDHI_compilation_flags) + # Add your new module in the list, order is not important include(GUDHI_modules) @@ -33,30 +40,6 @@ message("++ GUDHI_MODULES list is:\"${GUDHI_MODULES}\"") set(GUDHI_USER_VERSION_DIR ${CMAKE_SOURCE_DIR}) include(GUDHI_doxygen_target) -# This variable is used by Cython CMakeLists.txt to know its path -set(GUDHI_CYTHON_PATH "cython") -# For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH -include(GUDHI_third_party_libraries) - -if(MSVC) - # Turn off some VC++ warnings - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4668 /wd4311 /wd4800 /wd4820 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018") -else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic") -endif() - -if(CMAKE_BUILD_TYPE MATCHES Debug) - message("++ Debug compilation flags are: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") -else() - message("++ Release compilation flags are: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") -endif() - -if (DEBUG_TRACES) - message(STATUS "DEBUG_TRACES are activated") - # For programs to be more verbose - add_definitions(-DDEBUG_TRACES) -endif() - #--------------------------------------------------------------------------------------- # Gudhi compilation part include_directories(include) diff --git a/src/Contraction/example/CMakeLists.txt b/src/Contraction/example/CMakeLists.txt index a92d1685..582b7ab8 100644 --- a/src/Contraction/example/CMakeLists.txt +++ b/src/Contraction/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Contraction_examples) add_executable(RipsContraction Rips_contraction.cpp) diff --git a/src/GudhUI/CMakeLists.txt b/src/GudhUI/CMakeLists.txt index 2503a03e..b357b8f7 100644 --- a/src/GudhUI/CMakeLists.txt +++ b/src/GudhUI/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.8) project(GudhUI) # Need to find OpenGL first as find_package(Qt5) tries to #include"GL/gl.h" on some platforms @@ -38,4 +37,4 @@ if (OPENGL_FOUND) install(TARGETS GudhUI DESTINATION bin) endif() -endif(OPENGL_FOUND) \ No newline at end of file +endif(OPENGL_FOUND) diff --git a/src/Nerve_GIC/example/CMakeLists.txt b/src/Nerve_GIC/example/CMakeLists.txt index 542c6af4..fdecf86e 100644 --- a/src/Nerve_GIC/example/CMakeLists.txt +++ b/src/Nerve_GIC/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Nerve_GIC_examples) if (NOT CGAL_VERSION VERSION_LESS 4.8.1) @@ -17,11 +16,11 @@ if (NOT CGAL_VERSION VERSION_LESS 4.8.1) file(COPY "${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) add_test(NAME Nerve_GIC_example_CoordGIC COMMAND $ - "tore3D_1307.off" "0") + "${CMAKE_CURRENT_BINARY_DIR}/tore3D_1307.off" "0") add_test(NAME Nerve_GIC_example_FuncGIC COMMAND $ - "lucky_cat.off" - "lucky_cat_PCA1") + "${CMAKE_CURRENT_BINARY_DIR}/lucky_cat.off" + "${CMAKE_CURRENT_BINARY_DIR}/lucky_cat_PCA1") install(TARGETS CoordGIC DESTINATION bin) install(TARGETS FuncGIC DESTINATION bin) diff --git a/src/Nerve_GIC/test/CMakeLists.txt b/src/Nerve_GIC/test/CMakeLists.txt index c35cdff7..99263ea0 100644 --- a/src/Nerve_GIC/test/CMakeLists.txt +++ b/src/Nerve_GIC/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Graph_induced_complex_tests) if (NOT CGAL_VERSION VERSION_LESS 4.8.1) diff --git a/src/Nerve_GIC/utilities/CMakeLists.txt b/src/Nerve_GIC/utilities/CMakeLists.txt index 7a838a8c..215f9dfd 100644 --- a/src/Nerve_GIC/utilities/CMakeLists.txt +++ b/src/Nerve_GIC/utilities/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Nerve_GIC_examples) if (NOT CGAL_VERSION VERSION_LESS 4.8.1) diff --git a/src/Persistence_representations/example/CMakeLists.txt b/src/Persistence_representations/example/CMakeLists.txt index 54d719ac..33558df3 100644 --- a/src/Persistence_representations/example/CMakeLists.txt +++ b/src/Persistence_representations/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistence_representations_example) add_executable ( Persistence_representations_example_landscape_on_grid persistence_landscape_on_grid.cpp ) diff --git a/src/Persistence_representations/test/CMakeLists.txt b/src/Persistence_representations/test/CMakeLists.txt index 335a71ef..5e2b6910 100644 --- a/src/Persistence_representations/test/CMakeLists.txt +++ b/src/Persistence_representations/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistence_representations_test) include(GUDHI_test_coverage) diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt index 386e9fa5..89ef232f 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistence_representations_heat_maps_utilities) add_persistence_representation_creation_utility(create_pssk "10" "-1" "-1" "4" "-1") diff --git a/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt index 875ff45e..649b72cb 100644 --- a/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistence_representations_intervals_utilities) diff --git a/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt index d7087ed8..6b24d032 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistence_representations_landscapes_utilities) add_persistence_representation_creation_utility(create_landscapes "-1") 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 c5ea4bbf..36f3196b 100644 --- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistence_representations_lanscapes_on_grid_utilities) # Need to set grid min and max for further average, distance and scalar_product diff --git a/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt index a401c955..bc982094 100644 --- a/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt +++ b/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistence_vectors_utilities) add_persistence_representation_creation_utility(create_persistence_vectors "-1") diff --git a/src/Persistent_cohomology/benchmark/CMakeLists.txt b/src/Persistent_cohomology/benchmark/CMakeLists.txt index 8b135ba1..2bb3b0c7 100644 --- a/src/Persistent_cohomology/benchmark/CMakeLists.txt +++ b/src/Persistent_cohomology/benchmark/CMakeLists.txt @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 2.6) project(Persistent_cohomology_benchmark) - if(GMP_FOUND) if(GMPXX_FOUND) diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index 18e2913b..0f731519 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistent_cohomology_examples) add_executable(plain_homology plain_homology.cpp) diff --git a/src/Persistent_cohomology/test/CMakeLists.txt b/src/Persistent_cohomology/test/CMakeLists.txt index 45f53eb9..f8baf861 100644 --- a/src/Persistent_cohomology/test/CMakeLists.txt +++ b/src/Persistent_cohomology/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Persistent_cohomology_tests) include(GUDHI_test_coverage) diff --git a/src/Rips_complex/example/CMakeLists.txt b/src/Rips_complex/example/CMakeLists.txt index af86636b..e7772bdb 100644 --- a/src/Rips_complex/example/CMakeLists.txt +++ b/src/Rips_complex/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Rips_complex_examples) # Point cloud diff --git a/src/Rips_complex/test/CMakeLists.txt b/src/Rips_complex/test/CMakeLists.txt index 3da9c90d..745d953c 100644 --- a/src/Rips_complex/test/CMakeLists.txt +++ b/src/Rips_complex/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Rips_complex_tests) include(GUDHI_test_coverage) diff --git a/src/Rips_complex/utilities/CMakeLists.txt b/src/Rips_complex/utilities/CMakeLists.txt index deb73ff0..4b565628 100644 --- a/src/Rips_complex/utilities/CMakeLists.txt +++ b/src/Rips_complex/utilities/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Rips_complex_utilities) add_executable(rips_distance_matrix_persistence rips_distance_matrix_persistence.cpp) diff --git a/src/Simplex_tree/example/CMakeLists.txt b/src/Simplex_tree/example/CMakeLists.txt index b33b2d05..857e8518 100644 --- a/src/Simplex_tree/example/CMakeLists.txt +++ b/src/Simplex_tree/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Simplex_tree_examples) add_executable ( Simplex_tree_example_from_cliques_of_graph simplex_tree_from_cliques_of_graph.cpp ) diff --git a/src/Simplex_tree/test/CMakeLists.txt b/src/Simplex_tree/test/CMakeLists.txt index 8684ad2a..c63d8532 100644 --- a/src/Simplex_tree/test/CMakeLists.txt +++ b/src/Simplex_tree/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Simplex_tree_tests) include(GUDHI_test_coverage) diff --git a/src/Skeleton_blocker/example/CMakeLists.txt b/src/Skeleton_blocker/example/CMakeLists.txt index de70f089..0e5d2f11 100644 --- a/src/Skeleton_blocker/example/CMakeLists.txt +++ b/src/Skeleton_blocker/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Skeleton_blocker_examples) add_executable(Skeleton_blocker_example_from_simplices Skeleton_blocker_from_simplices.cpp) diff --git a/src/Skeleton_blocker/test/CMakeLists.txt b/src/Skeleton_blocker/test/CMakeLists.txt index 4a363294..19c65871 100644 --- a/src/Skeleton_blocker/test/CMakeLists.txt +++ b/src/Skeleton_blocker/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Skeleton_blocker_tests) include(GUDHI_test_coverage) diff --git a/src/Spatial_searching/example/CMakeLists.txt b/src/Spatial_searching/example/CMakeLists.txt index 4cf3d863..0f799987 100644 --- a/src/Spatial_searching/example/CMakeLists.txt +++ b/src/Spatial_searching/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Spatial_searching_examples) if(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/Spatial_searching/test/CMakeLists.txt b/src/Spatial_searching/test/CMakeLists.txt index b9da7b4e..b60ab1e3 100644 --- a/src/Spatial_searching/test/CMakeLists.txt +++ b/src/Spatial_searching/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Spatial_searching_tests) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/Subsampling/example/CMakeLists.txt b/src/Subsampling/example/CMakeLists.txt index 34400b1e..f26d107f 100644 --- a/src/Subsampling/example/CMakeLists.txt +++ b/src/Subsampling/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Subsampling_examples) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/Subsampling/test/CMakeLists.txt b/src/Subsampling/test/CMakeLists.txt index dbf97db3..924f0925 100644 --- a/src/Subsampling/test/CMakeLists.txt +++ b/src/Subsampling/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Subsampling_tests) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/Tangential_complex/benchmark/CMakeLists.txt b/src/Tangential_complex/benchmark/CMakeLists.txt index 8729e394..f136ab27 100644 --- a/src/Tangential_complex/benchmark/CMakeLists.txt +++ b/src/Tangential_complex/benchmark/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Tangential_complex_benchmark) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/Tangential_complex/example/CMakeLists.txt b/src/Tangential_complex/example/CMakeLists.txt index 16d1339d..af0dac51 100644 --- a/src/Tangential_complex/example/CMakeLists.txt +++ b/src/Tangential_complex/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Tangential_complex_examples) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/Tangential_complex/test/CMakeLists.txt b/src/Tangential_complex/test/CMakeLists.txt index 1948c8f6..902f19af 100644 --- a/src/Tangential_complex/test/CMakeLists.txt +++ b/src/Tangential_complex/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Tangential_complex_tests) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) diff --git a/src/Witness_complex/example/CMakeLists.txt b/src/Witness_complex/example/CMakeLists.txt index a8231392..3d838c0d 100644 --- a/src/Witness_complex/example/CMakeLists.txt +++ b/src/Witness_complex/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Witness_complex_examples) add_executable ( Witness_complex_example_nearest_landmark_table example_nearest_landmark_table.cpp ) diff --git a/src/Witness_complex/test/CMakeLists.txt b/src/Witness_complex/test/CMakeLists.txt index 0b523eaf..58ac60c5 100644 --- a/src/Witness_complex/test/CMakeLists.txt +++ b/src/Witness_complex/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Witness_complex_tests) include(GUDHI_test_coverage) diff --git a/src/Witness_complex/utilities/CMakeLists.txt b/src/Witness_complex/utilities/CMakeLists.txt index 125a41ff..ce5e29f2 100644 --- a/src/Witness_complex/utilities/CMakeLists.txt +++ b/src/Witness_complex/utilities/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Witness_complex_utilities) # CGAL and Eigen3 are required for Euclidean version of Witness diff --git a/src/cmake/modules/GUDHI_compilation_flags.cmake b/src/cmake/modules/GUDHI_compilation_flags.cmake new file mode 100644 index 00000000..614d3812 --- /dev/null +++ b/src/cmake/modules/GUDHI_compilation_flags.cmake @@ -0,0 +1,36 @@ +# This files manage compilation flags required by GUDHI + +include(TestCXXAcceptsFlag) + +# add a compiler flag only if it is accepted +macro(add_cxx_compiler_flag _flag) + string(REPLACE "-" "_" _flag_var ${_flag}) + check_cxx_accepts_flag("${_flag}" CXX_COMPILER_${_flag_var}_OK) + if(CXX_COMPILER_${_flag_var}_OK) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flag}") + endif() +endmacro() + +set (CMAKE_CXX_STANDARD 11) + +enable_testing() + +if(MSVC) + # Turn off some VC++ warnings + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4668 /wd4311 /wd4800 /wd4820 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018") +endif() + +add_cxx_compiler_flag("-Wall") +add_cxx_compiler_flag("-pedantic") + +if(CMAKE_BUILD_TYPE MATCHES Debug) + message("++ Debug compilation flags are: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") +else() + message("++ Release compilation flags are: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") +endif() + +if (DEBUG_TRACES) + # For programs to be more verbose + message(STATUS "DEBUG_TRACES are activated") + add_definitions(-DDEBUG_TRACES) +endif() diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt index 1273c699..04015cdc 100644 --- a/src/common/example/CMakeLists.txt +++ b/src/common/example/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Common_examples) add_executable ( vector_double_off_reader example_vector_double_points_off_reader.cpp ) diff --git a/src/common/test/CMakeLists.txt b/src/common/test/CMakeLists.txt index de3e765a..0b49fa1e 100644 --- a/src/common/test/CMakeLists.txt +++ b/src/common/test/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(Common_tests) include(GUDHI_test_coverage) diff --git a/src/common/utilities/CMakeLists.txt b/src/common/utilities/CMakeLists.txt index b3e4b436..7f1d1cd7 100644 --- a/src/common/utilities/CMakeLists.txt +++ b/src/common/utilities/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.6) project(off_file_from_shape_generator) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index b19cc550..2c21d158 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.8) project(Cython) include(CheckCXXSourceCompiles) @@ -100,12 +99,13 @@ if(CYTHON_FOUND) add_gudhi_cython_lib(${Boost_THREAD_LIBRARY}) set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${Boost_LIBRARY_DIRS}', ") endif() - + message("*** ${CGAL_HEADER_ONLY}") # Add CGAL compilation args if(CGAL_HEADER_ONLY) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_HEADER_ONLY', ") else(CGAL_HEADER_ONLY) - add_gudhi_cython_lib(${CGAL_LIBRARIES}) + message("*** ${CGAL_LIBRARY}") + add_gudhi_cython_lib(${CGAL_LIBRARY}) set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${CGAL_LIBRARIES_DIR}', ") # If CGAL is not header only, CGAL library may link with boost system, add_gudhi_cython_lib(${Boost_SYSTEM_LIBRARY}) -- cgit v1.2.3 From e996b0fd0a0aecfa3b77e0ff3780f31b1b8bab4a Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 22 May 2018 20:59:45 +0000 Subject: Add CMake 3.1 in installation requirements. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3450 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: bae61cf108841dae3ff1be5953eb9f87f1713e41 --- src/common/doc/installation.h | 5 +++-- src/cython/doc/installation.rst | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/common') diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index 25675cc5..12407c18 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -5,8 +5,9 @@ * Examples of GUDHI headers inclusion can be found in \ref demos. * * \section compiling Compiling - * The library uses c++11 and requires Boost with version 1.48.0 or - * more recent. It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. + * The library uses c++11 and requires Boost ≥ 1.48.0 + * and CMake ≥ 3.1. + * It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. * * \subsection demos Demos and examples * To build the demos and examples, run the following commands in a terminal: diff --git a/src/cython/doc/installation.rst b/src/cython/doc/installation.rst index c182f176..52c5eb49 100644 --- a/src/cython/doc/installation.rst +++ b/src/cython/doc/installation.rst @@ -3,10 +3,10 @@ Installation Compiling ********* - -The library uses c++11 and requires `Boost `_ with -version 1.48.0 or more recent. It is a multi-platform library and compiles on -Linux, Mac OSX and Visual Studio 2015. +The library uses c++11 and requires `Boost `_ ≥ 1.48.0 +and `CMake `_ ≥ 3.1. +It is a multi-platform library and compiles on Linux, Mac OSX and Visual +Studio 2015. It also requires cmake to generate makefiles, and cython to compile the library. -- cgit v1.2.3 From ef31bf2f968299589e9668e3b00ab90228ad08bf Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 5 Jun 2018 16:05:54 +0000 Subject: Add author name on main page git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3536 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7fc4d6de9bc65d51f4f0fb263b01a88adcab77d3 --- src/common/doc/main_page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 30d4e71b..db1e80ce 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -79,7 +79,7 @@
    @@ -52,8 +52,8 @@ Copyright: GPL v3
    - The Cech complex is a proximity graph that allows to construct a simplicial complex from it. - It guarantees the simplices inserted are inside a ball of a given radius.
    + The ÄŒech complex is a simplicial complex constructed from a proximity graph.
    + The set of all simplices is filtered by the radius of their minimal enclosing ball.
    User manual: \ref cech_complex - Reference manual: Gudhi::cech_complex::Cech_complex
    -- cgit v1.2.3 From dde12ef73a36913c06d33ff3f5c2df43dd209930 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 5 Jun 2018 19:44:59 +0000 Subject: Add new layout for documentation website for Doxygen (C++) and sphinx (Python) git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3539 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 2dc9edea317426fad7a7d99d849145845eb75bb9 --- src/common/doc/header.html | 109 +++++++++++++++++----------------- src/cython/doc/_templates/layout.html | 109 +++++++++++++++++----------------- 2 files changed, 110 insertions(+), 108 deletions(-) (limited to 'src/common') diff --git a/src/common/doc/header.html b/src/common/doc/header.html index 2f54e68d..4661dbbe 100644 --- a/src/common/doc/header.html +++ b/src/common/doc/header.html @@ -24,60 +24,61 @@ $extrastylesheet diff --git a/src/cython/doc/_templates/layout.html b/src/cython/doc/_templates/layout.html index c9356116..613d7d06 100644 --- a/src/cython/doc/_templates/layout.html +++ b/src/cython/doc/_templates/layout.html @@ -166,60 +166,61 @@ -- cgit v1.2.3 From e7fa347f0d0e0160e90ee2f869c8039625aaed5f Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 13 Jun 2018 07:32:36 +0000 Subject: Fix cppcheck issues git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3601 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 44cc04b1609d3b3d40382fd02d4fe15e5ba0159f --- src/Cech_complex/include/gudhi/Cech_complex.h | 1 + .../include/gudhi/read_persistence_from_file.h | 6 ++-- .../include/gudhi/Sparse_rips_complex.h | 4 +-- .../rips_correlation_matrix_persistence.cpp | 1 + src/Witness_complex/example/generators.h | 6 ++-- src/common/doc/header.html | 34 ++++++++++----------- src/common/include/gudhi/Off_reader.h | 2 +- src/common/include/gudhi/distance_functions.h | 4 +-- src/common/include/gudhi/random_point_generators.h | 3 +- .../include/gudhi/writing_persistence_to_file.h | 8 ++--- src/cython/doc/_templates/layout.html | 35 +++++++++++----------- 11 files changed, 54 insertions(+), 50 deletions(-) (limited to 'src/common') diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h index f4fb4288..f9b8a269 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex.h +++ b/src/Cech_complex/include/gudhi/Cech_complex.h @@ -30,6 +30,7 @@ #include #include // for exception management +#include 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 e0fc7107..4a2b9d68 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -57,7 +57,7 @@ std::vector > read_persistence_intervals_in_one_dimens std::string line; std::vector > barcode_initial = - read_persistence_intervals_in_dimension(filename, (int)dimension); + read_persistence_intervals_in_dimension(filename, static_cast(dimension)); std::vector > final_barcode; final_barcode.reserve(barcode_initial.size()); @@ -92,8 +92,8 @@ std::vector > read_persistence_intervals_in_one_dimens if ((barcode_initial[i].second == std::numeric_limits::infinity()) && (what_to_substitute_for_infinite_bar != -1)) { - if (barcode_initial[i].first < what_to_substitute_for_infinite_bar) // if only birth < death. - { + if (barcode_initial[i].first < what_to_substitute_for_infinite_bar) { + // if only birth < death. final_barcode.push_back( std::pair(barcode_initial[i].first, what_to_substitute_for_infinite_bar)); } diff --git a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h index 19a44b28..4dcc08ed 100644 --- a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h +++ b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h @@ -54,7 +54,7 @@ namespace rips_complex { template class Sparse_rips_complex { private: - // TODO: use a different graph where we know we can safely insert in parallel. + // TODO(MG): use a different graph where we know we can safely insert in parallel. typedef typename boost::adjacency_list, boost::property> @@ -140,7 +140,7 @@ class Sparse_rips_complex { put(vertex_filtration_t(), graph_, v, 0); } - // TODO: + // TODO(MG): // - make it parallel // - only test near-enough neighbors for (int i = 0; i < n; ++i) diff --git a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp index d4671b45..c78677d2 100644 --- a/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp +++ b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp @@ -31,6 +31,7 @@ #include #include #include // infinity +#include // for sort // Types definition using Simplex_tree = Gudhi::Simplex_tree; diff --git a/src/Witness_complex/example/generators.h b/src/Witness_complex/example/generators.h index 81566824..4b755daa 100644 --- a/src/Witness_complex/example/generators.h +++ b/src/Witness_complex/example/generators.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef EXAMPLE_WITNESS_COMPLEX_GENERATORS_H_ -#define EXAMPLE_WITNESS_COMPLEX_GENERATORS_H_ +#ifndef GENERATORS_H_ +#define GENERATORS_H_ #include #include @@ -163,4 +163,4 @@ void generate_points_torus(Point_Vector& W, int nbP, int dim) { } } -#endif // EXAMPLE_WITNESS_COMPLEX_GENERATORS_H_ +#endif // GENERATORS_H_ diff --git a/src/common/doc/header.html b/src/common/doc/header.html index 4661dbbe..56833d39 100644 --- a/src/common/doc/header.html +++ b/src/common/doc/header.html @@ -27,7 +27,7 @@ $extrastylesheet
    - Author: Clément Maria, Pawel Dlotko, Vincent Rouvreau
    + Author: Clément Maria, Pawel Dlotko, Vincent Rouvreau, Marc Glisse
    Introduced in: GUDHI 2.0.0
    Copyright: GPL v3