Action:
|
Performs a Boolean subtract operation of two graphs.
|
|
Filename:
|
kern/kern_scm/graph_scm.cxx
|
|
Syntax:
|
(graph:subtract in-graph1 in-graph2 in-keep)
|
|
Arg Types:
|
in-graph1
|
graph
|
|
in-graph2
|
graph
|
|
in-keep
|
boolean
|
|
Returns:
|
graph
|
|
|
in-graph1 and
in-graph2 specifies the graph.
|
|
|
The
in-keep argument with a value true (#t) specifies that the edges going to common elements are kept.
|
|
Example:
|
; graph:subtract
|
|
; Create some simple graphs.
|
|
(define g1 (graph "I-me me-myself myself-mine I-we
|
|
|
we-us us-them"))
|
|
;; g1
|
|
(define g2 (graph "he-she it-thing they-those us-we
|
|
|
them-us"))
|
|
;; g2
|
|
(define g3 (graph:subtract g1 g2 #f))
|
|
;; g3
|
|
(define g4 (graph:subtract g2 g1 #f))
|
|
;; g4
|
|
(define g5 (graph:subtract g2 g1 #t))
|
|
;; g5
|