summaryrefslogtreecommitdiff
path: root/src/cython/example/alpha_rips_persistence_bottleneck_distance.py
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-04-03 09:11:12 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-04-03 09:11:12 +0000
commit77d03dba655f8c19c413d70b929c6426f332dc34 (patch)
tree1e8aad7fbfd7df74796553ceeaf1234e3ac85c7d /src/cython/example/alpha_rips_persistence_bottleneck_distance.py
parent8447fa7575ae4db0db6daa8e03a0c2f9a374df7c (diff)
parent3e1cf01b055718ead2433ef852dcfccce502cdb8 (diff)
Merge rips_complex_from_correlation_matrix branch
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3328 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a0d98d884fc06a6528e3362d6ed627cd964f527a
Diffstat (limited to 'src/cython/example/alpha_rips_persistence_bottleneck_distance.py')
-rwxr-xr-xsrc/cython/example/alpha_rips_persistence_bottleneck_distance.py5
1 files changed, 3 insertions, 2 deletions
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())