1.3.2
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

◆ FALSE

#define FALSE   0

◆ TRUE

#define TRUE   1

Function Documentation

◆ btree_display()

GSTLEARN_EXPORT void btree_display ( const t_btree tree,
int  level = -1 
)

◆ btree_init()

GSTLEARN_EXPORT t_btree* btree_init ( const double **  data,
int  n_samples,
int  n_features,
int  leaf_size,
int  dist_type 
)

◆ copy_double_arr()

GSTLEARN_EXPORT double** copy_double_arr ( const double **  arr,
int  row,
int  col 
)

◆ copy_double_arrAsVVD()

GSTLEARN_EXPORT double** copy_double_arrAsVVD ( const VectorVectorDouble arr)

◆ copy_int_arr()

GSTLEARN_EXPORT int** copy_int_arr ( const int **  arr,
int  row,
int  col 
)

◆ euclidean_dist()

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

◆ finalize_tree()

GSTLEARN_EXPORT void finalize_tree ( t_btree tree)

◆ free_2d_double()

GSTLEARN_EXPORT void free_2d_double ( double **  arr,
int  row 
)

◆ free_2d_int()

GSTLEARN_EXPORT void free_2d_int ( int **  arr,
int  row 
)

◆ free_tree()

GSTLEARN_EXPORT void free_tree ( t_btree tree)

◆ manhattan_dist()

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

◆ min_dist()

double min_dist ( t_btree tree,
int  i_node,
const double *  pt 
)

◆ nheap_init()

t_nheap* nheap_init ( int  n_pts,
int  n_nbrs 
)

◆ nheap_largest()

double nheap_largest ( t_nheap h,
int  row 
)

◆ nheap_load()

void nheap_load ( t_nheap heap,
t_btree b,
const double **  x 
)

◆ nheap_push()

int nheap_push ( t_nheap h,
int  row,
double  val,
int  i_val 
)

◆ nheap_sort()

void nheap_sort ( t_nheap h)

◆ query_depth_first()

int query_depth_first ( t_btree b,
int  i_node,
const double *  pt,
int  i_pt,
t_nheap heap,
double  dist 
)