Class ContextGenerator
Constructor for a simple context generator with the given radius. Node
locations are resolved using nodeindex (typically an instance of
tree.DocumentOrderIndex) and values are mapped using the valindex.
Constructor
-
class ContextGenerator(radius, nodeindex, valindex)
Arguments: |
- radius –
- nodeindex –
- valindex –
|
Methods
head
-
ContextGenerator#head(anchor)
Arguments: |
- anchor – The tree.Anchor specifying the first node after head.
|
Return n values representing the head-context where n is the size of the
radius.
tail
-
ContextGenerator#tail(anchor, length, depth)
Arguments: |
- anchor – The tree.Anchor specifying the first node after head.
- length – The number of siblings affected by the operation.
- depth –
- Wether the operation affects subtrees (true) or only
- one node (false).
|
Return the values for the tail context starting with the given node.