Action:

Sets the order of a graph starting at 0 for the specified vertex.


Filename:

kern/kern_scm/graph_scm.cxx


Syntax:

(graph:orderfrom ingraph invertex)


Arg Types:

ingraph

graph


invertex

string  entity


Returns:

integer


Description:

When ordering the graph starting at 0 for the specified
invertex, each subsequent vertex receives a number based on how far away it is (e.g., how many edges) from the starting vertex. The integer returned is the maximum number of "hops" that one or more vertices are from the starting vertex.



ingraph specifies a graph.



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


Example:

; graph:orderfrom


; Create a simple graph.


(define g1 (graph "ab bc ce cd cf fg fh"))


;; g1


(graph:orderfrom g1 "a")


;; 4


(graph:showorder g1)


;; ("a 0" "b 1" "c 2" "e 3" "d 3" "f 3" "g 4" "h 4")
