KrisLibrary  1.0.0
Classes | Public Member Functions | Public Attributes | List of all members
Range2Indices Struct Reference

A 2D lattice of regular ranges. More...

#include <indexing.h>

Classes

struct  iterator
 

Public Member Functions

 Range2Indices (const Range2Indices &rhs)
 
 Range2Indices (const RangeIndices &irange, const RangeIndices &jrange)
 
 Range2Indices (int imax, int jmax)
 
 Range2Indices (int imin, int imax, int jmin, int jmax)
 
 Range2Indices (int imin, int imax, int istride, int jmin, int jmax, int jstride)
 
void enumerate (std::vector< IntPair > &indices)
 
IntPair operator() (int i, int j) const
 
IntPair operator() (const IntPair &t) const
 
bool contains (int iindex, int jindex) const
 
bool contains (const IntPair &t) const
 
IntPair indexToElement (int iindex, int jindex) const
 
iterator begin () const
 
iterator end () const
 

Public Attributes

RangeIndices irange
 
RangeIndices jrange
 

Detailed Description

A 2D lattice of regular ranges.

Can be accessed with an iterator class, which iterates over the second coordinate first, then the first (lexicographically ordered). Efficient index computation.


The documentation for this struct was generated from the following files: