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; }