Faster orthogonal range search class using a tree. More...
Public Member Functions | |
void | Compute (GenMatrix< T > &set_of_low_coord_limits, GenMatrix< T > &set_of_high_coord_limits, GenMatrix< bool > *candidate_points) |
Performs the multiple orthogonal range searches simultaneously. | |
void | Init (GenMatrix< T > &dataset, bool make_copy, const char *load_tree_file_name) |
Initialization function - to read the data and to construct tree. | |
OrthoRangeSearch () | |
Constructor that initializes pointers to NULL. | |
void | SaveTree (const char *save_tree_file_name) |
Save the tree to the file. | |
~OrthoRangeSearch () | |
Destructor that frees up memory. |
Faster orthogonal range search class using a tree.
OrthoRangeSearch search; search.Init(dataset, NULL); search.Compute(low_coord_limits, high_coord_limits); GenMatrix<bool> search_results; // Make sure that the vector is uninitialized before passing. search.get_results(&search_results);
Definition at line 61 of file ortho_range_search.h.
OrthoRangeSearch< T >::OrthoRangeSearch | ( | ) | [inline] |
Constructor that initializes pointers to NULL.
Definition at line 72 of file ortho_range_search.h.
OrthoRangeSearch< T >::~OrthoRangeSearch | ( | ) | [inline] |
Destructor that frees up memory.
Definition at line 81 of file ortho_range_search.h.
References mem::Free().
void OrthoRangeSearch< T >::Compute | ( | GenMatrix< T > & | set_of_low_coord_limits, | |
GenMatrix< T > & | set_of_high_coord_limits, | |||
GenMatrix< bool > * | candidate_points | |||
) | [inline] |
Performs the multiple orthogonal range searches simultaneously.
set_of_low_coord_limits | ||
set_of_high_coord_limits |
Definition at line 100 of file ortho_range_search.h.
References GenVector< T >::CopyValues(), fx_timer_start(), fx_timer_stop(), GenMatrix< T >::Init(), GenMatrix< T >::MakeColumnVector(), and GenMatrix< T >::n_cols().
Referenced by main().
void OrthoRangeSearch< T >::Init | ( | GenMatrix< T > & | dataset, | |
bool | make_copy, | |||
const char * | load_tree_file_name | |||
) | [inline] |
Initialization function - to read the data and to construct tree.
dataset | The dataset for orthogonal range searching. | |
make_copy | Whether to make the copy of the incoming dataset or not. If true, a copy is made. Otherwise, the object will "steal" the incoming matrix. | |
load_tree_file_name | If NULL, the tree is built from scratch. If not NULL, the tree is loaded from the file whose name is given as the argument. |
Definition at line 209 of file ortho_range_search.h.
References fx_param_int(), fx_timer_start(), and fx_timer_stop().
Referenced by main().
void OrthoRangeSearch< T >::SaveTree | ( | const char * | save_tree_file_name | ) | [inline] |
Save the tree to the file.
save_tree_file_name | The tree is serialized to the file whose name is given as the argument. |
Definition at line 162 of file ortho_range_search.h.
References mem::AllocBytes(), mem::Free(), ot::Freeze(), and ot::FrozenSize().
Referenced by main().