SHOGUN  v3.2.0
类 | 宏定义 | 函数 | 变量
JLCoverTree.h 文件参考

浏览源代码.

类

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

宏定义

#define NDEBUG
 

函数

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)
 

变量

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
 

宏定义说明

◆ NDEBUG

#define NDEBUG

在文件 JLCoverTree.h 第 9 行定义.

函数说明

◆ add_height()

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

在文件 JLCoverTree.h 第 325 行定义.

◆ alloc_epsilon()

float* alloc_epsilon ( )

在文件 JLCoverTree.h 第 506 行定义.

◆ alloc_k()

float* alloc_k ( )

在文件 JLCoverTree.h 第 494 行定义.

◆ batch_create()

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

在文件 JLCoverTree.h 第 292 行定义.

◆ batch_insert()

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 
)

在文件 JLCoverTree.h 第 195 行定义.

◆ batch_nearest_neighbor()

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

在文件 JLCoverTree.h 第 784 行定义.

◆ breadth_dist()

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

在文件 JLCoverTree.h 第 367 行定义.

◆ brute_nearest()

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 
)

在文件 JLCoverTree.h 第 696 行定义.

◆ compare()

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

在文件 JLCoverTree.h 第 393 行定义.

◆ copy_cover_sets()

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 
)

在文件 JLCoverTree.h 第 555 行定义.

◆ copy_zero_set()

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 
)

在文件 JLCoverTree.h 第 531 行定义.

◆ depth_dist()

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

在文件 JLCoverTree.h 第 356 行定义.

◆ descend()

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 
)

在文件 JLCoverTree.h 第 636 行定义.

◆ dist_of_scale()

float dist_of_scale ( int  s)

在文件 JLCoverTree.h 第 87 行定义.

◆ dist_split()

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

在文件 JLCoverTree.h 第 164 行定义.

◆ epsilon_nearest_neighbor()

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

在文件 JLCoverTree.h 第 837 行定义.

◆ get_cover_sets()

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

在文件 JLCoverTree.h 第 460 行定义.

◆ get_scale()

int get_scale ( float  d)

在文件 JLCoverTree.h 第 92 行定义.

◆ halfsort()

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

在文件 JLCoverTree.h 第 399 行定义.

◆ height_dist()

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

在文件 JLCoverTree.h 第 334 行定义.

◆ internal_batch_nearest_neighbor()

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 
)

在文件 JLCoverTree.h 第 732 行定义.

◆ k_nearest_neighbor()

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

在文件 JLCoverTree.h 第 825 行定义.

◆ max_set()

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

在文件 JLCoverTree.h 第 113 行定义.

◆ new_leaf()

node<P> new_leaf ( const P &  p)

在文件 JLCoverTree.h 第 106 行定义.

◆ new_node()

node<P> new_node ( const P &  p)

在文件 JLCoverTree.h 第 98 行定义.

◆ print()

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

在文件 JLCoverTree.h 第 129 行定义.

◆ print_cover_sets()

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 
)

在文件 JLCoverTree.h 第 596 行定义.

◆ print_query()

void print_query ( const node< P > *  top_node)

在文件 JLCoverTree.h 第 584 行定义.

◆ print_space()

void print_space ( int  s)

在文件 JLCoverTree.h 第 122 行定义.

◆ set_epsilon()

void set_epsilon ( float *  begin,
float  max 
)

在文件 JLCoverTree.h 第 510 行定义.

◆ set_k()

void set_k ( float *  begin,
float  max 
)

在文件 JLCoverTree.h 第 498 行定义.

◆ set_unequal()

void set_unequal ( float *  begin,
float  max 
)

在文件 JLCoverTree.h 第 521 行定义.

◆ shell()

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

在文件 JLCoverTree.h 第 471 行定义.

◆ split()

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

在文件 JLCoverTree.h 第 147 行定义.

◆ unequal_nearest_neighbor()

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

在文件 JLCoverTree.h 第 849 行定义.

◆ update_epsilon()

void update_epsilon ( float *  upper_bound,
float  new_dist 
)

在文件 JLCoverTree.h 第 505 行定义.

◆ update_k()

void update_k ( float *  k_upper_bound,
float  upper_bound 
)

在文件 JLCoverTree.h 第 478 行定义.

◆ update_unequal()

void update_unequal ( float *  upper_bound,
float  new_dist 
)

在文件 JLCoverTree.h 第 515 行定义.

变量说明

◆ alloc_unequal

float*(* alloc_unequal) () = alloc_epsilon

在文件 JLCoverTree.h 第 520 行定义.

◆ alloc_upper

float*(* alloc_upper) () = alloc_k

在文件 JLCoverTree.h 第 528 行定义.

◆ base

float base = 1.3
static

在文件 JLCoverTree.h 第 82 行定义.

◆ il2

float il2 = 1. / log(base)
static

在文件 JLCoverTree.h 第 85 行定义.

◆ internal_epsilon

float internal_epsilon =0.

在文件 JLCoverTree.h 第 504 行定义.

◆ internal_k

int internal_k =1

在文件 JLCoverTree.h 第 477 行定义.

◆ setter

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

在文件 JLCoverTree.h 第 527 行定义.

◆ update

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

在文件 JLCoverTree.h 第 526 行定义.


SHOGUN Machine Learning Toolbox - Documentation