#include <ctime>#include <cmath>#include <cstring>#include <fstream>#include <ANN/ANN.h>#include <ANN/ANNx.h>#include <ANN/ANNperf.h>#include "rand.h"
Go to the source code of this file.
Macros | |
| #define | CLOCKS_PER_SEC 1000000 |
| #define | log2(x) (log(x)/log(2.0)) |
Enumerations | |
| enum | Distrib { UNIFORM, GAUSS, LAPLACE, CO_GAUSS, CO_LAPLACE, CLUS_GAUSS, CLUS_ORTH_FLATS, CLUS_ELLIPSOIDS, PLANTED, N_DISTRIBS } |
| enum | PtType { DATA, QUERY } |
| enum | StatLev { SILENT, EXEC_TIME, PREP_STATS, QUERY_STATS, QUERY_RES, SHOW_PTS, SHOW_STRUCT, N_STAT_LEVELS } |
Functions | |
| void | doValidation () |
| void | Error (const char *msg, ANNerr level) |
| void | generatePts (ANNpointArray &pa, int n, PtType type, ANNbool new_clust, ANNpointArray src=NULL, int n_src=0) |
| ANNbool | getDirective (istream &in, char *directive) |
| void | getTrueNN () |
| void | initGlobals () |
| int | lookUp (const char *arg, const char(*table)[STRING_LEN], int size) |
| int | main (int argc, char **argv) |
| void | printPoint (ANNpoint p, int dim) |
| void | readPts (ANNpointArray &pa, int &n, char *file_nm, PtType type) |
| ANNbool | skipComment (istream &in) |
| void | treeStats (ostream &out, ANNbool verbose) |
| #define CLOCKS_PER_SEC 1000000 |
Definition at line 52 of file ann_test.cpp.
Definition at line 1570 of file ann_test.cpp.
| enum Distrib |
| Enumerator | |
|---|---|
| UNIFORM | |
| GAUSS | |
| LAPLACE | |
| CO_GAUSS | |
| CO_LAPLACE | |
| CLUS_GAUSS | |
| CLUS_ORTH_FLATS | |
| CLUS_ELLIPSOIDS | |
| PLANTED | |
| N_DISTRIBS | |
Definition at line 321 of file ann_test.cpp.
| enum PtType |
| Enumerator | |
|---|---|
| DATA | |
| QUERY | |
Definition at line 291 of file ann_test.cpp.
| enum StatLev |
| Enumerator | |
|---|---|
| SILENT | |
| EXEC_TIME | |
| PREP_STATS | |
| QUERY_STATS | |
| QUERY_RES | |
| SHOW_PTS | |
| SHOW_STRUCT | |
| N_STAT_LEVELS | |
Definition at line 297 of file ann_test.cpp.
| void doValidation | ( | ) |
Definition at line 1467 of file ann_test.cpp.
| void Error | ( | const char * | msg, |
| ANNerr | level | ||
| ) |
Definition at line 376 of file ann_test.cpp.
| void generatePts | ( | ANNpointArray & | pa, |
| int | n, | ||
| PtType | type, | ||
| ANNbool | new_clust, | ||
| ANNpointArray | src = NULL, |
||
| int | n_src = 0 |
||
| ) |
Definition at line 1191 of file ann_test.cpp.
| ANNbool getDirective | ( | istream & | in, |
| char * | directive | ||
| ) |
Definition at line 611 of file ann_test.cpp.
| void getTrueNN | ( | ) |
Definition at line 1374 of file ann_test.cpp.
| void initGlobals | ( | ) |
Definition at line 550 of file ann_test.cpp.
| int lookUp | ( | const char * | arg, |
| const char(*) | table[STRING_LEN], | ||
| int | size | ||
| ) |
Definition at line 401 of file ann_test.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 628 of file ann_test.cpp.
| void printPoint | ( | ANNpoint | p, |
| int | dim | ||
| ) |
Definition at line 389 of file ann_test.cpp.
| void readPts | ( | ANNpointArray & | pa, |
| int & | n, | ||
| char * | file_nm, | ||
| PtType | type | ||
| ) |
Definition at line 1283 of file ann_test.cpp.
| ANNbool skipComment | ( | istream & | in | ) |
Definition at line 594 of file ann_test.cpp.
| void treeStats | ( | ostream & | out, |
| ANNbool | verbose | ||
| ) |
Definition at line 1572 of file ann_test.cpp.
| ANNdistArray apx_dists |
Definition at line 537 of file ann_test.cpp.
| ANNidxArray apx_nn_idx |
Definition at line 536 of file ann_test.cpp.
| int* apx_pts_in_range |
Definition at line 538 of file ann_test.cpp.
| int bucket_size |
Definition at line 483 of file ann_test.cpp.
| double corr_coef |
Definition at line 479 of file ann_test.cpp.
| ANNpointArray data_pts |
Definition at line 533 of file ann_test.cpp.
| int data_size |
Definition at line 473 of file ann_test.cpp.
| const int def_bucket_size = 1 |
Definition at line 452 of file ann_test.cpp.
| const double def_corr_coef = 0.05 |
Definition at line 451 of file ann_test.cpp.
| const int def_data_size = 100 |
Definition at line 444 of file ann_test.cpp.
| const int def_dim = 2 |
Definition at line 443 of file ann_test.cpp.
Definition at line 449 of file ann_test.cpp.
| const double def_epsilon = 0.0 |
Definition at line 453 of file ann_test.cpp.
| const int def_max_dim = 1 |
Definition at line 448 of file ann_test.cpp.
| const int def_max_visit = 0 |
Definition at line 455 of file ann_test.cpp.
| const int def_n_color = 5 |
Definition at line 446 of file ann_test.cpp.
| const int def_near_neigh = 1 |
Definition at line 454 of file ann_test.cpp.
Definition at line 447 of file ann_test.cpp.
| const int def_query_size = 100 |
Definition at line 445 of file ann_test.cpp.
| const int def_rad_bound = 0 |
Definition at line 456 of file ann_test.cpp.
| const int def_seed = 0 |
Definition at line 459 of file ann_test.cpp.
| const ANNshrinkRule def_shrink = ANN_BD_NONE |
Definition at line 466 of file ann_test.cpp.
| const ANNsplitRule def_split = ANN_KD_SUGGEST |
Definition at line 464 of file ann_test.cpp.
| const StatLev def_stats = QUERY_STATS |
Definition at line 462 of file ann_test.cpp.
| const double def_std_dev = 1.00 |
Definition at line 450 of file ann_test.cpp.
| const int def_true_nn = def_near_neigh + extra_nn |
Definition at line 458 of file ann_test.cpp.
Definition at line 460 of file ann_test.cpp.
| int dim |
Definition at line 472 of file ann_test.cpp.
| Distrib distr |
Definition at line 478 of file ann_test.cpp.
| const char distr_table[N_DISTRIBS][STRING_LEN] |
Definition at line 334 of file ann_test.cpp.
| double epsilon |
Definition at line 484 of file ann_test.cpp.
| const double ERR = 0.00001 |
Definition at line 284 of file ann_test.cpp.
| const int extra_nn = 10 |
Definition at line 441 of file ann_test.cpp.
| int max_dim |
Definition at line 477 of file ann_test.cpp.
| int* max_pts_in_range |
Definition at line 542 of file ann_test.cpp.
| int max_pts_visit |
Definition at line 486 of file ann_test.cpp.
| int* min_pts_in_range |
Definition at line 541 of file ann_test.cpp.
| int n_color |
Definition at line 475 of file ann_test.cpp.
| const int N_SHRINK_RULES = 4 |
Definition at line 362 of file ann_test.cpp.
| const int N_SPLIT_RULES = 6 |
Definition at line 349 of file ann_test.cpp.
| int near_neigh |
Definition at line 485 of file ann_test.cpp.
| ANNbool new_clust |
Definition at line 476 of file ann_test.cpp.
| ANNpointArray query_pts |
Definition at line 534 of file ann_test.cpp.
| int query_size |
Definition at line 474 of file ann_test.cpp.
| double radius_bound |
Definition at line 487 of file ann_test.cpp.
| const double RND_OFF = 5E-16 |
Definition at line 285 of file ann_test.cpp.
| ANNshrinkRule shrink |
Definition at line 492 of file ann_test.cpp.
| const char shrink_table[N_SHRINK_RULES][STRING_LEN] |
Definition at line 363 of file ann_test.cpp.
| ANNsplitRule split |
Definition at line 491 of file ann_test.cpp.
| const char split_table[N_SPLIT_RULES][STRING_LEN] |
Definition at line 350 of file ann_test.cpp.
| const char stat_table[N_STAT_LEVELS][STRING_LEN] |
Definition at line 308 of file ann_test.cpp.
| StatLev stats |
Definition at line 490 of file ann_test.cpp.
| double std_dev |
Definition at line 480 of file ann_test.cpp.
| double std_dev_hi |
Definition at line 482 of file ann_test.cpp.
| double std_dev_lo |
Definition at line 481 of file ann_test.cpp.
| const int STRING_LEN = 500 |
Definition at line 283 of file ann_test.cpp.
| ANNbd_tree* the_tree |
Definition at line 535 of file ann_test.cpp.
| ANNdistArray true_dists |
Definition at line 540 of file ann_test.cpp.
| int true_nn |
Definition at line 488 of file ann_test.cpp.
| ANNidxArray true_nn_idx |
Definition at line 539 of file ann_test.cpp.
| ANNbool valid_dirty |
Definition at line 544 of file ann_test.cpp.
| ANNbool validate |
Definition at line 489 of file ann_test.cpp.