35 |
|
* |
36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
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; |