Trees | Indices | Help |
|
---|
|
A Class in the classification scheme. Meant to be called only by _Node in this module. N.B.: The term "item" is a synonym for a _Class object at the lowest level of the hierarchy.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
set of items |
|
||
set of items |
|
||
set of items |
|
||
|
|
|||
int |
NO_FILL = 0 Do not diverge from equal child sampling in an attempt to return nwanted items; see getDiverseRandomItems().
|
||
int |
PART_FILL = 1 Mildly diverge from equal child sampling in an attempt to return nwanted items; see getDiverseRandomItems().
|
||
int |
FULL_FILL = 2 Strongly diverge from equal child sampling in an attempt to return nwanted items; see getDiverseRandomItems().
|
|
|||
set of _Class |
children Children of the current _Class (set by Scheme.registerItem()) |
||
Any object |
data Arbitrary data associated with an item (set by Scheme.registerItem()) |
||
str |
name Name of the current _Class (set by Scheme.registerItem()) |
||
int |
nitems Number of items contained by the current _Class (set by Scheme.setClassPopulations()) |
||
_Node |
node Node to which the current _Class belongs (set by Scheme.registerItem()) |
||
set of _Class |
parents Parents of the current _Class (set by Scheme.registerItem()) |
|
Create a new class with the given name in the given node. It is assumed that the name has already been checked for uniqueness within the node.
|
Add the ordered class list to its item. This permits certain search optimizations.
|
Add a child to the current class.
|
Add a parent to the current class.
|
Get the set of items contained in the current class.
|
Get (up to) nwanted random items from the current class. If there are nwanted or fewer items in the class, return them all.
|
Worker function to implement the recursive part of the method invoked by getDiverseRandomItems. See that method's description for details. |
Get (up to) nwanted random items from a _Class, selecting more or less equally from _Class children, recursively, at each level down to the items themselves. This avoids unbalanced random sampling in situations where some child classes contain many more items than others.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon May 19 23:05:07 2014 | http://epydoc.sourceforge.net |