0

I am having trouble accessing an edgelist of a vertex(which is another object of vertex linked to it). Any ideas how?

like for example i have
Edge.cs, Vertex.cs, DirecGraph.cs

In the DirectGraph.cs

IDictionary < String, Vertex> dic = new IDictionary< String, Vertex>();
..
...
// Then add a vertex type object in the dictionary
Vertex newV;
dic.Add(newV.getVertex(), Vertex);// this works

//now to add another vertex to the dictionary i just need to call the above code

now if i create 2 vertices, a and b, i can set the b as an edgelist of a. (I can see this in the memory while in a debug mode and it works). But trying to print/access Vertex b as an edgelist of Vertex a is a pain. Any ideas how?

3
Contributors
2
Replies
13
Views
4 Years
Discussion Span
Last Post by Ketsuekiame
0

Not without seeing all the code. We can't tell how you implemented your graph structure as we can't see your screen from here.

0

Not sure if you typo'd your above code but you're adding a type to the dictionary not an object. Unless you made it some kind of static I'm not even sure how that would compile.

Also we do need to see how you're recording the fact that it's an edge list and also how you're trying to recall it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.