summaryrefslogtreecommitdiff
path: root/src/cython/example/alpha_rips_persistence_bottleneck_distance.py
diff options
context:
space:
mode:
authormcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-04-23 20:34:49 +0000
committermcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-04-23 20:34:49 +0000
commitc11a8596bc7ee8705f99258886714da7757f2334 (patch)
treedd3787d1ee5c72eaef0e0215036ba5af2d9c5a81 /src/cython/example/alpha_rips_persistence_bottleneck_distance.py
parentea11100d803c86a0fd5cfec1b9431110b48d87c9 (diff)
parentdc1a4ce409292138cf1380ca673a72eaae67675a (diff)
added unitary tests for kernels
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/kernels@3391 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d383ed76f3cfd3724449cb7e8c24b895a7322d52
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())