IMP logo
IMP Reference Guide  2.15.0
The Integrative Modeling Platform
IMP::algebra::BoundedGridRangeD< D > Class Template Reference

#include <IMP/algebra/grid_ranges.h>

+ Inheritance diagram for IMP::algebra::BoundedGridRangeD< D >:

Detailed Description

template<int D>
class IMP::algebra::BoundedGridRangeD< D >

This is a base class for storage types which refer to a bounded number of cells.

Definition at line 98 of file grid_ranges.h.

Public Types

typedef ExtendedGridIndexD< D > ExtendedIndex
 
typedef GridIndexD< D > Index
 

Public Member Functions

 BoundedGridRangeD (const Ints &counts)
 
ExtendedGridIndexD< D > get_end_index () const
 Get the past-end voxel. More...
 
bool get_has_index (const ExtendedGridIndexD< D > &v) const
 Return true if the ExtendedIndex is also a normal index value. More...
 
GridIndexD< D > get_index (const ExtendedGridIndexD< D > &v) const
 Convert a ExtendedIndex into a real Index if possible. More...
 
ExtendedGridIndexD< D > get_maximum_extended_index () const
 Return the index of the maximal cell. More...
 
ExtendedGridIndexD< D > get_minimum_extended_index () const
 Return the ExtendedGridIndexD of all zeros. More...
 
unsigned int get_number_of_voxels (unsigned int i) const
 Return the number of voxels in a certain direction. More...
 
unsigned int get_number_of_voxels () const
 
void show (std::ostream &out=std::cout) const
 

All Index iterators

The value type is a GridIndexD;

AllIndexIterator all_indexes_begin () const
 
AllIndexIterator all_indexes_end () const
 
Vector< GridIndexD< D > > get_all_indexes () const
 

Index Iterators

Iterate through a range of actual indexes. The value type for the iterator is an GridIndexD<D>.

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
 
ExtendedIndexIterator extended_indexes_begin (const ExtendedGridIndexD< D > &lb, const ExtendedGridIndexD< D > &ub) const
 
ExtendedIndexIterator extended_indexes_end (const ExtendedGridIndexD< D > &, const ExtendedGridIndexD< D > &) const
 
Vector< GridIndexD< D > > get_indexes (const ExtendedGridIndexD< D > &lb, const ExtendedGridIndexD< D > &ub) const
 
Vector< ExtendedGridIndexD< D > > get_extended_indexes (const ExtendedGridIndexD< D > &lb, const ExtendedGridIndexD< D > &ub) const
 

Member Function Documentation

template<int D>
ExtendedGridIndexD<D> IMP::algebra::BoundedGridRangeD< D >::get_end_index ( ) const

Get the past-end voxel.

Definition at line 131 of file grid_ranges.h.

template<int D>
bool IMP::algebra::BoundedGridRangeD< D >::get_has_index ( const ExtendedGridIndexD< D > &  v) const

Return true if the ExtendedIndex is also a normal index value.

Definition at line 242 of file grid_ranges.h.

template<int D>
GridIndexD<D> IMP::algebra::BoundedGridRangeD< D >::get_index ( const ExtendedGridIndexD< D > &  v) const

Convert a ExtendedIndex into a real Index if possible.

The passed index must be part of the grid

Definition at line 237 of file grid_ranges.h.

template<int D>
ExtendedGridIndexD<D> IMP::algebra::BoundedGridRangeD< D >::get_maximum_extended_index ( ) const

Return the index of the maximal cell.

Definition at line 259 of file grid_ranges.h.

template<int D>
ExtendedGridIndexD<D> IMP::algebra::BoundedGridRangeD< D >::get_minimum_extended_index ( ) const

Return the ExtendedGridIndexD of all zeros.

Definition at line 251 of file grid_ranges.h.

template<int D>
unsigned int IMP::algebra::BoundedGridRangeD< D >::get_number_of_voxels ( unsigned int  i) const

Return the number of voxels in a certain direction.

Definition at line 118 of file grid_ranges.h.


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