| Home | Trees | Index | Help |
|
|---|
| Package WordUtils :: Module dawg :: Class Node |
|
object --+
|
Node
| Method Summary | |
|---|---|
Default constructor. | |
Adds a child with the given key, or return existing child with same key. | |
Return a list of the values that two nodes have in common in their children. (Static method) | |
Compare two nodes. (Static method) | |
Returns the child (if any) having the indicated key. | |
Returns the values of this node's children. | |
Indicates whether node has a child with the indicated key. | |
Merge one node ( fromnode) into another
(tonode). (Static method)
| |
Property target used to get children. | |
Property target used to get endpoint. | |
Property target used to get value. | |
Property target used to set children. | |
Property target used to set endpoint. | |
Property target used to set value. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Property Summary | |
|---|---|
children: Children of this node. | |
endpoint: Indicates whether node is a word endpoint. | |
value: Value of the node. | |
| Instance Method Details |
|---|
__init__(self,
key=None)
Default constructor.
|
addChild(self, key)Adds a child with the given key, or return existing child with same key.
|
getChild(self, key)Returns the child (if any) having the indicated key.
|
getChildValues(self)Returns the values of this node's children.
|
hasChild(self, key)Indicates whether node has a child with the indicated key.
|
_getChildren(self)Property target used to get children. |
_getEndpoint(self)Property target used to get endpoint. |
_getValue(self)Property target used to get value. |
_setChildren(self, value)Property target used to set children. |
_setEndpoint(self, value)Property target used to set endpoint. We normalize the value toTrue or False.
|
_setValue(self, value)Property target used to set value. |
| Static Method Details |
|---|
commonValues(node1, node2)Return a list of the values that two nodes have in common in their children. Note: this is a static method. |
compare(node1, node2)Compare two nodes. The comparison checks whether the two nodes are identical, i.e. have the exact same value, endpoint flag and children (not children with the same values). Note: this is a static method. |
merge(fromnode, tonode)Merge one node ( |
| Property Details |
|---|
childrenChildren of this node.
|
endpointIndicates whether node is a word endpoint.
|
valueValue of the node. |
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Tue Sep 27 17:02:10 2005 | http://epydoc.sf.net |