<tree>

<tree> (arbre) encode un arbre, qui est composé d'une racine, de noeuds internes, de feuilles et d'arcs allant de la racine vers les feuilles. 19.2 Trees
Modulenets — 19 Graphs, Networks, and Trees
Attributs
aritydonne le nombre maximal d'enfants de la racine et des noeuds internes de l'arbre.
Statut Optionel
Type de données
data.count
Valeurs A nonnegative integer.
ord (ordered) indique si l'arbre est ordonné ou non ou s'il l'est partiellement.
Statut Requis
Les valeurs autorisées sont:
true
indicates that all of the branching nodes of the tree are ordered. [Valeur par défaut]
partial
indicates that some of the branching nodes of the tree are ordered and some are unordered.
false
indicates that all of the branching nodes of the tree are unordered.
orderdonne l'ordre de l'arbre, c'est-à-dire le nombre de ses noeuds.
Statut Optionel
Type de données
data.count
Valeurs A nonnegative integer.
Note
The size of a tree is always one less than its order, hence there is no need for both a size and order attribute.
Utilisé parforest model.divPart
Peut contenir
core: label
nets: iNode leaf root
Declaration
element tree
{
   att.global.attributes,
   attribute arity { data.count }?,
   attribute ord { "true" | "partial" | "false" },
   attribute order { data.count }?,
   ( label?, ( ( leaf | iNode )*, root, ( leaf | iNode )* ) )
}
Exemple
<tree
  n="ex2"
  arity="2"
  ord="partial"
  order="13">

 <root xml:id="G-div1children="#G-plu1 #G-exp1ord="true">
  <label>/</label>
 </root>
 <iNode
   xml:id="G-plu1"
   children="#G-exp2 #G-exp3"
   parent="#G-div1"
   ord="false">

  <label>+</label>
 </iNode>
 <iNode
   xml:id="G-exp1"
   children="#G-plu2 #G-num2.3"
   parent="#G-div1"
   ord="true">

  <label>**</label>
 </iNode>
 <iNode
   xml:id="G-exp2"
   children="#G-vara1 #G-num2.1"
   parent="#G-plu1"
   ord="true">

  <label>**</label>
 </iNode>
 <iNode
   xml:id="G-exp3"
   children="#G-varb1 #G-num2.2"
   parent="#G-plu1"
   ord="true">

  <label>**</label>
 </iNode>
 <iNode
   xml:id="G-plu2"
   children="#G-vara2 #G-varb2"
   parent="#G-exp1"
   ord="false">

  <label>+</label>
 </iNode>
 <leaf xml:id="G-vara1parent="#G-exp2">
  <label>a</label>
 </leaf>
 <leaf xml:id="G-num2.1parent="#G-exp2">
  <label>2</label>
 </leaf>
 <leaf xml:id="G-varb1parent="#G-exp3">
  <label>b</label>
 </leaf>
 <leaf xml:id="G-num2.2parent="#G-exp3">
  <label>2</label>
 </leaf>
 <leaf xml:id="G-vara2parent="#G-plu2">
  <label>a</label>
 </leaf>
 <leaf xml:id="G-varb2parent="#G-plu2">
  <label>b</label>
 </leaf>
 <leaf xml:id="G-num2.3parent="#G-exp1">
  <label>2</label>
 </leaf>
</tree>
Note
A root, and zero or more internal nodes and leaves, but if there is an internal node, there must also be at least one leaf.