1.3.0
CCC
 
ball_algorithm.h File Reference
#include "gstlearn_export.hpp"
#include "Tree/KNN.hpp"
#include "Basic/VectorNumT.hpp"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <float.h>
#include <sys/stat.h>
#include <time.h>

Classes

struct  t_nheap
 
struct  t_nodedata
 
struct  t_btree
 

Macros

#define TRUE   1
 
#define FALSE   0
 

Functions

GSTLEARN_EXPORT double ** copy_double_arrAsVVD (const VectorVectorDouble &arr)
 
GSTLEARN_EXPORT double ** copy_double_arr (const double **arr, int row, int col)
 
GSTLEARN_EXPORT int ** copy_int_arr (const int **arr, int row, int col)
 
GSTLEARN_EXPORT t_btreebtree_init (const double **data, int n_samples, int n_features, int leaf_size, int dist_type)
 
GSTLEARN_EXPORT void free_2d_double (double **arr, int row)
 
GSTLEARN_EXPORT void free_2d_int (int **arr, int row)
 
GSTLEARN_EXPORT void free_tree (t_btree *tree)
 
GSTLEARN_EXPORT void finalize_tree (t_btree *tree)
 
GSTLEARN_EXPORT void btree_display (const t_btree *tree, int level=-1)
 
double manhattan_dist (const double *x1, const double *x2, int size)
 
double euclidean_dist (const double *x1, const double *x2, int size)
 
t_nheapnheap_init (int n_pts, int n_nbrs)
 
double nheap_largest (t_nheap *h, int row)
 
int nheap_push (t_nheap *h, int row, double val, int i_val)
 
void nheap_sort (t_nheap *h)
 
void nheap_load (t_nheap *heap, t_btree *b, const double **x)
 
double min_dist (t_btree *tree, int i_node, const double *pt)
 
int query_depth_first (t_btree *b, int i_node, const double *pt, int i_pt, t_nheap *heap, double dist)
 

Macro Definition Documentation

#define FALSE   0
#define TRUE   1

Function Documentation

GSTLEARN_EXPORT void btree_display ( const t_btree tree,
int  level = -1 
)
GSTLEARN_EXPORT t_btree* btree_init ( const double **  data,
int  n_samples,
int  n_features,
int  leaf_size,
int  dist_type 
)
GSTLEARN_EXPORT double** copy_double_arr ( const double **  arr,
int  row,
int  col 
)
GSTLEARN_EXPORT double** copy_double_arrAsVVD ( const VectorVectorDouble arr)
GSTLEARN_EXPORT int** copy_int_arr ( const int **  arr,
int  row,
int  col 
)
double euclidean_dist ( const double *  x1,
const double *  x2,
int  size 
)

Returns the Standard distance between two points

Parameters
x1Vector of coordinates for the first point
x2Vector of coordinates for the second point
sizeNumber of coordinates
Returns
GSTLEARN_EXPORT void finalize_tree ( t_btree tree)
GSTLEARN_EXPORT void free_2d_double ( double **  arr,
int  row 
)
GSTLEARN_EXPORT void free_2d_int ( int **  arr,
int  row 
)
GSTLEARN_EXPORT void free_tree ( t_btree tree)
double manhattan_dist ( const double *  x1,
const double *  x2,
int  size 
)

Returns the Manhattan distance between two points

Parameters
x1Vector of coordinates for the first point
x2Vector of coordinates for the second point
sizeNumber of coordinates
Returns
double min_dist ( t_btree tree,
int  i_node,
const double *  pt 
)
t_nheap* nheap_init ( int  n_pts,
int  n_nbrs 
)
double nheap_largest ( t_nheap h,
int  row 
)
void nheap_load ( t_nheap heap,
t_btree b,
const double **  x 
)
int nheap_push ( t_nheap h,
int  row,
double  val,
int  i_val 
)
void nheap_sort ( t_nheap h)
int query_depth_first ( t_btree b,
int  i_node,
const double *  pt,
int  i_pt,
t_nheap heap,
double  dist 
)