graph:order-with
List of: Scheme Extensions
Subjects: Graph Theory
Contents: Kernel

Action: Sets the order of one graph onto another and rescales the ordering to remove gaps.

Filename: kern/kern_scm/graph_scm.cxx

Syntax: (graph:order-with in-graph1 in-graph2)

Arg Types: in-graph1 graph

in-graph2 graph

Returns: integer

Description: This extension orders the in-graph1 with respect to in-graph2. The integer returned is the maximum order number.


in-graph1 and in-graph2 specifies the graph.

Example: ; graph:order-with

; Create a simple example

(define g1 (graph "a-b b-c c-d d-e"))

;; g1

(graph:order-from g1 "a")

;; 4

(graph:show-order g1)

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

(graph:negate g1)

;; #[graph "a-b b-c c-d d-e"]

(graph:show-order g1)

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

(define s1 (graph "a c e"))

;; s1

(graph:order-with s1 g1)

;; 2

(graph:show-order s1)

;; ("a 2" "c 1" "e 0")
PDF/KERN/13SCF.PDF
HTM/DATA/KERN/KERN/13SCF/0058.HTM