2 Nov 2008 03:55
further to all-bidirectional-search-paths
Stewart Wallace <stewart.wallace <at> dictionaryofsydney.org>
2008-11-02 02:55:50 GMT
2008-11-02 02:55:50 GMT
Stewart Wallace <stewart.wallace <at> dictionaryofsydney.org> writes: Further experimenting suggests that the normal behaviour for this function is to only return the shortest path - it will return more than one only if there are several the same length. If there is some way to make it return all paths up to max-depth n, I would be very interested to know. I have attempted to use the Prolog equivalent - bidirectional-search-paths - as an alternative as the doco on it suggested more explicitly that it iterates through multiple returned paths but I've struck another problem here because it just seems to return nil paths. I've set it up as follows: (setf mn1 (upi !mp1:MajorNode_1)) (setf mn2 (upi !mp1:MajorNode_2)) (?- (bidirectional-search-paths (?? mn1) (?? mn2) (?? nextN) 11)) .. nextN is the generator previously defined in my previous post - (setf nextN (defsna-generator nextNode () (:undirected :p (!mp1:hasNextNode)))) The exact equivalent lisp version - (all-bidirectional-search-paths !mp1:MajorNode_1 !mp1:MajorNode_2 nextN 11) - returns at least a path but the Prolog one just returns nil - can't see what I'm doing wrong. I've also noticed that AllegroCL doesn't seem to want to recognise some of the other Prolog functions mentioned in the doco like: (?- (nodal-neighbors (?? mn1) (?? nextN))) .. this just gives and unrecognised-function error. Are all the documented Prolog SNA functions (those in(Continue reading)






RSS Feed