|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
-------------------------------------------------------
Name : DNearest.hh
Library : nn
Description: Dynamic Nearest Neighbour (points can be add not removed)
Dependancies: Vector3dC
Modified :
Created : 11.95
Author : Adrian Hilton
-------------------------------------------------------
========================================================
INLINE
================== DNearestC =============================
Dynamic Nearest correspondence between any point and a dynamic target set
Points may be dynamically added to the target point set
Variables:
Methods:
- DNearestC()
-
empty constructor
Default Direct NN Search
Hash table size =1 all points are inserted into 0th slot of hash table
- DNearestC(const IntT num,const RealT size)
-
- ~DNearestC()
-
destruct
- DNearestC(const DNearestC & s)
-
copy constructor
- const DNearestC & operator=(const DNearestC & s)
-
assignment
Internal Data Structure for Computation - Default Hash Computation
-------------------------------------------------------------------
Internal structure is empty after setup
- void SetupDirect()
-
Setup a direct computation
0(N) evalutation of nearest point
Hash lookupTable Size =1
- void SetupHash(const IntT & num,const RealT & size)
-
Nearest Point evaluation uses a 3D Hash table lookup.
The parameters setup an internal 1D hash lookup table with
number of slots >= 'approx_number_of_points' and
uniform cubes of size 'voxel_size'.
- void SetupHash(const IntT & num,const Vector3dC & vsize)
-
Nearest Point evaluation uses a 3D Hash table lookup.
The parameters setup an internal 1D hash lookup table with
number of slots >= 'approx_number_of_points' and
cubes of size 'voxel_size'.
Operations
-----------
- void Ins(const IntT ref,Vector3dC & p)
-
Insert Point
insert a pointer to vector 'p' with reference 'ref' into the
nearest point lookup
void Del(const IntT ref, Vector3dC& p);
Delete Point
search for point with same reference 'ref' (local search)
only valid if external ref = constant (may cause problems)
- IntT Nearest(Vector3dC & v)
-
get nearest point in target set to point v
returns -1 if no nearest point is found
|
Programmer:Adrian Hilton, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|