diff options
author | Gard Spreemann <gspreemann@gmail.com> | 2018-06-14 20:39:01 +0200 |
---|---|---|
committer | Gard Spreemann <gspreemann@gmail.com> | 2018-06-14 20:39:01 +0200 |
commit | c524232f734de875d69e2f190f01a6c976024368 (patch) | |
tree | d8bba27646c367cb2b7c718354dd036892bcd629 /cython/example/alpha_rips_persistence_bottleneck_distance.py | |
parent | 9899ae167f281d10b1684dfcd02c6838c5bf28df (diff) |
GUDHI 2.2.0 as released by upstream in a tarball.upstream/2.2.0
Diffstat (limited to 'cython/example/alpha_rips_persistence_bottleneck_distance.py')
-rwxr-xr-x | cython/example/alpha_rips_persistence_bottleneck_distance.py | 9 |
1 files changed, 5 insertions, 4 deletions
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()) |