[Rcpp-commits] r3127 - pkg/RcppEigen/inst/include

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jul 10 23:16:24 CEST 2011


Author: dmbates
Date: 2011-07-10 23:16:24 +0200 (Sun, 10 Jul 2011)
New Revision: 3127

Added:
   pkg/RcppEigen/inst/include/PlainObjectBaseAddon.h
Log:
Added some begin and end methods to PlainObjectBase template through the extension mechanism.  Should make these legitimate iterators.


Added: pkg/RcppEigen/inst/include/PlainObjectBaseAddon.h
===================================================================
--- pkg/RcppEigen/inst/include/PlainObjectBaseAddon.h	                        (rev 0)
+++ pkg/RcppEigen/inst/include/PlainObjectBaseAddon.h	2011-07-10 21:16:24 UTC (rev 3127)
@@ -0,0 +1,11 @@
+    EIGEN_STRONG_INLINE const Scalar *begin() const
+    { return m_storage.data(); }
+
+    EIGEN_STRONG_INLINE Scalar *begin()
+    { return m_storage.data(); }
+
+    EIGEN_STRONG_INLINE const Scalar *end() const
+    { return m_storage.data() + base().size(); }
+
+    EIGEN_STRONG_INLINE Scalar *end()
+    { return m_storage.data() + base().size(); }



More information about the Rcpp-commits mailing list