Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#150 BicubicSpline update() doesn't work

closed-fixed
None
5
2012-05-15
2012-05-14
Fabio Ramponi
No

The calculate() method in BicubicSpline is called every time the linked data matrix (zData_) changes but, due to the reserve() at line 58 of bicubicsplineinterpolation.hpp and the subesquent push_back(), every time I call update() new splines are added to the splines_ vector instead of substituting the existing ones.

My suggestion is to use resize instead of reserve, and then simply fill the allocated vector splines_.

In the attached file my proposal of change for the file bicubicsplineinterpolation.hpp, affecting only lines 58 and 60.

Best regards,

Fabio

Discussion

  • Luigi Ballabio
    Luigi Ballabio
    2012-05-15

    The patch was applied to the Subversion repository.
    Thank you for the report and the fix.

     
  • Luigi Ballabio
    Luigi Ballabio
    2012-05-15

    • assigned_to: nobody --> lballabio
    • status: open --> closed-fixed