[Rcpp-commits] r4340 - in pkg/Rcpp: . inst/include/Rcpp/stats/random

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 14 09:23:41 CEST 2013


Author: romain
Date: 2013-06-14 09:23:41 +0200 (Fri, 14 Jun 2013)
New Revision: 4340

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/include/Rcpp/stats/random/rf.h
   pkg/Rcpp/inst/include/Rcpp/stats/random/runif.h
Log:
remove unused variables

Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2013-06-13 08:49:13 UTC (rev 4339)
+++ pkg/Rcpp/ChangeLog	2013-06-14 07:23:41 UTC (rev 4340)
@@ -1,3 +1,8 @@
+2013-06-14  Romain Francois <romain at r-enthusiasts.com>
+
+	* include/Rcpp/stats/random/runif.h : removed unused max variable
+	* include/Rcpp/stats/random/rf.h : removed unused n1 and n2 variables
+
 2013-06-13  Romain Francois <romain at r-enthusiasts.com>
 
 	* src/Module.cpp: small buglet in macro. Reported on Rcpp-devel

Modified: pkg/Rcpp/inst/include/Rcpp/stats/random/rf.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/stats/random/rf.h	2013-06-13 08:49:13 UTC (rev 4339)
+++ pkg/Rcpp/inst/include/Rcpp/stats/random/rf.h	2013-06-14 07:23:41 UTC (rev 4340)
@@ -2,7 +2,7 @@
 //
 // rf.h: Rcpp R/C++ interface class library -- 
 //
-// Copyright (C) 2010 - 2012 Douglas Bates, Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2010 - 2013 Douglas Bates, Dirk Eddelbuettel and Romain Francois
 //
 // This file is part of Rcpp.
 //
@@ -30,7 +30,7 @@
 		public:
 	
 			FGenerator_Finite_Finite( double n1_, double n2_ ) : 
-				n1(n1_), n2(n2_), n1__2(n1_ / 2.0 ), n2__2(n2_ / 2.0 ), ratio(n2_/n1_) {}
+				n1__2(n1_ / 2.0 ), n2__2(n2_ / 2.0 ), ratio(n2_/n1_) {}
 	
 			inline double operator()() const {
 				// here we know that both n1 and n2 are finite
@@ -39,7 +39,7 @@
 			}
 	
 		private:
-			double n1, n2, n1__2, n2__2, ratio ;
+			double n1__2, n2__2, ratio ;
 		} ;
 
 		

Modified: pkg/Rcpp/inst/include/Rcpp/stats/random/runif.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/stats/random/runif.h	2013-06-13 08:49:13 UTC (rev 4339)
+++ pkg/Rcpp/inst/include/Rcpp/stats/random/runif.h	2013-06-14 07:23:41 UTC (rev 4340)
@@ -2,7 +2,7 @@
 //
 // runif.h: Rcpp R/C++ interface class library -- 
 //
-// Copyright (C) 2010 - 2011 Douglas Bates, Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2010 - 2013 Douglas Bates, Dirk Eddelbuettel and Romain Francois
 //
 // This file is part of Rcpp.
 //
@@ -30,7 +30,7 @@
 		public:
 	
 			UnifGenerator( double min_ = 0.0, double max_ = 1.0) : 
-				min(min_), max(max_), diff(max_ - min_) {}
+				min(min_), diff(max_ - min_) {}
 	
 			inline double operator()() const {
 				double u;
@@ -40,7 +40,6 @@
 	
 		private:
 			double min; 
-			double max ;
 			double diff ;
 		} ;
 
@@ -48,7 +47,7 @@
 		class UnifGenerator__0__1 : public ::Rcpp::Generator<double> {
 		public:
 	
-			UnifGenerator__0__1( double min_ = 0.0, double max_ = 1.0) {}
+			UnifGenerator__0__1() {}
 	
 			inline double operator()() const {
 				double u;



More information about the Rcpp-commits mailing list