[Rcpp-commits] r3171 - pkg/RcppEigen/inst/include/unsupported/Eigen/src/SparseExtra
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 12 09:35:10 CEST 2011
Author: dmbates
Date: 2011-08-12 09:35:09 +0200 (Fri, 12 Aug 2011)
New Revision: 3171
Modified:
pkg/RcppEigen/inst/include/unsupported/Eigen/src/SparseExtra/CholmodSupport.h
Log:
By-passing the const reference
Modified: pkg/RcppEigen/inst/include/unsupported/Eigen/src/SparseExtra/CholmodSupport.h
===================================================================
--- pkg/RcppEigen/inst/include/unsupported/Eigen/src/SparseExtra/CholmodSupport.h 2011-08-11 10:08:57 UTC (rev 3170)
+++ pkg/RcppEigen/inst/include/unsupported/Eigen/src/SparseExtra/CholmodSupport.h 2011-08-12 07:35:09 UTC (rev 3171)
@@ -236,7 +236,8 @@
}
template<typename OtherDerived>
- void solveInPlace(const MatrixBase<OtherDerived>& other, int type) const {
+ void solveInPlace(const MatrixBase<OtherDerived>& _other, int type) const {
+ OtherDerived& other = _other.const_cast_derived();
eigen_assert(m_factorizationIsOk &&
"The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()");
const Index size = m_cholmodFactor->n;
@@ -249,7 +250,7 @@
this->m_info = NumericalIssue;
}
Scalar* xpt=reinterpret_cast<Scalar*>(x_cd->x);
- std::copy(xpt, xpt + other.rows() * other.cols(), other.derived().data());
+ std::copy(xpt, xpt + other.rows() * other.cols(), other.data());
M_cholmod_free_dense(&x_cd, &m_cholmod);
}
More information about the Rcpp-commits
mailing list