#### 5.1 Rand.java

- Int(bound):
- generates an integer in the uniformly distributed range 0 up to but not including the bound value.
- Double():
- generates a double in the range 0 to 1
- Double(bound):
- generates a double in the uniformly distributed range 0 up to the bound value.
- Long(bound):
- generates a long in the uniformly distributed range 0 up to but not including the bound value.
- Bool():
- generates a random boolean value, with equal probability of true and false.
- Binomial(n,p):
- samples the binomial distribution, returns the number of heads with n weighted coin flips and probability p of heads
- Multinomial(double[]probs,n,Binomial,int[]ret,rn):
- fills the return array with the number of occurrences of each event. n is the total number of occurrences to bin. Binomial is a class in the Tools folder.
- Shuffle(arr,sampleSize,numberOfShuffles,rn):
- shuffles an array, sampleSize is how much of the complete array should be involved in shuffling, and numberOfShuffles is the number of entries of the array that will be shuffled. the shuffling results will always start from the beginning of the array up to numberOfShuffles.
- Gaussian(mean,stdDev,rn):
- samples a gaussian with the mean and standard deviation given.
- RandomVariable(double[]probs,rn):
- samples the distribution of probabilities (which should sum to 1, the SumTo1 function comes in handy here) and returns the index of the probability bin that was randomly chosen.
- RandomPointOnSphereEdge(radius,double[]ret,rn):
- writes into ret the coordinates of a random point on a sphere with given radius centered on (0,0,0)
- RandomPointInSphere(radius,double[]ret,rn):
- writes into ret the coordinates of a random point of inside a sphere with given radius centered on (0,0,0)
- RandomPointOnCircleEdge(radius,double[]ret,rn):
- writes into ret the coordinates of a random point on the edge of a circle with given radius ceneterd on (0,0)
- RandomPointInCircle(radius,double[]ret,rn):
- writes into ret the coordinates of a random point on the edge of a circle with given radius ceneterd on (0,0)