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

Comparing branches/development/src/utils/next_combination.hpp (file contents):
Revision 1873 by gezelter, Wed Feb 20 15:39:39 2013 UTC vs.
Revision 1874 by gezelter, Wed May 15 15:09:35 2013 UTC

# 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