![]() |
das2C
das core C utilities (v3)
|
Iterate over a sub-set of the index space of a DasAry. More...
#include <das3/iterator.h>

Public Member Functions | |
| DAS_API void | DasAryIter_init (DasAryIter *pThis, const DasAry *pAry, int iDimMin, int iDimMax, ptrdiff_t *pBeg, ptrdiff_t *pEnd) |
| Initialize an array iterator. | |
Iterate over a sub-set of the index space of a DasAry.
| DAS_API void DasAryIter_init | ( | DasAryIter * | pThis, |
| const DasAry * | pAry, | ||
| int | iDimMin, | ||
| int | iDimMax, | ||
| ptrdiff_t * | pBeg, | ||
| ptrdiff_t * | pEnd | ||
| ) |
Initialize an array iterator.
The iterator can be used to simple iterate over the whole array when nDimMin = 0, nDimMax = -1, pBeg = NULL, and pEnd = NULL, though it's primary purpose it to iterate over a subset of indices.
| pThis | - The iterator to initialize |
| pAry | - The array over which it will iterate |
| iDimMin | - The minimum (left most) index to change. Use 0 to increment the highest level index as needed, 1 for the next highest and so on. |
| iDimMax | - The maximum (right most) index to change. So for a rank 3 array this would be 2. Use -1 to allow changes for the last index, -2 for the next to last and so on. |
| pBeg | - The starting point for iteration, use NULL to start at the beginning. |
| pEnd | - The ending point for iteration. This is an exclusive upper bound! Use NULL to end after the last valid index in the array. |