Skip to main content

Kdtree::KdTree

Kdtree::KdTree

More…

#include <KdTree.hpp>

Public Functions

Name
KdTree(const KdNodeVector< T > * nodes, int distance_type =2)
~KdTree()
void set_distance(int distance_type, const WeightVector * weights =NULL)
void k_nearest_neighbors(const CoordPoint< T > & point, size_t k, KdNodeVector< T > * result, KdNodePredicate< T > * pred =NULL)
void range_nearest_neighbors(const CoordPoint< T > & point, double r, KdNodeVector< T > * result)

Public Attributes

Name
KdNodeVector< T > allnodes
size_t dimension
kdtree_node< T > * root

Detailed Description

template <typename T >
class Kdtree::KdTree;

Public Functions Documentation

function KdTree

KdTree(
    const KdNodeVector< T > * nodes,
    int distance_type =2
)

function ~KdTree

~KdTree()

function set_distance

void set_distance(
    int distance_type,
    const WeightVector * weights =NULL
)

function k_nearest_neighbors

void k_nearest_neighbors(
    const CoordPoint< T > & point,
    size_t k,
    KdNodeVector< T > * result,
    KdNodePredicate< T > * pred =NULL
)

function range_nearest_neighbors

void range_nearest_neighbors(
    const CoordPoint< T > & point,
    double r,
    KdNodeVector< T > * result
)

Public Attributes Documentation

variable allnodes

KdNodeVector< T > allnodes;

variable dimension

size_t dimension;

variable root

kdtree_node< T > * root;

Updated on 2026-11-13 at 20:25:42 +0000