|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
DNearestC::DNearestC(void)
DNearestC::DNearestC(const IntT,const RealT)
DNearestC::~DNearestC(void)
DNearestC::DNearestC(const DNearestC &)
DNearestC::operator=(const DNearestC &)
DNearestC::SetupDirect(void)
DNearestC::SetupHash(const IntT &,const RealT &)
DNearestC::SetupHash(const IntT &,const Vector3dC &)
DNearestC::Ins(const IntT,Vector3dC &)
DNearestC::Nearest(Vector3dC &)
DNearestC::Delete(void)
DNearestC::nearest_hash(RealT &,IntT &,const Vector3dC,const IntT,const IntT,const IntT)
DNearestC::nearest_hash_all(RealT &,IntT &,const Vector3dC)
DNearestC::nearest_direct(RealT &,IntT &,const Vector3dC)
|
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:
- Hash3dC hash_table;
-
- IntT type;
-
computation: direct(0) grid(1) hash(2)
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
- void Delete()
-
----------------------------- Functions for NN
- void nearest_hash(RealT & emin,IntT & nodemin,const Vector3dC data,const IntT i,const IntT j,const IntT k)
-
- void nearest_hash_all(RealT & emin,IntT & nodemin,const Vector3dC data)
-
- void nearest_direct(RealT & emin,IntT & nodemin,const Vector3dC v)
-
direct computation of nearest point 0(N)
|
Programmer:Adrian Hilton, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|