1 Macros |
|
|
define-vl-hash |
Form | (define-vl-hash name args streamed? bidirectional? vertex-properties get-vl) |
Description | Create and import specialized vertex list.
VERTEX LIST
[vertex_record-hashtable max-vertex_index]
VERTEX RECORD
[out-edge_list {if bidirectional? in-edge_list} vertex-properties]
VERTEX DESCRIPTOR
source-hashtable_key
|
Parameters | name | graph type name, which is used to
prefix all the graph methods |
args | ([PRED [SIZE]]) - PRED is (lambda v1 v2) that equality compares two vertices, and SIZE is initial vertex storage size |
streamed? | #t if the stream methods are to be created |
bidirectional? | #t if in-edge methods are
to be created |
vertex-properties | list of internal vertex
properties |
get-vl | procedure -> vertex_list |
See also | Graph Methods | graph-methods |
|
GTYPE-vertex-set? |
Form | (GTYPE-vertex-set?) |
Description | Are the vertices in a set (#t) or a list (#f)? |
Returns | boolean |
|
2 Graph Methods |
|
|
##carp##make-GTYPE-vl |
Form | (##carp##make-GTYPE-vl graph) |
Description | Internal. |
Returns | vertex_list |
|
GTYPE-add-vertex! |
Form | (GTYPE-add-vertex! graph key [ignored-arg ...]) |
Description | Create and add a new vertex to graph , indexed by key . If vertex already exists at key , then returns the preexisting vertex. In any case, the key is the vertex descriptor. Amortized O(1). |
Parameters | graph | graph object |
key | to-be-added vertex_descriptor |
ignored-arg | argument that will be ignored |
Returns | vertex_descriptor |
|
GTYPE-remove-vertex! |
Form | (GTYPE-remove-vertex! graph vertex_descriptor) |
Description | Remove vertex from graph. All vertex_descriptors will become invalid. O(n). |
|
GTYPE-vertex-eq? |
Form | (GTYPE-vertex-eq? graph u v) |
Description | Is vertex u the same vertex as vertex v? |
Returns | (if 'vertices-equal #t #f) |
|
GTYPE-num-vertices |
Form | (GTYPE-num-vertices graph) |
Description | Gets the number of vertices in graph. O(1). |
Returns | number-of-vertices-integer |
|
GTYPE-vertices |
Form | (GTYPE-vertices graph) |
Description | Gets a list of all the vertices in the graph. |
Returns | (list vertex_descriptor ...) |
|
GTYPE-vertices* |
Form | (GTYPE-vertices* graph) |
Description | Gets a stream of all the vertices in the graph. |
Returns | (stream vertex_descriptor ...) |
|
GTYPE-clear! |
Form | (GTYPE-clear! graph) |
Description | Removes all vertices and edges from graph. |
|
##carp#GTYPE-out-edge-list |
Form | (##carp#GTYPE-out-edge-list graph vertex_descriptor) |
Description | Internal. |
Returns | out-edge_list |
|
##carp#GTYPE-in-edge-list |
Form | (##carp#GTYPE-in-edge-list graph vertex_descriptor) |
Description | Internal. Only defined if bidirectional?. |
Returns | in-edge_list |
|
3 Graph Properties |
The methods that follow [except GTYPE-vertex-index] are just examples, if you use the 'vertex-properties as (vertex-name vertex-color). The vertex-index property is always created for vl-vector. |
|
GTYPE-vertex-index |
Form | (GTYPE-vertex-index graph vertex_descriptor) |
Description | Read-only property map alwys created by vl-vector. |
Returns | vertex-index-integer |
See also | properties | Rooster Graph Properties |
|
GTYPE-vertex-name |
Form | (GTYPE-vertex-name graph vertex_descriptor) |
Description | Example. Property getter. |
Returns | vertex-property |
See also | properties | Rooster Graph Properties |
|
GTYPE-vertex-color |
Form | (GTYPE-vertex-color graph vertex_descriptor) |
Description | Example. Property getter. |
Returns | vertex-property |
See also | properties | Rooster Graph Properties |
|
set-GTYPE-vertex-name! |
Form | (set-GTYPE-vertex-name! graph vertex_descriptor vertex-property) |
Description | Example. Property setter. |
See also | properties | Rooster Graph Properties |
|
set-GTYPE-vertex-color! |
Form | (set-GTYPE-vertex-color! graph vertex_descriptor vertex-property) |
Description | Example. Property setter. |
See also | properties | Rooster Graph Properties |
|
GTYPE-vertex-name-map |
Form | GTYPE-vertex-name-map |
Description | Example. Property map. |
Returns | vertex-property-map |
See also | properties | Rooster Graph Properties |
|
GTYPE-vertex-color-map |
Form | GTYPE-vertex-color-map |
Description | Example. Property map. |
Returns | vertex-property-map |
See also | properties | Rooster Graph Properties |
|