- COPYRIGHT AND LICENSE
TPath::Index - tree-specific database
my $f = MyForester->new; # hypothetical forester for my sort of tree my $root = next_tree(); # generate my sort of tree my $index = $f->index($root); # construct reusable index for $root
A cache of information about a particular tree. Reuse indices to save effort.
The chief function of an index is to enable an expression to map a node to its ancestors for those trees that provide this mapping themselves. All tree-specific caches belong here, though.
The map from ids to nodes.
The root of the indexed tree.
Expects a node. Returns whether this node is the root of the tree indexed by this index.
Cause this index to walk its tree and perform all necessary indexation.
Expects a node and returns the parent of this node.
Record the link from child to parent. If this index is unnecessary for a particular variety of tree -- nodes know their parents -- then you should override this method to be a no-op. It assumes all nodes are references and will throw an error if this is not the case.
Returns the unique identifier, if any, that identifies this node. This method delegates to the forester's
The TPath::Forester that generated this index.
David F. Houghton <email@example.com>
This software is copyright (c) 2013 by David F. Houghton.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 180:
Unknown directive: =attribute