Exemplo n.º 1
0
 public static Fraction Prob(int total, int selected, Fraction chance)
 {
     return((Fraction.Pow(chance, selected) * Fraction.Pow(Fraction.One + -chance, total - selected) * new Fraction(Choose(total, selected), 1)).Simplify());
 }
Exemplo n.º 2
0
 public Perm(List <int> cycles, Fraction probability)
 {
     Cycles      = cycles;
     Probability = probability;
 }