############################### DISCLAIMER #################################-----Original Message-----
From: amar singh [mailto:[hidden email]]
Sent: mercoledì, 10 dicembre 2003 21:43
To: quantlib users
Subject: [Quantlib-users] How to convert among timeunits in Period objectI have a vector of Period objects of different time units - months/years.
How can I easily convert this to another vector of timelength in year?
eg. consider the following vector available:
std::vector<Period> swaptionMaturities;
swaptionMaturities.push_back(Period(1, Months));
swaptionMaturities.push_back(Period(3, Months));
swaptionMaturities.push_back(Period(6, Months));
swaptionMaturities.push_back(Period(1, Years));
swaptionMaturities.push_back(Period(2, Years));
swaptionMaturities.push_back(Period(3, Years));
swaptionMaturities.push_back(Period(4, Years));
swaptionMaturities.push_back(Period(5, Years));
swaptionMaturities.push_back(Period(7, Years));
swaptionMaturities.push_back(Period(10, Years));I want to have a vectorstd::vector<Time> times;which has timeunits in year.I looked at Period / Date Classes, but there does not seem to be any method for conversion.Can someone please help?Thanks ,Amar
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
| Free forum by Nabble | Edit this page |