|
BALL
1.5.0
|
#include <BALL/DATATYPE/hashGrid.h>
Classes | |
| class | BoxIteratorTraits |
| class | DataIteratorTraits |
Public Member Functions | |
Constructors and Destructors | |
| HashGridBox3 (HashGrid3< Item > *parent) | |
| Default constructor. More... | |
| void | clear () |
| Clears the grid box. More... | |
| void | destroy () |
Accessors | |
| void | setParent (HashGrid3< Item > *p) |
| void | getIndices (Position &x, Position &y, Position &z) |
| Item * | find (const Item &item) |
| const Item * | find (const Item &item) const |
| The const version of find() More... | |
| 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. More... | |
Predicates | |
| bool | operator== (const HashGridBox3 &box) const |
| Equality operator. More... | |
| bool | operator!= (const HashGridBox3 &box) const |
| Inequality operator. More... | |
| 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) |
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.
Definition at line 54 of file hashGrid.h.
| 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.
Definition at line 327 of file hashGrid.h.
| typedef Position BALL::HashGridBox3< Item >::BoxIteratorPosition |
Definition at line 178 of file hashGrid.h.
| typedef ConstForwardIterator<HashGridBox3<Item>, HashGridBox3<Item>, BoxIteratorPosition, BoxIteratorTraits> BALL::HashGridBox3< Item >::ConstBoxIterator |
This is the const version of BoxIterator .
Definition at line 346 of file hashGrid.h.
| typedef ConstForwardIterator<HashGridBox3<Item>, Item, DataIteratorPosition, DataIteratorTraits> BALL::HashGridBox3< Item >::ConstDataIterator |
Const data iterator for grid boxes. This is the const version of DataIterator
Definition at line 513 of file hashGrid.h.
| typedef std::forward_list<Item> BALL::HashGridBox3< Item >::DataContainer |
Definition at line 360 of file hashGrid.h.
| 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 .
Definition at line 492 of file hashGrid.h.
| typedef DataContainer::iterator BALL::HashGridBox3< Item >::DataIteratorPosition |
Definition at line 362 of file hashGrid.h.
| BALL::HashGridBox3< Item >::HashGridBox3 | ( | HashGrid3< Item > * | parent | ) |
Default constructor.
Definition at line 535 of file hashGrid.h.
| bool BALL::HashGridBox3< Item >::apply | ( | UnaryProcessor< HashGridBox3< Item > > & | processor | ) |
Definition at line 708 of file hashGrid.h.
| bool BALL::HashGridBox3< Item >::apply | ( | UnaryProcessor< Item > & | processor | ) |
Definition at line 685 of file hashGrid.h.
|
inline |
get the first box
Definition at line 330 of file hashGrid.h.
|
inline |
get the first box
Definition at line 349 of file hashGrid.h.
|
inline |
Definition at line 495 of file hashGrid.h.
|
inline |
Definition at line 516 of file hashGrid.h.
| void BALL::HashGridBox3< Item >::clear |
Clears the grid box.
Definition at line 541 of file hashGrid.h.
| BALL_INLINE void BALL::HashGridBox3< Item >::destroy |
Clears the grid box. Same as clear.
Definition at line 548 of file hashGrid.h.
| void BALL::HashGridBox3< Item >::dump | ( | std::ostream & | s = std::cout, |
| Size | depth = 0 |
||
| ) | const |
Definition at line 664 of file hashGrid.h.
|
inline |
get the last box
Definition at line 336 of file hashGrid.h.
|
inline |
get the last box
Definition at line 355 of file hashGrid.h.
|
inline |
Definition at line 501 of file hashGrid.h.
|
inline |
Definition at line 522 of file hashGrid.h.
| Item * BALL::HashGridBox3< Item >::find | ( | const Item & | item | ) |
Find an item in the item list of this grid box.
| item | the item to be searched for |
Definition at line 567 of file hashGrid.h.
| BALL_INLINE const Item * BALL::HashGridBox3< Item >::find | ( | const Item & | item | ) | const |
The const version of find()
Definition at line 581 of file hashGrid.h.
| BALL_INLINE void BALL::HashGridBox3< Item >::getIndices | ( | Position & | x, |
| Position & | y, | ||
| Position & | z | ||
| ) |
Return the indices of this box in the parent HashGrid
Definition at line 561 of file hashGrid.h.
| Size BALL::HashGridBox3< Item >::getSize |
Counts all items in the data item list (in linear time).
Definition at line 587 of file hashGrid.h.
| BALL_INLINE bool BALL::HashGridBox3< Item >::has | ( | const Item & | item | ) | const |
Test whether an item is in the data item list
| item |
true if instance has item, false otherwise. Definition at line 644 of file hashGrid.h.
| BALL_INLINE void BALL::HashGridBox3< Item >::host | ( | Visitor< HashGridBox3< Item > > & | visitor | ) |
Host method.
Definition at line 624 of file hashGrid.h.
| BALL_INLINE void BALL::HashGridBox3< Item >::insert | ( | const Item & | item | ) |
Insert an item into the data item list of a grid box.
| item | the item to be inserted |
Definition at line 594 of file hashGrid.h.
| BALL_INLINE bool BALL::HashGridBox3< Item >::isEmpty |
Test, whether this box is empty, i. e. the data item list contains nothing
true, if this is empty. false otherwise. Definition at line 651 of file hashGrid.h.
| bool BALL::HashGridBox3< Item >::isValid |
Definition at line 657 of file hashGrid.h.
| BALL_INLINE bool BALL::HashGridBox3< Item >::operator!= | ( | const HashGridBox3< Item > & | box | ) | const |
Inequality operator.
Definition at line 637 of file hashGrid.h.
| bool BALL::HashGridBox3< Item >::operator== | ( | const HashGridBox3< Item > & | box | ) | const |
Equality operator.
Definition at line 630 of file hashGrid.h.
| bool BALL::HashGridBox3< Item >::remove | ( | const Item & | item | ) |
Remove the first occurrence of a certain item from the data item list.
| item | the item to be removed |
true, if the item could be removed, false otherwise. Definition at line 600 of file hashGrid.h.
| bool BALL::HashGridBox3< Item >::removeAll | ( | const Item & | item | ) |
Remove all occurences of a certain item from the data item list.
| item | the item to be removed |
true, if the item could be removed, false otherwise. Definition at line 615 of file hashGrid.h.
| BALL_INLINE void BALL::HashGridBox3< Item >::setParent | ( | HashGrid3< Item > * | p | ) |
Definition at line 554 of file hashGrid.h.
|
friend |
Definition at line 318 of file hashGrid.h.
|
friend |
Definition at line 484 of file hashGrid.h.
| DataContainer BALL::HashGridBox3< Item >::data |
Definition at line 531 of file hashGrid.h.
| HashGrid3<Item>* BALL::HashGridBox3< Item >::parent |
Definition at line 529 of file hashGrid.h.