Skip to content
This repository was archived by the owner on Jul 7, 2020. It is now read-only.

Commit a856df7

Browse files
committed
Fixed stupid typo in SampleSet. Tests now pass.
1 parent 054c035 commit a856df7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/clearspring/analytics/stream/SampleSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public T removeRandom()
107107
for (Node<T> itr = head; itr != null; itr = itr.next)
108108
{
109109
weight += itr.count;
110-
if (p >= weight / (double) count)
110+
if (p < weight / (double) count)
111111
{
112112
itr.count--;
113113
count--;

0 commit comments

Comments
 (0)