SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros | Functions | Variables
JLCoverTree.h File Reference

Go to the source code of this file.

Classes

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

Macros

#define NDEBUG
 

Functions

float dist_of_scale (int s)
 
int get_scale (float d)
 
template<class P >
node< P > new_node (const P &p)
 
template<class P >
node< P > new_leaf (const P &p)
 
template<class P >
float 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 >
void dist_split (v_array< ds_node< P > > &point_set, v_array< ds_node< P > > &new_point_set, P new_point, int max_scale)
 
template<class P >
node< P > batch_insert (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 >
node< P > batch_create (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 >
float 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 (float parent_query_dist, float child_parent_dist, float upper_bound)
 
void update_k (float *k_upper_bound, float upper_bound)
 
float * alloc_k ()
 
void set_k (float *begin, float max)
 
void update_epsilon (float *upper_bound, float new_dist)
 
float * alloc_epsilon ()
 
void set_epsilon (float *begin, float max)
 
void update_unequal (float *upper_bound, float new_dist)
 
void set_unequal (float *begin, float max)
 
template<class P >
void copy_zero_set (node< P > *query_chi, float *new_upper_bound, v_array< d_node< P > > &zero_set, v_array< d_node< P > > &new_zero_set)
 
template<class P >
void copy_cover_sets (node< P > *query_chi, float *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 >
void descend (const node< P > *query, float *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 >
void brute_nearest (const node< P > *query, v_array< d_node< P > > zero_set, float *upper_bound, v_array< v_array< P > > &results, v_array< v_array< d_node< P > > > &spare_zero_sets)
 
template<class P >
void internal_batch_nearest_neighbor (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, float *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 >
void batch_nearest_neighbor (const node< P > &top_node, const node< P > &query, v_array< v_array< P > > &results)
 
template<class P >
void k_nearest_neighbor (const node< P > &top_node, const node< P > &query, v_array< v_array< P > > &results, int k)
 
template<class P >
void epsilon_nearest_neighbor (const node< P > &top_node, const node< P > &query, v_array< v_array< P > > &results, float epsilon)
 
template<class P >
void unequal_nearest_neighbor (const node< P > &top_node, const node< P > &query, v_array< v_array< P > > &results)
 

Variables

static float base = 1.3
 
static float il2 = 1. / log(base)
 
int internal_k =1
 
float internal_epsilon =0.
 
float *(* alloc_unequal )() = alloc_epsilon
 
void(* update )(float *foo, float bar) = update_k
 
void(* setter )(float *foo, float bar) = set_k
 
float *(* alloc_upper )() = alloc_k
 

Macro Definition Documentation

#define NDEBUG

Definition at line 12 of file JLCoverTree.h.

Function Documentation

void add_height ( int  d,
v_array< int > &  heights 
)

Definition at line 328 of file JLCoverTree.h.

float* alloc_epsilon ( )

Definition at line 509 of file JLCoverTree.h.

float* alloc_k ( )

Definition at line 497 of file JLCoverTree.h.

node<P> batch_create ( v_array< P >  points)

Definition at line 295 of file JLCoverTree.h.

node<P> batch_insert ( 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 
)

Definition at line 198 of file JLCoverTree.h.

void batch_nearest_neighbor ( const node< P > &  top_node,
const node< P > &  query,
v_array< v_array< P > > &  results 
)

Definition at line 787 of file JLCoverTree.h.

void breadth_dist ( const node< P >  top_node,
v_array< int > &  breadths 
)

Definition at line 370 of file JLCoverTree.h.

void brute_nearest ( const node< P > *  query,
v_array< d_node< P > >  zero_set,
float *  upper_bound,
v_array< v_array< P > > &  results,
v_array< v_array< d_node< P > > > &  spare_zero_sets 
)

Definition at line 699 of file JLCoverTree.h.

float compare ( const d_node< P > *  p1,
const d_node< P > *  p2 
)

Definition at line 396 of file JLCoverTree.h.

void copy_cover_sets ( node< P > *  query_chi,
float *  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 
)

Definition at line 558 of file JLCoverTree.h.

void copy_zero_set ( node< P > *  query_chi,
float *  new_upper_bound,
v_array< d_node< P > > &  zero_set,
v_array< d_node< P > > &  new_zero_set 
)

Definition at line 534 of file JLCoverTree.h.

void depth_dist ( int  top_scale,
const node< P >  top_node,
v_array< int > &  depths 
)

Definition at line 359 of file JLCoverTree.h.

void descend ( const node< P > *  query,
float *  upper_bound,
int  current_scale,
int &  max_scale,
v_array< v_array< d_node< P > > > &  cover_sets,
v_array< d_node< P > > &  zero_set 
)

Definition at line 639 of file JLCoverTree.h.

float dist_of_scale ( int  s)

Definition at line 90 of file JLCoverTree.h.

void dist_split ( v_array< ds_node< P > > &  point_set,
v_array< ds_node< P > > &  new_point_set,
new_point,
int  max_scale 
)

Definition at line 167 of file JLCoverTree.h.

void epsilon_nearest_neighbor ( const node< P > &  top_node,
const node< P > &  query,
v_array< v_array< P > > &  results,
float  epsilon 
)

Definition at line 840 of file JLCoverTree.h.

v_array<v_array<d_node<P> > > get_cover_sets ( v_array< v_array< v_array< d_node< P > > > > &  spare_cover_sets)

Definition at line 463 of file JLCoverTree.h.

int get_scale ( float  d)

Definition at line 95 of file JLCoverTree.h.

void halfsort ( v_array< d_node< P > >  cover_set)

Definition at line 402 of file JLCoverTree.h.

int height_dist ( const node< P >  top_node,
v_array< int > &  heights 
)

Definition at line 337 of file JLCoverTree.h.

void internal_batch_nearest_neighbor ( 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,
float *  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 
)

Definition at line 735 of file JLCoverTree.h.

void k_nearest_neighbor ( const node< P > &  top_node,
const node< P > &  query,
v_array< v_array< P > > &  results,
int  k 
)

Definition at line 828 of file JLCoverTree.h.

float max_set ( v_array< ds_node< P > > &  v)

Definition at line 116 of file JLCoverTree.h.

node<P> new_leaf ( const P &  p)

Definition at line 109 of file JLCoverTree.h.

node<P> new_node ( const P &  p)

Definition at line 101 of file JLCoverTree.h.

void print ( int  depth,
node< P > &  top_node 
)

Definition at line 132 of file JLCoverTree.h.

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 
)

Definition at line 599 of file JLCoverTree.h.

void print_query ( const node< P > *  top_node)

Definition at line 587 of file JLCoverTree.h.

void print_space ( int  s)

Definition at line 125 of file JLCoverTree.h.

void set_epsilon ( float *  begin,
float  max 
)

Definition at line 513 of file JLCoverTree.h.

void set_k ( float *  begin,
float  max 
)

Definition at line 501 of file JLCoverTree.h.

void set_unequal ( float *  begin,
float  max 
)

Definition at line 524 of file JLCoverTree.h.

bool shell ( float  parent_query_dist,
float  child_parent_dist,
float  upper_bound 
)

Definition at line 474 of file JLCoverTree.h.

void split ( v_array< ds_node< P > > &  point_set,
v_array< ds_node< P > > &  far_set,
int  max_scale 
)

Definition at line 150 of file JLCoverTree.h.

void unequal_nearest_neighbor ( const node< P > &  top_node,
const node< P > &  query,
v_array< v_array< P > > &  results 
)

Definition at line 852 of file JLCoverTree.h.

void update_epsilon ( float *  upper_bound,
float  new_dist 
)

Definition at line 508 of file JLCoverTree.h.

void update_k ( float *  k_upper_bound,
float  upper_bound 
)

Definition at line 481 of file JLCoverTree.h.

void update_unequal ( float *  upper_bound,
float  new_dist 
)

Definition at line 518 of file JLCoverTree.h.

Variable Documentation

float*(* alloc_unequal)() = alloc_epsilon

Definition at line 523 of file JLCoverTree.h.

float*(* alloc_upper)() = alloc_k

Definition at line 531 of file JLCoverTree.h.

float base = 1.3
static

Definition at line 85 of file JLCoverTree.h.

float il2 = 1. / log(base)
static

Definition at line 88 of file JLCoverTree.h.

float internal_epsilon =0.

Definition at line 507 of file JLCoverTree.h.

int internal_k =1

Definition at line 480 of file JLCoverTree.h.

void(* setter)(float *foo, float bar) = set_k

Definition at line 530 of file JLCoverTree.h.

void(* update)(float *foo, float bar) = update_k

Definition at line 529 of file JLCoverTree.h.


SHOGUN Machine Learning Toolbox - Documentation