Skip to content

Commit

Permalink
Make helper function hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
ulupo committed Jan 28, 2021
1 parent 76cda6f commit 320121a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cechmate/filtrations/alpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def alpha_build(X, filtration_current, filtration_upper):
for sigma in filtration_current:
filtration_current[sigma] = \
_squared_circumradius(X[np.asarray(sigma)])
for x in drop_elements(sigma):
for x in _drop_elements(sigma):
tau = x[1]
vertex = x[0]
if tau in filtration_lower and \
Expand All @@ -141,7 +141,7 @@ def alpha_build(X, filtration_current, filtration_upper):
if np.isnan(filtration_current[sigma]):
filtration_current[sigma] = \
_squared_circumradius(X[np.asarray(sigma)])
for x in drop_elements(sigma):
for x in _drop_elements(sigma):
tau = x[1]
vertex = x[0]
if tau in filtration_lower and \
Expand All @@ -157,7 +157,7 @@ def alpha_build(X, filtration_current, filtration_upper):

# Correct artifacts
for omega in filtration_upper:
for x in drop_elements(omega):
for x in _drop_elements(omega):
sigma = x[1]
filtration_current[sigma] = min(filtration_current[sigma],
filtration_upper[omega])
Expand Down Expand Up @@ -262,7 +262,7 @@ def _pdist(A):


@njit
def drop_elements(tup: tuple):
def _drop_elements(tup: tuple):
for x in range(len(tup)):
empty = tup[:-1] # Not empty, but the right size and will be mutated
idx = 0
Expand Down

0 comments on commit 320121a

Please sign in to comment.