9 #ifndef IMPALGEBRA_STANDARD_GRIDS_H
10 #define IMPALGEBRA_STANDARD_GRIDS_H
12 #include <IMP/algebra/algebra_config.h>
17 IMPALGEBRA_BEGIN_NAMESPACE
21 #define IMP_ALGEBRA_SWIG_GRID_METHODS(D, Q) \
22 GridIndexD<D> add_voxel(const ExtendedGridIndexD<D> &i, const Q &q); \
23 Q __getitem__(const GridIndexD<D> i) const; \
24 void __setitem__(const GridIndexD<D> &i, const Q &q); \
25 Q __getitem__(const VectorD<D> i) const; \
26 void __setitem__(const VectorD<D> &i, const Q &q); \
27 BoundingBoxD<D> get_bounding_box(ExtendedGridIndexD<D> v) const; \
28 BoundingBoxD<D> get_bounding_box() const
31 #define IMP_ALGEBRA_SWIG_GRID_METHODS(D, VT)
36 template <
int D,
class VT>
38 :
public GridD<D, SparseGridStorageD<D, VT, UnboundedGridRangeD<D> >, VT,
39 DefaultEmbeddingD<D> > {
43 :
P(side, origin, def) {}
45 IMP_ALGEBRA_SWIG_GRID_METHODS(D, VT);
54 :
public GridD<3, DenseGridStorageD<3, VT>, VT, DefaultEmbeddingD<3> > {
59 IMP_ALGEBRA_SWIG_GRID_METHODS(3, VT);
65 :
public GridD<3, SparseGridStorageD<3, VT, BoundedGridRangeD<3> >, VT,
66 DefaultEmbeddingD<3> > {
72 :
P(xd, yd, zd, bb, def) {}
74 IMP_ALGEBRA_SWIG_GRID_METHODS(3, VT);
81 :
public GridD<3, SparseGridStorageD<3, VT, UnboundedGridRangeD<3> >, VT,
82 DefaultEmbeddingD<3> > {
86 :
P(side, origin, def) {}
88 IMP_ALGEBRA_SWIG_GRID_METHODS(3, VT);
93 float, LogEmbeddingD<-1> > {
96 IMP_ALGEBRA_SWIG_GRID_METHODS(-1,
float);
101 :
public GridD<3, DenseGridStorageD<3, int>, int, LogEmbeddingD<3> > {
104 IMP_ALGEBRA_SWIG_GRID_METHODS(3,
int);
107 IMPALGEBRA_END_NAMESPACE
A class to represent a voxel grid.
A class to represent a voxel grid.
A voxel grid in d-dimensional space space.
A Cartesian vector in D-dimensions.
A class to represent a voxel grid.
A class to represent a voxel grid.