Figure 9.5:
Defining graph functions:
|
(oval-item vg) |
(slot) Holds an object of class <guarded-oval>, where the
latter prevents
the user from changing the ``fill'' slot, since ``color'' is the
slot which controls the color of the vertex. NOT SETTLED YET -
MUST OTHER ATTRIBUTES BE GUARDED TOO?
(slot) Holds the STk <txt-item> which holds the the vertex label.
Note that vertex-label and vertex-name are two different concepts. The
name is constant, while the label can change to display various
information.
(slot) Holds the <vertex*> object contained within
vg.
(slot) The viewing coordinates of <vertex-item>
vg.
(slot) The world coordinates of <vertex-item>
vg.
(slot) The size in pixels of the oval depicting the vertex.
(slot)The width of the outline encircling the vertex-item. The default
is 1.
(slot) The color of the outline encircling the vertex-item.
(slot) The color of the oval depicting the vertex.
(slot) The color of the vertex label.
(slot) The font of the vertex label.
(slot) The stipple of the oval depicting the vertex. For
example, ``'' is
the default value, and ''gray-50'' gives the oval a sparser
background. See the Tk documentation for other options.
(slot) The STk tags associated with the vertex-item. This
information
is contained in a list, and some common values include 'vertex,
which is always present in vertices, and 'link:selected-item,'
which is added if the user selects the vertex.
(method) returns the degree of the vertex contained within
vertex-item
vg.
(method) returns a random neighbor (out-neighbor) of
vertex-item
vg.
(method) Returns #t if
vg is a vertex-item object.