Action:

Returns the shortest cycle graph that includes the specified graph vertex.


Filename:

kern/kern_scm/graph_scm.cxx


Syntax:

(graph:shortestcycle ingraph invertex)


Arg Types:

ingraph

graph


invertex

string  entity


Returns:

graph


Description:

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



ingraph specifies a graph.



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


Example:

; graph:shortestcycle


; 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:shortestcycle g1 "me"))


;; g2


(define g3 (graph:shortestcycle g1 "FIDO"))


;; g3
