[cl-graph-devel] map-shortest-paths questions
Gary King
gwking at metabang.com
Thu Sep 18 15:36:17 UTC 2008
Hi Robin,
Thanks for your questions. I'll make the time to answer them later
today / tonight.
On Sep 15, 2008, at 2:42 AM, Robin Lee Powell wrote:
> On Sun, Sep 14, 2008 at 11:14:29PM -0700, Robin Lee Powell wrote:
>>
>> So there doesn't seem to be anything like introductory
>> documentation or a tutorial for cl-graph, so I'm struggling along
>> trying to figure it out.
>>
>> It doesn't help that it's been a decade since I needed any graph
>> theory. :D
>>
>> Anyways, two questions:
>
> Make that four.
>
> 3. Why does map-shortests-paths appear to find paths regardless of
> directed edges? Example:
>
> (let ((g (make-container 'graph-container :default-edge-
> type :directed)))
> (loop for (v1 . v2) in '((a . b) (a . c) (d . a) (e . a)) do
> (add-edge-between-vertexes g v1 v2))
> (map-shortest-paths g (find-vertex g 'a) 1 #'print))
>
> Gives:
>
> (#<A> #<B>)
> (#<A> #<C>)
> (#<A> #<D>)
> (#<A> #<E>)
> #<GRAPH-CONTAINER [5,4] {1002F2E641}>
>
> The appearance of the latter two is, to put it mildly, rather
> counter-intuitive to me.
>
> 4. I apologize if this is more of a CL programming question then a
> cl-graph question, but if map-shortest-paths find the path I'm
> looking for, how do I make it stop looking for the rest?
>
> -Robin
>
> --
> Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo
> Proud Supporter of the Singularity Institute - http://singinst.org/
> http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
> _______________________________________________
> cl-graph-devel mailing list
> cl-graph-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-graph-devel
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM
More information about the cl-graph-devel
mailing list