On Oct 30, 8:57 am, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Oct 29, 6:27 pm, ccahoon <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I'm wondering what would be a good way to represent a mincut, maximum
> > flow problem in Clojure. A set of weighted edges makes sense to me,
> > but I am not sure how best to represent the edges so I can use them as
> > a key in a map. Pardon me for asking such a noob question on this
> > board. I am new to graph representations.
>
> > For example, if I have an edge (p, q) with weight 2, what is a good
> > way to represent that so I can access weights with the edges?
>
> The graph libraries others have mentioned probably have a lot of nice
> features, but I just wanted to say that [x y] vectors or {:x 1 :y 2}
> maps make perfectly fine keys if you want to roll your own in Clojure.
>
> Also, this simple TSP solver uses graphs:
>
> http://groups.google.com/group/clojure/msg/df7b0f5673513b85
>
> RichHow are graphs with cycles represented in a purish functional language? I guess explicit node indexing can be used instead of references, but I would think that would get slow for large graphs. Traversal ends up being a interpretation on node indices instead of a simple dereference. Matt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
