#include <kdtree.h>
Classes | |
struct | no_specific_order |
Public Member Functions | |
void | printLeavesize () |
int | size () |
std::list< float * > * | findDatasetInterval (unsigned int kdim, unsigned int curlvl, float *min_datavec, float *max_datavec) |
std::list< VALUE > * | findUsersetInterval (unsigned int kdim, unsigned int curlvl, float *min_datavec, float *max_datavec) |
std::list< float * > * | findDataset (unsigned int kdim, unsigned int curlvl, float *datavec) |
std::list< VALUE > * | findUserset (unsigned int kdim, unsigned int curlvl, float *datavec) |
Public Attributes | |
float | comparevalue |
Value which splits the data into two halfs along current dimension. | |
KDNode * | left |
Left subtree contains only datavectors v where v[dim] < comparevalue;. | |
KDNode * | right |
Right subtree contains only datavectors v where v[dim] >= comparevalue;. | |
std::list< float * > * | dataset |
If this node is a leaf then dataset stores same datavectors (or one). | |
std::list< VALUE > * | userset |
If this node is a leaf then userset stores associated userdata. |
KDNode represents a Single KD-Tree node/leaf or a complete tree/subtree as well. This structure is for use in kdtree class only!
std::list<float*>* kdtree< VALUE >::KDNode::findDataset | ( | unsigned int | kdim, | |
unsigned int | curlvl, | |||
float * | datavec | |||
) | [inline] |
Finds a set of similar or equal vectors to the given data-vector. If the returned set contains more than one vector then they are equal as for the data but the pointers are different (Data-Vectors do have data+identity). Don't delete returned sets!! Returned sets are part of the kd-tree!
std::list<float*>* kdtree< VALUE >::KDNode::findDatasetInterval | ( | unsigned int | kdim, | |
unsigned int | curlvl, | |||
float * | min_datavec, | |||
float * | max_datavec | |||
) | [inline] |
Search for data vectors near to the given data vector interval (ie. searching for data vectors matching multidimensional Intervals). Note that the result may contain more data than just the data vectors within the interval (false positives, or fuzziness). You should delete returned sets!! Caller responsibility!
std::list<VALUE>* kdtree< VALUE >::KDNode::findUserset | ( | unsigned int | kdim, | |
unsigned int | curlvl, | |||
float * | datavec | |||
) | [inline] |
Finds a set of similar or equal vectors to the given data-vector and returns their associated userdata (objects related to those vectors). If the returned set contains more than one vector then they are equal as for the data but the pointers are different (Data-Vectors do have data+identity). Don't delete returned sets!! Returned sets are part of the kd-tree!
std::list<VALUE>* kdtree< VALUE >::KDNode::findUsersetInterval | ( | unsigned int | kdim, | |
unsigned int | curlvl, | |||
float * | min_datavec, | |||
float * | max_datavec | |||
) | [inline] |
Search for data vectors near to the given data vector interval (ie. searching for data vectors matching multidimensional Intervals) and returns their associated userdata (objects related to those vectors). Note that the result may contain more data than just within the interval (false positives, or fuzziness). You should delete returned sets!! Caller responsibility!
void kdtree< VALUE >::KDNode::printLeavesize | ( | ) | [inline] |
Print size of KD-Tree leaves.
int kdtree< VALUE >::KDNode::size | ( | ) | [inline] |
Returns amount of (not necessarily unique) stored datavectors.