// end static class CliqueEqualityWrapper
        private static Clique Intern(Clique c)
        {
            Clique.CliqueEqualityWrapper wrapper = new Clique.CliqueEqualityWrapper(c);
            Clique newC = interner[wrapper];

            if (newC == null)
            {
                interner[wrapper] = c;
                newC = c;
            }
            return(newC);
        }
 public override bool Equals(object o)
 {
     if (!(o is Clique.CliqueEqualityWrapper))
     {
         return(false);
     }
     Clique.CliqueEqualityWrapper otherC = (Clique.CliqueEqualityWrapper)o;
     if (otherC.c.relativeIndices.Length != c.relativeIndices.Length)
     {
         return(false);
     }
     for (int i = 0; i < c.relativeIndices.Length; i++)
     {
         if (c.relativeIndices[i] != otherC.c.relativeIndices[i])
         {
             return(false);
         }
     }
     return(true);
 }