|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGramaticas.ArbolCYK
public class ArbolCYK
Clase que implementa un nodo del arbol de analisis resultante del algoritmo de parsing CYK.
Field Summary | |
---|---|
private java.util.ArrayList |
ramas
Ramas que cuelgan del nodo (de izqda a drcha). |
private Simbolo |
simb
Simbolo (terminal/no terminal) almacenado en el nodo. |
Constructor Summary | |
---|---|
ArbolCYK(Simbolo s,
ArbolCYK ri,
ArbolCYK rd)
Constructor |
Method Summary | |
---|---|
void |
dibujar(java.lang.String titulo)
Dibuja en una ventana una representacion grafica del arbol de analisis |
Tree |
getChild(int i)
Returns the i'th subtree of the tree's root. |
java.lang.String |
getLabel()
Returns the tree's root's label. |
int |
numChildren()
Returns the number of subtrees of the tree's root. |
java.lang.String |
toString()
Devuelve una representacion parentizada del arbol en formato String |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Simbolo simb
private java.util.ArrayList ramas
Constructor Detail |
---|
public ArbolCYK(Simbolo s, ArbolCYK ri, ArbolCYK rd)
s
- Simbolo (terminal/no terminal) almacenado en el nodo.ri
- Subarbol de la rama izqda. (recibe null
si no hay, caso de los nodos hoja)rd
- Subarbol de la rama drcha. (recibe null
si no hay, caso de los nodos hoja y las reglas No_terminal->Terminal)Method Detail |
---|
public int numChildren()
Tree
numChildren
in interface Tree
public Tree getChild(int i)
Tree
getChild
in interface Tree
public java.lang.String getLabel()
LabelledTree
getLabel
in interface LabelledTree
public void dibujar(java.lang.String titulo)
titulo
- Titulo de la ventanapublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |