SchemeExt:Graph:order-with
From DocR21
Contents |
Action
Sets the order of one graph onto another and rescales the ordering to remove gaps.
Filename
scm/scmext/kern/graph_scm.cpp
APIs
None
Syntax
(graph:order-with in-graph2 in-graph3)
Argument Types
| Argument | Scheme Data Type |
|---|---|
| in-graph2 | graph |
| in-graph3 | graph |
Returns
integer
Description
This extension orders the in-graph2 with respect to in-graph3. The integer returned is the maximum order number.
Arguments
- in-graph2 and in-graph3 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")
