OrthoRangeSearch< T > Class Template Reference

Faster orthogonal range search class using a tree. More...

Collaboration diagram for OrthoRangeSearch< T >:
[legend]

List of all members.

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.

Detailed Description

template<typename T>
class OrthoRangeSearch< T >

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.


Constructor & Destructor Documentation

template<typename T>
OrthoRangeSearch< T >::OrthoRangeSearch (  )  [inline]

Constructor that initializes pointers to NULL.

Definition at line 72 of file ortho_range_search.h.

template<typename T>
OrthoRangeSearch< T >::~OrthoRangeSearch (  )  [inline]

Destructor that frees up memory.

Definition at line 81 of file ortho_range_search.h.

References mem::Free().


Member Function Documentation

template<typename T>
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.

Parameters:
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().

template<typename T>
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.

Parameters:
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().

template<typename T>
void OrthoRangeSearch< T >::SaveTree ( const char *  save_tree_file_name  )  [inline]

Save the tree to the file.

Parameters:
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().


The documentation for this class was generated from the following file:
Generated on Mon Jan 24 12:04:40 2011 for FASTlib by  doxygen 1.6.3