#include <BALL/DATATYPE/hashGrid.h>
Classes | |
class | BoxIteratorTraits |
class | DataItem |
????? More... | |
class | DataIteratorTraits |
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 () |
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) |
const Item * | find (const Item &item) const |
The const version of find(). | |
Size | getSize () const |
void | insert (const Item &item) |
bool | remove (const Item &item) |
bool | removeAll (const Item &item) |
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 |
bool | isEmpty () const |
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 |
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 |
typedef ConstForwardIterator < HashGridBox3< Item >, Item, DataIteratorPosition, DataIteratorTraits > | ConstDataIterator |
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 |
Grid Box Class. 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 Position BALL::HashGridBox3< Item >::BoxIteratorPosition |
typedef ConstForwardIterator<HashGridBox3<Item>, HashGridBox3<Item>, BoxIteratorPosition, BoxIteratorTraits> BALL::HashGridBox3< Item >::ConstBoxIterator |
This is the const version of BoxIterator .
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 .
typedef DataItem* BALL::HashGridBox3< Item >::DataIteratorPosition |
ConstBoxIterator BALL::HashGridBox3< Item >::beginBox | ( | ) | const [inline] |
get the first box
BoxIterator BALL::HashGridBox3< Item >::beginBox | ( | ) | [inline] |
get the first box
ConstDataIterator BALL::HashGridBox3< Item >::beginData | ( | ) | const [inline] |
DataIterator BALL::HashGridBox3< Item >::beginData | ( | ) | [inline] |
Referenced by BALL::HashGrid3< Item >::getClosestItem().
ConstBoxIterator BALL::HashGridBox3< Item >::endBox | ( | ) | const [inline] |
get the last box
BoxIterator BALL::HashGridBox3< Item >::endBox | ( | ) | [inline] |
get the last box
ConstDataIterator BALL::HashGridBox3< Item >::endData | ( | ) | const [inline] |
DataIterator BALL::HashGridBox3< Item >::endData | ( | ) | [inline] |
Referenced by BALL::HashGrid3< Item >::getClosestItem().
friend class BoxIteratorTraits [friend] |
friend class DataIteratorTraits [friend] |
DataItem* BALL::HashGridBox3< Item >::first_item_ |
Referenced by BALL::HashGrid3< Item >::apply(), BALL::HashGridBox3< Item >::apply(), BALL::HashGridBox3< Item >::clear(), BALL::HashGridBox3< Item >::dump(), BALL::HashGridBox3< Item >::find(), BALL::HashGridBox3< Item >::getSize(), BALL::HashGridBox3< Item >::insert(), BALL::HashGridBox3< Item >::isEmpty(), BALL::HashGridBox3< Item >::isValid(), BALL::HashGridBox3< Item >::operator==(), BALL::HashGridBox3< Item >::remove(), BALL::HashGridBox3< Item >::removeAll(), and BALL::HashGrid3< Item >::set().
HashGridBox3* BALL::HashGridBox3< Item >::neighbours[27] |
This array stores a pointer to the box itself and the 26 neighbours of the current box.
Referenced by BALL::HashGridBox3< Item >::apply(), BALL::HashGridBox3< Item >::dump(), and BALL::HashGridBox3< Item >::HashGridBox3().