You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(17) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(23) |
| 2002 |
Jan
(18) |
Feb
(20) |
Mar
(22) |
Apr
(41) |
May
(28) |
Jun
(25) |
Jul
(10) |
Aug
(7) |
Sep
(5) |
Oct
(20) |
Nov
(13) |
Dec
(11) |
| 2003 |
Jan
(28) |
Feb
(5) |
Mar
(6) |
Apr
(5) |
May
(17) |
Jun
(6) |
Jul
(45) |
Aug
(35) |
Sep
(24) |
Oct
(50) |
Nov
(53) |
Dec
(6) |
| 2004 |
Jan
(4) |
Feb
(10) |
Mar
(52) |
Apr
(46) |
May
(8) |
Jun
(25) |
Jul
(12) |
Aug
(6) |
Sep
(8) |
Oct
(8) |
Nov
(9) |
Dec
(7) |
| 2005 |
Jan
(18) |
Feb
(60) |
Mar
(19) |
Apr
(26) |
May
(14) |
Jun
(27) |
Jul
(8) |
Aug
(15) |
Sep
(19) |
Oct
(53) |
Nov
(20) |
Dec
(23) |
| 2006 |
Jan
(16) |
Feb
(27) |
Mar
(33) |
Apr
(51) |
May
(36) |
Jun
(25) |
Jul
(54) |
Aug
(30) |
Sep
(25) |
Oct
(67) |
Nov
(43) |
Dec
(13) |
| 2007 |
Jan
(23) |
Feb
(27) |
Mar
(55) |
Apr
(79) |
May
(60) |
Jun
(66) |
Jul
(46) |
Aug
(30) |
Sep
(90) |
Oct
(49) |
Nov
(85) |
Dec
(74) |
| 2008 |
Jan
(68) |
Feb
(59) |
Mar
(64) |
Apr
(28) |
May
(66) |
Jun
(35) |
Jul
(73) |
Aug
(76) |
Sep
(65) |
Oct
(46) |
Nov
(41) |
Dec
(19) |
| 2009 |
Jan
(46) |
Feb
(90) |
Mar
(51) |
Apr
(104) |
May
(13) |
Jun
(24) |
Jul
(20) |
Aug
(39) |
Sep
(109) |
Oct
(101) |
Nov
(117) |
Dec
(57) |
| 2010 |
Jan
(55) |
Feb
(42) |
Mar
(39) |
Apr
(22) |
May
(33) |
Jun
(41) |
Jul
(25) |
Aug
(52) |
Sep
(75) |
Oct
(60) |
Nov
(62) |
Dec
(52) |
| 2011 |
Jan
(70) |
Feb
(31) |
Mar
(26) |
Apr
(28) |
May
(17) |
Jun
(38) |
Jul
(51) |
Aug
(35) |
Sep
(27) |
Oct
(35) |
Nov
(10) |
Dec
(20) |
| 2012 |
Jan
(21) |
Feb
(29) |
Mar
(13) |
Apr
(37) |
May
(33) |
Jun
(12) |
Jul
(34) |
Aug
(27) |
Sep
(29) |
Oct
(35) |
Nov
(58) |
Dec
(27) |
| 2013 |
Jan
(27) |
Feb
(16) |
Mar
(40) |
Apr
(16) |
May
(34) |
Jun
(37) |
Jul
(6) |
Aug
(3) |
Sep
(4) |
Oct
(49) |
Nov
(13) |
Dec
(12) |
| 2014 |
Jan
(15) |
Feb
(21) |
Mar
(11) |
Apr
(13) |
May
(27) |
Jun
(60) |
Jul
(19) |
Aug
(29) |
Sep
(20) |
Oct
(28) |
Nov
(41) |
Dec
(15) |
| 2015 |
Jan
(33) |
Feb
(29) |
Mar
(26) |
Apr
(17) |
May
(2) |
Jun
(13) |
Jul
(21) |
Aug
(30) |
Sep
(22) |
Oct
(15) |
Nov
(46) |
Dec
(20) |
| 2016 |
Jan
(6) |
Feb
(5) |
Mar
(9) |
Apr
(15) |
May
(9) |
Jun
(4) |
Jul
(3) |
Aug
(4) |
Sep
(39) |
Oct
(8) |
Nov
(5) |
Dec
(8) |
| 2017 |
Jan
(4) |
Feb
(14) |
Mar
(4) |
Apr
(16) |
May
(5) |
Jun
(10) |
Jul
(25) |
Aug
(2) |
Sep
(5) |
Oct
(11) |
Nov
(8) |
Dec
(11) |
| 2018 |
Jan
(7) |
Feb
(4) |
Mar
|
Apr
(1) |
May
(4) |
Jun
(21) |
Jul
(8) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(5) |
Mar
(18) |
Apr
(9) |
May
(5) |
Jun
(21) |
Jul
(25) |
Aug
(25) |
Sep
(4) |
Oct
(2) |
Nov
(2) |
Dec
(5) |
| 2020 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(6) |
Dec
|
| 2021 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(5) |
| 2022 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(3) |
Aug
(3) |
Sep
(3) |
Oct
(14) |
Nov
|
Dec
(1) |
| 2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(2) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
| 2024 |
Jan
(8) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(4) |
Aug
(5) |
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(1) |
| 2025 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2026 |
Jan
(1) |
Feb
(12) |
Mar
|
Apr
(2) |
May
(8) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Roland L. <rol...@go...> - 2009-12-02 16:21:17
|
> > warning C4100: 'i' : unreferenced formal > parameter > c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\onefactorcopula.hpp > 264 > I'd like to keep the parameter to allow varying grid size for the copula integration in the future. > warning C4100: 'stepSize' : unreferenced formal > parameter > c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp > 84 > Removed the parameter. > warning C4100: 'floatDayCount' : unreferenced formal > parameter > c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp > 192 > warning C4100: 'floatConvention' : unreferenced formal > parameter > c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp > 191 > Fixed two bugs here, now using the parameters, thanks! > warning C4100: 'date' : unreferenced formal > parameter > c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskybond.cpp > 76 > Removed the parameter. > warning C4100: 'd' : unreferenced formal > parameter > c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp > 164 > Kept the parameter (due to inheritance) > warning C4100: 'buckets' : unreferenced formal > parameter > c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\distribution.cpp > 280 > Removed the parameter. I have committed the changes to the trunk. Regards, Roland |
|
From: Matrixpower <juk...@gm...> - 2009-12-02 11:43:22
|
Hi Ferdinando,
Thank you for your concerns. I have resolved that problem but I got the
new one. When I compiled ohgensrc, I got the following error.
------ Build started: Project: ohgensrc, Configuration: All Win32 ------
Performing Makefile project actions
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
..\..\gensrc\gensrc.py -xdlv --oh_dir=..
File "c:\Projects\trunk\gensrc\gensrc.py", line 51
print USAGE_ERROR % { 'scriptName' : sys.argv[0] }
^
SyntaxError: invalid syntax
NMAKE : fatal error U1077: '..\..\gensrc\gensrc.py' : return code '0x1'
Stop.
Project : error PRJ0019: A tool returned an error code from "Performing
Makefile project actions"
Build log was saved at
"file://c:\Projects\trunk\ObjectHandler\gensrc\build\vc\BuildLog.htm"
ohgensrc - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
By the way, if all codes in SVN can be compiled or not. Since when I
compiled ohxllib, I found the project file is not consistent with the source
code. That means someone changed something but they didn't change the
project file. So weird~~~~~~~~~~~~~~
Thanks
Matrix
Ferdinando Ametrano wrote:
>
> On Tue, Dec 1, 2009 at 12:15 PM, Matrixpower <juk...@gm...> wrote:
>> I got error when I compiled QuantLibXL_full_vc9 solution. It looks so
>> weird. At beginning, I only compiled project apr and aprutil
>> respectively.
>> When I compiled log4gcxx, I got
>> --------------------------------------------------------------------------
>> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) :
>> error
>> C2004: expected 'defined(id)'
>> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) :
>> fatal
>> error C1012: unmatched parenthesis : missing ')'
>
> chances are you have some problem with your sdk
>
> which version of QLXL are you trying to compile ?
> windows xp 32 o 64 bits ?
> VC 9: what do you have in the about box ?
>
> ciao -- Nando
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
>
--
View this message in context: http://old.nabble.com/Compile-QuantLibXL_full_vc9-error%21-tp26590179p26607566.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|
|
From: Matrixpower <juk...@gm...> - 2009-12-01 23:25:33
|
Sorry, I forgot to mention. I download it from SVN not in the webpage. I don't think this is the problem. Thanks Matrixpower wrote: > > Thank you for your quick reply. Sorry, it is Visual studio 8.0 not visual > studio 9.0. My platform is Windows XP 32 bit (Windows XP Professional > Version 2002 and Service Pack 2). In the about box, Microsoft Visual > Studio 2008 Version 9.0.21022.8 RTM, Microsoft .NET Framework Version 3.5 > SP1. > > > Thanks > > > > Ferdinando Ametrano wrote: >> >> On Tue, Dec 1, 2009 at 12:15 PM, Matrixpower <juk...@gm...> >> wrote: >>> I got error when I compiled QuantLibXL_full_vc9 solution. It looks so >>> weird. At beginning, I only compiled project apr and aprutil >>> respectively. >>> When I compiled log4gcxx, I got >>> -------------------------------------------------------------------------- >>> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : >>> error >>> C2004: expected 'defined(id)' >>> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : >>> fatal >>> error C1012: unmatched parenthesis : missing ')' >> >> chances are you have some problem with your sdk >> >> which version of QLXL are you trying to compile ? >> windows xp 32 o 64 bits ? >> VC 9: what do you have in the about box ? >> >> ciao -- Nando >> >> ------------------------------------------------------------------------------ >> Join us December 9, 2009 for the Red Hat Virtual Experience, >> a free event focused on virtualization and cloud computing. >> Attend in-depth sessions from your desk. Your couch. Anywhere. >> http://p.sf.net/sfu/redhat-sfdev2dev >> _______________________________________________ >> QuantLib-dev mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >> >> > > -- View this message in context: http://old.nabble.com/Compile-QuantLibXL_full_vc9-error%21-tp26590179p26600904.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: Matrixpower <juk...@gm...> - 2009-12-01 23:24:16
|
Thank you for your quick reply. Sorry, it is Visual studio 8.0 not visual studio 9.0. My platform is Windows XP 32 bit (Windows XP Professional Version 2002 and Service Pack 2). In the about box, Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM, Microsoft .NET Framework Version 3.5 SP1. Thanks Ferdinando Ametrano wrote: > > On Tue, Dec 1, 2009 at 12:15 PM, Matrixpower <juk...@gm...> wrote: >> I got error when I compiled QuantLibXL_full_vc9 solution. It looks so >> weird. At beginning, I only compiled project apr and aprutil >> respectively. >> When I compiled log4gcxx, I got >> -------------------------------------------------------------------------- >> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : >> error >> C2004: expected 'defined(id)' >> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : >> fatal >> error C1012: unmatched parenthesis : missing ')' > > chances are you have some problem with your sdk > > which version of QLXL are you trying to compile ? > windows xp 32 o 64 bits ? > VC 9: what do you have in the about box ? > > ciao -- Nando > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > -- View this message in context: http://old.nabble.com/Compile-QuantLibXL_full_vc9-error%21-tp26590179p26600896.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: Ferdinando A. <na...@am...> - 2009-12-01 19:45:11
|
On Tue, Dec 1, 2009 at 12:15 PM, Matrixpower <juk...@gm...> wrote: > I got error when I compiled QuantLibXL_full_vc9 solution. It looks so > weird. At beginning, I only compiled project apr and aprutil respectively. > When I compiled log4gcxx, I got > -------------------------------------------------------------------------- > C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : error > C2004: expected 'defined(id)' > C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : fatal > error C1012: unmatched parenthesis : missing ')' chances are you have some problem with your sdk which version of QLXL are you trying to compile ? windows xp 32 o 64 bits ? VC 9: what do you have in the about box ? ciao -- Nando |
|
From: Alexander L. <ale...@go...> - 2009-12-01 17:54:57
|
Hello Marco, we have already discussed this problem here: http://old.nabble.com/gensrc-support-for-valarray-td26287680.html#a26287680 Plamen wanted to fix it. I think he will do it next days. Cheers Alexander Bianchetti Marco wrote: > error C2440: 'initializing' : cannot convert from 'std::valarray<_Ty>' to 'std::vector<_Ty,_Ax>' > d:\Projects\QuantLib-SVN\DevEnv\trunk\QuantLibXL\qlxl\functions\utilities.cpp 111 > > >> -----Original Message----- >> From: mar...@us... >> [mailto:mar...@us...] >> Sent: martedì 10 novembre 2009 02.21 >> To: qua...@li... >> Subject: [QuantLib-svn] SF.net SVN: quantlib:[16725] trunk/QuantLib >> >> >> Revision: 16725 >> >> http://quantlib.svn.sourceforge.net/quantlib/?rev=16725&view=rev >> Author: markjoshi >> Date: 2009-11-10 01:21:02 +0000 (Tue, 10 Nov 2009) >> >> Log Message: >> ----------- >> Abolished vector<bool>s from MarketModel code and replaced >> with Valarrays. Also, changed the LMM CurveState to use a >> smarter caching methodology. Substantial speed up has occurred. >> >> Modified Paths: >> -------------- >> trunk/QuantLib/ql/math/matrixutilities/basisincompleteordered.cpp >> trunk/QuantLib/ql/math/matrixutilities/basisincompleteordered.hpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap >> tionexercisevalue.cpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap >> tionexercisevalue.hpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/collectnodedata.cpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/exercisevalue.hpp >> trunk/QuantLib/ql/models/marketmodels/callability/lsstrategy.cpp >> trunk/QuantLib/ql/models/marketmodels/callability/lsstrategy.hpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/nodedataprovider.hpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc >> isevalue.cpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc >> isevalue.hpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/parametricex >> erciseadapter.hpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/swapbasissystem.cpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/swapbasissystem.hpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa >> pexercise.cpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa >> pexercise.hpp >> >> trunk/QuantLib/ql/models/marketmodels/callability/upperboundengine.hpp >> trunk/QuantLib/ql/models/marketmodels/constrainedevolver.hpp >> >> trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvestate.cpp >> >> trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvestate.hpp >> >> trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat >> eeulerconstrained.cpp >> >> trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat >> eeulerconstrained.hpp >> >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr >> umentjacobian.cpp >> >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr >> umentjacobian.hpp >> >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/vegabumpc >> luster.cpp >> >> trunk/QuantLib/ql/models/marketmodels/products/compositeproduct.hpp >> >> trunk/QuantLib/ql/models/marketmodels/products/multistep/calls >> pecifiedmultiproduct.hpp >> >> trunk/QuantLib/ql/models/marketmodels/products/multistep/exerc >> iseadapter.hpp >> trunk/QuantLib/ql/models/marketmodels/proxygreekengine.cpp >> trunk/QuantLib/ql/models/marketmodels/proxygreekengine.hpp >> trunk/QuantLib/ql/models/marketmodels/utilities.cpp >> trunk/QuantLib/ql/models/marketmodels/utilities.hpp >> trunk/QuantLib/test-suite/marketmodel.cpp >> trunk/QuantLib/test-suite/quantlibtestsuite.cpp >> >> Modified: >> trunk/QuantLib/ql/math/matrixutilities/basisincompleteordered.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/math/matrixutilities/basisincompleteorde >> red.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/math/matrixutilities/basisincompleteorde >> red.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -129,7 +129,7 @@ >> multiplierCutoff_(multiplierCutoff), >> numberVectors_(originalVectors.rows()), >> dimension_(originalVectors.columns()), >> - validVectors_(originalVectors.rows(), true), >> + validVectors_(true,originalVectors.rows()), // >> opposite way round from vector constructor >> orthoNormalizedVectors_(originalVectors.rows(), >> originalVectors.columns()) >> { >> @@ -219,7 +219,7 @@ >> >> } // end of constructor >> >> - const std::vector<bool>& >> OrthogonalProjections::validVectors() const >> + const std::valarray<bool>& >> OrthogonalProjections::validVectors() const >> { >> return validVectors_; >> >> >> Modified: >> trunk/QuantLib/ql/math/matrixutilities/basisincompleteordered.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/math/matrixutilities/basisincompleteorde >> red.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/math/matrixutilities/basisincompleteorde >> red.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -22,6 +22,7 @@ >> #define quantlib_basis_incomplete_ordered_hpp >> >> #include <ql/math/matrix.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -57,7 +58,7 @@ >> Real multiplierCutOff, >> Real tolerance ); >> >> - const std::vector<bool>& validVectors() const; >> + const std::valarray<bool>& validVectors() const; >> const std::vector<Real>& GetVector(Size index) const; >> >> Size numberValidVectors() const; >> @@ -73,7 +74,7 @@ >> Size dimension_; >> >> //!outputs >> - std::vector<bool> validVectors_; >> + std::valarray<bool> validVectors_; >> std::vector<std::vector<Real> > projectedVectors_; >> >> //!workspace >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap >> tionexercisevalue.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap >> tionexercisevalue.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap >> tionexercisevalue.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -70,8 +70,8 @@ >> } >> >> >> - std::vector<bool> >> BermudanSwaptionExerciseValue::isExerciseTime() const { >> - return std::vector<bool>(numberOfExercises_,true); >> + std::valarray<bool> >> BermudanSwaptionExerciseValue::isExerciseTime() const { >> + return std::valarray<bool>(true,numberOfExercises_); >> } >> >> MarketModelMultiProduct::CashFlow >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap >> tionexercisevalue.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap >> tionexercisevalue.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap >> tionexercisevalue.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -24,6 +24,7 @@ >> #include <ql/models/marketmodels/callability/exercisevalue.hpp> >> #include <ql/models/marketmodels/evolutiondescription.hpp> >> #include <boost/shared_ptr.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -40,7 +41,7 @@ >> void nextStep(const CurveState&); >> void reset(); >> // whether or not evolution times are exercise times >> - std::vector<bool> isExerciseTime() const; >> + std::valarray<bool> isExerciseTime() const; >> MarketModelMultiProduct::CashFlow value(const >> CurveState&) const; >> std::auto_ptr<MarketModelExerciseValue> clone() const; >> private: >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/collectnodedata.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/collectnoded >> ata.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/collectnoded >> ata.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -94,20 +94,20 @@ >> >> std::vector<Time> evolutionTimes = >> evolution.evolutionTimes(); >> >> - std::vector<bool> isProductTime = >> + std::valarray<bool> isProductTime = >> isInSubset(evolutionTimes, >> product.evolution().evolutionTimes()); >> - std::vector<bool> isRebateTime = >> + std::valarray<bool> isRebateTime = >> isInSubset(evolutionTimes, >> rebate.evolution().evolutionTimes()); >> - std::vector<bool> isControlTime = >> + std::valarray<bool> isControlTime = >> isInSubset(evolutionTimes, >> control.evolution().evolutionTimes()); >> - std::vector<bool> isBasisTime = >> + std::valarray<bool> isBasisTime = >> isInSubset(evolutionTimes, >> dataProvider.evolution().evolutionTimes()); >> - std::vector<bool> >> isExerciseTime(evolutionTimes.size(),false); >> - std::vector<bool> v = rebate.isExerciseTime(); >> + std::valarray<bool> >> isExerciseTime(false,evolutionTimes.size()); >> + std::valarray<bool> v = rebate.isExerciseTime(); >> Size exercises = 0; >> for (i=0; i<evolutionTimes.size(); ++i) { >> if (isRebateTime[i]) { >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/exercisevalue.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/exerciseva >> lue.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/exerciseva >> lue.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -24,6 +24,7 @@ >> // to be removed using forward declaration >> #include <ql/models/marketmodels/multiproduct.hpp> >> #include <memory> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -41,7 +42,7 @@ >> virtual void nextStep(const CurveState&) = 0; >> virtual void reset() = 0; >> // whether or not evolution times are exercise times >> - virtual std::vector<bool> isExerciseTime() const = 0; >> + virtual std::valarray<bool> isExerciseTime() const = 0; >> virtual MarketModelMultiProduct::CashFlow value( >> const >> CurveState&) const = 0; >> virtual std::auto_ptr<MarketModelExerciseValue> >> clone() const = 0; >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/lsstrategy.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/lsstrat >> egy.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/lsstrat >> egy.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -49,8 +49,8 @@ >> >> control_->evolution().evolutionTimes()); >> >> exerciseIndex_ = std::vector<Size>(relevantTimes_.size()); >> - isExerciseTime_ = >> std::vector<bool>(relevantTimes_.size(),false); >> - std::vector<bool> v = exercise_->isExerciseTime(); >> + isExerciseTime_ = >> std::valarray<bool>(false,relevantTimes_.size()); >> + std::valarray<bool> v = exercise_->isExerciseTime(); >> Size exercises = 0; >> Size i; >> for (i=0; i<relevantTimes_.size(); ++i) { >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/lsstrategy.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/lsstrat >> egy.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/lsstrat >> egy.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -55,8 +55,8 @@ >> Size currentIndex_; >> Real principalInNumerairePortfolio_, newPrincipal_; >> std::vector<Time> exerciseTimes_, relevantTimes_; >> - std::vector<bool> isBasisTime_, isRebateTime_, >> isControlTime_; >> - std::vector<bool> isExerciseTime_; >> + std::valarray<bool> isBasisTime_, isRebateTime_, >> isControlTime_; >> + std::valarray<bool> isExerciseTime_; >> std::vector<MarketModelDiscounter> rebateDiscounters_; >> std::vector<MarketModelDiscounter> controlDiscounters_; >> mutable std::vector<std::vector<Real> > basisValues_; >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/nodedataprovider.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/nodedataprov >> ider.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/nodedataprov >> ider.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -23,6 +23,7 @@ >> >> #include <ql/types.hpp> >> #include <vector> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -40,7 +41,7 @@ >> virtual void nextStep(const CurveState&) = 0; >> virtual void reset() = 0; >> // whether or not evolution times are exercise times >> - virtual std::vector<bool> isExerciseTime() const = 0; >> + virtual std::valarray<bool> isExerciseTime() const = 0; >> virtual void values(const CurveState&, >> std::vector<Real>& results) const = 0; >> }; >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc >> isevalue.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc >> isevalue.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc >> isevalue.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -60,8 +60,8 @@ >> } >> >> >> - std::vector<bool> NothingExerciseValue::isExerciseTime() const { >> - return std::vector<bool>(numberOfExercises_, true); >> + std::valarray<bool> >> NothingExerciseValue::isExerciseTime() const { >> + return std::valarray<bool>(true, >> numberOfExercises_); // opposite way round from vector constructor >> } >> >> MarketModelMultiProduct::CashFlow >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc >> isevalue.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc >> isevalue.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc >> isevalue.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -36,7 +36,7 @@ >> void nextStep(const CurveState&); >> void reset(); >> // whether or not evolution times are exercise times >> - std::vector<bool> isExerciseTime() const; >> + std::valarray<bool> isExerciseTime() const; >> MarketModelMultiProduct::CashFlow value(const >> CurveState&) const; >> std::auto_ptr<MarketModelExerciseValue> clone() const; >> private: >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/parametricex >> erciseadapter.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/parametricex >> erciseadapter.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/parametricex >> erciseadapter.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -23,6 +23,7 @@ >> >> #include <ql/methods/montecarlo/exercisestrategy.hpp> >> #include <ql/utilities/clone.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -45,7 +46,7 @@ >> std::vector<std::vector<Real> > parameters_; >> std::vector<Time> exerciseTimes_; >> Size currentStep_, currentExercise_; >> - std::vector<bool> isExerciseTime_; >> + std::valarray<bool> isExerciseTime_; >> std::vector<Size> numberOfVariables_; >> mutable std::vector<Real> variables_; >> }; >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/swapbasissystem.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/swapbasissys >> tem.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/swapbasissys >> tem.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -59,8 +59,8 @@ >> currentIndex_ = 0; >> } >> >> - std::vector<bool> SwapBasisSystem::isExerciseTime() const { >> - return std::vector<bool>(exerciseTimes_.size(), true); >> + std::valarray<bool> SwapBasisSystem::isExerciseTime() const { >> + return std::valarray<bool>(true, exerciseTimes_.size()); >> } >> >> void SwapBasisSystem::values(const CurveState& currentState, >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/swapbasissystem.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/swapbasissys >> tem.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/swapbasissys >> tem.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -35,7 +35,7 @@ >> const EvolutionDescription& evolution() const; >> void nextStep(const CurveState&); >> void reset(); >> - std::vector<bool> isExerciseTime() const; >> + std::valarray<bool> isExerciseTime() const; >> void values(const CurveState&, >> std::vector<Real>& results) const; >> std::auto_ptr<MarketModelBasisSystem> clone() const; >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa >> pexercise.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa >> pexercise.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa >> pexercise.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -54,8 +54,8 @@ >> currentStep_ = 0; >> } >> >> - std::vector<bool> TriggeredSwapExercise::isExerciseTime() const { >> - return std::vector<bool>(numberOfExercises(), true); >> + std::valarray<bool> >> TriggeredSwapExercise::isExerciseTime() const { >> + return std::valarray<bool>(true,numberOfExercises()); >> } >> >> void TriggeredSwapExercise::values(const CurveState& state, >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa >> pexercise.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa >> pexercise.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa >> pexercise.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -36,7 +36,7 @@ >> const EvolutionDescription& evolution() const; >> void nextStep(const CurveState&); >> void reset(); >> - std::vector<bool> isExerciseTime() const; >> + std::valarray<bool> isExerciseTime() const; >> void values(const CurveState&, >> std::vector<Real>& results) const; >> >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/callability/upperboundengine.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/callability/upperbounden >> gine.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/callability/upperbounden >> gine.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -27,6 +27,7 @@ >> #include <ql/math/statistics/sequencestatistics.hpp> >> #include <ql/utilities/clone.hpp> >> #include <utility> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -70,7 +71,7 @@ >> Size underlyingOffset_, rebateOffset_, hedgeOffset_, >> hedgeRebateOffset_; >> Size numberOfProducts_; >> Size numberOfSteps_; >> - std::vector<bool> isExerciseTime_; >> + std::valarray<bool> isExerciseTime_; >> >> // workspace >> std::vector<Size> numberCashFlowsThisStep_; >> >> Modified: trunk/QuantLib/ql/models/marketmodels/constrainedevolver.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/constrainedevolver.hpp >> 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/constrainedevolver.hpp >> 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -22,6 +22,7 @@ >> #define quantlib_constrained_evolver_hpp >> >> #include <ql/models/marketmodels/evolver.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -45,7 +46,7 @@ >> //! call before each path >> virtual void setThisConstraint( >> const std::vector<Rate>& rateConstraints, >> - const std::vector<bool>& isConstraintActive) = 0; >> + const std::valarray<bool>& isConstraintActive) = 0; >> }; >> >> } >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvestate.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvest >> ate.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvest >> ate.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -33,7 +33,10 @@ >> cmSwapRates_(numberOfRates_), >> cmSwapAnnuities_(numberOfRates_,rateTaus_[numberOfRates_-1]), >> cotSwapRates_(numberOfRates_), >> - cotAnnuities_(numberOfRates_, rateTaus_[numberOfRates_-1]) {} >> + cotAnnuities_(numberOfRates_, >> + rateTaus_[numberOfRates_-1]), >> + firstCotAnnuityComped_(numberOfRates_) >> + {} >> >> void LMMCurveState::setOnForwardRates(const >> std::vector<Rate>& rates, >> Size firstValidIndex) { >> @@ -60,6 +63,8 @@ >> // lazy evaluation of: >> // - coterminal swap rates/annuities >> // - constant maturity swap rates/annuities >> + >> + firstCotAnnuityComped_ = numberOfRates_; >> } >> >> void LMMCurveState::setOnDiscountRatios(const >> std::vector<DiscountFactor>& discRatios, >> @@ -86,6 +91,8 @@ >> // lazy evaluation of: >> // - coterminal swap rates/annuities >> // - constant maturity swap rates/annuities >> + >> + firstCotAnnuityComped_ = numberOfRates_; >> } >> >> Real LMMCurveState::discountRatio(Size i, Size j) const { >> @@ -107,19 +114,37 @@ >> QL_REQUIRE(numeraire>=first_ && numeraire<=numberOfRates_, >> "invalid numeraire"); >> QL_REQUIRE(i>=first_ && i<=numberOfRates_, "invalid index"); >> - coterminalFromDiscountRatios(first_, >> - discRatios_, rateTaus_, >> - cotSwapRates_, cotAnnuities_); >> - return cotAnnuities_[i]/discRatios_[numeraire]; >> + // coterminalFromDiscountRatios(first_, >> + // discRatios_, rateTaus_, >> + // cotSwapRates_, cotAnnuities_); >> + >> + if (firstCotAnnuityComped_ <=i) >> + return cotAnnuities_[i]/discRatios_[numeraire]; >> + >> + if (firstCotAnnuityComped_ == numberOfRates_) >> + { >> + cotAnnuities_[numberOfRates_-1] = >> rateTaus_[numberOfRates_-1]*discRatios_[numberOfRates_]; >> + --firstCotAnnuityComped_; >> + } >> + >> + for (int j= >> static_cast<int>(firstCotAnnuityComped_)-1; j >> >>> =static_cast<int>(i); --j) >>> >> + cotAnnuities_[j] = >> cotAnnuities_[j+1]+rateTaus_[j]*discRatios_[j+1]; >> + >> + firstCotAnnuityComped_ = i; >> + >> + return cotAnnuities_[i]/discRatios_[numeraire]; >> } >> >> Rate LMMCurveState::coterminalSwapRate(Size i) const { >> QL_REQUIRE(first_<numberOfRates_, "curve state not >> initialized yet"); >> QL_REQUIRE(i>=first_ && i<=numberOfRates_, "invalid index"); >> - coterminalFromDiscountRatios(first_, >> - discRatios_, rateTaus_, >> - cotSwapRates_, cotAnnuities_); >> - return cotSwapRates_[i]; >> + // coterminalFromDiscountRatios(first_, >> + // discRatios_, rateTaus_, >> + // cotSwapRates_, cotAnnuities_); >> + // return cotSwapRates_[i]; >> + >> + Real res = (discRatios_[i]/ >> discRatios_[numberOfRates_] >> -1.0)/coterminalSwapAnnuity(numberOfRates_,i); >> + return res; >> } >> >> Rate LMMCurveState::cmSwapAnnuity(Size numeraire, >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvestate.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvest >> ate.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvest >> ate.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -89,6 +89,8 @@ >> mutable std::vector<Real> cmSwapAnnuities_; >> mutable std::vector<Rate> cotSwapRates_; >> mutable std::vector<Real> cotAnnuities_; >> + >> + mutable Size firstCotAnnuityComped_; >> }; >> >> } >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat >> eeulerconstrained.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat >> eeulerconstrained.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat >> eeulerconstrained.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -133,7 +133,7 @@ >> >> void LogNormalFwdRateEulerConstrained::setThisConstraint( >> const std::vector<Rate>& >> rateConstraints, >> - const std::vector<bool>& >> isConstraintActive) >> + const std::valarray<bool>& >> isConstraintActive) >> { >> QL_REQUIRE(rateConstraints.size() == numeraires_.size(), >> "wrong number of constraints specified"); >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat >> eeulerconstrained.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat >> eeulerconstrained.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat >> eeulerconstrained.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -25,6 +25,7 @@ >> #include <ql/models/marketmodels/constrainedevolver.hpp> >> #include <ql/models/marketmodels/curvestates/lmmcurvestate.hpp> >> #include >> <ql/models/marketmodels/driftcomputation/lmmdriftcalculator.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -47,7 +48,7 @@ >> const std::vector<Size>& endIndexOfSwapRate); >> virtual void setThisConstraint( >> const std::vector<Rate>& rateConstraints, >> - const std::vector<bool>& isConstraintActive); >> + const std::valarray<bool>& isConstraintActive); >> //@} >> //! \name MarketModel interface >> //@{ >> @@ -71,7 +72,7 @@ >> >> //often changing inputs >> std::vector<Rate> rateConstraints_; >> - std::vector<bool> isConstraintActive_; >> + std::valarray<bool> isConstraintActive_; >> >> // fixed variables >> std::vector<std::vector<Real> > fixedDrifts_; >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr >> umentjacobian.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr >> umentjacobian.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr >> umentjacobian.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -30,7 +30,7 @@ >> >> VolatilityBumpInstrumentJacobian::VolatilityBumpInstrumentJaco >> bian(const VegaBumpCollection& bumps, >> const std::vector<Swaption>& swaptions, >> const std::vector<Cap>& caps) >> - : bumps_(bumps), swaptions_(swaptions), caps_(caps), >> computed_(swaptions.size()+caps.size(), false), >> + : bumps_(bumps), swaptions_(swaptions), caps_(caps), >> computed_(false,swaptions.size()+caps.size()), >> >> derivatives_(swaptions.size()+caps.size(),std::vector<Real>(bu >> mps.numberBumps())), >> >> bumpMatrix_(swaptions.size()+caps.size(),bumps_.numberBumps()) >> { >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr >> umentjacobian.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr >> umentjacobian.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr >> umentjacobian.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -25,6 +25,7 @@ >> >> #include <ql/models/marketmodels/marketmodel.hpp> >> #include <ql/models/marketmodels/pathwisegreeks/vegabumpcluster.hpp> >> +#include <valarray> >> >> namespace QuantLib >> { >> @@ -68,7 +69,7 @@ >> VegaBumpCollection bumps_; >> std::vector<Swaption> swaptions_; >> std::vector<Cap> caps_; >> - mutable std::vector<bool> computed_; >> + mutable std::valarray<bool> computed_; >> mutable bool allComputed_; >> mutable std::vector<std::vector<Real> > derivatives_; >> >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/vegabumpc >> luster.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/vegabumpc >> luster.cpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/vegabumpc >> luster.cpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -20,6 +20,7 @@ >> #include <ql/models/marketmodels/pathwisegreeks/vegabumpcluster.hpp> >> #include <ql/errors.hpp> >> #include <ql/models/marketmodels/evolutiondescription.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -149,14 +150,14 @@ >> { >> if (checked_) >> return full_; >> - std::vector<std::vector<std::vector<bool> > > v; >> + std::vector<std::vector<std::valarray<bool> > > v; >> >> Size factors = associatedVolStructure_->numberOfFactors(); >> >> - std::vector<bool> model(factors); >> - std::fill(model.begin(), model.end(), false); >> + std::valarray<bool> model(false,factors); >> + // std::fill(model.begin(), model.end(), false); >> >> - std::vector<std::vector<bool> > modelTwo; >> + std::vector<std::valarray<bool> > modelTwo; >> for (Size i=0; i < >> associatedVolStructure_->numberOfRates(); ++i) >> modelTwo.push_back(model); >> >> @@ -189,15 +190,15 @@ >> if (checked_) >> return nonOverlapped_; >> >> - std::vector<std::vector<std::vector<bool> > > v; >> + std::vector<std::vector<std::valarray<bool> > > v; >> >> Size factors = associatedVolStructure_->numberOfFactors(); >> >> >> - std::vector<bool> model(factors); >> - std::fill(model.begin(), model.end(), false); >> + std::valarray<bool> model(false,factors); >> + //std::fill(model.begin(), model.end(), false); >> >> - std::vector<std::vector<bool> > modelTwo; >> + std::vector<std::valarray<bool> > modelTwo; >> for (Size i=0; i < >> associatedVolStructure_->numberOfRates(); ++i) >> modelTwo.push_back(model); >> >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/products/compositeproduct.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/products/compositeprod >> uct.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/products/compositeprod >> uct.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -23,6 +23,7 @@ >> #include <ql/models/marketmodels/multiproduct.hpp> >> #include <ql/models/marketmodels/evolutiondescription.hpp> >> #include <ql/utilities/clone.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -76,7 +77,7 @@ >> Size currentIndex_; >> std::vector<Time> cashflowTimes_; >> std::vector<std::vector<Time> > allEvolutionTimes_; >> - std::vector<std::vector<bool> > isInSubset_; >> + std::vector<std::valarray<bool> > isInSubset_; >> }; >> >> } >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/products/multistep/calls >> pecifiedmultiproduct.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/products/multistep/calls >> pecifiedmultiproduct.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/products/multistep/calls >> pecifiedmultiproduct.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -25,6 +25,7 @@ >> #include <ql/models/marketmodels/multiproduct.hpp> >> #include <ql/methods/montecarlo/exercisestrategy.hpp> >> #include <ql/utilities/clone.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -59,7 +60,7 @@ >> Clone<ExerciseStrategy<CurveState> > strategy_; >> Clone<MarketModelMultiProduct> rebate_; >> EvolutionDescription evolution_; >> - std::vector<std::vector<bool> > isPresent_; >> + std::vector<std::valarray<bool> > isPresent_; >> std::vector<Time> cashFlowTimes_; >> Size rebateOffset_; >> bool wasCalled_; >> >> Modified: >> trunk/QuantLib/ql/models/marketmodels/products/multistep/exerc >> iseadapter.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/products/multistep/exerc >> iseadapter.hpp 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/products/multistep/exerc >> iseadapter.hpp 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -50,7 +50,7 @@ >> private: >> Clone<MarketModelExerciseValue> exercise_; >> Size numberOfProducts_; >> - std::vector<bool> isExerciseTime_; >> + std::valarray<bool> isExerciseTime_; >> Size currentIndex_; >> }; >> >> >> Modified: trunk/QuantLib/ql/models/marketmodels/proxygreekengine.cpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/proxygreekengine.cpp >> 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/proxygreekengine.cpp >> 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -122,11 +122,12 @@ >> product_->reset(); >> Real principalInNumerairePortfolio = 1.0; >> >> - if (storeRates) { >> - std::fill(constraintsActive_.begin(), >> - constraintsActive_.end(), >> - false); >> - } >> + if (storeRates) >> + constraintsActive_ =false; >> +// std::fill(constraintsActive_.begin(), >> + // constraintsActive_.end(), >> + // false); >> + // } >> >> bool done = false; >> do { >> >> Modified: trunk/QuantLib/ql/models/marketmodels/proxygreekengine.hpp >> =================================================================== >> --- >> trunk/QuantLib/ql/models/marketmodels/proxygreekengine.hpp >> 2009-11-09 16:35:59 UTC (rev 16724) >> +++ >> trunk/QuantLib/ql/models/marketmodels/proxygreekengine.hpp >> 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -26,6 +26,7 @@ >> >> #include <ql/math/statistics/sequencestatistics.hpp> >> #include <ql/utilities/clone.hpp> >> +#include <valarray> >> >> namespace QuantLib { >> >> @@ -69,7 +70,7 @@ >> >> // workspace >> std::vector<Rate> constraints_; >> - std::vector<bool> constraintsActive_; >> + std::valarray<bool> constraintsActive_; >> std::vector<Real> numerairesHeld_; >> std::vector<Size> numberCashFlowsThisStep_; >> std::vector<std::vector<MarketModelMultiProduct::CashFlow> > >> >> Modified: trunk/QuantLib/ql/models/marketmodels/utilities.cpp >> =================================================================== >> --- trunk/QuantLib/ql/models/marketmodels/utilities.cpp >> 2009-11-09 16:35:59 UTC (rev 16724) >> +++ trunk/QuantLib/ql/models/marketmodels/utilities.cpp >> 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -22,12 +22,13 @@ >> #include <ql/models/marketmodels/utilities.hpp> >> #include <ql/errors.hpp> >> #include <algorithm> >> +#include <valarray> >> >> namespace QuantLib { >> >> void mergeTimes(const std::vector<std::vector<Time> >& times, >> std::vector<Time>& mergedTimes, >> - std::vector<std::vector<bool> >& isPresent) { >> + std::vector<std::valarray<bool> >& isPresent) { >> >> std::vector<Time> allTimes; >> for (Size i=0; i<times.size(); i++) { >> @@ -55,10 +56,10 @@ >> } >> } >> >> - std::vector<bool> isInSubset(const std::vector<Time>& set, >> + std::valarray<bool> isInSubset(const std::vector<Time>& set, >> const std::vector<Time>& subset) { >> >> - std::vector<bool> result(set.size(), false); >> + std::valarray<bool> result(false,set.size()); >> Size dimsubSet = subset.size(); >> if (dimsubSet==0) >> return result; >> >> Modified: trunk/QuantLib/ql/models/marketmodels/utilities.hpp >> =================================================================== >> --- trunk/QuantLib/ql/models/marketmodels/utilities.hpp >> 2009-11-09 16:35:59 UTC (rev 16724) >> +++ trunk/QuantLib/ql/models/marketmodels/utilities.hpp >> 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -24,12 +24,13 @@ >> >> #include <ql/types.hpp> >> #include <vector> >> +#include <valarray> >> >> namespace QuantLib { >> >> void mergeTimes(const std::vector<std::vector<Time> >& times, >> std::vector<Time>& mergedTimes, >> - std::vector<std::vector<bool> >& isPresent); >> + std::vector<std::valarray<bool> >& isPresent); >> >> /*! Look for elements of a set in a subset. >> Returns a vector of booleans such that: >> @@ -37,7 +38,7 @@ >> >> \pre both vectors must be strictly increasing. >> */ >> - std::vector<bool> isInSubset(const std::vector<Time>& set, >> + std::valarray<bool> isInSubset(const std::vector<Time>& set, >> const std::vector<Time>& subset); >> >> //! check for strictly increasing times, first time >> greater than zero >> >> Modified: trunk/QuantLib/test-suite/marketmodel.cpp >> =================================================================== >> --- trunk/QuantLib/test-suite/marketmodel.cpp 2009-11-09 >> 16:35:59 UTC (rev 16724) >> +++ trunk/QuantLib/test-suite/marketmodel.cpp 2009-11-10 >> 01:21:02 UTC (rev 16725) >> @@ -1408,7 +1408,7 @@ >> >> std::vector<boost::shared_ptr<MarketModelEvolver> > >> innerEvolvers; >> >> - std::vector<bool> isExerciseTime = >> + std::valarray<bool> isExerciseTime = >> >> isInSubset(evolution.evolutionTimes(), >> naifStrategy.exerciseTimes()); >> for (Size s=0; s < >> isExerciseTime.size(); ++s) { >> @@ -1586,7 +1586,7 @@ >> >> std::vector<boost::shared_ptr<MarketModelEvolver> > >> innerEvolvers; >> >> - std::vector<bool> isExerciseTime = >> + std::valarray<bool> isExerciseTime = >> >> isInSubset(evolution.evolutionTimes(), >> exerciseStrategy.exerciseTimes()); >> for (Size s=0; s < >> isExerciseTime.size(); ++s) { >> @@ -1757,7 +1757,7 @@ >> evolvers[i]); >> >> std::vector<boost::shared_ptr<MarketModelEvolver> > >> innerEvolvers; >> - std::vector<bool> isExerciseTime = >> + std::valarray<bool> isExerciseTime = >> >> isInSubset(evolution.evolutionTimes(), >> exerciseStrategy.exerciseTimes()); >> for (Size s=0; s < >> isExerciseTime.size(); ++s) { >> @@ -4611,7 +4611,7 @@ >> std::vector<Time> set, subset; >> for (Size i=0; i<dim; i++) set.push_back(i*1.0); >> for (Size i=0; i<dim; i++) subset.push_back(dim+i*1.0); >> - std::vector<bool> result = isInSubset(set, subset); >> + std::valarray<bool> result = isInSubset(set, subset); >> if (printReport_) { >> for (Size i=0; i<dim; i++) { >> BOOST_MESSAGE(io::ordinal(i+1) << ":" << >> >> Modified: trunk/QuantLib/test-suite/quantlibtestsuite.cpp >> =================================================================== >> --- trunk/QuantLib/test-suite/quantlibtestsuite.cpp >> 2009-11-09 16:35:59 UTC (rev 16724) >> +++ trunk/QuantLib/test-suite/quantlibtestsuite.cpp >> 2009-11-10 01:21:02 UTC (rev 16725) >> @@ -314,6 +314,7 @@ >> //tests for deprecated classes >> test->add(LiborMarketModelTest::suite()); >> test->add(LiborMarketModelProcessTest::suite()); >> + >> >> test->add(QUANTLIB_TEST_CASE(stopTimer)); >> >> >> >> This was sent by the SourceForge.net collaborative >> development platform, the world's largest Open Source >> development site. >> >> -------------------------------------------------------------- >> ---------------- >> Let Crystal Reports handle the reporting - Free Crystal >> Reports 2008 30-Day >> trial. Simplify your report design, integration and >> deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> QuantLib-cvs mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-cvs >> >> > > This e-mail is subject to terms available at the following link: > https://www.bancaimi.com/bimi/emaildisclaimer.jsf. > Please read the hyperlink carefully as it contains the conditions governing any electronic communications between you and Banca IMI SpA. By messaging with Banca IMI SpA you agree to such terms and conditions of use. Banca IMI SpA may amend these terms and conditions at any time without notice. You should check the relevant webpage from time to time to review the current terms and conditions because they are binding on you. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Please note that, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited and may be unlawful. > > Prima di stampare, pensa all'ambiente ** Think about the environment before printing > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > |
|
From: Matrixpower <juk...@gm...> - 2009-12-01 11:53:21
|
Hi All, I got error when I compiled QuantLibXL_full_vc9 solution. It looks so weird. At beginning, I only compiled project apr and aprutil respectively. When I compiled log4gcxx, I got -------------------------------------------------------------------------- C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : error C2004: expected 'defined(id)' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : fatal error C1012: unmatched parenthesis : missing ')' -------------------------------------------------------------------------- Then I clean all solution build and build the solution. Then I got the following errors for apr, aprutil ....... -------------------------------------------------------------------------- C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : error C2004: expected 'defined(id)' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(424) : fatal error C1012: unmatched parenthesis : missing ')' -------------------------------------------------------------------------- I don't know what the problem is. My system is Windows XP and Visual Studio 9. Thanks -- View this message in context: http://old.nabble.com/Compile-QuantLibXL_full_vc9-error%21-tp26590179p26590179.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: Bianchetti M. <mar...@ba...> - 2009-12-01 10:50:40
|
error C2440: 'initializing' : cannot convert from 'std::valarray<_Ty>' to 'std::vector<_Ty,_Ax>' d:\Projects\QuantLib-SVN\DevEnv\trunk\QuantLibXL\qlxl\functions\utilities.cpp 111 > -----Original Message----- > From: mar...@us... > [mailto:mar...@us...] > Sent: martedì 10 novembre 2009 02.21 > To: qua...@li... > Subject: [QuantLib-svn] SF.net SVN: quantlib:[16725] trunk/QuantLib > > > Revision: 16725 > > http://quantlib.svn.sourceforge.net/quantlib/?rev=16725&view=rev > Author: markjoshi > Date: 2009-11-10 01:21:02 +0000 (Tue, 10 Nov 2009) > > Log Message: > ----------- > Abolished vector<bool>s from MarketModel code and replaced > with Valarrays. Also, changed the LMM CurveState to use a > smarter caching methodology. Substantial speed up has occurred. > > Modified Paths: > -------------- > trunk/QuantLib/ql/math/matrixutilities/basisincompleteordered.cpp > trunk/QuantLib/ql/math/matrixutilities/basisincompleteordered.hpp > > trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap > tionexercisevalue.cpp > > trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap > tionexercisevalue.hpp > > trunk/QuantLib/ql/models/marketmodels/callability/collectnodedata.cpp > > trunk/QuantLib/ql/models/marketmodels/callability/exercisevalue.hpp > trunk/QuantLib/ql/models/marketmodels/callability/lsstrategy.cpp > trunk/QuantLib/ql/models/marketmodels/callability/lsstrategy.hpp > > trunk/QuantLib/ql/models/marketmodels/callability/nodedataprovider.hpp > > trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc > isevalue.cpp > > trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc > isevalue.hpp > > trunk/QuantLib/ql/models/marketmodels/callability/parametricex > erciseadapter.hpp > > trunk/QuantLib/ql/models/marketmodels/callability/swapbasissystem.cpp > > trunk/QuantLib/ql/models/marketmodels/callability/swapbasissystem.hpp > > trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa > pexercise.cpp > > trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa > pexercise.hpp > > trunk/QuantLib/ql/models/marketmodels/callability/upperboundengine.hpp > trunk/QuantLib/ql/models/marketmodels/constrainedevolver.hpp > > trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvestate.cpp > > trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvestate.hpp > > trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat > eeulerconstrained.cpp > > trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat > eeulerconstrained.hpp > > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr > umentjacobian.cpp > > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr > umentjacobian.hpp > > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/vegabumpc > luster.cpp > > trunk/QuantLib/ql/models/marketmodels/products/compositeproduct.hpp > > trunk/QuantLib/ql/models/marketmodels/products/multistep/calls > pecifiedmultiproduct.hpp > > trunk/QuantLib/ql/models/marketmodels/products/multistep/exerc > iseadapter.hpp > trunk/QuantLib/ql/models/marketmodels/proxygreekengine.cpp > trunk/QuantLib/ql/models/marketmodels/proxygreekengine.hpp > trunk/QuantLib/ql/models/marketmodels/utilities.cpp > trunk/QuantLib/ql/models/marketmodels/utilities.hpp > trunk/QuantLib/test-suite/marketmodel.cpp > trunk/QuantLib/test-suite/quantlibtestsuite.cpp > > Modified: > trunk/QuantLib/ql/math/matrixutilities/basisincompleteordered.cpp > =================================================================== > --- > trunk/QuantLib/ql/math/matrixutilities/basisincompleteorde > red.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/math/matrixutilities/basisincompleteorde > red.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -129,7 +129,7 @@ > multiplierCutoff_(multiplierCutoff), > numberVectors_(originalVectors.rows()), > dimension_(originalVectors.columns()), > - validVectors_(originalVectors.rows(), true), > + validVectors_(true,originalVectors.rows()), // > opposite way round from vector constructor > orthoNormalizedVectors_(originalVectors.rows(), > originalVectors.columns()) > { > @@ -219,7 +219,7 @@ > > } // end of constructor > > - const std::vector<bool>& > OrthogonalProjections::validVectors() const > + const std::valarray<bool>& > OrthogonalProjections::validVectors() const > { > return validVectors_; > > > Modified: > trunk/QuantLib/ql/math/matrixutilities/basisincompleteordered.hpp > =================================================================== > --- > trunk/QuantLib/ql/math/matrixutilities/basisincompleteorde > red.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/math/matrixutilities/basisincompleteorde > red.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -22,6 +22,7 @@ > #define quantlib_basis_incomplete_ordered_hpp > > #include <ql/math/matrix.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -57,7 +58,7 @@ > Real multiplierCutOff, > Real tolerance ); > > - const std::vector<bool>& validVectors() const; > + const std::valarray<bool>& validVectors() const; > const std::vector<Real>& GetVector(Size index) const; > > Size numberValidVectors() const; > @@ -73,7 +74,7 @@ > Size dimension_; > > //!outputs > - std::vector<bool> validVectors_; > + std::valarray<bool> validVectors_; > std::vector<std::vector<Real> > projectedVectors_; > > //!workspace > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap > tionexercisevalue.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap > tionexercisevalue.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap > tionexercisevalue.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -70,8 +70,8 @@ > } > > > - std::vector<bool> > BermudanSwaptionExerciseValue::isExerciseTime() const { > - return std::vector<bool>(numberOfExercises_,true); > + std::valarray<bool> > BermudanSwaptionExerciseValue::isExerciseTime() const { > + return std::valarray<bool>(true,numberOfExercises_); > } > > MarketModelMultiProduct::CashFlow > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap > tionexercisevalue.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap > tionexercisevalue.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/bermudanswap > tionexercisevalue.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -24,6 +24,7 @@ > #include <ql/models/marketmodels/callability/exercisevalue.hpp> > #include <ql/models/marketmodels/evolutiondescription.hpp> > #include <boost/shared_ptr.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -40,7 +41,7 @@ > void nextStep(const CurveState&); > void reset(); > // whether or not evolution times are exercise times > - std::vector<bool> isExerciseTime() const; > + std::valarray<bool> isExerciseTime() const; > MarketModelMultiProduct::CashFlow value(const > CurveState&) const; > std::auto_ptr<MarketModelExerciseValue> clone() const; > private: > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/collectnodedata.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/collectnoded > ata.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/collectnoded > ata.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -94,20 +94,20 @@ > > std::vector<Time> evolutionTimes = > evolution.evolutionTimes(); > > - std::vector<bool> isProductTime = > + std::valarray<bool> isProductTime = > isInSubset(evolutionTimes, > product.evolution().evolutionTimes()); > - std::vector<bool> isRebateTime = > + std::valarray<bool> isRebateTime = > isInSubset(evolutionTimes, > rebate.evolution().evolutionTimes()); > - std::vector<bool> isControlTime = > + std::valarray<bool> isControlTime = > isInSubset(evolutionTimes, > control.evolution().evolutionTimes()); > - std::vector<bool> isBasisTime = > + std::valarray<bool> isBasisTime = > isInSubset(evolutionTimes, > dataProvider.evolution().evolutionTimes()); > - std::vector<bool> > isExerciseTime(evolutionTimes.size(),false); > - std::vector<bool> v = rebate.isExerciseTime(); > + std::valarray<bool> > isExerciseTime(false,evolutionTimes.size()); > + std::valarray<bool> v = rebate.isExerciseTime(); > Size exercises = 0; > for (i=0; i<evolutionTimes.size(); ++i) { > if (isRebateTime[i]) { > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/exercisevalue.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/exerciseva > lue.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/exerciseva > lue.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -24,6 +24,7 @@ > // to be removed using forward declaration > #include <ql/models/marketmodels/multiproduct.hpp> > #include <memory> > +#include <valarray> > > namespace QuantLib { > > @@ -41,7 +42,7 @@ > virtual void nextStep(const CurveState&) = 0; > virtual void reset() = 0; > // whether or not evolution times are exercise times > - virtual std::vector<bool> isExerciseTime() const = 0; > + virtual std::valarray<bool> isExerciseTime() const = 0; > virtual MarketModelMultiProduct::CashFlow value( > const > CurveState&) const = 0; > virtual std::auto_ptr<MarketModelExerciseValue> > clone() const = 0; > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/lsstrategy.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/lsstrat > egy.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/lsstrat > egy.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -49,8 +49,8 @@ > > control_->evolution().evolutionTimes()); > > exerciseIndex_ = std::vector<Size>(relevantTimes_.size()); > - isExerciseTime_ = > std::vector<bool>(relevantTimes_.size(),false); > - std::vector<bool> v = exercise_->isExerciseTime(); > + isExerciseTime_ = > std::valarray<bool>(false,relevantTimes_.size()); > + std::valarray<bool> v = exercise_->isExerciseTime(); > Size exercises = 0; > Size i; > for (i=0; i<relevantTimes_.size(); ++i) { > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/lsstrategy.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/lsstrat > egy.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/lsstrat > egy.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -55,8 +55,8 @@ > Size currentIndex_; > Real principalInNumerairePortfolio_, newPrincipal_; > std::vector<Time> exerciseTimes_, relevantTimes_; > - std::vector<bool> isBasisTime_, isRebateTime_, > isControlTime_; > - std::vector<bool> isExerciseTime_; > + std::valarray<bool> isBasisTime_, isRebateTime_, > isControlTime_; > + std::valarray<bool> isExerciseTime_; > std::vector<MarketModelDiscounter> rebateDiscounters_; > std::vector<MarketModelDiscounter> controlDiscounters_; > mutable std::vector<std::vector<Real> > basisValues_; > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/nodedataprovider.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/nodedataprov > ider.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/nodedataprov > ider.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -23,6 +23,7 @@ > > #include <ql/types.hpp> > #include <vector> > +#include <valarray> > > namespace QuantLib { > > @@ -40,7 +41,7 @@ > virtual void nextStep(const CurveState&) = 0; > virtual void reset() = 0; > // whether or not evolution times are exercise times > - virtual std::vector<bool> isExerciseTime() const = 0; > + virtual std::valarray<bool> isExerciseTime() const = 0; > virtual void values(const CurveState&, > std::vector<Real>& results) const = 0; > }; > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc > isevalue.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc > isevalue.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc > isevalue.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -60,8 +60,8 @@ > } > > > - std::vector<bool> NothingExerciseValue::isExerciseTime() const { > - return std::vector<bool>(numberOfExercises_, true); > + std::valarray<bool> > NothingExerciseValue::isExerciseTime() const { > + return std::valarray<bool>(true, > numberOfExercises_); // opposite way round from vector constructor > } > > MarketModelMultiProduct::CashFlow > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc > isevalue.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc > isevalue.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/nothingexerc > isevalue.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -36,7 +36,7 @@ > void nextStep(const CurveState&); > void reset(); > // whether or not evolution times are exercise times > - std::vector<bool> isExerciseTime() const; > + std::valarray<bool> isExerciseTime() const; > MarketModelMultiProduct::CashFlow value(const > CurveState&) const; > std::auto_ptr<MarketModelExerciseValue> clone() const; > private: > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/parametricex > erciseadapter.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/parametricex > erciseadapter.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/parametricex > erciseadapter.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -23,6 +23,7 @@ > > #include <ql/methods/montecarlo/exercisestrategy.hpp> > #include <ql/utilities/clone.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -45,7 +46,7 @@ > std::vector<std::vector<Real> > parameters_; > std::vector<Time> exerciseTimes_; > Size currentStep_, currentExercise_; > - std::vector<bool> isExerciseTime_; > + std::valarray<bool> isExerciseTime_; > std::vector<Size> numberOfVariables_; > mutable std::vector<Real> variables_; > }; > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/swapbasissystem.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/swapbasissys > tem.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/swapbasissys > tem.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -59,8 +59,8 @@ > currentIndex_ = 0; > } > > - std::vector<bool> SwapBasisSystem::isExerciseTime() const { > - return std::vector<bool>(exerciseTimes_.size(), true); > + std::valarray<bool> SwapBasisSystem::isExerciseTime() const { > + return std::valarray<bool>(true, exerciseTimes_.size()); > } > > void SwapBasisSystem::values(const CurveState& currentState, > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/swapbasissystem.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/swapbasissys > tem.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/swapbasissys > tem.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -35,7 +35,7 @@ > const EvolutionDescription& evolution() const; > void nextStep(const CurveState&); > void reset(); > - std::vector<bool> isExerciseTime() const; > + std::valarray<bool> isExerciseTime() const; > void values(const CurveState&, > std::vector<Real>& results) const; > std::auto_ptr<MarketModelBasisSystem> clone() const; > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa > pexercise.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa > pexercise.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa > pexercise.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -54,8 +54,8 @@ > currentStep_ = 0; > } > > - std::vector<bool> TriggeredSwapExercise::isExerciseTime() const { > - return std::vector<bool>(numberOfExercises(), true); > + std::valarray<bool> > TriggeredSwapExercise::isExerciseTime() const { > + return std::valarray<bool>(true,numberOfExercises()); > } > > void TriggeredSwapExercise::values(const CurveState& state, > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa > pexercise.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa > pexercise.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/triggeredswa > pexercise.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -36,7 +36,7 @@ > const EvolutionDescription& evolution() const; > void nextStep(const CurveState&); > void reset(); > - std::vector<bool> isExerciseTime() const; > + std::valarray<bool> isExerciseTime() const; > void values(const CurveState&, > std::vector<Real>& results) const; > > > Modified: > trunk/QuantLib/ql/models/marketmodels/callability/upperboundengine.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/callability/upperbounden > gine.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/callability/upperbounden > gine.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -27,6 +27,7 @@ > #include <ql/math/statistics/sequencestatistics.hpp> > #include <ql/utilities/clone.hpp> > #include <utility> > +#include <valarray> > > namespace QuantLib { > > @@ -70,7 +71,7 @@ > Size underlyingOffset_, rebateOffset_, hedgeOffset_, > hedgeRebateOffset_; > Size numberOfProducts_; > Size numberOfSteps_; > - std::vector<bool> isExerciseTime_; > + std::valarray<bool> isExerciseTime_; > > // workspace > std::vector<Size> numberCashFlowsThisStep_; > > Modified: trunk/QuantLib/ql/models/marketmodels/constrainedevolver.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/constrainedevolver.hpp > 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/constrainedevolver.hpp > 2009-11-10 01:21:02 UTC (rev 16725) > @@ -22,6 +22,7 @@ > #define quantlib_constrained_evolver_hpp > > #include <ql/models/marketmodels/evolver.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -45,7 +46,7 @@ > //! call before each path > virtual void setThisConstraint( > const std::vector<Rate>& rateConstraints, > - const std::vector<bool>& isConstraintActive) = 0; > + const std::valarray<bool>& isConstraintActive) = 0; > }; > > } > > Modified: > trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvestate.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvest > ate.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvest > ate.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -33,7 +33,10 @@ > cmSwapRates_(numberOfRates_), > cmSwapAnnuities_(numberOfRates_,rateTaus_[numberOfRates_-1]), > cotSwapRates_(numberOfRates_), > - cotAnnuities_(numberOfRates_, rateTaus_[numberOfRates_-1]) {} > + cotAnnuities_(numberOfRates_, > + rateTaus_[numberOfRates_-1]), > + firstCotAnnuityComped_(numberOfRates_) > + {} > > void LMMCurveState::setOnForwardRates(const > std::vector<Rate>& rates, > Size firstValidIndex) { > @@ -60,6 +63,8 @@ > // lazy evaluation of: > // - coterminal swap rates/annuities > // - constant maturity swap rates/annuities > + > + firstCotAnnuityComped_ = numberOfRates_; > } > > void LMMCurveState::setOnDiscountRatios(const > std::vector<DiscountFactor>& discRatios, > @@ -86,6 +91,8 @@ > // lazy evaluation of: > // - coterminal swap rates/annuities > // - constant maturity swap rates/annuities > + > + firstCotAnnuityComped_ = numberOfRates_; > } > > Real LMMCurveState::discountRatio(Size i, Size j) const { > @@ -107,19 +114,37 @@ > QL_REQUIRE(numeraire>=first_ && numeraire<=numberOfRates_, > "invalid numeraire"); > QL_REQUIRE(i>=first_ && i<=numberOfRates_, "invalid index"); > - coterminalFromDiscountRatios(first_, > - discRatios_, rateTaus_, > - cotSwapRates_, cotAnnuities_); > - return cotAnnuities_[i]/discRatios_[numeraire]; > + // coterminalFromDiscountRatios(first_, > + // discRatios_, rateTaus_, > + // cotSwapRates_, cotAnnuities_); > + > + if (firstCotAnnuityComped_ <=i) > + return cotAnnuities_[i]/discRatios_[numeraire]; > + > + if (firstCotAnnuityComped_ == numberOfRates_) > + { > + cotAnnuities_[numberOfRates_-1] = > rateTaus_[numberOfRates_-1]*discRatios_[numberOfRates_]; > + --firstCotAnnuityComped_; > + } > + > + for (int j= > static_cast<int>(firstCotAnnuityComped_)-1; j > >=static_cast<int>(i); --j) > + cotAnnuities_[j] = > cotAnnuities_[j+1]+rateTaus_[j]*discRatios_[j+1]; > + > + firstCotAnnuityComped_ = i; > + > + return cotAnnuities_[i]/discRatios_[numeraire]; > } > > Rate LMMCurveState::coterminalSwapRate(Size i) const { > QL_REQUIRE(first_<numberOfRates_, "curve state not > initialized yet"); > QL_REQUIRE(i>=first_ && i<=numberOfRates_, "invalid index"); > - coterminalFromDiscountRatios(first_, > - discRatios_, rateTaus_, > - cotSwapRates_, cotAnnuities_); > - return cotSwapRates_[i]; > + // coterminalFromDiscountRatios(first_, > + // discRatios_, rateTaus_, > + // cotSwapRates_, cotAnnuities_); > + // return cotSwapRates_[i]; > + > + Real res = (discRatios_[i]/ > discRatios_[numberOfRates_] > -1.0)/coterminalSwapAnnuity(numberOfRates_,i); > + return res; > } > > Rate LMMCurveState::cmSwapAnnuity(Size numeraire, > > Modified: > trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvestate.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvest > ate.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/curvestates/lmmcurvest > ate.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -89,6 +89,8 @@ > mutable std::vector<Real> cmSwapAnnuities_; > mutable std::vector<Rate> cotSwapRates_; > mutable std::vector<Real> cotAnnuities_; > + > + mutable Size firstCotAnnuityComped_; > }; > > } > > Modified: > trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat > eeulerconstrained.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat > eeulerconstrained.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat > eeulerconstrained.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -133,7 +133,7 @@ > > void LogNormalFwdRateEulerConstrained::setThisConstraint( > const std::vector<Rate>& > rateConstraints, > - const std::vector<bool>& > isConstraintActive) > + const std::valarray<bool>& > isConstraintActive) > { > QL_REQUIRE(rateConstraints.size() == numeraires_.size(), > "wrong number of constraints specified"); > > Modified: > trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat > eeulerconstrained.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat > eeulerconstrained.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/evolvers/lognormalfwdrat > eeulerconstrained.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -25,6 +25,7 @@ > #include <ql/models/marketmodels/constrainedevolver.hpp> > #include <ql/models/marketmodels/curvestates/lmmcurvestate.hpp> > #include > <ql/models/marketmodels/driftcomputation/lmmdriftcalculator.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -47,7 +48,7 @@ > const std::vector<Size>& endIndexOfSwapRate); > virtual void setThisConstraint( > const std::vector<Rate>& rateConstraints, > - const std::vector<bool>& isConstraintActive); > + const std::valarray<bool>& isConstraintActive); > //@} > //! \name MarketModel interface > //@{ > @@ -71,7 +72,7 @@ > > //often changing inputs > std::vector<Rate> rateConstraints_; > - std::vector<bool> isConstraintActive_; > + std::valarray<bool> isConstraintActive_; > > // fixed variables > std::vector<std::vector<Real> > fixedDrifts_; > > Modified: > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr > umentjacobian.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr > umentjacobian.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr > umentjacobian.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -30,7 +30,7 @@ > > VolatilityBumpInstrumentJacobian::VolatilityBumpInstrumentJaco > bian(const VegaBumpCollection& bumps, > const std::vector<Swaption>& swaptions, > const std::vector<Cap>& caps) > - : bumps_(bumps), swaptions_(swaptions), caps_(caps), > computed_(swaptions.size()+caps.size(), false), > + : bumps_(bumps), swaptions_(swaptions), caps_(caps), > computed_(false,swaptions.size()+caps.size()), > > derivatives_(swaptions.size()+caps.size(),std::vector<Real>(bu > mps.numberBumps())), > > bumpMatrix_(swaptions.size()+caps.size(),bumps_.numberBumps()) > { > > Modified: > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr > umentjacobian.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr > umentjacobian.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/bumpinstr > umentjacobian.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -25,6 +25,7 @@ > > #include <ql/models/marketmodels/marketmodel.hpp> > #include <ql/models/marketmodels/pathwisegreeks/vegabumpcluster.hpp> > +#include <valarray> > > namespace QuantLib > { > @@ -68,7 +69,7 @@ > VegaBumpCollection bumps_; > std::vector<Swaption> swaptions_; > std::vector<Cap> caps_; > - mutable std::vector<bool> computed_; > + mutable std::valarray<bool> computed_; > mutable bool allComputed_; > mutable std::vector<std::vector<Real> > derivatives_; > > > Modified: > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/vegabumpc > luster.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/vegabumpc > luster.cpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/pathwisegreeks/vegabumpc > luster.cpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -20,6 +20,7 @@ > #include <ql/models/marketmodels/pathwisegreeks/vegabumpcluster.hpp> > #include <ql/errors.hpp> > #include <ql/models/marketmodels/evolutiondescription.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -149,14 +150,14 @@ > { > if (checked_) > return full_; > - std::vector<std::vector<std::vector<bool> > > v; > + std::vector<std::vector<std::valarray<bool> > > v; > > Size factors = associatedVolStructure_->numberOfFactors(); > > - std::vector<bool> model(factors); > - std::fill(model.begin(), model.end(), false); > + std::valarray<bool> model(false,factors); > + // std::fill(model.begin(), model.end(), false); > > - std::vector<std::vector<bool> > modelTwo; > + std::vector<std::valarray<bool> > modelTwo; > for (Size i=0; i < > associatedVolStructure_->numberOfRates(); ++i) > modelTwo.push_back(model); > > @@ -189,15 +190,15 @@ > if (checked_) > return nonOverlapped_; > > - std::vector<std::vector<std::vector<bool> > > v; > + std::vector<std::vector<std::valarray<bool> > > v; > > Size factors = associatedVolStructure_->numberOfFactors(); > > > - std::vector<bool> model(factors); > - std::fill(model.begin(), model.end(), false); > + std::valarray<bool> model(false,factors); > + //std::fill(model.begin(), model.end(), false); > > - std::vector<std::vector<bool> > modelTwo; > + std::vector<std::valarray<bool> > modelTwo; > for (Size i=0; i < > associatedVolStructure_->numberOfRates(); ++i) > modelTwo.push_back(model); > > > Modified: > trunk/QuantLib/ql/models/marketmodels/products/compositeproduct.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/products/compositeprod > uct.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/products/compositeprod > uct.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -23,6 +23,7 @@ > #include <ql/models/marketmodels/multiproduct.hpp> > #include <ql/models/marketmodels/evolutiondescription.hpp> > #include <ql/utilities/clone.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -76,7 +77,7 @@ > Size currentIndex_; > std::vector<Time> cashflowTimes_; > std::vector<std::vector<Time> > allEvolutionTimes_; > - std::vector<std::vector<bool> > isInSubset_; > + std::vector<std::valarray<bool> > isInSubset_; > }; > > } > > Modified: > trunk/QuantLib/ql/models/marketmodels/products/multistep/calls > pecifiedmultiproduct.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/products/multistep/calls > pecifiedmultiproduct.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/products/multistep/calls > pecifiedmultiproduct.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -25,6 +25,7 @@ > #include <ql/models/marketmodels/multiproduct.hpp> > #include <ql/methods/montecarlo/exercisestrategy.hpp> > #include <ql/utilities/clone.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -59,7 +60,7 @@ > Clone<ExerciseStrategy<CurveState> > strategy_; > Clone<MarketModelMultiProduct> rebate_; > EvolutionDescription evolution_; > - std::vector<std::vector<bool> > isPresent_; > + std::vector<std::valarray<bool> > isPresent_; > std::vector<Time> cashFlowTimes_; > Size rebateOffset_; > bool wasCalled_; > > Modified: > trunk/QuantLib/ql/models/marketmodels/products/multistep/exerc > iseadapter.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/products/multistep/exerc > iseadapter.hpp 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/products/multistep/exerc > iseadapter.hpp 2009-11-10 01:21:02 UTC (rev 16725) > @@ -50,7 +50,7 @@ > private: > Clone<MarketModelExerciseValue> exercise_; > Size numberOfProducts_; > - std::vector<bool> isExerciseTime_; > + std::valarray<bool> isExerciseTime_; > Size currentIndex_; > }; > > > Modified: trunk/QuantLib/ql/models/marketmodels/proxygreekengine.cpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/proxygreekengine.cpp > 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/proxygreekengine.cpp > 2009-11-10 01:21:02 UTC (rev 16725) > @@ -122,11 +122,12 @@ > product_->reset(); > Real principalInNumerairePortfolio = 1.0; > > - if (storeRates) { > - std::fill(constraintsActive_.begin(), > - constraintsActive_.end(), > - false); > - } > + if (storeRates) > + constraintsActive_ =false; > +// std::fill(constraintsActive_.begin(), > + // constraintsActive_.end(), > + // false); > + // } > > bool done = false; > do { > > Modified: trunk/QuantLib/ql/models/marketmodels/proxygreekengine.hpp > =================================================================== > --- > trunk/QuantLib/ql/models/marketmodels/proxygreekengine.hpp > 2009-11-09 16:35:59 UTC (rev 16724) > +++ > trunk/QuantLib/ql/models/marketmodels/proxygreekengine.hpp > 2009-11-10 01:21:02 UTC (rev 16725) > @@ -26,6 +26,7 @@ > > #include <ql/math/statistics/sequencestatistics.hpp> > #include <ql/utilities/clone.hpp> > +#include <valarray> > > namespace QuantLib { > > @@ -69,7 +70,7 @@ > > // workspace > std::vector<Rate> constraints_; > - std::vector<bool> constraintsActive_; > + std::valarray<bool> constraintsActive_; > std::vector<Real> numerairesHeld_; > std::vector<Size> numberCashFlowsThisStep_; > std::vector<std::vector<MarketModelMultiProduct::CashFlow> > > > Modified: trunk/QuantLib/ql/models/marketmodels/utilities.cpp > =================================================================== > --- trunk/QuantLib/ql/models/marketmodels/utilities.cpp > 2009-11-09 16:35:59 UTC (rev 16724) > +++ trunk/QuantLib/ql/models/marketmodels/utilities.cpp > 2009-11-10 01:21:02 UTC (rev 16725) > @@ -22,12 +22,13 @@ > #include <ql/models/marketmodels/utilities.hpp> > #include <ql/errors.hpp> > #include <algorithm> > +#include <valarray> > > namespace QuantLib { > > void mergeTimes(const std::vector<std::vector<Time> >& times, > std::vector<Time>& mergedTimes, > - std::vector<std::vector<bool> >& isPresent) { > + std::vector<std::valarray<bool> >& isPresent) { > > std::vector<Time> allTimes; > for (Size i=0; i<times.size(); i++) { > @@ -55,10 +56,10 @@ > } > } > > - std::vector<bool> isInSubset(const std::vector<Time>& set, > + std::valarray<bool> isInSubset(const std::vector<Time>& set, > const std::vector<Time>& subset) { > > - std::vector<bool> result(set.size(), false); > + std::valarray<bool> result(false,set.size()); > Size dimsubSet = subset.size(); > if (dimsubSet==0) > return result; > > Modified: trunk/QuantLib/ql/models/marketmodels/utilities.hpp > =================================================================== > --- trunk/QuantLib/ql/models/marketmodels/utilities.hpp > 2009-11-09 16:35:59 UTC (rev 16724) > +++ trunk/QuantLib/ql/models/marketmodels/utilities.hpp > 2009-11-10 01:21:02 UTC (rev 16725) > @@ -24,12 +24,13 @@ > > #include <ql/types.hpp> > #include <vector> > +#include <valarray> > > namespace QuantLib { > > void mergeTimes(const std::vector<std::vector<Time> >& times, > std::vector<Time>& mergedTimes, > - std::vector<std::vector<bool> >& isPresent); > + std::vector<std::valarray<bool> >& isPresent); > > /*! Look for elements of a set in a subset. > Returns a vector of booleans such that: > @@ -37,7 +38,7 @@ > > \pre both vectors must be strictly increasing. > */ > - std::vector<bool> isInSubset(const std::vector<Time>& set, > + std::valarray<bool> isInSubset(const std::vector<Time>& set, > const std::vector<Time>& subset); > > //! check for strictly increasing times, first time > greater than zero > > Modified: trunk/QuantLib/test-suite/marketmodel.cpp > =================================================================== > --- trunk/QuantLib/test-suite/marketmodel.cpp 2009-11-09 > 16:35:59 UTC (rev 16724) > +++ trunk/QuantLib/test-suite/marketmodel.cpp 2009-11-10 > 01:21:02 UTC (rev 16725) > @@ -1408,7 +1408,7 @@ > > std::vector<boost::shared_ptr<MarketModelEvolver> > > innerEvolvers; > > - std::vector<bool> isExerciseTime = > + std::valarray<bool> isExerciseTime = > > isInSubset(evolution.evolutionTimes(), > naifStrategy.exerciseTimes()); > for (Size s=0; s < > isExerciseTime.size(); ++s) { > @@ -1586,7 +1586,7 @@ > > std::vector<boost::shared_ptr<MarketModelEvolver> > > innerEvolvers; > > - std::vector<bool> isExerciseTime = > + std::valarray<bool> isExerciseTime = > > isInSubset(evolution.evolutionTimes(), > exerciseStrategy.exerciseTimes()); > for (Size s=0; s < > isExerciseTime.size(); ++s) { > @@ -1757,7 +1757,7 @@ > evolvers[i]); > > std::vector<boost::shared_ptr<MarketModelEvolver> > > innerEvolvers; > - std::vector<bool> isExerciseTime = > + std::valarray<bool> isExerciseTime = > > isInSubset(evolution.evolutionTimes(), > exerciseStrategy.exerciseTimes()); > for (Size s=0; s < > isExerciseTime.size(); ++s) { > @@ -4611,7 +4611,7 @@ > std::vector<Time> set, subset; > for (Size i=0; i<dim; i++) set.push_back(i*1.0); > for (Size i=0; i<dim; i++) subset.push_back(dim+i*1.0); > - std::vector<bool> result = isInSubset(set, subset); > + std::valarray<bool> result = isInSubset(set, subset); > if (printReport_) { > for (Size i=0; i<dim; i++) { > BOOST_MESSAGE(io::ordinal(i+1) << ":" << > > Modified: trunk/QuantLib/test-suite/quantlibtestsuite.cpp > =================================================================== > --- trunk/QuantLib/test-suite/quantlibtestsuite.cpp > 2009-11-09 16:35:59 UTC (rev 16724) > +++ trunk/QuantLib/test-suite/quantlibtestsuite.cpp > 2009-11-10 01:21:02 UTC (rev 16725) > @@ -314,6 +314,7 @@ > //tests for deprecated classes > test->add(LiborMarketModelTest::suite()); > test->add(LiborMarketModelProcessTest::suite()); > + > > test->add(QUANTLIB_TEST_CASE(stopTimer)); > > > > This was sent by the SourceForge.net collaborative > development platform, the world's largest Open Source > development site. > > -------------------------------------------------------------- > ---------------- > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > QuantLib-cvs mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-cvs > This e-mail is subject to terms available at the following link: https://www.bancaimi.com/bimi/emaildisclaimer.jsf. Please read the hyperlink carefully as it contains the conditions governing any electronic communications between you and Banca IMI SpA. By messaging with Banca IMI SpA you agree to such terms and conditions of use. Banca IMI SpA may amend these terms and conditions at any time without notice. You should check the relevant webpage from time to time to review the current terms and conditions because they are binding on you. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Please note that, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited and may be unlawful. Prima di stampare, pensa all'ambiente ** Think about the environment before printing |
|
From: Allen K. <all...@ya...> - 2009-11-29 08:43:45
|
Nando:
>
> warning C4100: 'redemption' : unreferenced formal
> parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\callablebonds\callablebond.cpp 32
>
redemption is used in the "CallableBond::arguments" member class, rather than directly in the class "CallableBond." (It is set in the arguments class via "Bond::redemption()").
Hence, can remove the parameter in the "CallableBond" class constructor, as it is not needed.
>
> warning C4100: 'paymentConvention' : unreferenced formal
> parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\callablebonds\callablebond.cpp 31
>
remove the parameter as it is not needed
>
> warning C4100: 'faceAmount' : unreferenced formal
> parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\callablebonds\callablebond.cpp 28
>
underlying "Bond" constructor has changed (where faceAmount was originally required). Hence, can now remove the parameter in the CallableBond constructor, as it is not needed.
Thanks,
Allen
|
|
From: Yee M. C. <ym...@ya...> - 2009-11-28 02:01:52
|
Thanks for fixing my code. You guys are so efficient! Yee Man --- On Fri, 11/27/09, Ferdinando Ametrano <na...@am...> wrote: > From: Ferdinando Ametrano <na...@am...> > Subject: Re: [Quantlib-dev] potentially uninitialized local variables in Analytic GJR-GARCH(1, 1) Engine > To: lui...@gm... > Cc: "QuantLib developers" <qua...@li...> > Date: Friday, November 27, 2009, 8:42 AM > Ok, avoided warning with cleaner > if/else constructs: > > http://quantlib.svn.sourceforge.net/viewvc/quantlib/branches/R01000x-branch/QuantLib/ql/pricingengines/vanilla/analyticgjrgarchengine.cpp?r1=16838&r2=16837&pathrev=16838 > > ciao -- Nando > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > |
|
From: Luigi B. <lui...@gm...> - 2009-11-27 16:54:28
|
On Fri, 2009-11-27 at 17:42 +0100, Ferdinando Ametrano wrote: > Ok, avoided warning with cleaner if/else constructs: > > http://quantlib.svn.sourceforge.net/viewvc/quantlib/branches/R01000x-branch/QuantLib/ql/pricingengines/vanilla/analyticgjrgarchengine.cpp?r1=16838&r2=16837&pathrev=16838 Looks right to me. Luigi -- A debugged program is one for which you have not yet found the conditions that make it fail. -- Jerry Ogdin |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 16:48:50
|
Hi all I need to get in touch with J. Erik Radmall about some code he's contributed. If anyone has his current address please contact me off-list ciao -- Nando |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 16:45:55
|
ok fixed declaring getUpdatedDirection as protected and removing the unused parameter from its signature http://quantlib.svn.sourceforge.net/viewvc/quantlib?view=rev&revision=16837 On Wed, Nov 25, 2009 at 7:37 PM, Ferdinando Ametrano <na...@am...> wrote: > Hi all > > the implementations in derived classes (ConjugateGradient, BFGS, > SteepestDescent) of > > LineSearchBasedMethod::getUpdatedDirection(Problem &P, > Real fold, > Real gold2, > const Array& gradient) = 0; > > never use the second parameter Real fold. > > Is the parameter to be removed or it might be used by some future > line-search based optimization method? > > Nicolas, Frédéric? Anyone else? > > ciao -- Nando > > RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano > > |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 16:43:24
|
Ok, avoided warning with cleaner if/else constructs: http://quantlib.svn.sourceforge.net/viewvc/quantlib/branches/R01000x-branch/QuantLib/ql/pricingengines/vanilla/analyticgjrgarchengine.cpp?r1=16838&r2=16837&pathrev=16838 ciao -- Nando |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 16:31:15
|
On Fri, Nov 27, 2009 at 2:12 PM, Luigi Ballabio
<lui...@gm...> wrote:
> On Fri, 2009-11-27 at 12:56 +0100, Ferdinando Ametrano wrote:
>> On Fri, Nov 27, 2009 at 12:30 PM, Luigi Ballabio
>> > The variables above are all initialized one way or the other in a
>> > section of code that reads:
>> >
>> > if (init_ != true || constants_match != true || ...) {
>> > ... the variables are initialized to some values ...
>> > }
>> > else if (init_ == true && constants_match == true) {
>> > ... the variables are initialized to some other values ...
>> > }
>>
>> mmm... it seems to me the condition you summarized as "..." might
>> really imply some other logic branch where variables are not
>> initialized.
>
> No. If either init or constants_match is false, the code takes the first
> branch (it's an or, so one suffices.) If not, either the conditions in
> "..." are true (and the code takes the first branch) or, since init and
> constant_match are both true, it takes the second branch.
ooops... now I got it.
I was confused between AND and OR... go figure :-)
so I'll commit a revisited if else: please don't forget to check my logic
ciao -- Nando
ciao -- Nando
|
|
From: Luigi B. <lui...@gm...> - 2009-11-27 13:13:04
|
On Fri, 2009-11-27 at 12:56 +0100, Ferdinando Ametrano wrote:
> On Fri, Nov 27, 2009 at 12:30 PM, Luigi Ballabio
> > The variables above are all initialized one way or the other in a
> > section of code that reads:
> >
> > if (init_ != true || constants_match != true || ...) {
> > ... the variables are initialized to some values ...
> > }
> > else if (init_ == true && constants_match == true) {
> > ... the variables are initialized to some other values ...
> > }
>
> mmm... it seems to me the condition you summarized as "..." might
> really imply some other logic branch where variables are not
> initialized.
No. If either init or constants_match is false, the code takes the first
branch (it's an or, so one suffices.) If not, either the conditions in
"..." are true (and the code takes the first branch) or, since init and
constant_match are both true, it takes the second branch.
Luigi
--
Things should be made as simple as possible, but no simpler.
-- Albert Einstein
|
|
From: Dima <dim...@go...> - 2009-11-27 12:44:46
|
Would you please elaborate your point?
Can I do it by taking back what I said :)? I was more referring to the
calendar classes, which I think work well in QuantLib
and might not be the focus of the boost library. The simple date classes
can be taken from boost I think. In particular, because
they already have linked dates and times, see the code below
ptime now = second_clock::local_time();
date today = now.date();
date tommorrow = today + days(1);
ptime tommorrow_start(tommorrow); //midnight
time_duration remaining = tommorrow_start - now;
Regarding boost stats: I've seen the accumulator library, but found it
very painful/cryptic to use. Eg. to calculate the covariance
you need to setup a cummulator set with
accumulator_set<double, stats<tag::covariance<double, tag::covariate1>>> acc;
Or for a quantile calculation:
accumulator_set<double, stats<tag::tail_quantile<right>>> acc0(tag::tail<right>::cache_size = c);
Ferdinando Ametrano schrieb:
> On Fri, Nov 27, 2009 at 12:29 PM, Dima <dim...@go...> wrote:
>
>> I'm not sure whether we should switch to boost's date library.
>>
>
> Would you please elaborate your point ?
>
>
>> Also, I
>> haven't seen how signals could potentially
>> replace observer/observables.
>>
>
> I might be completely wrong here as I'm not familiar about boost
> signal/slot, anyway according to wikipedia it's one implementation of
> the observer pattern:
> http://en.wikipedia.org/wiki/Observer_pattern
>
>
>> As a first step, I'd really suggest
>> to replace the distribution functions with
>> the one in boost. This is I think easy to do and would be the first
>> boostification step.
>>
>
> and since I forgot in my first email, please let me add that also the
> boost stats classes might be an improvement.
> Maybe even a performance improvement in MC when you only need mean and
> variance and don't need the higher moments which are calculate in QL
> stat classes
>
> ciao -- Nando
>
>
|
|
From: Ferdinando A. <na...@am...> - 2009-11-27 12:22:33
|
On Fri, Nov 27, 2009 at 12:29 PM, Dima <dim...@go...> wrote: > I'm not sure whether we should switch to boost's date library. Would you please elaborate your point ? > Also, I > haven't seen how signals could potentially > replace observer/observables. I might be completely wrong here as I'm not familiar about boost signal/slot, anyway according to wikipedia it's one implementation of the observer pattern: http://en.wikipedia.org/wiki/Observer_pattern > As a first step, I'd really suggest > to replace the distribution functions with > the one in boost. This is I think easy to do and would be the first > boostification step. and since I forgot in my first email, please let me add that also the boost stats classes might be an improvement. Maybe even a performance improvement in MC when you only need mean and variance and don't need the higher moments which are calculate in QL stat classes ciao -- Nando |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 11:57:16
|
On Fri, Nov 27, 2009 at 12:30 PM, Luigi Ballabio
<lui...@gm...> wrote:
>> using potentially uninitialized local variables smells like a genuine bug to me
>
> Yes--in your compiler's branch detection algorithm :)
>
> The variables above are all initialized one way or the other in a
> section of code that reads:
>
> if (init_ != true || constants_match != true || ...) {
> ... the variables are initialized to some values ...
> }
> else if (init_ == true && constants_match == true) {
> ... the variables are initialized to some other values ...
> }
mmm... it seems to me the condition you summarized as "..." might
really imply some other logic branch where variables are not
initialized.
Anyway I'm sure making the compiler happier would at least result in
more readable if-else code :-)
ciao -- Nando
|
|
From: Luigi B. <lui...@gm...> - 2009-11-27 11:31:52
|
On Fri, 2009-11-27 at 12:15 +0100, Ferdinando Ametrano wrote:
> warning C4701: potentially uninitialized local variable 'ex'
> used c:\projects\quantlib\trunk\quantlib\ql\pricingengines\vanilla\analyticgjrgarchengine.cpp 268
> warning C4701: potentially uninitialized local variable 'k3'
> used c:\projects\quantlib\trunk\quantlib\ql\pricingengines\vanilla\analyticgjrgarchengine.cpp 279
> warning C4701: potentially uninitialized local variable 'k4'
> used c:\projects\quantlib\trunk\quantlib\ql\pricingengines\vanilla\analyticgjrgarchengine.cpp 279
> warning C4701: potentially uninitialized local variable 'sigma'
> used c:\projects\quantlib\trunk\quantlib\ql\pricingengines\vanilla\analyticgjrgarchengine.cpp 267
>
> using potentially uninitialized local variables smells like a genuine bug to me
Yes--in your compiler's branch detection algorithm :)
The variables above are all initialized one way or the other in a
section of code that reads:
if (init_ != true || constants_match != true || ...) {
... the variables are initialized to some values ...
}
else if (init_ == true && constants_match == true) {
... the variables are initialized to some other values ...
}
My guess is that since a final "else" is missing, the compiler doesn't
realize that between them the two conditions cover all possible cases.
Of course the if could be rewritten so that the warning disappears,
though---the "else if" could just be an "else" (and of course, the
"init_ != true" and "init_ == true" should be just "!init_" and
"init_"...)
Luigi
--
Though this be madness, yet there is method in't.
-- Hamlet, Act II, scene II
|
|
From: Dima <dim...@go...> - 2009-11-27 11:29:59
|
I'm not sure whether we should switch to boost's date library. Also, I haven't seen how signals could potentially replace observer/observables. However, I definitely think that a boostification is the way to go. And the usage of advanced classes like the Loki ones. As a first step, I'd really suggest to replace the distribution functions with the one in boost. This is I think easy to do and would be the first boostification step. Ferdinando Ametrano schrieb: > On Fri, Nov 20, 2009 at 8:15 AM, Nicolai Lassesen <nla...@de...> wrote: > >> I would be happy to help boostify QL. How would you go about doing it? Use the >> Boost date class and give up Quantlib date? >> > > 1) replace as much QuantLib:Date implementation as possible using > Boost, preserving backward compatibility and Excel date number > compatibility > 2) extend discrete (integer) Date to continuous (decimal) Date, again > preserving backward compatibility and Excel date number compatibility > 3) finally if the QuantLib wrapper layer is thin enough support me in > lobbying for getting rid of QuantLib::Date in a backward incompatible > QuantLib 2.0 :-) > > Similar approaches could be used for math (especially distributions), > random numbers, and any other area where Boost and QuantLib overlap. > > The black-belt developer might even try to replace QuantLib > Observer/Observable with Boost signals/slots, and maybe replace the > other patterns with Loki > > Rest assured we'll pay due credit even if you just remove code > resulting in few source files with your name in it :-) > > ciao -- Nando > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 11:23:37
|
Hi all as you probably guessed I'm doing some lint activity for 1.0 release, so expect some more "unreferenced formal parameters" message from me. Feel free to trash all of them ;-) but if you are the author or you have some familiarity with the code referenced please consider helping warning C4100: 'forbidden' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\commodities\unitofmeasureconversionmanager.cpp 176 warning C4100: 'r2' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\commodities\unitofmeasureconversion.cpp 71 For unreferenced formal parameter there are 3 possible alternatives: 1) keep the parameter, just remove its name. This might be the case if you're inheriting the signature, but the parameter doesn't make sense in your implementation 2) use the parameter. Not using it was a genuine bug 3) remove the parameter as it is not needed ciao -- Nando RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 11:20:21
|
Hi all as you probably guessed I'm doing some lint activity for 1.0 release, so expect some more "unreferenced formal parameters" message from me. Feel free to trash all of them ;-) but if you are the author or you have some familiarity with the code referenced please consider helping warning C4100: 'redemption' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\callablebonds\callablebond.cpp 32 warning C4100: 'paymentConvention' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\callablebonds\callablebond.cpp 31 warning C4100: 'faceAmount' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\callablebonds\callablebond.cpp 28 For unreferenced formal parameter there are 3 possible alternatives: 1) keep the parameter, just remove its name. This might be the case if you're inheriting the signature, but the parameter doesn't make sense in your implementation 2) use the parameter. Not using it was a genuine bug 3) remove the parameter as it is not needed ciao -- Nando RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 11:16:30
|
Hi all as you probably guessed I'm doing some lint activity for 1.0 release, so expect some more annoying message from me. Feel free to trash all of them ;-) but if you are the author or you have some familiarity with the code referenced please consider helping warning C4701: potentially uninitialized local variable 'ex' used c:\projects\quantlib\trunk\quantlib\ql\pricingengines\vanilla\analyticgjrgarchengine.cpp 268 warning C4701: potentially uninitialized local variable 'k3' used c:\projects\quantlib\trunk\quantlib\ql\pricingengines\vanilla\analyticgjrgarchengine.cpp 279 warning C4701: potentially uninitialized local variable 'k4' used c:\projects\quantlib\trunk\quantlib\ql\pricingengines\vanilla\analyticgjrgarchengine.cpp 279 warning C4701: potentially uninitialized local variable 'sigma' used c:\projects\quantlib\trunk\quantlib\ql\pricingengines\vanilla\analyticgjrgarchengine.cpp 267 using potentially uninitialized local variables smells like a genuine bug to me ciao -- Nando RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano |
|
From: Ferdinando A. <na...@am...> - 2009-11-27 11:11:54
|
Hi all as you probably guessed I'm doing some lint activity for 1.0 release, so expect some more "unreferenced formal parameters" message from me. Feel free to trash all of them ;-) but if you are the author or you have some familiarity with the code referenced please consider helping warning C4100: 'i' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\onefactorcopula.hpp 264 warning C4100: 'stepSize' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp 84 warning C4100: 'floatDayCount' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp 192 warning C4100: 'floatConvention' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp 191 warning C4100: 'date' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskybond.cpp 76 warning C4100: 'd' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp 164 warning C4100: 'buckets' : unreferenced formal parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\distribution.cpp 280 For unreferenced formal parameter there are 3 possible alternatives: 1) keep the parameter, just remove its name. This might be the case if you're inheriting the signature, but the parameter doesn't make sense in your implementation 2) use the parameter. Not using it was a genuine bug 3) remove the parameter as it is not needed ciao -- Nando RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano |