[ quantlib-Patches-3000492 ] Enhancements to TimeSeries class

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

[ quantlib-Patches-3000492 ] Enhancements to TimeSeries class

SourceForge.net
Patches item #3000492, was opened at 2010-05-12 17:02
Message generated for change (Comment added) made by lballabio
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3000492&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Slava Mazur (shlagbaum)
Assigned to: Nobody/Anonymous (nobody)
Summary: Enhancements to TimeSeries class

Initial Comment:
I propose the following changes to TimeSeries class:
-- to add an extra template parameter Time with default to Date - this will allow for use of alternative data/time types (e.g. time_t);
-- to add time and value projection iterators so that one would be able to iterate through time and values independently - this feature would allow for treatment of a TimeSeries object as a simple sequence of time and/or value elemnets;
-- to add time and value iterator generating members: begin_time(), end_time(), begin_values(), end_values()

The diff of proposed changes is attached

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

>Comment By: Luigi Ballabio (lballabio)
Date: 2010-09-29 17:00

Message:
Slava,
    unfortunately, redefining TimeSeries as

template <class T, class Time = Date, class Container = std::map<Time, T>
>

is not backward-compatible with the existing declaration; existing client
code instantiating TimeSeries<T, MyContainer> would break. As Time needs to
come before Container in the template parameters, I don't think we'll be
able to apply this change until we start breaking things for a 2.0
release.

However, the iterators you defined would be a welcome addition.  May you
attach a new diff that adds them, but without the Time template parameter?

Thanks,
    Luigi



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

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

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev