Class CR2SuscFracDistr


public class CR2SuscFracDistr
extends java.lang.Object

Distribution of fraction of an ASs announced IP space populated by hosts that were susceptible to the Code Red II worm in Sept 2001. Empirical distribution based on data from CAIDA site [David Moore].

See main() method for usage example.

Nested Class Summary
static class CR2SuscFracDistr.TestFixture
          Unit test code.
Constructor Summary
CR2SuscFracDistr(boolean useTheor)
          Test code.
Method Summary
static void discard()
          Deallocate the lookup table to let the memory be reclaimed.
static void init(boolean useTheoreticalDistr, RandomStream _rng)
          Initialize the lookup table.
static void main(java.lang.String[] argv)
          Simple test code.
static double nextDouble()
          Draw a sample from the Susceptible fraction distribution.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public CR2SuscFracDistr(boolean useTheor)
Test code. For normal usage, do not instantiate. Singleton class.

Method Detail


public static void init(boolean useTheoreticalDistr,
                        RandomStream _rng)
Initialize the lookup table. Must be called before any samples can be drawn.

useTheoreticalDistr - Set to true to use the approximate theoretical distribution instead of the empirical distr.
_rng - A random number stream. As defined in the SSF.Util.Random package.


public static double nextDouble()
Draw a sample from the Susceptible fraction distribution.


public static void discard()
Deallocate the lookup table to let the memory be reclaimed. No more samples can be drawn from the distribution.


public static void main(java.lang.String[] argv)
Simple test code.