/*************************** random numbers *****************************/ package random; import java.util.*; /* uniformly dist. pseudo random integers over [low, high] */ public class urand extends rand { int low; int high; double range; public urand(int low, int high) { this(low, high, 13); } /* constructor */ public urand(int l, int h, long seed) { super(seed); low = l; high = h; range = (double)(high-low+1); } public int draw() /* draw from [low, high] */ { return low+(int)(range*fdraw()); } }