示例#1
0
        public override string SignatureStringForVertex(int vertexIndex, int height)
        {
            SimpleVertexSignature vertexSignature =
                new SimpleVertexSignature(vertexIndex, height, this.graph);

            return(vertexSignature.ToCanonicalString());
        }
示例#2
0
 public void RegularGraphTest(SimpleGraph graph, int diameter)
 {
     for (int h = 1; h <= diameter; h++)
     {
         SimpleVertexSignature sig0 =
             new SimpleVertexSignature(0, h, graph);
         string zeroCanonical = sig0.ToCanonicalString();
         Console.Out.WriteLine(h + "\t" + zeroCanonical);
         for (int i = 1; i < graph.GetVertexCount(); i++)
         {
             SimpleVertexSignature sig =
                 new SimpleVertexSignature(i, h, graph);
             //                Assert.AreEqual(zeroCanonical, sig.ToCanonicalString());
             string canString = sig.ToCanonicalString();
             if (zeroCanonical.Equals(canString))
             {
                 //                    Console.Out.WriteLine("EQU");
             }
             else
             {
                 Console.Out.WriteLine("NEQ "
                                       + h + "\t" + i + "\t"
                                       + zeroCanonical + " " + canString);
             }
             Assert.AreEqual(zeroCanonical, canString);
         }
     }
 }