graph:copy
List of: Scheme Extensions
Subjects: Graph Theory
Contents: Kernel

Action: Creates a new graph that is a copy of the specified graph.

Filename: kern/kern_scm/graph_scm.cxx

Syntax: (graph:copy in-graph)

Arg Types: in-graph graph

Returns: graph


in-graph specifies a graph.

Example: ; graph:copy

; Create a simple example

(define g1 (graph "me-you us-them


we-they them-they


FIDO-SPOT SPOT-KING SPOT-PETEY"))

;; g1

; CAREFUL: The order of the graph output may

; not be the same each time.

(define g2 (graph:component g1 "FIDO"))

;; g2

(define g3 (graph:copy g2))

;; g3

; CAREFUL: The order may not be the same as the

; original, but graphs are still equivalent.
PDF/KERN/13SCF.PDF
HTM/DATA/KERN/KERN/13SCF/0036.HTM