Skip to content

Commit c4f243d

Browse files
committed
Update solver.py
1 parent e98374e commit c4f243d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

syndiffix/clustering/solver.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,8 @@ class MutableCluster:
1919
def _col_weight(entropy: float) -> float:
2020
return 1.0 + math.sqrt(max(entropy, 1.0))
2121

22-
23-
def _floor_by(n: float, x: float) -> float:
24-
if n == 0.0:
25-
return 0.0
26-
else:
27-
return math.floor(x / n) * n
28-
22+
def _floor_by(value: float, bin_size: float) -> float:
23+
return math.floor(value / bin_size) * bin_size
2924

3025
def _build_clusters(
3126
context: ClusteringContext,

0 commit comments

Comments
 (0)