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);
55 :
public GridD<3, DenseGridStorageD<3, VT>, VT, DefaultEmbeddingD<3> > {
60 IMP_ALGEBRA_SWIG_GRID_METHODS(3, VT);
63 template <
int D,
class VT>
65 :
public GridD<D, DenseGridStorageD<D, VT>, VT, DefaultEmbeddingD<D> > {
69 DenseGridD(
const VectorD<D> &sides,
const BoundingBoxD<D> &bb, VT def = VT())
70 : P(sides, bb, def) {}
72 IMP_ALGEBRA_SWIG_GRID_METHODS(D, VT);
79 :
public GridD<3, SparseGridStorageD<3, VT, BoundedGridRangeD<3> >, VT,
80 DefaultEmbeddingD<3> > {
86 :
P(xd, yd, zd, bb, def) {}
88 IMP_ALGEBRA_SWIG_GRID_METHODS(3, VT);
95 :
public GridD<3, SparseGridStorageD<3, VT, UnboundedGridRangeD<3> >, VT,
96 DefaultEmbeddingD<3> > {
100 :
P(side, origin, def) {}
102 :
P(sides, origin, def) {}
104 IMP_ALGEBRA_SWIG_GRID_METHODS(3, VT);
109 float, LogEmbeddingD<-1> > {
112 IMP_ALGEBRA_SWIG_GRID_METHODS(-1,
float);
117 :
public GridD<3, DenseGridStorageD<3, int>, int, LogEmbeddingD<3> > {
120 IMP_ALGEBRA_SWIG_GRID_METHODS(3,
int);
123 IMPALGEBRA_END_NAMESPACE
A class to represent a voxel grid.
A class to represent a voxel grid.
A voxel grid in d-dimensional space.
A sparse, infinite grid of values.
A Cartesian vector in D-dimensions.
A class to represent a voxel grid.
A class to represent a voxel grid.
A sparse, infinite grid of values.