public void TestInit() { Graph = new GraphChromosome(TestHelpers.IntegerChromosome(), TestHelpers.IntegerChromosome()); Graph.AddVertex(0u); Graph.AddVertex(1u); Graph.AddEdge(0u, 1u); }
public void AddEdge() { var e1 = g[0, 0]; g.AddEdge(0, 0); var e2 = g[0, 0]; Assert.AreNotEqual(e1.ToString(), e2.ToString()); }
public static void ClassInit(TestContext tc) { var chrom = new IntegerChromosome(0, 1); Graph1 = new GraphChromosome(chrom, chrom, 2); Graph1.AddVertex(0u); Graph1.AddVertex(2u); Graph1.AddEdge(0u, 2u); Graph1.AddEdge(2u, 0u); Graph2 = new GraphChromosome(chrom, chrom, 4); Graph2.AddVertex(0u); Graph2.AddVertex(1u); Graph2.AddVertex(2u); Graph2.AddVertex(3u); Graph2.AddEdge(0u, 2u); Graph2.AddEdge(1u, 2u); Graph2.AddEdge(2u, 3u); nVertMismatch = 2; nEdgeMismatch = 3; }