#include <hashGrid.h>
Classes |
|
class | DataItem |
????? More... |
|
Public Member Functions |
|
Constructors and Destructors
|
|
HashGridBox3 () | |
Default constructor. |
|
HashGridBox3 (const HashGridBox3 &grid_box, bool deep=true) | |
Copy constructor. |
|
~HashGridBox3 () | |
Destructor. |
|
void | clear () |
Clears the grid box. |
|
void | destroy () |
Clears the grid box.
|
|
Assignment
|
|
void | set (const HashGridBox3 &box, bool=true) throw (Exception::NotImplemented) |
const HashGridBox3 & | operator= (const HashGridBox3 &box) throw (Exception::NotImplemented) |
Accessors
|
|
Item * | find (const Item &item) |
Find an item in the item list of
this grid box.
|
|
const Item * | find (const Item &item) const |
The const version of find(). |
|
Size | getSize () const |
Counts all items in the data item
list.
|
|
void | insert (const Item &item) |
Insert an item into the data item
list of a grid box.
|
|
bool | remove (const Item &item) |
Remove the first occurrence of a
certain item from the data item list.
|
|
bool | removeAll (const Item &item) |
Remove all occurences of a certain
item from the data item list.
|
|
Miscellaneous
|
|
void | host (Visitor< HashGridBox3 > &visitor) |
Host method. |
|
Predicates
|
|
bool | operator== (const HashGridBox3 &box) const |
Equality operator. |
|
bool | operator!= (const HashGridBox3 &box) const |
Inequality operator. |
|
bool | has (const Item &item) const |
Test whether an item is in the data
item list.
|
|
bool | isEmpty () const |
Test, whether this box is empty, i.
|
|
Debugging and Diagnostics
|
|
bool | isValid () const |
void | dump (std::ostream &s=std::cout, Size depth=0) const |
Internal Iterators
|
|
bool | apply (UnaryProcessor< Item > &processor) |
bool | apply (UnaryProcessor< HashGridBox3< Item > > &processor) |
Public Attributes |
|
HashGridBox3 * | neighbours [27] |
This array stores a pointer to the
box itself and the 26 neighbours of the current
box. |
|
DataItem * | first_item_ |
External Iterators |
|
typedef Position | BoxIteratorPosition |
typedef ForwardIterator < HashGridBox3< Item > , HashGridBox3< Item > , BoxIteratorPosition, BoxIteratorTraits > |
BoxIterator |
BoxIterators iterate over all boxes
that lie in the direct neighborhood to a box, and over the
box itself. |
|
typedef ConstForwardIterator < HashGridBox3< Item > , HashGridBox3< Item > , BoxIteratorPosition, BoxIteratorTraits > |
ConstBoxIterator |
This is the const version of
BoxIterator . |
|
typedef DataItem * | DataIteratorPosition |
typedef ForwardIterator < HashGridBox3< Item >, Item, DataIteratorPosition, DataIteratorTraits > |
DataIterator |
Data iterator for grid boxes.
|
|
typedef ConstForwardIterator < HashGridBox3< Item >, Item, DataIteratorPosition, DataIteratorTraits > |
ConstDataIterator |
Const data iterator for grid boxes.
|
|
class | BoxIteratorTraits |
class | DataIteratorTraits |
BoxIterator | beginBox () |
get the first box |
|
BoxIterator | endBox () |
get the last box |
|
ConstBoxIterator | beginBox () const |
get the first box |
|
ConstBoxIterator | endBox () const |
get the last box |
|
DataIterator | beginData () |
DataIterator | endData () |
ConstDataIterator | beginData () const |
ConstDataIterator | endData () const |
These boxes represent the buckets of a threedimensional hash grid. Every such box contains a linear list of the objects that are contained in this box. This list is accessible through a DataIterator.
typedef ForwardIterator<HashGridBox3<Item>, HashGridBox3<Item>, BoxIteratorPosition, BoxIteratorTraits> BALL::HashGridBox3< Item >::BoxIterator |
BoxIterators iterate over all boxes that lie in the direct neighborhood to a box, and over the box itself.
Such an iterator traverses over 27 boxes.
typedef ConstForwardIterator<HashGridBox3<Item>, Item, DataIteratorPosition, DataIteratorTraits> BALL::HashGridBox3< Item >::ConstDataIterator |
Const data iterator for grid boxes.
This is the const version of DataIterator
typedef ForwardIterator<HashGridBox3<Item>, Item, DataIteratorPosition, DataIteratorTraits> BALL::HashGridBox3< Item >::DataIterator |
Data iterator for grid boxes.
This iterator traverses the list of data items store in a HashGridBox3 .