|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
-------------------------------------------------------
Name : NearestC.hh
Library : vecsetC
Description: Nearest Neighbour Vector Set Pair
Dependancies: Vector3dC, VectorSetC
Modified :
Created : 13.2.95
Author : Adrian Hilton
-------------------------------------------------------
========================================================
INLINE
================== NearestC =============================
Nearest correspondence of any point to a target set of vectors
Variables:
- VectorSetC target;
-
HASH
- Vector3dC hash_size;
-
dimensions of voxels in hash table
- Hash3dC hash_table;
-
- IntT type;
-
computation: direct(0) grid(1) hash(2)
- RealT max_distance;
-
max distance reqd for hash/voxel
Methods:
- NearestC()
-
empty constructor
- NearestC(VectorSetC & t)
-
- ~NearestC()
-
destruct
- NearestC(const NearestC & s)
-
copy constructor
- const NearestC & operator=(const NearestC & s)
-
assignment
Internal Data Structure for Computation - Default Direct Computation O(N)
--------------------------------------------------------------------------
- void SetupHash(const RealT & size)
-
Hash table uniform spatial subdivision using voxels of size vsize
- void SetupHash(const Vector3dC & vsize)
-
Hash table spatial subdivision with voxels of size vsize(X,Y,Z)
Operations
-----------
- 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)
-
- IntT nearest_direct(const Vector3dC v)
-
direct computation of nearest point 0(N)
|
Programmer:Adrian Hilton, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|