Generated: July 29, 2004, 07:56:25 A SchemeDoc Manual

Rooster Graph - Hash Vertex List

Jonah Nathaniel Beckford © 2004

LAML Version 23.00 (December 12, 2003, full)

Hash Vertex List for the Rooster Graph. The keys you pass in become the vertex descriptors.

Table of Contents:
1. Macros 2. Graph Methods 3. Graph Properties

Alphabetic index:
##carp##make-GTYPE-vl (##carp##make-GTYPE-vl graph) Internal.
##carp#GTYPE-in-edge-list (##carp#GTYPE-in-edge-list graph vertex_descriptor) Internal.
##carp#GTYPE-out-edge-list (##carp#GTYPE-out-edge-list graph vertex_descriptor) Internal.
GTYPE-add-vertex! (GTYPE-add-vertex! graph key [ignored-arg ...]) Create and add a new vertex to graph, indexed by key.
GTYPE-clear! (GTYPE-clear! graph) Removes all vertices and edges from graph.
GTYPE-num-vertices (GTYPE-num-vertices graph) Gets the number of vertices in graph.
GTYPE-remove-vertex! (GTYPE-remove-vertex! graph vertex_descriptor) Remove vertex from graph.
GTYPE-vertex-color (GTYPE-vertex-color graph vertex_descriptor) Example.
GTYPE-vertex-color-map GTYPE-vertex-color-map Example.
GTYPE-vertex-eq? (GTYPE-vertex-eq? graph u v) Is vertex u the same vertex as vertex v?
GTYPE-vertex-index (GTYPE-vertex-index graph vertex_descriptor) Read-only property map alwys created by vl-vector.
GTYPE-vertex-name (GTYPE-vertex-name graph vertex_descriptor) Example.
GTYPE-vertex-name-map GTYPE-vertex-name-map Example.
GTYPE-vertex-set? (GTYPE-vertex-set?) Are the vertices in a set (#t) or a list (#f)?
GTYPE-vertices (GTYPE-vertices graph) Gets a list of all the vertices in the graph.
GTYPE-vertices* (GTYPE-vertices* graph) Gets a stream of all the vertices in the graph.
define-vl-hash (define-vl-hash name args streamed? bidirectional? vertex-properties get-vl) Create and import specialized vertex list.
set-GTYPE-vertex-color! (set-GTYPE-vertex-color! graph vertex_descriptor vertex-property) Example.
set-GTYPE-vertex-name! (set-GTYPE-vertex-name! graph vertex_descriptor vertex-property) Example.

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


Generated: July 29, 2004, 07:56:26
Generated by LAML SchemeDoc .