Class IPSpaceDistr


public class IPSpaceDistr
extends java.lang.Object

Distribution of announced IP space sizes for ASs. Empirical distribution for the size of IP space announced by each AS in the Internet on Oct 26th, 2001, at 16:48. Based on RIB data from University of Oregon's "Route Views" data set. Also offers a "rough-cut" theoretical distribution to approximate the empirical distribution: Let X be a sample from N(12.22983, 3.172661). Then the IP space size Y = 2^X.

See main() method for usage example.

Data by BJ Premore, Michael Liljenstam.

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

Constructor Detail


public IPSpaceDistr(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 long getSample(double rnd)
Deprecated. Draw a sample from the IP space distribution.

rnd - A random sample U[0,1)


public static long nextLong()
Draw a sample from the IP space 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.