Skip to content

Commit 085eeb8

Browse files
Merge pull request #73 from VincentRouvreau/AlphaDTMFiltration_duplicate_points_management
AlphaDTMFiltration was failing with duplicated points
2 parents 3ab7c33 + a2822b3 commit 085eeb8

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

DTM_filtrations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ def AlphaDTMFiltration(X, m, p, dimension_max =2, filtration_max = np.inf):
158158
N_tot = X.shape[0]
159159
alpha_complex = gudhi.AlphaComplex(points=X)
160160
st_alpha = alpha_complex.create_simplex_tree()
161-
Y = np.array([alpha_complex.get_point(i) for i in range(N_tot)])
161+
Y = X
162162
distances = euclidean_distances(Y) #computes the pairwise distances
163-
DTM_values = DTM(X,Y,m) #/!\ in 3D, gudhi.AlphaComplex may change the ordering of the points
163+
DTM_values = DTM(X,Y,m)
164164

165165
st = gudhi.SimplexTree() #creates an empty simplex tree
166166
for simplex in st_alpha.get_skeleton(2): #adds vertices with corresponding filtration value

0 commit comments

Comments
 (0)