Permalink
Browse files

minor: meaningless comments

  • Loading branch information...
1 parent 13da986 commit cbf6ced5ab8f1d937bd9b71d703a3aed92ed3bcc @jkff committed May 12, 2012
Showing with 2 additions and 13 deletions.
  1. +2 −13 src/main/java/com/clearspring/analytics/stream/StochasticTopper.java
View
15 src/main/java/com/clearspring/analytics/stream/StochasticTopper.java
@@ -41,10 +41,6 @@ public StochasticTopper(int sampleSize)
this(sampleSize, null);
}
- /**
- *
- *
- */
public StochasticTopper(int sampleSize, Long seed)
{
this.sample = new SampleSet<T>(sampleSize);
@@ -56,21 +52,16 @@ public StochasticTopper(int sampleSize, Long seed)
random = new Random();
}
- /**
- *
- * @param item
- * @return
- */
public boolean offer(T item)
{
count++;
boolean taken = false;
- if(sample.count() < sampleSize)
+ if (sample.count() < sampleSize)
{
sample.put(item);
taken = true;
}
- else if(random.nextDouble() < sampleSize/(double)count)
+ else if (random.nextDouble() < sampleSize/(double)count)
{
sample.removeRandom();
sample.put(item);
@@ -82,8 +73,6 @@ else if(random.nextDouble() < sampleSize/(double)count)
/**
* Retrieve top k items
- * @param k
- * @return
*/
public List<T> peek(int k)
{

0 comments on commit cbf6ced

Please sign in to comment.