Home > WaCoLab > package > @tree > linearizeTree.m

linearizeTree

PURPOSE ^

linearizeTree -- A breadth first linearization of a tree

SYNOPSIS ^

function lintree = linearizeTree(tree)

DESCRIPTION ^

linearizeTree -- A breadth first linearization of a tree

 input:
   tree: the tree to linearize
 output:
   An array with the number of nodes as length. For every node the label
   is given in the array, beginning with the root node, in a breadth first
   order.
 example:
 For the tree
   o node1 1
   |-node2 2
   |   |-node2 3
   |   |-node1 4
   |-node3 5
   |   |-node2 6
   |   |-node1 7
 the result is as follows : [1    1    5     3     4     6     7]

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 12-Oct-2007 20:23:47 by m2html © 2003