Action:

Returns the shortest path graph that includes the two specified graph vertices.


Filename:

kern/kern_scm/graph_scm.cxx


Syntax:

(graph:shortestpath ingraph invertex1 invertex2)


Arg Types:

ingraph

graph


invertex1

string  entity


invertex2

string  entity


Returns:

graph


Description:

This extension can be used to trim away branches off of a cyclic graph.



ingraph specifies a graph.



invertex1 could be either a designation string of the graph or a model entity associated with a graph vertex.



invertex2 could be either a designation string of the graph or a model entity associated with a graph vertex.


Example:

; graph:shortestpath


; Create a simple example


(define g1 (graph "meyou youus usthem



themthey methey



FIDOSPOT SPOTKING SPOTPETEY"))


;; g1


; CAREFUL: The order of the graph output may


; not be the same each time.


(define g2 (graph:shortestpath g1 "me" "us"))


;; g2


(define g3 (graph:shortestpath g1 "me" "FIDO"))


;; g3


(define g4 (graph:shortestpath g1 "PETEY" "FIDO"))


;; g4
