#include <grid_of_cubes.h>
|
static void | init_grid (const Iterator &begin, const Iterator &end, int &xlim, int &ylim, int &zlim, double &rmax, Point &lower_corner) |
|
template<class Any_iterator > |
static boost::tuple< int, int, int > | locate_cube (Any_iterator it, const int &xlim, const int &ylim, const int &zlim, const double &cubel, const Point &lower_corner) |
|
template<class Any_iterator > |
static bool | is_outside_grid (Any_iterator it, const int &xlim, const int &ylim, const int &zlim, const double &cubel, const Point &lower_corner) |
|
template<class Point_, class Iterator_>
struct ESBTL::Traits_for_grid< Point_, Iterator_ >
Traits for using with Grid_of_cubes. Objects are atoms/points, maximum radius is fixed to 3.
- Template Parameters
-
Point_ | is the underlying point type used. |
Iterator_ | is an iterator over objects to be stored in the grid. |
◆ init_grid()
static void init_grid |
( |
const Iterator & |
begin, |
|
|
const Iterator & |
end, |
|
|
int & |
xlim, |
|
|
int & |
ylim, |
|
|
int & |
zlim, |
|
|
double & |
rmax, |
|
|
Point & |
lower_corner |
|
) |
| |
|
inlinestatic |
static function indicating how the grid must be initialized (the bounding box)
- Parameters
-
begin | first iterator over the range of objects to be inserted into the grid. |
end | past-end iterator over the range of objects to be inserted into the grid. |
xlim | is the number of cubes in the x-direction. This value will be defined by that function. |
ylim | is the number of cubes in the y-direction. This value will be defined by that function. |
zlim | is the number of cubes in the z-direction. This value will be defined by that function. |
rmax | is an upper bound on the radius of the atoms. This value will be defined by that function. |
lower_corner | is a point indicating the lower corner of the grid. This value will be defined by that function. |
◆ is_outside_grid()
static bool is_outside_grid |
( |
Any_iterator |
it, |
|
|
const int & |
xlim, |
|
|
const int & |
ylim, |
|
|
const int & |
zlim, |
|
|
const double & |
cubel, |
|
|
const Point & |
lower_corner |
|
) |
| |
|
inlinestatic |
static function indicating if an object can be in conflict with a grid object.
- Parameters
-
it | is an iterator over an object. |
xlim | is the number of cubes in the x-direction. |
ylim | is the number of cubes in the y-direction. |
zlim | is the number of cubes in the z-direction. |
cubel | is the edge length of a cube in the grid. |
lower_corner | is a point indicating the lower corner of the grid. |
- Returns
- a tuple giving the cube position of the object in the grid.
◆ locate_cube()
static boost::tuple<int,int,int> locate_cube |
( |
Any_iterator |
it, |
|
|
const int & |
xlim, |
|
|
const int & |
ylim, |
|
|
const int & |
zlim, |
|
|
const double & |
cubel, |
|
|
const Point & |
lower_corner |
|
) |
| |
|
inlinestatic |
static function computing the position of an object inside the grid.
- Template Parameters
-
Any_iterator | is an iterator type over object to be stored in the grid. |
- Parameters
-
it | is an iterator over an object. |
xlim | is the number of cubes in the x-direction. |
ylim | is the number of cubes in the y-direction. |
zlim | is the number of cubes in the z-direction. |
cubel | is the edge length of a cube in the grid. |
lower_corner | is a point indicating the lower corner of the grid. |
- Returns
- a tuple giving the cube position of the object in the grid.