SchemeExt:Graph:components
From DocR23
Revision as of 22:41, 10 May 2010 by Adminwikispa (Talk | contribs)
Contents |
Action
Returns the number of independent components that are in a graph.
Filename
scm/scmext/kern/graph_scm.cpp
APIs
None
Syntax
(graph:components in-graph)
Argument Types
| Argument | Scheme Data Type |
|---|---|
| in-graph | graph |
Returns
integer
Arguments
- in-graph specifies a graph.
Example
; graph:components ; 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. (graph:components g1) ;; 3 (define g2 (graph:component g1 "me")) ;; g2 (define g3 (graph:component g1 "FIDO")) ;; g3 (define g4 (graph:component g1 1)) ;; g4