E
Eleanor
Hi,
Could you please help me finding out whether the following is an
appropriate data structure.
I represent an undirected weighted graph of strings that is searchable
and enumeratable as:
Hashtable graph (string nodeA, Hashtable intern); and Hashtable
intern (string nodeB, double weight)
In which each edge is added twice (once for nodeA -> nodeB, and once for
nodeB -> nodeA)
I guess I'm wondering whether there really is not any collection that is
directly "accessible" from two sides. For instance, suppose there exists
something like a three-cell storage Hashtable (instead of a two-cell
storage), that is accessible through the key or through the "last"
value. In case of the undirected graph, one would be able to go from
nodeA->weight->nodeB and from nodeB->weight->nodeA (without adding the
edge twice of course).
Thanks in advance.
Eleanor
Could you please help me finding out whether the following is an
appropriate data structure.
I represent an undirected weighted graph of strings that is searchable
and enumeratable as:
Hashtable graph (string nodeA, Hashtable intern); and Hashtable
intern (string nodeB, double weight)
In which each edge is added twice (once for nodeA -> nodeB, and once for
nodeB -> nodeA)
I guess I'm wondering whether there really is not any collection that is
directly "accessible" from two sides. For instance, suppose there exists
something like a three-cell storage Hashtable (instead of a two-cell
storage), that is accessible through the key or through the "last"
value. In case of the undirected graph, one would be able to go from
nodeA->weight->nodeB and from nodeB->weight->nodeA (without adding the
edge twice of course).
Thanks in advance.
Eleanor