[Rquantlib-commits] r308 - in pkg/RQuantLib: . src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 22 00:16:17 CET 2011


Author: edd
Date: 2011-02-22 00:16:16 +0100 (Tue, 22 Feb 2011)
New Revision: 308

Modified:
   pkg/RQuantLib/ChangeLog
   pkg/RQuantLib/DESCRIPTION
   pkg/RQuantLib/src/bermudan.cpp
   pkg/RQuantLib/src/utils.cpp
Log:
Bug fix release 0.3.6 adding four casts which came up during a Debian archive auto-rebuild


Modified: pkg/RQuantLib/ChangeLog
===================================================================
--- pkg/RQuantLib/ChangeLog	2010-11-30 21:20:08 UTC (rev 307)
+++ pkg/RQuantLib/ChangeLog	2011-02-21 23:16:16 UTC (rev 308)
@@ -1,3 +1,10 @@
+2011-02-21  Dirk Eddelbuettel  <edd at debian.org>
+
+	* DESCRIPTION: Release 0.3.6
+
+	* src/bermudan.cpp: Added two explicit casts to double scalar
+	* src/utils.cpp: Idem
+
 2010-11-15  Dirk Eddelbuettel  <edd at debian.org>
 
 	* DESCRIPTION: Release 0.3.5

Modified: pkg/RQuantLib/DESCRIPTION
===================================================================
--- pkg/RQuantLib/DESCRIPTION	2010-11-30 21:20:08 UTC (rev 307)
+++ pkg/RQuantLib/DESCRIPTION	2011-02-21 23:16:16 UTC (rev 308)
@@ -1,6 +1,6 @@
 Package: RQuantLib
 Title: R interface to the QuantLib library
-Version: 0.3.5
+Version: 0.3.6
 Date: $Date$
 Maintainer: Dirk Eddelbuettel <edd at debian.org>
 Author: Dirk Eddelbuettel <edd at debian.org> and Khanh Nguyen <knguyen at cs.umb.edu>

Modified: pkg/RQuantLib/src/bermudan.cpp
===================================================================
--- pkg/RQuantLib/src/bermudan.cpp	2010-11-30 21:20:08 UTC (rev 307)
+++ pkg/RQuantLib/src/bermudan.cpp	2011-02-21 23:16:16 UTC (rev 308)
@@ -3,7 +3,7 @@
 // RQuantLib function BermudanSwaption
 //
 // Copyright (C) 2005 - 2007 Dominick Samperi
-// Copyright (C) 2007 - 2010 Dirk Eddelbuettel
+// Copyright (C) 2007 - 2011 Dirk Eddelbuettel
 //
 // $Id$
 //
@@ -92,7 +92,7 @@
         boost::shared_ptr<QuantLib::YieldTermStructure> curve;
         if(firstQuoteName.compare("flat") == 0) {
             // Get flat yield curve
-            double rateQuote = tslist[0]; //tslist.getValue(0);
+            double rateQuote = Rcpp::as<double>(tslist[0]); //tslist.getValue(0);
             boost::shared_ptr<QuantLib::Quote> flatRate(new QuantLib::SimpleQuote(rateQuote));
             boost::shared_ptr<QuantLib::FlatForward> ts(new QuantLib::FlatForward(settlementDate,
                                                                                   QuantLib::Handle<QuantLib::Quote>(flatRate),
@@ -104,7 +104,7 @@
             std::vector<boost::shared_ptr<QuantLib::RateHelper> > curveInput;
             for(i = 0; i < (QuantLib::Size)tslist.size(); i++) {
                 std::string name = tsnames[i]; //tslist.getName(i);
-                double val = tslist[i]; //tslist.getValue(i);
+                double val = Rcpp::as<double>(tslist[i]); //tslist.getValue(i);
                 boost::shared_ptr<QuantLib::RateHelper> rh = 
                     ObservableDB::instance().getRateHelper(name, val);
                 // edd 2009-11-01 FIXME NULL_RateHelper no longer builds under 0.9.9

Modified: pkg/RQuantLib/src/utils.cpp
===================================================================
--- pkg/RQuantLib/src/utils.cpp	2010-11-30 21:20:08 UTC (rev 307)
+++ pkg/RQuantLib/src/utils.cpp	2011-02-21 23:16:16 UTC (rev 308)
@@ -2,7 +2,7 @@
 //
 // RQuantLib -- R interface to the QuantLib libraries
 //
-// Copyright (C) 2002 - 2009  Dirk Eddelbuettel 
+// Copyright (C) 2002 - 2011  Dirk Eddelbuettel 
 // Copyright (C) 2005 - 2006  Dominick Samperi
 // Copyright (C) 2009 - 2010  Dirk Eddelbuettel and Khanh Nguyen
 //
@@ -142,7 +142,7 @@
         double tolerance = 1.0e-15;
         
         if (firstQuoteName.compare("flat") == 0) {	// Create a flat term structure.
-            double rateQuote = tslist[0];
+            double rateQuote = Rcpp::as<double>(tslist[0]);
             boost::shared_ptr<QuantLib::Quote> flatRate(new QuantLib::SimpleQuote(rateQuote));
             boost::shared_ptr<QuantLib::FlatForward> 
                 ts(new QuantLib::FlatForward(settlementDate, QuantLib::Handle<QuantLib::Quote>(flatRate), QuantLib::Actual365Fixed()));
@@ -151,7 +151,7 @@
             std::vector<boost::shared_ptr<QuantLib::RateHelper> > curveInput;
             for (int i = 0; i < tslist.size(); i++) {
                 std::string name = Rcpp::as<std::string>(tsnames[i]);
-                double val = tslist[i];
+                double val = Rcpp::as<double>(tslist[i]);
                 boost::shared_ptr<QuantLib::RateHelper> rh = ObservableDB::instance().getRateHelper(name, val);
                 // edd 2009-11-01 FIXME NULL_RateHelper no longer builds under 0.9.9
                 // if (rh == NULL_RateHelper)



More information about the Rquantlib-commits mailing list