Skip to content

Commit

Permalink
changed naming convecntion for the stable method
Browse files Browse the repository at this point in the history
  • Loading branch information
Feelx234 committed Dec 22, 2023
1 parent 2644f34 commit e6abaeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true
}
12 changes: 6 additions & 6 deletions src/microagg1d/user_facing.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _sse_staggered2(v, k, stable=1):
method = __staggered2
# unfortunately a lot of copy pasta as numba can't handle it yet
n = len(v)
if stable == 2:
if stable == 0:
cost_calculator = FasterAdaptedSSECostCalculator(
calc_cumsum(v), k, np.empty(n + 1, dtype=np.float64)
)
Expand All @@ -46,7 +46,7 @@ def _sse_staggered2(v, k, stable=1):
v, k, np.empty(n + 1, dtype=np.float64), 3 * k
)
return convert_implicit_to_explicit_clustering(method(n, cost_calculator, k))
elif stable == 0:
elif stable == 2:
cumsum = calc_cumsum(v)
cumsum2 = calc_cumsum(np.square(v))
cost_calculator = AdaptedSSECostCalculator(
Expand All @@ -62,7 +62,7 @@ def _sse_galil_park2(v, k, stable=1):
method = __galil_park2
# unfortunately a lot of copy pasta as numba can't handle it yet
n = len(v)
if stable == 2:
if stable == 0:
cost_calculator = FasterAdaptedSSECostCalculator(
calc_cumsum(v), k, np.empty(n + 1, dtype=np.float64)
)
Expand All @@ -72,7 +72,7 @@ def _sse_galil_park2(v, k, stable=1):
v, k, np.empty(n + 1, dtype=np.float64), 3 * k
)
return convert_implicit_to_explicit_clustering(method(n, cost_calculator))
elif stable == 0:
elif stable == 2:
cumsum = calc_cumsum(v)
cumsum2 = calc_cumsum(np.square(v))
cost_calculator = AdaptedSSECostCalculator(
Expand All @@ -88,7 +88,7 @@ def _sse_wilber2(v, k, stable=1):
method = __wilber2
# unfortunately a lot of copy pasta as numba can't handle it yet
n = len(v)
if stable == 2:
if stable == 0:
cost_calculator = FasterAdaptedSSECostCalculator(
calc_cumsum(v), k, np.empty(n + 1, dtype=np.float64)
)
Expand All @@ -98,7 +98,7 @@ def _sse_wilber2(v, k, stable=1):
v, k, np.empty(n + 1, dtype=np.float64), 3 * k
)
return convert_implicit_to_explicit_clustering(method(n, cost_calculator))
elif stable == 0:
elif stable == 2:
cumsum = calc_cumsum(v)
cumsum2 = calc_cumsum(np.square(v))
cost_calculator = AdaptedSSECostCalculator(
Expand Down

0 comments on commit e6abaeb

Please sign in to comment.