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 2069 by gezelter, Thu Mar 5 16:30:23 2015 UTC

# Line 50 | Line 50 | using namespace std;
50   using namespace OpenMD;
51   using namespace std;
52  
53 < CubicSpline::CubicSpline() : generated(false), isUniform(true) {
53 > CubicSpline::CubicSpline() : isUniform(true), generated(false) {
54    x_.clear();
55    y_.clear();
56   }
# 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