Example #1
0
        void CalculateProbabilities()
        {
            var groups = Digits.GroupBy(i => i);

            foreach (var group in groups)
            {
                InputProbabilities.Add(Math.Round((double)group.Count() / Digits.Count(), 4) * 100);
            }
        }
Example #2
0
 public override bool IsValid()
 {
     return(Digits.Any(digit => Digits.Count(i => i == digit) == 2));
 }
Example #3
0
 public void Count_ShouldReturnNumberOfDigits_IfFloat(float number, int count) =>
 Assert.Equal(count, Digits.Count(number));
Example #4
0
 public void Count_ShouldReturnNumberOfDigits_IfLong(long number, int count) =>
 Assert.Equal(count, Digits.Count(number));