planet.simulate
Class GenEvents

java.lang.Object
  extended byplanet.simulate.GenEvents

public class GenEvents
extends java.lang.Object

Author:
Ruben Mondejar

Constructor Summary
GenEvents()
           
 
Method Summary
static java.lang.Object[] genDistribEvents(int num)
           
static Id[] genRandomIds(Id min, int num, int k)
           
static java.lang.Object[] genRandomIds(int num)
          Generate a set of random ids for nodesto insert to Chord ring.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenEvents

public GenEvents()
Method Detail

genRandomIds

public static java.lang.Object[] genRandomIds(int num)
Generate a set of random ids for nodesto insert to Chord ring. The generated values are node's id and nodes' bootstrap.

Parameters:
num - Number of nodes to generate.
Returns:
An array of two positions with: in first position the id node bootstrap of the node 'i'th; in second position the id of node 'i'th.

genDistribEvents

public static java.lang.Object[] genDistribEvents(int num)

genRandomIds

public static Id[] genRandomIds(Id min,
                                int num,
                                int k)