BALL::HashGridBox3< Item > Class Template Reference
[Three-dimensional Hash Grid]

#include <BALL/DATATYPE/hashGrid.h>

List of all members.


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 HashGridBox3operator= (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

HashGridBox3neighbours [27]
 

This array stores a pointer to the box itself and the 26 neighbours of the current box.


DataItemfirst_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 DataItemDataIteratorPosition
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

Detailed Description

template<typename Item>
class BALL::HashGridBox3< Item >

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.


Member Typedef Documentation

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.

template<typename Item>
typedef Position BALL::HashGridBox3< Item >::BoxIteratorPosition

This is the const version of BoxIterator .

Const data iterator for grid boxes. This is the const version of DataIterator

Data iterator for grid boxes. This iterator traverses the list of data items store in a HashGridBox3 .

template<typename Item>
typedef DataItem* BALL::HashGridBox3< Item >::DataIteratorPosition

Member Function Documentation

template<typename Item>
ConstBoxIterator BALL::HashGridBox3< Item >::beginBox (  )  const [inline]

get the first box

template<typename Item>
BoxIterator BALL::HashGridBox3< Item >::beginBox (  )  [inline]

get the first box

template<typename Item>
ConstDataIterator BALL::HashGridBox3< Item >::beginData (  )  const [inline]
template<typename Item>
DataIterator BALL::HashGridBox3< Item >::beginData (  )  [inline]
template<typename Item>
ConstBoxIterator BALL::HashGridBox3< Item >::endBox (  )  const [inline]

get the last box

template<typename Item>
BoxIterator BALL::HashGridBox3< Item >::endBox (  )  [inline]

get the last box

template<typename Item>
ConstDataIterator BALL::HashGridBox3< Item >::endData (  )  const [inline]
template<typename Item>
DataIterator BALL::HashGridBox3< Item >::endData (  )  [inline]

Friends And Related Function Documentation

template<typename Item>
friend class BoxIteratorTraits [friend]
template<typename Item>
friend class DataIteratorTraits [friend]

Member Data Documentation

template<typename Item>
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().