- LICENSE AND COPYRIGHT
Data::Freq::Node - Represents a node of the result tree constructed by Data::Freq
my $root_node = Data::Freq::Node->new();
Constructs a node object in the "frequency tree" in Data::Freq.
my $child_node = $parent_node->add_subnode('normalized text');
Adds a normalized value and returns the corresponding subnode.
If the normalized text appears for the first time under the parent node, a new node is created. Otherwise, the existing node is returned with its count incremented by 1.
Retrieves the count for the normalized text.
Retrieves the normalized value.
Retrieves the parent node in the "frequency tree" in Data::Freq.
For the root node,
undef is returned.
Retrieves a hash ref of the raw counting results under this node, where the key is the normalized text and the value is the corresponding subnode.
Retrieves the number of the child nodes.
Calculates the maximum count of the child nodes.
Calculates the minimum count of the child nodes.
Calculates the average count of the child nodes.
Retrieves the first occurrence index of this node under its parent node.
The index is the count of the parent node at the time this child node is created.
Retrieves the last occurrence index of this node under its parent node.
The index is the count of the parent node at the last time this child node is added or created.
Retrieves the depth in the "frequency tree" in Data::Freq.
The depth of the root node is 0.
<mahiro at cpan.org>
Copyright 2012 Mahiro Ando.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.