Beispiel #1
0
 internal static void check(int[] permutation)
 {
     if (!HelpFunctions.checkOnePermutation(permutation))
     {
         throw new Exception("Bad format of permutation.");
     }
 }
Beispiel #2
0
 internal static bool checkTwoPermutations(int[] permutation1, int[] permutation2)
 {
     if (permutation1.Length == permutation2.Length)
     {
         if (HelpFunctions.checkOnePermutation(permutation1))
         {
             if (HelpFunctions.checkOnePermutation(permutation2))
             {
                 return(true);
             }
         }
     }
     return(false);
 }