HashResult

Template defines an STL-like container class used to hold geometric hash table query results. (See GeomHash). The results are iterated through using the HashIterator STL-like iterator class.

[ GAMB | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

AUTHORS
GOALS
USAGE

Class Summary

class HashResult

{
public:
static const int defSize = 32;
HashResult();
HashResult(const unsigned int defAlloc);
~HashResult();
void push_back(Bucket* bkt);
size_t size() const;
iterator begin();
iterator end();
bool empty() const;
size_t max_size() const;
reference front() const;
reference back() const;
unsigned int bucketCount() const;
void clear();
protected:
}; // HashResult

Back to the top of HashResult


AUTHORS

Meir Fuchs. (meirfux@math.tau.ac.il)

Copyright: SAMBA group, Tel-Aviv Univ. Israel, 1997.

Back to the top of HashResult


GOALS

The class defines an STL-like container that holds the geometric hash table query results. A HashResult is formed when a query is posted to a geometric hash table (GeomHash). A HashResult holds a set of pointers into hash Buckets within the hash table that are the query's results. The container elemenets are constant and no attempt to change them should be made because changes to the container elements are changes within the hash table itself.

Back to the top of HashResult


USAGE

The begin() and end() methods are used to generate head and tail iterators to the result list. The HashIterator-s can then be used to iterate through the result list using the ++, -- operators and using the * operator to reference the data itself.

For an example of using the query result container and iterator class see GeomHash.

Back to the top of HashResult


const int defSize = 32;

The default size of the Bucket pointers array. The array grows dynamically as more results are collected. The default size and increment size are defined by defSize but could be changed using the constructor. Note that the pointers are to Buckets of elements and not to the elements themselves so the pointer array size should not be as large as the number of results.

  static const int defSize = 32;

Back to the top of HashResult


HashResult();

Instantiate a HashResult. Allocates space for defSize bucket pointers.

  HashResult();

Back to the top of HashResult


HashResult(const unsigned int defAlloc);

Instantiate a HashResult. Allocates space for defAlloc bucket pointers.

  HashResult(const unsigned int defAlloc);

Back to the top of HashResult


~HashResult();

Destructor.

  ~HashResult();

Back to the top of HashResult


void push_back(Bucket* bkt);

Add a Bucket pointer to the dynamic pointer array held by the container. Generally, for normal use of the geometric hash tables this method should not be called. It is used by the HashLink template class to collect query results.

  void push_back(Bucket* bkt);

Back to the top of HashResult


size_t size() const;

Returns number of elements in the query result container. It should be stressed that the method does not return the number of Bucket pointers or the size of the pointer array but the number of actual data elements in the query results which could be much larger.

  size_t size() const;

Back to the top of HashResult


iterator begin();

Returns an iterator to the beginning of the query results list.

  iterator begin();

Back to the top of HashResult


iterator end();

Returns an iterator to the end of the query results list.

  iterator end();

Back to the top of HashResult


bool empty() const;

Returns true if container is empty.

  bool empty() const;

Back to the top of HashResult


size_t max_size() const;

Same as size(). Here for STL compliance.

  size_t max_size() const;

Back to the top of HashResult


reference front() const;

Returns first element of the container (the query results- assuming its a Bucket)

  reference front() const;

Back to the top of HashResult


reference back() const;

Returns last element of the container (the query results - assuming its a Bucket).

  reference back() const;

Back to the top of HashResult


unsigned int bucketCount() const;

Returns the number of Buckets referenced by the results container.

  unsigned int bucketCount() const;

Back to the top of HashResult


void clear();

Clears hash result container. Does not affect the geometric hash table itself. After a clear call a HashResult object may be used for another query. Memory used is not deallocated until object destruction.

  void clear();

Back to the top of HashResult


All Members

public:
static const int defSize = 32;
void push_back(Bucket* bkt);
size_t size() const;
iterator begin();
iterator end();
bool empty() const;
size_t max_size() const;
reference front() const;
reference back() const;
unsigned int bucketCount() const;
void clear();
protected:

Back to the top of HashResult


Ancestors

Class does not inherit from any other class.

Back to the top of HashResult


Descendants

Class is not inherited by any others.

Back to the top of HashResult


Generated from source by the Cocoon utilities on Sun Nov 15 13:35:25 2009 .

Report problems to jkotula@unimax.com