[ quantlib-Bugs-3526577 ] BicubicSpline update() doesn't work

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ quantlib-Bugs-3526577 ] BicubicSpline update() doesn't work

SourceForge.net
Bugs item #3526577, was opened at 2012-05-14 07:26
Message generated for change (Comment added) made by lballabio
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3526577&group_id=12740

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Fabio Ramponi (fabioramponi)
>Assigned to: Luigi Ballabio (lballabio)
Summary: BicubicSpline update() doesn't work

Initial Comment:
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

----------------------------------------------------------------------

Comment By: Luigi Ballabio (lballabio)
Date: 2012-05-15 05:22

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


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3526577&group_id=12740

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev