float
and not the default
double
representation.
reserved attribute name | required type of constant |
graph_name | <string constant> |
name | <string constant> |
location | (<numeric constant>,<numeric constant>) |
vcolor | <int constant> |
ecolor | <int constant> |
direction | <int constant> |
weight | <int constant> |
open | <int constant> |
/src/interface/scanner.l
. The parser need not be changed unless
the new reserved attribute must be of a type which is not currently
supported.
If the <attr_name> is not reserved, then
the type of the
<attr_value> determines the type of Attribute object which will be
created and associated with the graph.
After the preamble, there is a square-bracket enclosed list of vertex
names with optional associated attributes.
Each vertex specification consists of
an identifier, integer constant, or string constant naming the vertex
and a square bracket enclosed list
of attributes of the same format as that discussed above. The only
difference is that it is not permitted to declare new attributes
outside of the preamble. Any unrecognized attribute name outside of the
preamble will be flagged as an undeclared attribute and the parse
will be aborted.
The final section of the graph input file identifies the Edges.
Undirected edges are specified with curly-brace enclosed lists of
identifiers, integer constants, or string constants identifying vertices.
There is no delimiter other than
white space separating the vertex names in this list. If any
edge contains a vertex name which did not appear in the Vertices
section, that vertex is reported to be undeclared and the parse fails.
Support for further attribute types can be obtained by studying and
specializing the AttributeElementOps<T> class in Attribute.h
(for correct output) and the graph language grammar listed in
Appendix A, which is automatically generated from
parser.y in the /src/interface
directory. In order to allow
arbitrary structure or pointer types to be stored and reloaded successfully,
the graph input language would have to be augmented with more type recognizing
power.
Recall from Section