ostream & operator << (ostream & os, const nTreeLNode<int> * t)
{
os << t;
return os;
}
ostream & operator << (ostream & os, const nTreeLNode<int> & t)
{
if (t.isLeaf(t.root())) // El arbol solo es un nodo raiz
{
os << "Arbol (" << t.label(t.root()) << ")";
return os;
}
LNode<int> * hijo = t.leftMostChild (t.root());
os << " Arbol (" << t.label(t.root());
while (hijo)
{
os << ", " << t.subTree(hijo);
hijo = t.rightSibling (hijo);
}
os << ")";
return os;
}