ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/utils/next_combination.hpp
(Generate patch)

Comparing trunk/src/utils/next_combination.hpp (file contents):
Revision 1878 by gezelter, Wed Aug 22 02:28:28 2012 UTC vs.
Revision 1879 by gezelter, Sun Jun 16 15:15:42 2013 UTC

# Line 35 | Line 35
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   */
# Line 56 | Line 56 | namespace OpenMD {
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
# Line 111 | Line 111 | namespace OpenMD {
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines