Trees | Indices | Help |
|
---|
|
Class that stores the structure of the classification scheme.
|
|||
|
|||
Class_ |
|
||
|
|||
list of str |
|
||
Class_ |
|
||
list of Node |
|
||
|
|||
|
|||
list of list of Class_ |
|
|
|||
|
|||
|
|||
|
|||
|
|
|||
Set of Node |
_node_names Set of node names, for uniqueness checking |
||
List of list of Node |
_nodes_at_levels List of list of nodes, each outer list corresponding to a level |
||
Node |
_root The root node |
||
str |
name Name of this Scheme (set by Scheme.__init__()) |
||
int |
nlevel Number of levels in this Scheme (set by Scheme.__init__()) |
||
List of Node |
ordered_nodes List of nodes in a canonical order, starting with nodes at the 0th level |
|
Create the node network. The network is completely defined by the input parameter node_names_at_levels.
|
Given a collection of items, find the lowest common class in the hierarchy.
|
Calculate and store the number of items in each class in the scheme. This should be called by the application after all items have been registered. |
|
Add an item to the classification scheme.
|
Create nodes at level ilevel and add them to self.ordered_nodes.
|
Create nodes and self.ordered_nodes list.
|
Make sure first and last level have only a single node:
|
Add parents and children to the classes of a newly registered item.
|
Add the specified children and parents to the specified classes. |
Given a flat list of classes, return a list of lists containing the same classes in sub-lists corresponding to the levels of the schme. |
Add parents and children to all nodes at all levels.
|
Add parents and children to all nodes at one level. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jan 10 20:54:36 2015 | http://epydoc.sourceforge.net |