Topics: glee, graph
Sep 8, 2007 at 4:28 PM
i have tried to generate several graphs now, which are all working fine. but there is one which causes an exception when populating it to the GleeGraphProvider. I get the following error message (in German):

System.Collections.Generic.KeyNotFoundException was unhandled
  Message="Der angegebene Schlüssel war nicht im Wörterbuch angegeben."
       bei System.ThrowHelper.ThrowKeyNotFoundException()
       bei System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       bei QuickGraph.Glee.GleeDefaultGraphPopulator`2.AddEdge(Edge e)
       bei QuickGraph.Glee.GleeGraphPopulator`2.InternalCompute()
       bei QuickGraph.Algorithms.AlgorithmBase`1.Compute()

The translation would be like "The key was not found in the dictionary".

Why could this happen? I generate the graph in the same way as all others with:

GleeGraphPopulator<string, Edge<string>> populator = GleeGraphUtility.Create<string, Edge<string>>(graph);
Graph gleeGraph = populator.GleeGraph;
Sep 8, 2007 at 5:59 PM
Please open a workitem on this.
Sep 9, 2007 at 6:57 AM
Which graph datastructure are you using? there might be a bug over there.
Sep 9, 2007 at 9:34 AM
i use an AdjacencyGraph which i constructed as follows:

AdjacencyGraph<string, Edge<string>> graph = new AdjacencyGraph<string, Edge<string>>();

followed by some graph.AddVertex(someString); and graph.AddEdge(new Edge<string>(someString1, someString2)); commands.

and in the end comes the code shown above with the GraphPopularor
Sep 14, 2007 at 8:30 AM
That sounds correct. You can open a workitem on this.