56 |
|
namespace OpenMD { |
57 |
|
|
58 |
|
/** |
59 |
< |
* @brief STL next_permuationtation like combination sequence generator. |
59 |
> |
* @brief STL next_permuation-like combination sequence generator. |
60 |
|
* Given the first and last iterator of a sequence, next_combination iteratively generates all |
61 |
|
* possible combinations. |
62 |
|
* @return if more combination is availiable, otherwise return false |
111 |
|
//For instance, sequence may contain 6, 7, 8, 9 at this time, we need to increase the size |
112 |
|
// of combination to 5 |
113 |
|
typename std::vector<RandomAccessIterator>::iterator j = i; |
114 |
< |
j--; |
114 |
> |
--j; |
115 |
|
while( j >= iterContainer.begin() && *i == *j + 1){ |
116 |
< |
i--; |
117 |
< |
j--; |
116 |
> |
--i; |
117 |
> |
--j; |
118 |
|
}; |
119 |
|
|
120 |
|
RandomAccessIterator raIter; |