Re: [Quantlib-dev] Interpolator semantics
Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Interpolator-semantics-tp4212p4215.html
On 11/15/2005 07:25:57 PM, Joseph Wang wrote:
>>
> It's because I want to set extrapolate to true. At first I thought
> it would be easy to add it to C++ class, but that would break the
> bridge pattern.
Joseph,
it's done. You can check out the modified code and look at the
relevant test case in test-suite/interpolations.cpp to see how to
enable extrapolation.
On an unrelated note, I'm not sure that the transform() method you
added really belongs to Array, since a) it just wraps a call to
std::transform, b) it is less flexible, being only self-applied while
std::transform allows writing to a different output array, and c) I'd
like to keep class interfaces as lean as possible. Would it be a major
inconvenience for you if I took it back?
Later,
Luigi
----------------------------------------
The shortest way to do many things is to do only one thing at once.
-- Samuel Smiles