|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
Hash3dC::Hash3dC(void)
Hash3dC::Hash3dC(const IntT,const Vector3dC)
Hash3dC::Hash3dC(const IntT,const RealT)
Hash3dC::Hash3dC(VectorSetC &,Vector3dC &)
Hash3dC::Hash3dC(VectorSetC &,RealT &)
Hash3dC::~Hash3dC(void)
Hash3dC::operator=(const Hash3dC &)
Hash3dC::Size(void)
Hash3dC::VoxelSize(void)
Hash3dC::Put(const IntT,Vector3dC &)
Hash3dC::Get(const Vector3dC)
Hash3dC::GetAdj(const Vector3dC,const IntT,const IntT,const IntT)
Hash3dC::Print(void)
Hash3dC::Put(const t_hash3d_data,const Vector3dC)
Hash3dC::Get(const IntT)
Hash3dC::Hash(const IntT)
Hash3dC::Hash(const Vector3dC)
Hash3dC::Key(const Vector3dC)
Hash3dC::KeyAdj(const Vector3dC,const IntT,const IntT,const IntT)
Hash3dC::Key(const IntT,const IntT,const IntT)
|
Comments:
typedef StackG< t_hash3d_data > t_hash3d_list;
typedef StackIterG< t_hash3d_data > t_hash3d_iter;
========================================================
Constructs a hash table of points in 3D space
using a voxel subdivision of 3D space to generate key
The size of the hash table is a prime number greater than
the number of points to be inserted in the table.
Hash table: contains a list of `references' to points with
the same hash index.
Reference: a unique reference for each point
should is passed to the table on insertion.
Variables:
- IntT table_size;
-
Number of bins in table
prime > number of points to be inserted
- SArray1dC table;
-
1D Array of lists of size hash_table_num
- RealT xscale;
-
Voxel scale factor 1/voxel_size
- RealT yscale;
-
Voxel scale factor 1/voxel_size
- RealT zscale;
-
Voxel scale factor 1/voxel_size
Methods:
- Hash3dC()
-
construct empty hash table
cannot be accessed
- Hash3dC(const IntT num,const Vector3dC vsize)
-
Construct an empty hash table
number of slots >= num
with table bins corresponding to the voxel size 'vsize'
- Hash3dC(const IntT num,const RealT size)
-
Construct an empty hash table
number of slots >= num
with table bins corresponding to the uniform voxel size 'size'
- Hash3dC(VectorSetC & vset,Vector3dC & vsize)
-
Construct hash table for vector set 'vset'
with table bins corresponding to the voxel size 'vsize'
- Hash3dC(VectorSetC & vset,RealT & size)
-
- ~Hash3dC()
-
- const Hash3dC & operator=(const Hash3dC & hash)
-
Access
-------
- IntT Size()
-
size of hash table
- Vector3dC VoxelSize()
-
size of hash table voxels
- void Put(const IntT ref,Vector3dC & v)
-
put a point 'v' into the hash table with reference 'ref'
- t_hash3d_list & Get(const Vector3dC v)
-
return a list of table entries with same key as v
- t_hash3d_list & GetAdj(const Vector3dC v,const IntT ii,const IntT jj,const IntT kk)
-
return a list of table entries corresponding to offset of voxel v
v => voxel (i,j,k) then above => voxel(i+ii,j+jj,k+kk)
allows search of points in neighbouring voxels
Output
------
- void Print()
-
contents of non-empty table bins
- void Put(const t_hash3d_data d,const Vector3dC v)
-
insert hash data in hash table position of vector 'v'
- t_hash3d_list & Get(const IntT key)
-
get a list of points with the same key
-------------------------- internal workings of table from vector
- IntT Hash(const IntT key)
-
hash table index for key
- IntT Hash(const Vector3dC v)
-
hash table index for key of vector
- IntT Key(const Vector3dC v)
-
Key for vector
- IntT KeyAdj(const Vector3dC v,const IntT ii,const IntT jj,const IntT kk)
-
Key for voxel i+ii,j+jj,k+kk where v=>voxel i,j,k
- IntT Key(const IntT i,const IntT j,const IntT k)
-
Key for voxel i,j,k
-------------------------------- Data structures
|
Programmer:Adrian Hilton, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|