[Rcpp-commits] r3042 - pkg/Rcpp/inst/include/Rcpp/sugar/functions

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 31 09:49:20 CEST 2011


Author: romain
Date: 2011-05-31 09:49:20 +0200 (Tue, 31 May 2011)
New Revision: 3042

Modified:
   pkg/Rcpp/inst/include/Rcpp/sugar/functions/sum.h
Log:
sum for logical vectors

Modified: pkg/Rcpp/inst/include/Rcpp/sugar/functions/sum.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/functions/sum.h	2011-05-30 19:50:41 UTC (rev 3041)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/functions/sum.h	2011-05-31 07:49:20 UTC (rev 3042)
@@ -104,6 +104,10 @@
 	return sugar::Sum<REALSXP,NA,T>( t ) ;
 }
 
+template <bool NA, typename T>
+inline sugar::Sum<LGLSXP,NA,T> sum( const VectorBase<LGLSXP,NA,T>& t){
+	return sugar::Sum<LGLSXP,NA,T>( t ) ;
+}
 
 } // Rcpp
 #endif



More information about the Rcpp-commits mailing list