HDK
|
#include <UT_Classifier.h>
Definition at line 75 of file UT_Classifier.h.
|
inline |
Definition at line 78 of file UT_Classifier.h.
|
inline |
Definition at line 81 of file UT_Classifier.h.
|
default |
|
inline |
Definition at line 109 of file UT_Classifier.h.
Explicit request to build the index, instead of implicitly triggering it by calling classIndex(). If root_independent is true, the created index of each class will be the relative rank of its smallest element compared to other classes. Otherwise, it will be the relative rank of the class root (default) which is the case if the index is build implicitly. If min_class_size is set to a number larger than 1, only classes with min_class_size elements or larger are assigned a usual index and other classes are assigned -1.
|
inline |
Returns an ordinal number between 0 and number of classes - 1. buildIndex() must be called explicitly before calling classIndex(). Calling makeClasses() or unionClasses() invalidate the index and
Definition at line 124 of file UT_Classifier.h.
Look up the ticket number for the root element of the part of the parameter element
Definition at line 342 of file UT_Classifier.h.
|
inline |
Definition at line 131 of file UT_Classifier.h.
void UT_Classifier::consolidate | ( | bool | keep_size = false , |
bool | keep_index = false |
||
) |
Free up all unnecessary information except for class roots. makeClass and unionClasses operation are ignored on a consolidated classifier. class size and index information are also expunged (unless keep_size or keep_index are respectively set to true) and methods classIndex() and classSize() return -1 on all input. Of course classRoot() very much works as usual after consolidation! Calling reset() revives the object from the state of consolidation but naturally resets all the classes into singletons.
|
inline |
Definition at line 117 of file UT_Classifier.h.
void UT_Classifier::getAllClassIndices | ( | UT_IntArray & | out_array | ) |
Copy the whole index array.
exint UT_Classifier::makeClass | ( | ) |
create one or more singleton classes which get consecutive ticket numbers returns the ticket number of that last class created
Definition at line 280 of file UT_Classifier.h.
Definition at line 290 of file UT_Classifier.h.
|
inline |
Return number of distinct classes.
Definition at line 113 of file UT_Classifier.h.
|
inline |
Definition at line 169 of file UT_Classifier.h.
|
inline |
Definition at line 366 of file UT_Classifier.h.
Reset all the elements to singleton classes. If new_size is non-negative the number of classes are changed to new_size with ticket numbers 0 to new_size - 1. Otherwise, all classes are made singletons again.
Return the total number of elements in all classes.
Definition at line 116 of file UT_Classifier.h.
merge the classes containing elements with tickets a and b into a single part
Definition at line 307 of file UT_Classifier.h.