IMP
2.2.1
The Integrative Modeling Platform
|
#include <IMP/algebra/grid_storages.h>
Public Types | |
typedef VT | Value |
Public Member Functions | |
SparseGridStorageD (const Ints &counts, const VT &default_value) | |
GridIndexD< D > | add_voxel (const ExtendedGridIndexD< D > &i, const VT &gi) |
Add a voxel to the storage, this voxel will now have a GridIndex3D. | |
template<class Functor , class Grid > | |
Functor | apply (const Grid &g, Functor f) const |
bool | get_has_index (const ExtendedGridIndexD< D > &i) const |
Return true if the voxel has been added. | |
GridIndexD< D > | get_index (const ExtendedGridIndexD< D > &i) const |
requires get_has_index(i) is true. | |
unsigned int | get_number_of_voxels () const |
void | remove_voxel (const GridIndexD< D > &gi) |
void | show (std::ostream &out=std::cout) const |
Operator [] | |
Operator[] isn't very useful at the moment as it can only be used with a cell which has already been set. This behavior/the existence of these functions is likely to change. | |
const VT | operator[] (GridIndexD< D >) const |
VT & | operator[] (GridIndexD< D >) |
Index Iterators | |
Iterate through a range of actual indexes. The value type for the iterator is an GridIndex3D. The range is defined by a pair of indexes. It includes all indexes in the axis aligned box defined by lb as the lower corner and the second as the ub. That is, if lb is \((l_x, l_y, l_z)\) and ub is \((u_x, u_y, u_z)\), then the range includes all indexes \((i_x, i_y, i_z)\) such that \(l_x \leq i_x \leq u_x\), \(l_y \leq i_y \leq u_y\) and \(l_z \leq i_z \leq u_z\). | |
IndexIterator | indexes_begin (const ExtendedGridIndexD< D > &lb, const ExtendedGridIndexD< D > &ub) const |
IndexIterator | indexes_end (const ExtendedGridIndexD< D > &, const ExtendedGridIndexD< D > &) const |
base::Vector< GridIndexD< D > > | get_indexes (const ExtendedGridIndexD< D > &lb, const ExtendedGridIndexD< D > &ub) const |
Store a grid as a sparse set of voxels (only the voxels which have been added are actually stored). The get_has_index() functions allow one to tell if a voxel has been added.
Base should be one of BoundedGridRangeD or UnboundedGridRangeD.
Definition at line 183 of file grid_storages.h.