Skip to content

Commit

Permalink
AlphaDTMFiltration was failing with duplicated points. ordering chang…
Browse files Browse the repository at this point in the history
…es in 3d is no longer the behaviour
  • Loading branch information
VincentRouvreau committed Mar 1, 2024
1 parent 3ab7c33 commit a2822b3
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 a2822b3

Please sign in to comment.