Tapkee
covertree.hpp File Reference
#include <tapkee/neighbors/covertree_point.hpp>
#include <cmath>
#include <limits>
#include <stdio.h>
#include <assert.h>

Go to the source code of this file.

Classes

struct  node< P >
struct  ds_node< P >
struct  d_node< P >

Namespaces

namespace  tapkee
namespace  tapkee::tapkee_internal

Functions

template<class P >
void free_children (const node< P > &n)
ScalarType dist_of_scale (int s)
int get_scale (ScalarType d)
template<class P >
node< P > new_node (const P &p)
template<class P >
node< P > new_leaf (const P &p)
template<class P >
ScalarType max_set (v_array< ds_node< P > > &v)
void print_space (int s)
template<class P >
void print (int depth, node< P > &top_node)
template<class P >
void split (v_array< ds_node< P > > &point_set, v_array< ds_node< P > > &far_set, int max_scale)
template<class P , class DistanceCallback >
void dist_split (DistanceCallback &dcb, v_array< ds_node< P > > &point_set, v_array< ds_node< P > > &new_point_set, P new_point, int max_scale)
template<class P , class DistanceCallback >
node< P > batch_insert (DistanceCallback &dcb, const P &p, int max_scale, int top_scale, v_array< ds_node< P > > &point_set, v_array< ds_node< P > > &consumed_set, v_array< v_array< ds_node< P > > > &stack)
template<class P , class DistanceCallback >
node< P > batch_create (DistanceCallback &dcb, v_array< P > points)
void add_height (int d, v_array< int > &heights)
template<class P >
int height_dist (const node< P > top_node, v_array< int > &heights)
template<class P >
void depth_dist (int top_scale, const node< P > top_node, v_array< int > &depths)
template<class P >
void breadth_dist (const node< P > top_node, v_array< int > &breadths)
template<class P >
ScalarType compare (const d_node< P > *p1, const d_node< P > *p2)
template<class P >
void halfsort (v_array< d_node< P > > cover_set)
template<class P >
v_array< v_array< d_node< P > > > get_cover_sets (v_array< v_array< v_array< d_node< P > > > > &spare_cover_sets)
bool shell (ScalarType parent_query_dist, ScalarType child_parent_dist, ScalarType upper_bound)
void update_k (ScalarType *k_upper_bound, ScalarType upper_bound)
ScalarType * alloc_k ()
void set_k (ScalarType *begin, ScalarType max)
ScalarType * alloc_epsilon ()
void set_epsilon (ScalarType *begin)
void update_unequal (ScalarType *upper_bound, ScalarType new_dist)
void set_unequal (ScalarType *begin, ScalarType max)
template<class P , class DistanceCallback >
void copy_zero_set (DistanceCallback &dcb, node< P > *query_chi, ScalarType *new_upper_bound, v_array< d_node< P > > &zero_set, v_array< d_node< P > > &new_zero_set)
template<class P , class DistanceCallback >
void copy_cover_sets (DistanceCallback &dcb, node< P > *query_chi, ScalarType *new_upper_bound, v_array< v_array< d_node< P > > > &cover_sets, v_array< v_array< d_node< P > > > &new_cover_sets, int current_scale, int max_scale)
template<class P >
void print_query (const node< P > *top_node)
template<class P >
void print_cover_sets (v_array< v_array< d_node< P > > > &cover_sets, v_array< d_node< P > > &zero_set, int current_scale, int max_scale)
template<class P , class DistanceCallback >
void descend (DistanceCallback &dcb, const node< P > *query, ScalarType *upper_bound, int current_scale, int &max_scale, v_array< v_array< d_node< P > > > &cover_sets, v_array< d_node< P > > &zero_set)
template<class P , class DistanceCallback >
void brute_nearest (DistanceCallback &dcb, const node< P > *query, v_array< d_node< P > > zero_set, ScalarType *upper_bound, v_array< v_array< P > > &results, v_array< v_array< d_node< P > > > &spare_zero_sets)
template<class P , class DistanceCallback >
void internal_batch_nearest_neighbor (DistanceCallback &dcb, const node< P > *query, v_array< v_array< d_node< P > > > &cover_sets, v_array< d_node< P > > &zero_set, int current_scale, int max_scale, ScalarType *upper_bound, v_array< v_array< P > > &results, v_array< v_array< v_array< d_node< P > > > > &spare_cover_sets, v_array< v_array< d_node< P > > > &spare_zero_sets)
template<class P , class DistanceCallback >
void batch_nearest_neighbor (DistanceCallback &dcb, const node< P > &top_node, const node< P > &query, v_array< v_array< P > > &results)
template<class P , class DistanceCallback >
void k_nearest_neighbor (DistanceCallback &dcb, const node< P > &top_node, const node< P > &query, v_array< v_array< P > > &results, int k)

Variables

static ScalarType base = COVERTREE_BASE
static ScalarType il2 = 1. / log(base)
int internal_k = 1
ScalarType internal_epsilon = 0.
ScalarType *(* alloc_unequal )() = alloc_epsilon
void(* update )(ScalarType *foo, ScalarType bar) = update_k
void(* setter )(ScalarType *foo, ScalarType bar) = set_k
ScalarType *(* alloc_upper )() = alloc_k
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines