On Feb 23, 6:38 pm, Jeffrey Straszheim <straszheimjeff...@gmail.com>
wrote:
> Well, right now I'm just handling directed graphs, and basically treating
> nodes as integer indexes, with a simple formula from index to adjacency list
> of nodes.
>
I would actually like to see an implementation that more closely
resembles the mathematical representation of graphs:
A graph is <V, E>, where V is a set of vertices and E is a set of
edges <v1, v2>.
It's really easy to do with maps and sets:
{:V #{1 2 3 4 5} :E #{{:a 1 :b 2} . . . .
It is less efficient than yours, but let's not optimize too soon.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---