digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::KDNodeBase Class Referenceabstract
+ Inheritance diagram for Digikam::KDNodeBase:

Classes

struct  NodeCompareResult
 

Public Member Functions

 KDNodeBase (const cv::Mat &nodePos, const int identity, int splitAxis, int dimension)
 
double getClosestNeighbors (QMap< double, QVector< int > > &neighborList, const cv::Mat &position, float sqRange, float cosThreshold, int maxNbNeighbors) const
 Return a list of closest neighbors, limited by maxNbNeighbors and sqRange.
 
int getDimension ()
 
int getIdentity ()
 Return identity of the node.
 
cv::Mat getPosition () const
 Return position vector of a node.
 
KDNodeBaseinsert (const cv::Mat &nodePos, const int identity)
 Insert a new node to the sub-tree.
 
virtual NodeCompareResult nodeCompare (const cv::Mat &queryPosition, const cv::Mat &currentPosition, float sqRange, float cosThreshold, int nbDimension) const =0
 
void setNodeId (int id)
 Set database entry ID of the node.
 

Static Public Member Functions

static float cosDistance (const float *const pos1, const float *const pos2, int dimension)
 
static float sqrDistance (const float *const pos1, const float *const pos2, int dimension)
 

Protected Member Functions

virtual KDNodeBasecreateNode (const cv::Mat &nodePos, const int identity, int splitAxis, int dimension)=0
 Pure virtual functions to be overridden in child classes.
 

Member Function Documentation

◆ createNode()

virtual KDNodeBase * Digikam::KDNodeBase::createNode ( const cv::Mat &  nodePos,
const int  identity,
int  splitAxis,
int  dimension 
)
protectedpure virtual