From c524232f734de875d69e2f190f01a6c976024368 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Thu, 14 Jun 2018 20:39:01 +0200 Subject: GUDHI 2.2.0 as released by upstream in a tarball. --- ...ex_diagram_persistence_from_off_file_example.py | 8 +-- .../example/alpha_complex_from_points_example.py | 4 +- .../alpha_rips_persistence_bottleneck_distance.py | 9 +-- cython/example/bottleneck_basic_example.py | 6 +- ...ex_diagram_persistence_from_off_file_example.py | 8 +-- ...ex_diagram_persistence_from_off_file_example.py | 8 +-- cython/example/gudhi_graphical_tools_example.py | 11 +-- ...arcode_persistence_from_perseus_file_example.py | 4 +- .../random_cubical_complex_persistence_example.py | 4 +- ...istence_from_correlation_matrix_file_example.py | 84 ++++++++++++++++++++++ ...ersistence_from_distance_matrix_file_example.py | 15 ++-- ...ex_diagram_persistence_from_off_file_example.py | 11 +-- cython/example/rips_complex_from_points_example.py | 4 +- cython/example/rips_persistence_diagram.py | 4 +- cython/example/simplex_tree_example.py | 4 +- ...complex_plain_homology_from_off_file_example.py | 13 ++-- .../witness_complex_from_nearest_landmark_table.py | 4 +- 17 files changed, 141 insertions(+), 60 deletions(-) create mode 100755 cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py (limited to 'cython/example') diff --git a/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py b/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py index b4487be4..4abe22d4 100755 --- a/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py +++ b/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 ' @@ -38,7 +38,7 @@ parser = argparse.ArgumentParser(description='AlphaComplex creation from ' 'points from the given OFF file.') parser.add_argument("-f", "--file", type=str, required=True) parser.add_argument("-a", "--max_alpha_square", type=float, default=0.5) -parser.add_argument("-b", "--band_boot", type=float, default=0.) +parser.add_argument("-b", "--band", type=float, default=0.) parser.add_argument('--no-diagram', default=False, action='store_true' , help='Flag for not to display the diagrams') args = parser.parse_args() @@ -64,7 +64,7 @@ with open(args.file, 'r') as f: print(simplex_tree.betti_numbers()) if args.no_diagram == False: - pplot = gudhi.plot_persistence_diagram(diag, band_boot=args.band_boot) + pplot = gudhi.plot_persistence_diagram(diag, band=args.band) pplot.show() else: print(args.file, "is not a valid OFF file") diff --git a/cython/example/alpha_complex_from_points_example.py b/cython/example/alpha_complex_from_points_example.py index 7d6278ce..ad73c744 100755 --- a/cython/example/alpha_complex_from_points_example.py +++ b/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/cython/example/alpha_rips_persistence_bottleneck_distance.py b/cython/example/alpha_rips_persistence_bottleneck_distance.py index ab5fc1e9..b51fa7a8 100755 --- a/cython/example/alpha_rips_persistence_bottleneck_distance.py +++ b/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 ' @@ -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/cython/example/bottleneck_basic_example.py b/cython/example/bottleneck_basic_example.py index 31cecb29..287956e7 100755 --- a/cython/example/bottleneck_basic_example.py +++ b/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,11 +25,9 @@ import gudhi """ __author__ = "Francois Godi, Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__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')]] diff --git a/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py b/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py index e3f362dc..3b29781f 100755 --- a/cython/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py +++ b/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 ' @@ -40,7 +40,7 @@ parser.add_argument("-f", "--file", type=str, required=True) parser.add_argument("-a", "--max_alpha_square", type=float, required=True) parser.add_argument("-n", "--number_of_landmarks", type=int, required=True) parser.add_argument("-d", "--limit_dimension", type=int, required=True) -parser.add_argument("-b", "--band_boot", type=float, default=0.) +parser.add_argument("-b", "--band", type=float, default=0.) parser.add_argument('--no-diagram', default=False, action='store_true' , help='Flag for not to display the diagrams') args = parser.parse_args() @@ -71,7 +71,7 @@ with open(args.file, 'r') as f: print(simplex_tree.betti_numbers()) if args.no_diagram == False: - pplot = gudhi.plot_persistence_diagram(diag, band_boot=args.band_boot) + pplot = gudhi.plot_persistence_diagram(diag, band=args.band) pplot.show() else: print(args.file, "is not a valid OFF file") diff --git a/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py b/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py index c236d992..db34962d 100755 --- a/cython/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py +++ b/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 ' @@ -40,7 +40,7 @@ parser.add_argument("-f", "--file", type=str, required=True) parser.add_argument("-a", "--max_alpha_square", type=float, required=True) parser.add_argument("-n", "--number_of_landmarks", type=int, required=True) parser.add_argument("-d", "--limit_dimension", type=int, required=True) -parser.add_argument("-b", "--band_boot", type=float, default=0.) +parser.add_argument("-b", "--band", type=float, default=0.) parser.add_argument('--no-diagram', default=False, action='store_true' , help='Flag for not to display the diagrams') args = parser.parse_args() @@ -71,7 +71,7 @@ with open(args.file, 'r') as f: print(simplex_tree.betti_numbers()) if args.no_diagram == False: - pplot = gudhi.plot_persistence_diagram(diag, band_boot=args.band_boot) + pplot = gudhi.plot_persistence_diagram(diag, band=args.band) pplot.show() else: print(args.file, "is not a valid OFF file") diff --git a/cython/example/gudhi_graphical_tools_example.py b/cython/example/gudhi_graphical_tools_example.py index ed87806b..ac3d146c 100755 --- a/cython/example/gudhi_graphical_tools_example.py +++ b/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,14 +25,9 @@ import gudhi """ __author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" +__copyright__ = "Copyright (C) 2016 Inria" __license__ = "GPL v3" -print("#####################################################################") -print("Show palette colors values for dimension") - -gudhi.show_palette_values() - print("#####################################################################") print("Show barcode persistence example") @@ -50,5 +45,5 @@ pplot.show() print("#####################################################################") print("Show diagram persistence example with a confidence band") -pplot = gudhi.plot_persistence_diagram(persistence, band_boot=0.2) +pplot = gudhi.plot_persistence_diagram(persistence, band=0.2) pplot.show() diff --git a/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py b/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py index 00334121..5f968bf1 100755 --- a/cython/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py +++ b/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/cython/example/random_cubical_complex_persistence_example.py b/cython/example/random_cubical_complex_persistence_example.py index c832d6bf..80ff2452 100755 --- a/cython/example/random_cubical_complex_persistence_example.py +++ b/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/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py b/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py new file mode 100755 index 00000000..0c9dfc43 --- /dev/null +++ b/cython/example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python + +import gudhi +import sys +import argparse + +"""This file is part of the Gudhi Library. The Gudhi library + (Geometric Understanding in Higher Dimensions) is a generic C++ + library for computational topology. + + Author(s): Vincent Rouvreau + + 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__ = "Vincent Rouvreau" +__copyright__ = "Copyright (C) 2017 Inria" +__license__ = "GPL v3" + +parser = argparse.ArgumentParser(description='RipsComplex creation from ' + 'a correlation matrix read in a csv file.', + epilog='Example: ' + 'example/rips_complex_diagram_persistence_from_correlation_matrix_file_example.py ' + '-f ../data/correlation_matrix/lower_triangular_correlation_matrix.csv -e 12.0 -d 3' + '- Constructs a Rips complex with the ' + 'correlation matrix from the given csv file.') +parser.add_argument("-f", "--file", type=str, required=True) +parser.add_argument("-c", "--min_edge_correlation", type=float, default=0.5) +parser.add_argument("-d", "--max_dimension", type=int, default=1) +parser.add_argument("-b", "--band", type=float, default=0.) +parser.add_argument('--no-diagram', default=False, action='store_true' , help='Flag for not to display the diagrams') + +args = parser.parse_args() + +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") + +message = "RipsComplex with min_edge_correlation=" + repr(args.min_edge_correlation) +print(message) + +correlation_matrix = gudhi.read_lower_triangular_matrix_from_csv_file(csv_file=args.file) +# Given a correlation matrix M, we compute component-wise M'[i,j] = 1-M[i,j] to get a distance matrix: +distance_matrix = [[1.-correlation_matrix[i][j] for j in range(len(correlation_matrix[i]))] for i in range(len(correlation_matrix))] + +rips_complex = gudhi.RipsComplex(distance_matrix=distance_matrix, + max_edge_length=1.-args.min_edge_correlation) +simplex_tree = rips_complex.create_simplex_tree(max_dimension=args.max_dimension) + +message = "Number of simplices=" + repr(simplex_tree.num_simplices()) +print(message) + +diag = simplex_tree.persistence() + +print("betti_numbers()=") +print(simplex_tree.betti_numbers()) + +# invert the persistence diagram +invert_diag = [(diag[pers][0],(1.-diag[pers][1][0], 1.-diag[pers][1][1])) for pers in range(len(diag))] + +if args.no_diagram == False: + pplot = gudhi.plot_persistence_diagram(invert_diag, band=args.band) + pplot.show() diff --git a/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py b/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py index 3baebd17..4d2ed577 100755 --- a/cython/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py +++ b/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,20 +26,20 @@ 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 ' - 'a distance matrix read in a OFF file.', + 'a distance matrix read in a csv file.', epilog='Example: ' 'example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py ' '-f ../data/distance_matrix/lower_triangular_distance_matrix.csv -e 12.0 -d 3' '- Constructs a Rips complex with the ' - 'points from the given OFF file.') + 'distance matrix from the given csv file.') parser.add_argument("-f", "--file", type=str, required=True) parser.add_argument("-e", "--max_edge_length", type=float, default=0.5) parser.add_argument("-d", "--max_dimension", type=int, default=1) -parser.add_argument("-b", "--band_boot", type=float, default=0.) +parser.add_argument("-b", "--band", type=float, default=0.) parser.add_argument('--no-diagram', default=False, action='store_true' , help='Flag for not to display the diagrams') args = parser.parse_args() @@ -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()) @@ -62,5 +63,5 @@ print("betti_numbers()=") print(simplex_tree.betti_numbers()) if args.no_diagram == False: - pplot = gudhi.plot_persistence_diagram(diag, band_boot=args.band_boot) + pplot = gudhi.plot_persistence_diagram(diag, band=args.band) pplot.show() diff --git a/cython/example/rips_complex_diagram_persistence_from_off_file_example.py b/cython/example/rips_complex_diagram_persistence_from_off_file_example.py index 5951eedf..d15d5eb0 100755 --- a/cython/example/rips_complex_diagram_persistence_from_off_file_example.py +++ b/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 ' @@ -39,7 +39,7 @@ parser = argparse.ArgumentParser(description='RipsComplex creation from ' parser.add_argument("-f", "--file", type=str, required=True) parser.add_argument("-e", "--max_edge_length", type=float, default=0.5) parser.add_argument("-d", "--max_dimension", type=int, default=1) -parser.add_argument("-b", "--band_boot", type=float, default=0.) +parser.add_argument("-b", "--band", type=float, default=0.) parser.add_argument('--no-diagram', default=False, action='store_true' , help='Flag for not to display the diagrams') args = parser.parse_args() @@ -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()) @@ -65,7 +66,7 @@ with open(args.file, 'r') as f: print(simplex_tree.betti_numbers()) if args.no_diagram == False: - pplot = gudhi.plot_persistence_diagram(diag, band_boot=args.band_boot) + pplot = gudhi.plot_persistence_diagram(diag, band=args.band) pplot.show() else: print(args.file, "is not a valid OFF file") diff --git a/cython/example/rips_complex_from_points_example.py b/cython/example/rips_complex_from_points_example.py index 5d411b1a..ffa9d91f 100755 --- a/cython/example/rips_complex_from_points_example.py +++ b/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/cython/example/rips_persistence_diagram.py b/cython/example/rips_persistence_diagram.py index 9bfea41c..7a6a9f46 100755 --- a/cython/example/rips_persistence_diagram.py +++ b/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/cython/example/simplex_tree_example.py b/cython/example/simplex_tree_example.py index 51a60e73..28679015 100755 --- a/cython/example/simplex_tree_example.py +++ b/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/cython/example/tangential_complex_plain_homology_from_off_file_example.py b/cython/example/tangential_complex_plain_homology_from_off_file_example.py index 6145e7f2..0f8f5e80 100755 --- a/cython/example/tangential_complex_plain_homology_from_off_file_example.py +++ b/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,18 +26,19 @@ 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 ' 'points read in a OFF file.', epilog='Example: ' 'example/tangential_complex_plain_homology_from_off_file_example.py ' - '-f ../data/points/tore3D_300.off' + '-f ../data/points/tore3D_300.off -i 3' '- Constructs a tangential complex with the ' 'points from the given OFF file') parser.add_argument("-f", "--file", type=str, required=True) -parser.add_argument("-b", "--band_boot", type=float, default=0.) +parser.add_argument("-i", "--intrisic_dim", type=int, required=True) +parser.add_argument("-b", "--band", type=float, default=0.) parser.add_argument('--no-diagram', default=False, action='store_true' , help='Flag for not to display the diagrams') args = parser.parse_args() @@ -48,7 +49,7 @@ with open(args.file, 'r') as f: print("#####################################################################") print("TangentialComplex creation from points read in a OFF file") - tc = gudhi.TangentialComplex(off_file=args.file) + tc = gudhi.TangentialComplex(intrisic_dim = args.intrisic_dim, off_file=args.file) st = tc.create_simplex_tree() message = "Number of simplices=" + repr(st.num_simplices()) @@ -60,7 +61,7 @@ with open(args.file, 'r') as f: print(st.betti_numbers()) if args.no_diagram == False: - pplot = gudhi.plot_persistence_diagram(diag, band_boot=args.band_boot) + pplot = gudhi.plot_persistence_diagram(diag, band=args.band) pplot.show() else: print(args.file, "is not a valid OFF file") diff --git a/cython/example/witness_complex_from_nearest_landmark_table.py b/cython/example/witness_complex_from_nearest_landmark_table.py index 92ed970b..e6b295ee 100755 --- a/cython/example/witness_complex_from_nearest_landmark_table.py +++ b/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("#####################################################################") -- cgit v1.2.3