Public Types | Static Public Member Functions
ESBTL::Traits_for_grid< Point_, Iterator_ > Struct Template Reference

#include <grid_of_cubes.h>

List of all members.

Public Types

typedef double NT
typedef Iterator_ Iterator
typedef Point_ Point

Static Public Member Functions

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)

Detailed Description

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.

Member Typedef Documentation

template<class Point_ , class Iterator_ >
typedef Iterator_ ESBTL::Traits_for_grid< Point_, Iterator_ >::Iterator
template<class Point_ , class Iterator_ >
typedef double ESBTL::Traits_for_grid< Point_, Iterator_ >::NT
template<class Point_ , class Iterator_ >
typedef Point_ ESBTL::Traits_for_grid< Point_, Iterator_ >::Point

Member Function Documentation

template<class Point_ , class Iterator_ >
static void ESBTL::Traits_for_grid< Point_, Iterator_ >::init_grid ( const Iterator begin,
const Iterator end,
int &  xlim,
int &  ylim,
int &  zlim,
double &  rmax,
Point lower_corner 
) [inline, static]

static function indicating how the grid must be initialized (the bounding box)

Parameters:
beginfirst iterator over the range of objects to be inserted into the grid.
endpast-end iterator over the range of objects to be inserted into the grid.
xlimis the number of cubes in the x-direction. This value will be defined by that function.
ylimis the number of cubes in the y-direction. This value will be defined by that function.
zlimis the number of cubes in the z-direction. This value will be defined by that function.
rmaxis an upper bound on the radius of the atoms. This value will be defined by that function.
lower_corneris a point indicating the lower corner of the grid. This value will be defined by that function.
template<class Point_ , class Iterator_ >
template<class Any_iterator >
static bool ESBTL::Traits_for_grid< Point_, Iterator_ >::is_outside_grid ( Any_iterator  it,
const int &  xlim,
const int &  ylim,
const int &  zlim,
const double &  cubel,
const Point lower_corner 
) [inline, static]

static function indicating if an object can be in conflict with a grid object.

Parameters:
itis an iterator over an object.
xlimis the number of cubes in the x-direction.
ylimis the number of cubes in the y-direction.
zlimis the number of cubes in the z-direction.
cubelis the edge length of a cube in the grid.
lower_corneris a point indicating the lower corner of the grid.
Returns:
a tuple giving the cube position of the object in the grid.
template<class Point_ , class Iterator_ >
template<class Any_iterator >
static boost::tuple<int,int,int> ESBTL::Traits_for_grid< Point_, Iterator_ >::locate_cube ( Any_iterator  it,
const int &  xlim,
const int &  ylim,
const int &  zlim,
const double &  cubel,
const Point lower_corner 
) [inline, static]

static function computing the position of an object inside the grid.

Template Parameters:
Any_iteratoris an iterator type over object to be stored in the grid.
Parameters:
itis an iterator over an object.
xlimis the number of cubes in the x-direction.
ylimis the number of cubes in the y-direction.
zlimis the number of cubes in the z-direction.
cubelis the edge length of a cube in the grid.
lower_corneris a point indicating the lower corner of the grid.
Returns:
a tuple giving the cube position of the object in the grid.

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