|
From: Oleg B. <ole...@nl...> - 2008-03-12 13:35:20
|
Hello, everybody, The QL architecture of term structures/curves requires to introduce 3 classes for every new type of curve: YYYstructure for the interface (which is fine), static "interpolatedYYYcurve" and bootstrappable "piecewiseYYYcurve". Difference between second and 3rd is in the way they may be constructed. Although they are both merely containers of discrete points. Their members, such as dates_, times_ , data_ , interpolator_ and primitive manipulating functions appear same in every YYYcurve. If interpolated and bootstrappable curve versions joined, and if their primitives were implemented via pimpl or via curveBase template , it would reduce the amount of code for every new curve. Having common code for data primitives makes adding nice shortcuts easy too, such as operator[], operator(), sample(F), transform(F) and others. Every curve becomes robust, STL-ready object. This issue didn't catch an eye in 0.8.1, but 0.9.5 extends number of curves and shows up the problem quite clearly. Would you consider this improvement as item for 1.0 ? I can volunteer to contribute. Best regards, Oleg Burundukov, ABN AMRO, Amsterdam |