SchemeExt:Graph:show-order

From DocR21

Jump to: navigation, search

Contents

Action

Creates a list of a vertices in a graph and their respective distance from the starting vertex.

Filename

scm/scmext/kern/graph_scm.cpp

APIs

None

Syntax

(graph:show-order in-graph)

Argument Types

Argument Scheme Data Type
in-graph graph

Returns

text

Arguments

  • in-graph specifies a graph.

Example

; graph:show-order
; Create a simple graph.
(define g1 (graph "a-b b-c c-e c-d c-f f-g f-h"))
;; g1
(graph:order-from g1 "a")
;; 4
(graph:show-order g1)
;; ("a 0" "b 1" "c 2" "e 3" "d 3" "f 3" "g 4" "h 4")
Personal tools
Live