//package MCMC; import java.util.Vector; public class LCG { public double[] random_numbers; //contains "U[0,1]"-pseudo-random numbers public int[] int_random_numbers; //contains the sequence of integer random numbers public LCG(int z0, int a,int c,int m, int how_many ){ this.generate(z0,a,c,m,how_many); } /* * generates a sequence of pseudo-random numbers using the linear congruential method * */ public void generate(int z0, int a,int c,int m, int how_many ){ this.random_numbers=new double[how_many]; this.int_random_numbers= new int[how_many]; int z=z0; /* * generate pseudo-random numbers in {0,...,m-1} */ for(int i=0; i=alpha } while(((double)no_of_prns_leq_than(x))/n x && this.random_numbers[i]if there are too many random numbers the program might not terminate within //reasonable time. generator.QQ_plot(); } }