Ejemplo n.º 1
0
 static public void WriteInversionVector(int[] permutation)
 {
     int[][] cyclePermutation = WithoutRepetition.PermutationToCycle(permutation);
     int[]   inversionVector  = WithoutRepetition.InversionVector(permutation);
     using (StreamWriter writer = new StreamWriter("log.txt", true))
     {
         WriteDate(writer);
         WriteLine(writer, "Iversion vector of permutation:");
         WriteLine(writer);
         Write(writer, "One-line notation: ");
         WriteVector(writer, permutation);
         WriteLine(writer);
         Write(writer, "Canonical cycle notation: ");
         WriteCycle(writer, cyclePermutation);
         WriteLine(writer);
         WriteLine(writer);
         Write(writer, "Inversion vector: ");
         WriteVector(writer, inversionVector);
         WriteLine(writer);
     }
 }