ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/math/CubicSpline.cpp
(Generate patch)

Comparing trunk/src/math/CubicSpline.cpp (file contents):
Revision 2057 by gezelter, Tue Mar 3 15:22:26 2015 UTC vs.
Revision 2058 by gezelter, Tue Mar 3 15:35:45 2015 UTC

# Line 319 | Line 319 | std::vector<int> CubicSpline::sort_permutation(std::ve
319  
320   std::vector<int> CubicSpline::sort_permutation(std::vector<RealType>& v) {
321    std::vector<int> p(v.size());
322 <  std::iota(p.begin(), p.end(), 0);
322 >
323 >  // 6 lines to replace std::iota(p.begin(), p.end(), 0);
324 >  int value = 0;
325 >  std::vector<int>::iterator i;
326 >  for (i = p.begin(); i != p.end(); ++i) {
327 >    (*i) = value;
328 >    ++value;
329 >  }
330 >  
331    std::sort(p.begin(), p.end(), OpenMD::Comparator(v) );
332    return p;
333   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines