<graph> |
encodes a graph, which is a collection of nodes, and arcs which
connect the nodes. |
Attributes |
(In addition to global attributes
and those inherited from chunk)
type |
describes the type of graph. |
|
Datatype: CDATA |
|
Suggested values include:
undirected |
undirected graph |
directed |
directed graph |
transition network |
a directed graph with distinguished initial and final nodes |
transducer |
a transition network with up to two labels on each arc |
|
|
Default: #IMPLIED |
Note |
If type=undirected, then the distinction between
the to and from attributes of the <arc> tag
is neutralized. Also, the adj attribute, rather than the
adjFrom and adjTo attributes, should be used to
encode pointers to the ends of the arcs. If type=directed
(or any other value which implies directionality), then the
adjFrom and adjTo attributes should be used,
instead of the adj attribute.
|
label |
gives a label for a graph. |
|
Datatype: CDATA |
|
Values: A character string. |
|
Default: #IMPLIED |
order |
states the order of the graph, i.e., the number of its nodes. |
|
Datatype: CDATA |
|
Values: A positive integer. |
|
Default: #IMPLIED |
size |
states the size of the graph, i.e., the number of its arcs. |
|
Datatype: CDATA |
|
Values: A non-negative integer. |
|
Default: #IMPLIED |
|
Example |
<graph id="cug1"
rend="LABEL-PLACE bottom center NODE-FRAME none ARC solid line"
type="undirected" label="Airline Connections in Southwestern USA"
order="5" size="4">
<node id="lax" label="LAX" degree="2"/>
<node id="lvg" label="LVG" degree="2"/>
<node id="phx" label="PHX" degree="3"/>
<node id="tus" label="TUS" degree="1"/>
<node id="cib" label="CIB" degree="0"/>
<arc from="lax" to="lvg"/>
<arc from="lax" to="phx"/>
<arc from="lvg" to="phx"/>
<arc from="phx" to="tus"/>
</graph>
|
Example |
<graph id="rdg2"
rend="LABEL-PLACE bottom center NODE-FRAME none ARC solid line with arrowhead"
type="directed" label="Selected Airline Routes in Southwestern USA"
order="5" size="5">
<node id="lax" label="LAX" adjTo="lvg" adjFrom="phx" inDegree="1" outDegree="1"/>
<node id="lvg" label="LVG" adjTo="phx" adjFrom="lax" inDegree="1" outDegree="1"/>
<node id="phx" label="PHX" adjTo="lax tus" adjFrom="lvg tus" inDegree="2" outDegree="2"/>
<node id="tus" label="TUS" adjTo="phx" adjFrom="phx" inDegree="1" outDegree="1"/>
<node id="cib" label="CIB" inDegree="0" outDegree="0"/>
</graph>
|
Module |
Declared in file teinet2; Additional tag set for Graph Theory: enabled by TEI.nets
|
Class |
chunk
|
Data Description |
One
or more nodes and zero or more arcs in any order. |
May contain |
addSpan alt altGrp anchor arc cb certainty delSpan fLib fs fsLib fvLib fw gap index interp interpGrp join joinGrp lb link linkGrp milestone node pb respons span spanGrp timeline |
May occur within |
add argument body castList corr div div0 div1 div2 div3 div4 div5 div6 div7 epigraph epilogue item metDecl note performance prologue q quote set sic stage view |
Declaration |
<!ELEMENT graph %om.RR; ( (( node, (%m.Incl;)* )+, ( arc, (%m.Incl;)* )*)
| (( arc, (%m.Incl;)* )+, ( node, (%m.Incl;)* )+)) >
<!ATTLIST graph
%a.global;
type CDATA #IMPLIED
label CDATA #IMPLIED
order CDATA #IMPLIED
size CDATA #IMPLIED>
|
See further |
21.1 Graphs and Digraphs |