IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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 103 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.
unsigned int get_number_of_voxels () const
unsigned int get_number_of_voxels (unsigned int i) const
 Return the number of voxels in a certain direction.
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
GridIndexD< D > get_index (const ExtendedGridIndexD< D > &v) const
 Convert a ExtendedIndex into a real Index if possible.
bool get_has_index (const ExtendedGridIndexD< D > &v) const
 Return true if the ExtendedIndex is also a normal index value.
ExtendedGridIndexD< D > get_minimum_extended_index () const
 Return the ExtendedGridIndexD of all zeros.
ExtendedGridIndexD< D > get_maximum_extended_index () const
 Return the index of the maximal cell.

Member Typedef Documentation

◆ ExtendedIndex

template<int D>
typedef ExtendedGridIndexD<D> IMP::algebra::BoundedGridRangeD< D >::ExtendedIndex

Definition at line 120 of file grid_ranges.h.

◆ Index

template<int D>
typedef GridIndexD<D> IMP::algebra::BoundedGridRangeD< D >::Index

Definition at line 119 of file grid_ranges.h.

Constructor & Destructor Documentation

◆ BoundedGridRangeD() [1/2]

template<int D>
IMP::algebra::BoundedGridRangeD< D >::BoundedGridRangeD ( )

Definition at line 124 of file grid_ranges.h.

◆ BoundedGridRangeD() [2/2]

template<int D>
IMP::algebra::BoundedGridRangeD< D >::BoundedGridRangeD ( const Ints & counts)
explicit

Definition at line 125 of file grid_ranges.h.

Member Function Documentation

◆ all_indexes_begin()

template<int D>
AllIndexIterator IMP::algebra::BoundedGridRangeD< D >::all_indexes_begin ( ) const

Definition at line 159 of file grid_ranges.h.

◆ all_indexes_end()

template<int D>
AllIndexIterator IMP::algebra::BoundedGridRangeD< D >::all_indexes_end ( ) const

Definition at line 165 of file grid_ranges.h.

◆ extended_indexes_begin()

template<int D>
ExtendedIndexIterator IMP::algebra::BoundedGridRangeD< D >::extended_indexes_begin ( const ExtendedGridIndexD< D > & lb,
const ExtendedGridIndexD< D > & ub ) const

Definition at line 221 of file grid_ranges.h.

◆ extended_indexes_end()

template<int D>
ExtendedIndexIterator IMP::algebra::BoundedGridRangeD< D >::extended_indexes_end ( const ExtendedGridIndexD< D > & ,
const ExtendedGridIndexD< D > &  ) const

Definition at line 226 of file grid_ranges.h.

◆ get_all_indexes()

template<int D>
Vector< GridIndexD< D > > IMP::algebra::BoundedGridRangeD< D >::get_all_indexes ( ) const

Definition at line 167 of file grid_ranges.h.

◆ get_end_index()

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

Get the past-end voxel.

Definition at line 142 of file grid_ranges.h.

◆ get_extended_indexes()

template<int D>
Vector< ExtendedGridIndexD< D > > IMP::algebra::BoundedGridRangeD< D >::get_extended_indexes ( const ExtendedGridIndexD< D > & lb,
const ExtendedGridIndexD< D > & ub ) const

Definition at line 238 of file grid_ranges.h.

◆ get_has_index()

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 253 of file grid_ranges.h.

Here is the call graph for this function:

◆ get_index()

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 248 of file grid_ranges.h.

Here is the call graph for this function:

◆ get_indexes()

template<int D>
Vector< GridIndexD< D > > IMP::algebra::BoundedGridRangeD< D >::get_indexes ( const ExtendedGridIndexD< D > & lb,
const ExtendedGridIndexD< D > & ub ) const

Definition at line 233 of file grid_ranges.h.

◆ get_maximum_extended_index()

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

Return the index of the maximal cell.

Definition at line 270 of file grid_ranges.h.

◆ get_minimum_extended_index()

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

Return the ExtendedGridIndexD of all zeros.

Definition at line 262 of file grid_ranges.h.

◆ get_number_of_voxels() [1/2]

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

Definition at line 134 of file grid_ranges.h.

◆ get_number_of_voxels() [2/2]

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 129 of file grid_ranges.h.

◆ indexes_begin()

template<int D>
IndexIterator IMP::algebra::BoundedGridRangeD< D >::indexes_begin ( const ExtendedGridIndexD< D > & lb,
const ExtendedGridIndexD< D > & ub ) const

Definition at line 203 of file grid_ranges.h.

◆ indexes_end()

template<int D>
IndexIterator IMP::algebra::BoundedGridRangeD< D >::indexes_end ( const ExtendedGridIndexD< D > & ,
const ExtendedGridIndexD< D > &  ) const

Definition at line 216 of file grid_ranges.h.


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