From 9a0900e33e9ca4bc174cfccc26dbf4bdc38f7627 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 9 Nov 2009 07:51:31 -0500 Subject: last round of changes, mainly to return derived types instead of base types, and fix various compilation issues --- Eigen/src/LU/FullPivLU.h | 28 ++++++++++++++-------------- Eigen/src/LU/PartialPivLU.h | 12 ++++++------ 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'Eigen/src/LU') diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index c38789bd9..d8975b0b6 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -158,10 +158,10 @@ template class FullPivLU * * \sa image() */ - inline const ei_kernel_return_value kernel() const + inline const ei_kernel_retval kernel() const { ei_assert(m_isInitialized && "LU is not initialized."); - return ei_kernel_return_value(*this); + return ei_kernel_retval(*this); } /** \returns the image of the matrix, also called its column-space. The columns of the returned matrix @@ -183,11 +183,11 @@ template class FullPivLU * * \sa kernel() */ - inline const ei_image_return_value + inline const ei_image_retval image(const MatrixType& originalMatrix) const { ei_assert(m_isInitialized && "LU is not initialized."); - return ei_image_return_value(*this, originalMatrix); + return ei_image_retval(*this, originalMatrix); } /** \return a solution x to the equation Ax=b, where A is the matrix of which @@ -210,11 +210,11 @@ template class FullPivLU * \sa TriangularView::solve(), kernel(), inverse() */ template - inline const ei_solve_return_value + inline const ei_solve_retval solve(const MatrixBase& b) const { ei_assert(m_isInitialized && "LU is not initialized."); - return ei_solve_return_value(*this, b.derived()); + return ei_solve_retval(*this, b.derived()); } /** \returns the determinant of the matrix of which @@ -355,11 +355,11 @@ template class FullPivLU * * \sa MatrixBase::inverse() */ - inline const ei_solve_return_value > inverse() const + inline const ei_solve_retval > inverse() const { ei_assert(m_isInitialized && "LU is not initialized."); ei_assert(m_lu.rows() == m_lu.cols() && "You can't take the inverse of a non-square matrix!"); - return ei_solve_return_value > + return ei_solve_retval > (*this, MatrixType::Identity(m_lu.rows(), m_lu.cols()).nestByValue()); } @@ -486,8 +486,8 @@ typename ei_traits::Scalar FullPivLU::determinant() cons /********* Implementation of kernel() **************************************************/ template -struct ei_kernel_impl > - : ei_kernel_return_value > +struct ei_kernel_retval > + : ei_kernel_retval_base > { EIGEN_MAKE_KERNEL_HELPERS(FullPivLU<_MatrixType>) @@ -571,8 +571,8 @@ struct ei_kernel_impl > /***** Implementation of image() *****************************************************/ template -struct ei_image_impl > - : ei_image_return_value > +struct ei_image_retval > + : ei_image_retval_base > { EIGEN_MAKE_IMAGE_HELPERS(FullPivLU<_MatrixType>) @@ -608,8 +608,8 @@ struct ei_image_impl > /***** Implementation of solve() *****************************************************/ template -struct ei_solve_impl, Rhs> - : ei_solve_return_value, Rhs> +struct ei_solve_retval, Rhs> + : ei_solve_retval_base, Rhs> { EIGEN_MAKE_SOLVE_HELPERS(FullPivLU<_MatrixType>,Rhs) diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index 4f6cda68f..03c91456a 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -133,11 +133,11 @@ template class PartialPivLU * \sa TriangularView::solve(), inverse(), computeInverse() */ template - inline const ei_solve_return_value + inline const ei_solve_retval solve(const MatrixBase& b) const { ei_assert(m_isInitialized && "PartialPivLU is not initialized."); - return ei_solve_return_value(*this, b.derived()); + return ei_solve_retval(*this, b.derived()); } /** \returns the inverse of the matrix of which *this is the LU decomposition. @@ -147,10 +147,10 @@ template class PartialPivLU * * \sa MatrixBase::inverse(), LU::inverse() */ - inline const ei_solve_return_value > inverse() const + inline const ei_solve_retval > inverse() const { ei_assert(m_isInitialized && "PartialPivLU is not initialized."); - return ei_solve_return_value > + return ei_solve_retval > (*this, MatrixType::Identity(m_lu.rows(), m_lu.cols()).nestByValue()); } @@ -408,8 +408,8 @@ typename ei_traits::Scalar PartialPivLU::determinant() c /***** Implementation of solve() *****************************************************/ template -struct ei_solve_impl, Rhs> - : ei_solve_return_value, Rhs> +struct ei_solve_retval, Rhs> + : ei_solve_retval_base, Rhs> { EIGEN_MAKE_SOLVE_HELPERS(PartialPivLU<_MatrixType>,Rhs) -- cgit v1.2.3