Three-dimensional Hash Grid
[Generic Hash Associative Containers]


Classes

class  BALL::HashGridBox3< Item >
class  BALL::HashGrid3< Item >

Constructors and Destructors

 BALL::HashGridBox3::HashGridBox3 ()
 

Default constructor.


 BALL::HashGridBox3::HashGridBox3 (const HashGridBox3 &grid_box, bool deep=true)
 

Copy constructor.


 BALL::HashGridBox3::~HashGridBox3 ()
 

Destructor.


void BALL::HashGridBox3::clear ()
 

Clears the grid box.


void BALL::HashGridBox3::destroy ()

Assignment

void BALL::HashGridBox3::set (const HashGridBox3 &box, bool=true) throw (Exception::NotImplemented)
const HashGridBox3 & BALL::HashGridBox3::operator= (const HashGridBox3 &box) throw (Exception::NotImplemented)

Accessors

Item * BALL::HashGridBox3::find (const Item &item)
const Item * BALL::HashGridBox3::find (const Item &item) const
 

The const version of find().


Size BALL::HashGridBox3::getSize () const
void BALL::HashGridBox3::insert (const Item &item)
bool BALL::HashGridBox3::remove (const Item &item)
bool BALL::HashGridBox3::removeAll (const Item &item)

Miscellaneous

void BALL::HashGridBox3::host (Visitor< HashGridBox3 > &visitor)
 

Host method.



Predicates

bool BALL::HashGridBox3::operator== (const HashGridBox3 &box) const
 

Equality operator.


bool BALL::HashGridBox3::operator!= (const HashGridBox3 &box) const
 

Inequality operator.


bool BALL::HashGridBox3::has (const Item &item) const
bool BALL::HashGridBox3::isEmpty () const

Debugging and Diagnostics

bool BALL::HashGridBox3::isValid () const
void BALL::HashGridBox3::dump (std::ostream &s=std::cout, Size depth=0) const

Internal Iterators

bool BALL::HashGridBox3::apply (UnaryProcessor< Item > &processor)
bool BALL::HashGridBox3::apply (UnaryProcessor< HashGridBox3< Item > > &processor)

Function Documentation

template<typename Item>
bool BALL::HashGridBox3< Item >::apply ( UnaryProcessor< HashGridBox3< Item > > &  processor  )  [inline, inherited]
template<typename Item >
BALL_INLINE void BALL::HashGridBox3< Item >::destroy (  )  [inline, inherited]

Clears the grid box. Same as clear.

References BALL::HashGridBox3< Item >::clear().

template<typename Item>
BALL_INLINE const Item * BALL::HashGridBox3< Item >::find ( const Item &  item  )  const [inline, inherited]

The const version of find().

References BALL::HashGridBox3< Item >::find().

template<typename Item>
Item * BALL::HashGridBox3< Item >::find ( const Item &  item  )  [inline, inherited]

Find an item in the item list of this grid box.

Parameters:
item the item to be searched for
Returns:
a pointer to the desired item or a NULL pointer, if the item could not be found.

References BALL::HashGridBox3< Item >::first_item_, and BALL::HashGridBox3< Item >::DataItem::next_.

Referenced by BALL::HashGridBox3< Item >::find(), and BALL::HashGridBox3< Item >::has().

template<typename Item >
Size BALL::HashGridBox3< Item >::getSize (  )  const [inline, inherited]

Counts all items in the data item list.

Returns:
the size of the data item list.

References BALL::HashGridBox3< Item >::first_item_, and BALL::HashGridBox3< Item >::DataItem::next_.

Referenced by BALL::HashGridBox3< Item >::dump().

template<typename Item>
BALL_INLINE bool BALL::HashGridBox3< Item >::has ( const Item &  item  )  const [inline, inherited]

Test whether an item is in the data item list

Parameters:
item 
Returns:
bool - true if instance has item, false otherwise.

References BALL::HashGridBox3< Item >::find().

template<typename Item >
BALL::HashGridBox3< Item >::HashGridBox3 ( const HashGridBox3< Item > &  grid_box,
bool  deep = true 
) [inline, inherited]

Copy constructor.

template<typename Item >
BALL::HashGridBox3< Item >::HashGridBox3 (  )  [inline, inherited]

Default constructor.

References BALL::HashGridBox3< Item >::neighbours.

template<typename Item >
BALL_INLINE void BALL::HashGridBox3< Item >::host ( Visitor< HashGridBox3< Item > > &  visitor  )  [inline, inherited]

Host method.

template<typename Item>
BALL_INLINE void BALL::HashGridBox3< Item >::insert ( const Item &  item  )  [inline, inherited]

Insert an item into the data item list of a grid box.

Parameters:
item the item to be inserted

References BALL::HashGridBox3< Item >::first_item_.

Referenced by BALL::HashGrid3< Item >::insert(), and BALL::HashGrid3< Item >::set().

template<typename Item >
BALL_INLINE bool BALL::HashGridBox3< Item >::isEmpty (  )  const [inline, inherited]

Test, whether this box is empty, i. e. the data item list contains nothing

Returns:
bool - true, if this is empty. false otherwise.

References BALL::HashGridBox3< Item >::first_item_.

Referenced by BALL::HashGrid3< Item >::getClosestItem(), and BALL::HashGrid3< Item >::set().

template<typename Item >
BALL_INLINE bool BALL::HashGridBox3< Item >::operator!= ( const HashGridBox3< Item > &  box  )  const [inline, inherited]

Inequality operator.

template<typename Item >
BALL_INLINE const HashGridBox3< Item > & BALL::HashGridBox3< Item >::operator= ( const HashGridBox3< Item > &  box  )  throw (Exception::NotImplemented) [inline, inherited]
template<typename Item >
bool BALL::HashGridBox3< Item >::operator== ( const HashGridBox3< Item > &  box  )  const [inline, inherited]
template<typename Item>
bool BALL::HashGridBox3< Item >::remove ( const Item &  item  )  [inline, inherited]

Remove the first occurrence of a certain item from the data item list.

Parameters:
item the item to be removed
Returns:
bool - true, if the item could be removed, false otherwise.

References BALL::HashGridBox3< Item >::first_item_, BALL::HashGridBox3< Item >::DataItem::next_, and BALL::HashGridBox3< Item >::DataItem::previous_.

Referenced by BALL::HashGrid3< Item >::remove().

template<typename Item>
bool BALL::HashGridBox3< Item >::removeAll ( const Item &  item  )  [inline, inherited]

Remove all occurences of a certain item from the data item list.

Parameters:
item the item to be removed
Returns:
bool - true, if the item could be removed, false otherwise.

References BALL::HashGridBox3< Item >::first_item_, BALL::HashGridBox3< Item >::DataItem::item_, BALL::HashGridBox3< Item >::DataItem::next_, and BALL::HashGridBox3< Item >::DataItem::previous_.

template<typename Item >
void BALL::HashGridBox3< Item >::set ( const HashGridBox3< Item > &  box,
bool  deep = true 
) throw (Exception::NotImplemented) [inline, inherited]
template<typename Item >
BALL::HashGridBox3< Item >::~HashGridBox3 (  )  [inline, inherited]

Destructor.

References BALL::HashGridBox3< Item >::clear().