Class TreeHashIndex
Create new instance of a tree hash index.
Constructor
-
class TreeHashIndex(treehash[, propname])
Arguments: |
- treehash (object) – An object implementing the tree-hashing method.
E.g. an instance of
:js:class`SimpleTreeHash`.
- propname (string) – The name of the property which will be used to
cache the hash values on tree.Node objects. Defaults to ‘treehash’.
|
Methods
get
-
TreeHashIndex#get(node)
Arguments: |
- node (object) – A tree.Node.
|
Returns number: | Hash value of the subtree rooted at the given node.
|
Return the hash value for the subtree rooted at the given node.