
Definition at line 68 of file nmrMultiIndexCounter.h.
| bool nmrMultiIndexCounter::IndexIsEqualTo | ( | const nmrMultiIndexCounter & | other | ) | const |
Compare the index cells of to multi-index counters. The method does not compare bounds, increments, etc.
| void nmrMultiIndexCounter::GoToLowBounds | ( | ) | [inline] |
Set the counter to the low bounds specified in SetBounds(). Set the status to COUNTER_IN_BOUNDS.
Definition at line 223 of file nmrMultiIndexCounter.h.
| void nmrMultiIndexCounter::Increment | ( | ) |
Increment the counter by the values specified in SetIncements(). The last index changes fastest. When an index passes the high bound, the previous index is incremented, and if there was an index that was incremented successfully, all the subsequent indices are wrapped back to their low bounds. When no index can be incremented, the status is set to COUNTER_OVERFLOW.
Note that when the status is COUNTER_OVERFLOW, the indices are not determined, as the loop semantics is using <= rather than <. In the current implementation, COUNTER_OVERFLOW is reached with all indices above their high bounds. Yet this may change in future versions. One should not assume anything about a counter in COUNTER_OVERFLOW or COUNTER_UNDERFLOW status.
| void nmrMultiIndexCounter::Decrement | ( | ) |
Decrement the counter by the values specified in SetIncements(). The last index changes fastest. When an index gets below the low bound, the previous index is decremented, and if there was an index that was decremented successfully, all the subsequent indices are wrapped back to their high bounds. When no index can be incremented, the status is set to COUNTER_UNDERFLOW.
Note that when the status is COUNTER_UNDERFLOW, the indices are not determined, as the loop semantics is using <= rather than <. In the current implementation, COUNTER_UNDERFLOW is reached with all indices below their low bounds. Yet this may change in future versions. One should not assume anything about a counter in COUNTER_OVERFLOW or COUNTER_UNDERFLOW status.
| CounterStatus nmrMultiIndexCounter::GetStatus | ( | ) | const [inline] |
return one of UNDERLOW, COUNTER_IN_BOUNDS, COUNTER_OVERFLOW, COUNTER_UNDEFINED
Definition at line 287 of file nmrMultiIndexCounter.h.
| bool nmrMultiIndexCounter::IsAboveLowBounds | ( | ) | const [inline] |
return true if the status is defined and LowBounds <= Index
Definition at line 293 of file nmrMultiIndexCounter.h.
| bool nmrMultiIndexCounter::IsBelowHighBounds | ( | ) | const [inline] |
return true if the status is defined and Index <= HighBounds
Definition at line 299 of file nmrMultiIndexCounter.h.
| bool nmrMultiIndexCounter::IsBetweenBounds | ( | ) | const [inline] |
Return true of the status is COUNTER_IN_BOUNDS
Definition at line 305 of file nmrMultiIndexCounter.h.
| unsigned long nmrMultiIndexCounter::GetNumberOfCombinations | ( | ) | const |
return the total number of possible states, or combinations, of the counter.