server/assoserv/__pycache__/mutualEx/mutualEx_2.cpp
/********************
 Canonicalization by fast exhaustive generation of
 all permutations
 ********************/
Canonicalization by fast exhaustive generation of
all permutations
Canonicalization by fast exhaustive generation of all permutations
void SymmetryClass::Exhaustive_Fast_Canonicalize(state* s)
{
  int i;
  static state temp;
  Perm.ResetToExplicit();
  StateCopy(&temp, workingstate);
  ResetBestResult();
  for (i=0; i<Perm.count; i++)
    if (Perm.In(i))
      {
        StateCopy(workingstate, &temp);
        mu_n.Permute(Perm,i);
        if (args->multiset_reduction.value)
          mu_n.MultisetSort();
        SetBestResult(i, workingstate);
      }
  StateCopy(workingstate, &BestPermutedState);
  StateCopy(&temp, workingstate);
  ResetBestResult();
  for (i=0; i<Perm.count; i++)
    if (Perm.In(i))
      {
        StateCopy(workingstate, &temp);
        mu_x.Permute(Perm,i);
        if (args->multiset_reduction.value)
          mu_x.MultisetSort();
        SetBestResult(i, workingstate);
      }
  StateCopy(workingstate, &BestPermutedState);
}
void SymmetryClass :: Exhaustive_Fast_Canonicalize ( state * s ) { int i ; static state temp ; Perm . ResetToExplicit ( ) ; StateCopy ( & temp , workingstate ) ; ResetBestResult ( ) ; for ( i = 0 ; i < Perm . count ; i ++ ) if ( Perm . In ( i ) ) { StateCopy ( workingstate , & temp ) ; mu_n . Permute ( Perm , i ) ; if ( args -> multiset_reduction . value ) mu_n . MultisetSort ( ) ; SetBestResult ( i , workingstate ) ; } StateCopy ( workingstate , & BestPermutedState ) ; StateCopy ( & temp , workingstate ) ; ResetBestResult ( ) ; for ( i = 0 ; i < Perm . count ; i ++ ) if ( Perm . In ( i ) ) { StateCopy ( workingstate , & temp ) ; mu_x . Permute ( Perm , i ) ; if ( args -> multiset_reduction . value ) mu_x . MultisetSort ( ) ; SetBestResult ( i , workingstate ) ; } StateCopy ( workingstate , & BestPermutedState ) ; }
Canonicalization by fast exhaustive generation of
all permutations
Canonicalization by fast exhaustive generation of all permutations