diff options
author | Gard Spreemann <gspreemann@gmail.com> | 2018-06-15 12:34:03 +0200 |
---|---|---|
committer | Gard Spreemann <gspreemann@gmail.com> | 2018-06-15 12:34:03 +0200 |
commit | 41482b4260b4aff3d6803e340d5c94fbefb9af67 (patch) | |
tree | 89eae43dcb3fd4ab040e96f3d5479427d8cd2c7f /cython/example/alpha_rips_persistence_bottleneck_distance.py | |
parent | 41a1b8c2728e212c832c0384c8bb424139a247cf (diff) | |
parent | c524232f734de875d69e2f190f01a6c976024368 (diff) |
Merge branch 'upstream/latest' into dfsg/latest
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()) |