|
IMP Reference Guide
develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
|
#include <IMP/algebra/grid_storages.h>
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 188 of file 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 |
Iterators through set cells | |
Iterate through the voxels which have been set. The value type is a pair of GridIndex3D and VT. | |
| typedef Data::const_iterator | AllConstIterator |
| typedef boost::transform_iterator< GetIndex, AllConstIterator > | AllIndexIterator |
| AllConstIterator | all_begin () const |
| AllConstIterator | all_end () const |
| AllIndexIterator | all_indexes_begin () const |
| AllIndexIterator | all_indexes_end () 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 | at (GridIndexD< D >) const |
| VT & | at (GridIndexD< D >) |
| 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 |
| Vector< GridIndexD< D > > | get_indexes (const ExtendedGridIndexD< D > &lb, const ExtendedGridIndexD< D > &ub) const |
| typedef Data::const_iterator IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::AllConstIterator |
Definition at line 284 of file grid_storages.h.
| typedef boost::transform_iterator<GetIndex, AllConstIterator> IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::AllIndexIterator |
Definition at line 288 of file grid_storages.h.
| typedef VT IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::Value |
Definition at line 217 of file grid_storages.h.
| IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::SparseGridStorageD | ( | const Ints & | counts, |
| const VT & | default_value ) |
Definition at line 218 of file grid_storages.h.
| GridIndexD< D > IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::add_voxel | ( | const ExtendedGridIndexD< D > & | i, |
| const VT & | gi ) |
Add a voxel to the storage, this voxel will now have a GridIndex3D.
Definition at line 223 of file grid_storages.h.
| AllConstIterator IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::all_begin | ( | ) | const |
Definition at line 285 of file grid_storages.h.
| AllConstIterator IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::all_end | ( | ) | const |
Definition at line 286 of file grid_storages.h.
| AllIndexIterator IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::all_indexes_begin | ( | ) | const |
Definition at line 289 of file grid_storages.h.
| AllIndexIterator IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::all_indexes_end | ( | ) | const |
Definition at line 292 of file grid_storages.h.
| Functor IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::apply | ( | const Grid & | g, |
| Functor | f ) const |
Definition at line 348 of file grid_storages.h.
| bool IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::get_has_index | ( | const ExtendedGridIndexD< D > & | i | ) | const |
Return true if the voxel has been added.
Definition at line 237 of file grid_storages.h.
| GridIndexD< D > IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::get_index | ( | const ExtendedGridIndexD< D > & | i | ) | const |
requires get_has_index(i) is true.
Definition at line 241 of file grid_storages.h.
| Vector< GridIndexD< D > > IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::get_indexes | ( | const ExtendedGridIndexD< D > & | lb, |
| const ExtendedGridIndexD< D > & | ub ) const |
Definition at line 340 of file grid_storages.h.
| unsigned int IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::get_number_of_voxels | ( | ) | const |
Definition at line 235 of file grid_storages.h.
| IndexIterator IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::indexes_begin | ( | const ExtendedGridIndexD< D > & | lb, |
| const ExtendedGridIndexD< D > & | ub ) const |
Definition at line 323 of file grid_storages.h.
| IndexIterator IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::indexes_end | ( | const ExtendedGridIndexD< D > & | , |
| const ExtendedGridIndexD< D > & | ) const |
Definition at line 333 of file grid_storages.h.
| void IMP::algebra::SparseGridStorageD< D, VT, Base, Map >::remove_voxel | ( | const GridIndexD< D > & | gi | ) |
Definition at line 229 of file grid_storages.h.