Re: [QuantLib-svn] SF.net SVN: quantlib: [11763] trunk/QuantLib/ql/index.hpp

Posted by Ferdinando M. Ametrano-3 on
URL: http://quantlib.414.s1.nabble.com/Re-QuantLib-svn-SF-net-SVN-quantlib-11763-trunk-QuantLib-ql-index-hpp-tp9607p9608.html

On 7/2/07, Luigi Ballabio <[hidden email]> wrote:
> > +        void addFixings(const std::vector<Date>& dates,
> > +                        const std::vector<Real>& values);
> >          template <class DateIterator, class ValueIterator>
> >          void addFixings(DateIterator dBegin, DateIterator dEnd,
> >                          ValueIterator vBegin) {
>
> Did we really need it? We could use the method taking iterators.

the implementation of addFixings(const std::vector<Date>&, const
std::vector<Real>&) is actually just performing a size check and then
calls the iterator version.
I provided this a tiny wrapper because 99% of problems we've been
having with Indexes were about adding fixings using vectors of
different sizes, and in some instance such problems were hard to
detect (e.g. when values was shorter then dates)

ciao -- Nando

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev