Classes | Public Types | Public Member Functions | Public Attributes
ESBTL::Grid_of_cubes< Traits > Struct Template Reference

#include <grid_of_cubes.h>

List of all members.

Classes

struct  Cube_unit
class  iterator
class  neighbor_iterator
class  object_iterator

Public Types

typedef tuple< int, int, int > Cube_coordinates
typedef Traits::Iterator Object_iterator
typedef Grid_of_cubes< Traits >
::Cube_unit::In_cube_iterator 
In_cube_iterator
typedef std::map
< Cube_coordinates, Cube_unit * > 
Cube_container

Public Member Functions

void init (const Object_iterator &it_beg, const Object_iterator &it_end)
void fill (Object_iterator it_beg, Object_iterator it_end)
 Grid_of_cubes ()
 Grid_of_cubes (const Object_iterator &it_beg, const Object_iterator &it_end)
 ~Grid_of_cubes ()
unsigned nb_element () const
Cube_unitget_cube (const Cube_coordinates &t)
template<class Any_iterator >
Cube_coordinates locate_cube (Any_iterator v) const
template<class Any_iterator >
Cube_unitget_cube (Any_iterator v)
void insert_in_cube (Object_iterator V)
template<class Any_iterator >
bool is_outside_grid (Any_iterator v) const
bool valid_tuple (const Cube_coordinates &T) const
iterator begin ()
iterator end ()
neighbor_iterator nend ()
object_iterator last_object ()
object_iterator first_object ()
void erase (const object_iterator &it)
Cube_coordinates get_first_neighbor (Cube_coordinates &T)
neighbor_iterator first_neighbor (const Cube_coordinates &C)
neighbor_iterator first_neighbor (iterator &it)

Public Attributes

Cube_container cube_container
int xlim
int ylim
int zlim
Traits::NT cube_edge_length
Traits::Point lower_corner

Detailed Description

template<class Traits>
struct ESBTL::Grid_of_cubes< Traits >

This class offers an intersection detection between atoms using a grid. The bounding box of all the atoms is subdivided using a regular grid of cubes (which edge length is twice the largest radius + epsilon). Testing intersection between two atoms then reduces to test intersection between atoms in the same cube or in a direct neighboring cube.

Template Parameters:
Traitsis a class providing static function indicating how to handle stored objects (see Traits_for_grid for an example.)

Member Typedef Documentation

template<class Traits >
typedef std::map<Cube_coordinates,Cube_unit*> ESBTL::Grid_of_cubes< Traits >::Cube_container
template<class Traits >
typedef tuple<int,int,int> ESBTL::Grid_of_cubes< Traits >::Cube_coordinates
template<class Traits >
typedef Grid_of_cubes<Traits>::Cube_unit::In_cube_iterator ESBTL::Grid_of_cubes< Traits >::In_cube_iterator
template<class Traits >
typedef Traits::Iterator ESBTL::Grid_of_cubes< Traits >::Object_iterator

Constructor & Destructor Documentation

template<class Traits >
ESBTL::Grid_of_cubes< Traits >::Grid_of_cubes ( ) [inline]
template<class Traits >
ESBTL::Grid_of_cubes< Traits >::Grid_of_cubes ( const Object_iterator it_beg,
const Object_iterator it_end 
) [inline]
template<class Traits >
ESBTL::Grid_of_cubes< Traits >::~Grid_of_cubes ( ) [inline]

Member Function Documentation

template<class Traits >
iterator ESBTL::Grid_of_cubes< Traits >::begin ( ) [inline]
template<class Traits >
iterator ESBTL::Grid_of_cubes< Traits >::end ( ) [inline]
template<class Traits >
void ESBTL::Grid_of_cubes< Traits >::erase ( const object_iterator it) [inline]
template<class Traits >
void ESBTL::Grid_of_cubes< Traits >::fill ( Object_iterator  it_beg,
Object_iterator  it_end 
) [inline]
template<class Traits >
neighbor_iterator ESBTL::Grid_of_cubes< Traits >::first_neighbor ( const Cube_coordinates C) [inline]
template<class Traits >
neighbor_iterator ESBTL::Grid_of_cubes< Traits >::first_neighbor ( iterator it) [inline]
template<class Traits >
object_iterator ESBTL::Grid_of_cubes< Traits >::first_object ( ) [inline]
template<class Traits >
Cube_unit* ESBTL::Grid_of_cubes< Traits >::get_cube ( const Cube_coordinates t) [inline]
template<class Traits >
template<class Any_iterator >
Cube_unit* ESBTL::Grid_of_cubes< Traits >::get_cube ( Any_iterator  v) [inline]
template<class Traits >
Cube_coordinates ESBTL::Grid_of_cubes< Traits >::get_first_neighbor ( Cube_coordinates T) [inline]
template<class Traits >
void ESBTL::Grid_of_cubes< Traits >::init ( const Object_iterator it_beg,
const Object_iterator it_end 
) [inline]
template<class Traits >
void ESBTL::Grid_of_cubes< Traits >::insert_in_cube ( Object_iterator  V) [inline]
template<class Traits >
template<class Any_iterator >
bool ESBTL::Grid_of_cubes< Traits >::is_outside_grid ( Any_iterator  v) const [inline]
template<class Traits >
object_iterator ESBTL::Grid_of_cubes< Traits >::last_object ( ) [inline]
template<class Traits >
template<class Any_iterator >
Cube_coordinates ESBTL::Grid_of_cubes< Traits >::locate_cube ( Any_iterator  v) const [inline]
template<class Traits >
unsigned ESBTL::Grid_of_cubes< Traits >::nb_element ( ) const [inline]
template<class Traits >
neighbor_iterator ESBTL::Grid_of_cubes< Traits >::nend ( ) [inline]
template<class Traits >
bool ESBTL::Grid_of_cubes< Traits >::valid_tuple ( const Cube_coordinates T) const [inline]

Member Data Documentation

template<class Traits >
Cube_container ESBTL::Grid_of_cubes< Traits >::cube_container
template<class Traits >
Traits::NT ESBTL::Grid_of_cubes< Traits >::cube_edge_length
template<class Traits >
Traits::Point ESBTL::Grid_of_cubes< Traits >::lower_corner
template<class Traits >
int ESBTL::Grid_of_cubes< Traits >::xlim
template<class Traits >
int ESBTL::Grid_of_cubes< Traits >::ylim
template<class Traits >
int ESBTL::Grid_of_cubes< Traits >::zlim

The documentation for this struct was generated from the following file: