edu.usc.bg.base.generator
Class SkewedLatestGenerator

java.lang.Object
  extended by edu.usc.bg.base.generator.Generator
      extended by edu.usc.bg.base.generator.IntegerGenerator
          extended by edu.usc.bg.base.generator.SkewedLatestGenerator

public class SkewedLatestGenerator
extends IntegerGenerator

Generate a popularity distribution of items, skewed to favor recent items significantly more than older items.


Constructor Summary
SkewedLatestGenerator(CounterGenerator basis)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 double mean()
          Return the expected value (mean) of the values this generator will return.
 int nextInt()
          Generate the next string in the distribution, skewed Zipfian favoring the items most recently returned by the basis generator.
 
Methods inherited from class edu.usc.bg.base.generator.IntegerGenerator
lastInt, lastString, nextString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkewedLatestGenerator

public SkewedLatestGenerator(CounterGenerator basis)
Method Detail

nextInt

public int nextInt()
Generate the next string in the distribution, skewed Zipfian favoring the items most recently returned by the basis generator.

Specified by:
nextInt in class IntegerGenerator

main

public static void main(java.lang.String[] args)

mean

public double mean()
Description copied from class: IntegerGenerator
Return the expected value (mean) of the values this generator will return.

Specified by:
mean in class IntegerGenerator