Division of a range of indices into consecutive blocks.
A range of consecutive indices 0 to full.range.end() is divided into numBlocks() consecutive blocks of consecutive indices. Block b contains indices i for which block(b).begin() <= i < block(b).end().
|
int | numBlocks () const |
| Returns the number of blocks.
|
|
Block | block (int blockIndex) const |
| Returns the size of the block with index blockIndex .
|
|
Block | fullRange () const |
| Returns the full range.
|
|
Block | subRange (int blockIndexBegin, int blockIndexEnd) const |
| Returns a range starting at blockIndexBegin and ending at blockIndexEnd .
|
|
bool | allBlocksHaveSizeOne () const |
| Returns true when all blocks have size 0 or numBlocks()=0.
|
|
void | appendBlock (int blockSize) |
| Appends a block of size blockSize at the end of the range. More...
|
|
void | clear () |
| Removes all blocks.
|
|
void | reduceNumBlocks (int newNumBlocks) |
| Reduces the number of blocks to newNumBlocks . More...
|
|
void | setAllBlocksSizeOne (int numBlocks) |
| Sets the partitioning to numBlocks blocks each of size 1.
|
|
std::vector< int > & | rawIndex () |
| Returns the raw block index array, avoid using this.
|
|