[Rcpp-commits] r3979 - in pkg/Rcpp: . inst/include/Rcpp/vector
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 16 09:39:11 CET 2012
Author: romain
Date: 2012-11-16 09:39:11 +0100 (Fri, 16 Nov 2012)
New Revision: 3979
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/inst/include/Rcpp/vector/Vector.h
Log:
added Vector::is_na and Vector::get_na
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2012-11-16 02:44:32 UTC (rev 3978)
+++ pkg/Rcpp/ChangeLog 2012-11-16 08:39:11 UTC (rev 3979)
@@ -1,3 +1,8 @@
+2012-11-16 Romain Francois <romain at r-enthusiasts.com>
+
+ * include/Rcpp/vector/Vector.h : added static methods Vector::is_na and
+ Vector::get_na
+
2012-11-15 Romain Francois <romain at r-enthusiasts.com>
* include/Rcpp/sugar/logical/SingleLogicalResult.h : apply patch suggested
Modified: pkg/Rcpp/inst/include/Rcpp/vector/Vector.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/vector/Vector.h 2012-11-16 02:44:32 UTC (rev 3978)
+++ pkg/Rcpp/inst/include/Rcpp/vector/Vector.h 2012-11-16 08:39:11 UTC (rev 3979)
@@ -82,6 +82,9 @@
return *this ;
}
+ static inline stored_type get_na() { return traits::get_na<RTYPE>(); }
+ static inline bool is_na( stored_type x){ return traits::is_na<RTYPE>(x); }
+
private:
// sugar
@@ -151,6 +154,8 @@
import_expression<NA,VEC>( other, n ) ;
}
+
+
private:
// TODO: do some dispatch when VEC == Vector so that we use std::copy
More information about the Rcpp-commits
mailing list