From 4a23971b80dedae289ae470e447f91a227f1fdd4 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Sat, 6 Nov 2010 20:52:39 +0000 Subject: [PATCH] Fixed template names --- gtsam/base/Matrix-inl.h | 20 ++++++++++---------- gtsam/base/Matrix.h | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gtsam/base/Matrix-inl.h b/gtsam/base/Matrix-inl.h index 1e1c5dfe4..a038f28d1 100644 --- a/gtsam/base/Matrix-inl.h +++ b/gtsam/base/Matrix-inl.h @@ -33,11 +33,11 @@ using namespace std; * @param b an RHS vector * @return the solution x of U*x=b */ -template -Vector backSubstituteUpper(const boost::numeric::ublas::matrix_expression& _U, - const boost::numeric::ublas::vector_expression& _b, bool unit=false) { - const MATRIXAE& U((const MATRIXAE&)_U); - const VECTORAE& b((const VECTORAE&)_b); +template +Vector backSubstituteUpper(const boost::numeric::ublas::matrix_expression& _U, + const boost::numeric::ublas::vector_expression& _b, bool unit=false) { + const MATRIX& U(*static_cast(&_U)); + const VECTOR& b(*static_cast(&_b)); size_t n = U.size2(); #ifndef NDEBUG size_t m = U.size1(); @@ -74,11 +74,11 @@ Vector backSubstituteUpper(const boost::numeric::ublas::matrix_expression -Vector backSubstituteUpper(const boost::numeric::ublas::vector_expression& _b, - const boost::numeric::ublas::matrix_expression& _U, bool unit=false) { - const VECTORAE& b((const VECTORAE&)_b); - const MATRIXAE& U((const MATRIXAE&)_U); +template +Vector backSubstituteUpper(const boost::numeric::ublas::vector_expression& _b, + const boost::numeric::ublas::matrix_expression& _U, bool unit=false) { + const VECTOR& b(*static_cast(&_b)); + const MATRIX& U(*static_cast(&_U)); size_t n = U.size2(); #ifndef NDEBUG size_t m = U.size1(); diff --git a/gtsam/base/Matrix.h b/gtsam/base/Matrix.h index 8c69fb666..7815161b0 100644 --- a/gtsam/base/Matrix.h +++ b/gtsam/base/Matrix.h @@ -293,9 +293,9 @@ void householderColMajor(MatrixColMajor& A); * @return the solution x of U*x=b * TODO: use boost */ -template -Vector backSubstituteUpper(const boost::numeric::ublas::matrix_expression& U, - const boost::numeric::ublas::vector_expression& b, bool unit=false); +template +Vector backSubstituteUpper(const boost::numeric::ublas::matrix_expression& U, + const boost::numeric::ublas::vector_expression& b, bool unit=false); /** * backSubstitute x'*U=b' @@ -305,9 +305,9 @@ Vector backSubstituteUpper(const boost::numeric::ublas::matrix_expression -Vector backSubstituteUpper(const boost::numeric::ublas::vector_expression& b, - const boost::numeric::ublas::matrix_expression& U, bool unit=false); +template +Vector backSubstituteUpper(const boost::numeric::ublas::vector_expression& b, + const boost::numeric::ublas::matrix_expression& U, bool unit=false); /** * backSubstitute L*x=b