<graph>

<graph> codifica un grafo, cioè una raccolta di nodi e archi che collegano i nodi 19.1 Graphs and Digraphs
Modulonets — 19 Graphs, Networks, and Trees
Attributi
typedescrive il tipo di grafo
Stato Consigliato
Tipo di dati
data.enumerated
I valori suggeriti includono:
undirected
grafo non orientato
directed
grafo orientato
transitionNetwork
grafo orientato con nodi finale e iniziale distinti.
transducer
rete di transizione con un massimo di due etichette per arco
Nota
If type is specified as 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 is specified as directed (or any other value which implies directionality), then the adjFrom and adjTo attributes should be used, instead of the adj attribute.
orderdefinisce l'ordine del grafo, cioè il numero dei suoi nodi
Stato Opzionale
Tipo di dati
data.count
Valori A positive integer.
sizedefinisce la dimensione del grafo, cioè il numero dei suoi archi
Stato Opzionale
Tipo di dati
data.count
Valori A non-negative integer.
Usato da model.divPart
Può contenere
Dichiarazione
element graph
{
   att.global.attributes,
   attribute type
   {
      "undirected" | "directed" | "transitionNetwork" | "transducer" | xsd:Name
   }?,
   attribute order { data.count }?,
   attribute size { data.count }?,
   (
      ( label, model.global* )?,
      (
         ( ( node, model.global* )+, ( arc, model.global* )* )
       | ( ( arc, model.global* )+, ( node, model.global* )+ )
      )
   )
}
Esempio
<graph
  xml:id="cug1"
  type="undirected"
  order="5"
  size="4"
  rend="LABEL-PLACE bottom center NODE-FRAME none ARC solid line">

 <label>Airline Connections in Southwestern USA</label>
 <node xml:id="laxdegree="2">
  <label>LAX</label>
 </node>
 <node xml:id="lvgdegree="2">
  <label>LVG</label>
 </node>
 <node xml:id="phxdegree="3">
  <label>PHX</label>
 </node>
 <node xml:id="tusdegree="1">
  <label>TUS</label>
 </node>
 <node xml:id="cibdegree="0">
  <label>CIB</label>
 </node>
 <arc from="#laxto="#lvg"/>
 <arc from="#laxto="#phx"/>
 <arc from="#lvgto="#phx"/>
 <arc from="#phxto="#tus"/>
</graph>
Nota
One or more nodes and zero or more arcs in any order.