[Rcpp-commits] r3729 - in pkg/RcppEigen: . inst/doc inst/include inst/skeleton

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 7 18:15:41 CEST 2012


Author: dmbates
Date: 2012-08-07 18:15:41 +0200 (Tue, 07 Aug 2012)
New Revision: 3729

Modified:
   pkg/RcppEigen/ChangeLog
   pkg/RcppEigen/DESCRIPTION
   pkg/RcppEigen/inst/doc/code.R
   pkg/RcppEigen/inst/include/RcppEigenWrap.h
   pkg/RcppEigen/inst/skeleton/Makevars
   pkg/RcppEigen/inst/skeleton/rcppeigen_hello_world.cpp
Log:
Updates for release of RcppEigen_0.3.1 (Date, Changelog)


Modified: pkg/RcppEigen/ChangeLog
===================================================================
--- pkg/RcppEigen/ChangeLog	2012-07-31 02:20:59 UTC (rev 3728)
+++ pkg/RcppEigen/ChangeLog	2012-08-07 16:15:41 UTC (rev 3729)
@@ -1,3 +1,33 @@
+2012-07-30  Douglas Bates <bates at stat.wisc.edu>
+
+	* inst/include/RcppEigenWrap.h, inst/unitTests/runit.RcppEigen.R:
+	  Another suggestion from Gael Guennebaud to allow row vectors to be
+	  wrapped.
+
+2012-07-28  Douglas Bates <bates at stat.wisc.edu>
+
+	* inst/include/RcppEigenWrap.h, inst/unitTests/runit.RcppEigen.R: More
+	  fixes to RcppEigenWrap.h and adjustment of tests accordingly.
+	  The changes allow RowMajor matrices to be wrapped (thanks to Gael
+	  Guennebaud) but cannot handle RowVector types. There will need to be
+	  more template metaprogramming done to redirect the case of RowVector,
+	  which cannot be changed to a ColMajor form.
+	* src/Makevars: Because of changes in R, -DNDEBUG is automatic.
+	  One must override it with -UNDEBUG in the local ~/.R/Makevars to
+	  activate the debugging code.
+	* inst/doc/code.R: New version of wrap code provides correct answer to
+	  the badtrans example
+	* DESCRIPTION: Bump the date.
+2012-07-27  Douglas Bates <bates at stat.wisc.edu>
+	* inst/include/Eigen/*: Changed to released version of Eigen-3.1.0
+	  using the MPL2 license.
+
+2012-07-19  Dirk Eddelbuettel  <edd at debian.org>
+
+	* R/fastLm.R: o correct residual standard error display
+	* R/fastLm.R: o improved test for intercept once more with a tip of the
+	  hat to Doug
+
 2012-07-17  Dirk Eddelbuettel  <edd at debian.org>
 
 	* R/fastLm.R: Corrections for R^2 in no-intercept case
@@ -7,8 +37,28 @@
 	* DESCRIPTION, R/unit.test.R, inst/include/Eigen/*: Massive
 	changes related to upgrade to Eigen-3.1.0
 
+2012-03-13  Douglas Bates <bates at stat.wisc.edu>
+
+	* inst/include/RcppEigenWrap.h: Change the wrap methods to avoid
+	  creating Rcpp::Dimension objects (which are implicitly created by the
+	  Rcpp::Matrix constructor).
+	* inst/tests/test-solutions.R: Clean up. I defined the results then
+	  reevaluated them.
+
 2012-03-08  Douglas Bates <bates at stat.wisc.edu>
 
+	* inst/include/RcppEigenForward.h: Remove an include of
+	  RcppEigenConfig.h which is no longer needed.
+	* ChangeLog, NEWS, NEWS.org: Update Changelog and NEWS which is
+	  generated from an org-mode file NEWS.org
+	* inst/include/RcppEigenConfig.h,
+	  inst/include/unsupported/Eigen/MoreVectorization,
+	  inst/include/unsupported/Eigen/src/MoreVectorization/CMakeLists.txt:
+	  Delete the unsupported/Eigen/src/MoreVectorization module which we
+	  don't need
+	* inst/include/unsupported/Eigen/src/MoreVectorization/MathFunctions.h:
+	  Delete the unsupported/Eigen/src/MoreVectorization module which we
+	  don't need
 	* inst/tests/test-solutions.R, inst/tests/test-transform.R,
 	  inst/tests/test-wrap.R: Add testthat test files, temporarily disabled
 	  for R CMD check because of an unknown conflict

Modified: pkg/RcppEigen/DESCRIPTION
===================================================================
--- pkg/RcppEigen/DESCRIPTION	2012-07-31 02:20:59 UTC (rev 3728)
+++ pkg/RcppEigen/DESCRIPTION	2012-08-07 16:15:41 UTC (rev 3729)
@@ -2,7 +2,7 @@
 Type: Package
 Title: Rcpp integration for the Eigen templated linear algebra library.
 Version: 0.3.1
-Date: 2012-07-28
+Date: 2012-08-07
 Author: Douglas Bates, Romain Francois and Dirk Eddelbuettel
 Maintainer: Douglas Bates <bates at stat.wisc.edu>
 Description: R and Eigen integration using Rcpp.

Modified: pkg/RcppEigen/inst/doc/code.R
===================================================================
--- pkg/RcppEigen/inst/doc/code.R	2012-07-31 02:20:59 UTC (rev 3728)
+++ pkg/RcppEigen/inst/doc/code.R	2012-08-07 16:15:41 UTC (rev 3729)
@@ -225,7 +225,7 @@
 const SpChol     Ch(At * At.adjoint());
 if (Ch.info() != Eigen::Success) return R_NilValue;
 CholMD           L;
-L.compute(At * At.adjoint());
+L.compute(At);
 if (L.info() != Eigen::Success) return R_NilValue;
 const VectorXd betahat  = Ch.solve(Aty);
 const VectorXd betahatC = L.solve(Aty);

Modified: pkg/RcppEigen/inst/include/RcppEigenWrap.h
===================================================================
--- pkg/RcppEigen/inst/include/RcppEigenWrap.h	2012-07-31 02:20:59 UTC (rev 3728)
+++ pkg/RcppEigen/inst/include/RcppEigenWrap.h	2012-08-07 16:15:41 UTC (rev 3729)
@@ -28,6 +28,7 @@
 
         template<typename T>
         SEXP Eigen_cholmod_wrap(const Eigen::CholmodDecomposition<Eigen::SparseMatrix<T> >& obj) {
+			typedef T* Tpt;
             const cholmod_factor* f = obj.factor();
             if (f->minor < f->n)
                 throw std::runtime_error("CHOLMOD factorization was unsuccessful");
@@ -49,11 +50,11 @@
                 ans.slot("pi")    = ::Rcpp::wrap((int*)f->pi, ((int*)f->pi) + f->nsuper + 1);
                 ans.slot("px")    = ::Rcpp::wrap((int*)f->px, ((int*)f->px) + f->nsuper + 1);
                 ans.slot("s")     = ::Rcpp::wrap((int*)f->s, ((int*)f->s) + f->ssize);
-                ans.slot("x")     = ::Rcpp::wrap((T*)f->x, ((T*)f->x) + f->xsize);
+                ans.slot("x")     = ::Rcpp::wrap((Tpt)f->x, ((T*)f->x) + f->xsize);
             } else {
                 ans.slot("i")     = ::Rcpp::wrap((int*)f->i, ((int*)f->i) + f->nzmax);
                 ans.slot("p")     = ::Rcpp::wrap((int*)f->p, ((int*)f->p) + f->n + 1);
-                ans.slot("x")     = ::Rcpp::wrap((T*)f->x, ((T*)f->x) + f->nzmax);
+                ans.slot("x")     = ::Rcpp::wrap((Tpt)f->x, ((T*)f->x) + f->nzmax);
                 ans.slot("nz")    = ::Rcpp::wrap((int*)f->nz, ((int*)f->nz) + f->n);
                 ans.slot("nxt")   = ::Rcpp::wrap((int*)f->next, ((int*)f->next) + f->n + 2);
                 ans.slot("prv")   = ::Rcpp::wrap((int*)f->prev, ((int*)f->prev) + f->n + 2);

Modified: pkg/RcppEigen/inst/skeleton/Makevars
===================================================================
--- pkg/RcppEigen/inst/skeleton/Makevars	2012-07-31 02:20:59 UTC (rev 3728)
+++ pkg/RcppEigen/inst/skeleton/Makevars	2012-08-07 16:15:41 UTC (rev 3729)
@@ -1,3 +1,2 @@
 ## Use the R_HOME indirection to support installations of multiple R version
 PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` 
-PKG_CPPFLAGS = `$(R_HOME)/bin/Rscript -e "RcppEigen:::RcppEigenCxxFlags()"`

Modified: pkg/RcppEigen/inst/skeleton/rcppeigen_hello_world.cpp
===================================================================
--- pkg/RcppEigen/inst/skeleton/rcppeigen_hello_world.cpp	2012-07-31 02:20:59 UTC (rev 3728)
+++ pkg/RcppEigen/inst/skeleton/rcppeigen_hello_world.cpp	2012-08-07 16:15:41 UTC (rev 3729)
@@ -6,11 +6,9 @@
 	
     Eigen::MatrixXd m1 = Eigen::MatrixXd::Identity( 3, 3 ) ;
     Eigen::MatrixXd m2 = Eigen::MatrixXd::Random( 3, 3 ) ;
-				// need more flexible wrap methods
-    Eigen::MatrixXd comb = m1 + 3 * (m1 + m2);
     
-    return List::create(_["m1"]   = m1,
-			_["m2"]   = m2,
-			_["comb"] = comb);
+    return List::create(Named("m1")   = m1,
+			Named("m2")   = m2,
+			Named("comb") = m1 + 3 *(m1 + m2));
 }
 



More information about the Rcpp-commits mailing list