[Rcpp-commits] r3606 - in pkg/RcppSMC: . inst/include

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun May 13 22:30:35 CEST 2012


Author: edd
Date: 2012-05-13 22:30:35 +0200 (Sun, 13 May 2012)
New Revision: 3606

Modified:
   pkg/RcppSMC/ChangeLog
   pkg/RcppSMC/inst/include/sampler.h
Log:
use std::max() to make g++-4.7 happy


Modified: pkg/RcppSMC/ChangeLog
===================================================================
--- pkg/RcppSMC/ChangeLog	2012-05-13 16:46:57 UTC (rev 3605)
+++ pkg/RcppSMC/ChangeLog	2012-05-13 20:30:35 UTC (rev 3606)
@@ -1,7 +1,11 @@
+2012-05-13  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/include/sampler.h: Use explicit std::max() for g++-4.7
+
 2012-03-21  Dirk Eddelbuettel  <edd at debian.org>
 
 	* DESCRIPTION: Version 0.1.0
-	
+
 	* src/rng.cpp: Moved old GSL-based RNG code to deprecated/
 	* inst/include/rng.h: Idem
 	* man/pfLineartBS.Rd: Callback-to-R example only if interactive()

Modified: pkg/RcppSMC/inst/include/sampler.h
===================================================================
--- pkg/RcppSMC/inst/include/sampler.h	2012-05-13 16:46:57 UTC (rev 3605)
+++ pkg/RcppSMC/inst/include/sampler.h	2012-05-13 20:30:35 UTC (rev 3606)
@@ -336,7 +336,7 @@
      //Normalise the weights to sensible values....
      double dMaxWeight = -std::numeric_limits<double>::infinity();
      for(int i = 0; i < N; i++)
-       dMaxWeight = max(dMaxWeight, pParticles[i].GetLogWeight());
+       dMaxWeight = std::max(dMaxWeight, pParticles[i].GetLogWeight());
      for(int i = 0; i < N; i++)
        pParticles[i].SetLogWeight(pParticles[i].GetLogWeight() - (dMaxWeight));
 



More information about the Rcpp-commits mailing list