Skip to content

Commit

Permalink
Merge pull request #73 from VincentRouvreau/AlphaDTMFiltration_duplic…
Browse files Browse the repository at this point in the history
…ate_points_management

AlphaDTMFiltration was failing with duplicated points
  • Loading branch information
VincentRouvreau authored Dec 20, 2024
2 parents 3ab7c33 + a2822b3 commit 085eeb8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions DTM_filtrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ def AlphaDTMFiltration(X, m, p, dimension_max =2, filtration_max = np.inf):
N_tot = X.shape[0]
alpha_complex = gudhi.AlphaComplex(points=X)
st_alpha = alpha_complex.create_simplex_tree()
Y = np.array([alpha_complex.get_point(i) for i in range(N_tot)])
Y = X
distances = euclidean_distances(Y) #computes the pairwise distances
DTM_values = DTM(X,Y,m) #/!\ in 3D, gudhi.AlphaComplex may change the ordering of the points
DTM_values = DTM(X,Y,m)

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

0 comments on commit 085eeb8

Please sign in to comment.