public NroRandom multiplicativo(int x) { int xi = (a * x) % m; NroRandom nroRnd = new NroRandom(x, xi, dividir(xi)); return(nroRnd); }
public NroRandom lineal(int x) { int xi = (a * x + c) % m; NroRandom nroRnd = new NroRandom(x, xi, dividir(xi)); return(nroRnd); }
public NroRandom lenguaje() { //Random random = new Random(); double nro = Math.Round(random.NextDouble(), 4, MidpointRounding.AwayFromZero); NroRandom nroRnd = new NroRandom(0, 0, nro); return(nroRnd); }
public NroRandom multiplicativo(int x) { int a = 3 + (8 * k); double m = Math.Pow(2, g); int xi = Convert.ToInt32((a * x) % m); NroRandom nroRnd = new NroRandom(x, xi, dividir(xi, m)); return(nroRnd); }
public NroRandom lineal(int x) { int a = 1 + (4 * k); double m = Math.Pow(2, g); int xi = Convert.ToInt32((a * x + c) % m); NroRandom nroRnd = new NroRandom(x, xi, dividir(xi, m)); return(nroRnd); }
public NroRandom multiplicativo(int x) { //Xπ+1 β‘ (π β π₯π)πππ m int a = 3 + (8 * k); double m = Math.Pow(2, g); int xi = Convert.ToInt32((a * x) % m); NroRandom nroRnd = new NroRandom(x, xi, dividir(xi, m)); return nroRnd; }
public NroRandom mixto(int x) { //π₯π+1 β‘ (π β π₯π + π)πππ m int a = 1 + (4 * k); double m = Math.Pow(2, g); int xi = Convert.ToInt32((a * x + c) % m); NroRandom nroRnd = new NroRandom(x, xi, dividir(xi, m)); return nroRnd; }
public NroRandom lenguaje() { double nro = truncarACuatro(random.NextDouble()); NroRandom nroRnd = new NroRandom(0, 0, nro); return nroRnd; }