Exemplo n.º 1
0
 private void GetAvaibleKeys()
 {
     for (var i = 0; i < 140; i++)
     {
         if (NodHelper.IsNod(i, _alphabet.Length))
         {
             AvaibleKeys.Add(i);
         }
     }
 }
Exemplo n.º 2
0
        private static int NodHelperMethod(NodHelper helper, params int[] array)
        {
            CheckArray(array);

            int nod = helper(array[0], array[1]);

            for (int i = 2; i < array.Length; i++)
            {
                nod = helper(array[i], nod);
            }

            return(nod);
        }
Exemplo n.º 3
0
        private static int NodHelperMethod(NodHelper helper, out long time, params int[] array)
        {
            CheckArray(array);

            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();

            int nod = NodHelperMethod(helper, array);

            stopwatch.Stop();
            time = stopwatch.ElapsedMilliseconds;

            return(nod);
        }
Exemplo n.º 4
0
 private static int NodHelperMethod(NodHelper helper, int lhs, int rhs)
 {
     return(helper(lhs, rhs));
 }