summaryrefslogtreecommitdiff
path: root/cython/example/alpha_rips_persistence_bottleneck_distance.py
diff options
context:
space:
mode:
Diffstat (limited to 'cython/example/alpha_rips_persistence_bottleneck_distance.py')
-rwxr-xr-xcython/example/alpha_rips_persistence_bottleneck_distance.py9
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())