Comment 2 for bug 1209521

Revision history for this message
Richard Gomes (frgomes) wrote :

Hi Dominik,

I'm not sure whether my translation is correct or not. Maybe your observation is correct. I dont know how std::upper_bound behave exactly. Maybe test cases could point out some mistakes. At the moment, this method is being called by test cases but I'm not plenty confident on this code yet. Test coverage at: http://www.jquantlib.org/maven2/sites/jquantlib/cobertura/org.jquantlib.math.interpolations.AbstractInterpolation.html.

Maybe Gary could help us. He has better expertise on C++ and QuantLib.

In addition, this issue involves a little bit more effort on translation and code review. When I started the translation, we didnt have TypeToken and TypeReference yet. These tricky classes are needed in order to mimic a weird class hierarchy dictated by the way C++ templates are used. In a nutshell, a certain class "C" can extend class "A" or class "B" (!), depending on the way certain templates are used. Obviously this cannot be done easily in Java. I suppose that TypeToken or TypeReferennce could be used to mimic this behavior but I havent focused on this issue yet.

Cheers :)