Action:

Returns a number representing the distance a given graph vertex is from the 0 node in the given ordered graph.


Filename:

kern/kern_scm/graph_scm.cxx


Syntax:

(graph:getorder ingraph invertex)


Arg Types:

ingraph

graph


invertex

string  entity


Returns:

integer



ingraph specifies a graph.



invertex could be either the designation name used as part of the graph or the model entity associated with that graph vertex.


Example:

; graph:getorder


; Create a simple graph.


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


;; g1


(graph:orderfrom g1 "a")


;; 4


(graph:getorder g1 "a")


;; 0


(graph:getorder g1 "b")


;; 1


(graph:getorder g1 "h")


;; 4


(graph:showorder g1)


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