|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80269 - trunk/boost/numeric/ublas/operation
From: guwi17_at_[hidden]
Date: 2012-08-27 19:29:32
Author: guwi17
Date: 2012-08-27 19:29:31 EDT (Mon, 27 Aug 2012)
New Revision: 80269
URL: http://svn.boost.org/trac/boost/changeset/80269
Log:
boost/numeric/ublas/operation: num_rows.hpp, num_columns.hpp - use matrix_traits, see #7297
Text files modified:
trunk/boost/numeric/ublas/operation/num_columns.hpp | 6 ++++--
trunk/boost/numeric/ublas/operation/num_rows.hpp | 8 +++++---
2 files changed, 9 insertions(+), 5 deletions(-)
Modified: trunk/boost/numeric/ublas/operation/num_columns.hpp
==============================================================================
--- trunk/boost/numeric/ublas/operation/num_columns.hpp (original)
+++ trunk/boost/numeric/ublas/operation/num_columns.hpp 2012-08-27 19:29:31 EDT (Mon, 27 Aug 2012)
@@ -20,6 +20,8 @@
#include <boost/numeric/ublas/detail/config.hpp>
+#include <boost/numeric/ublas/expression_types.hpp>
+#include <boost/numeric/ublas/traits.hpp>
namespace boost { namespace numeric { namespace ublas {
@@ -32,9 +34,9 @@
*/
template <typename MatrixExprT>
BOOST_UBLAS_INLINE
- typename MatrixExprT::size_type num_columns(MatrixExprT const& m)
+ typename matrix_traits<MatrixExprT>::size_type num_columns(matrix_expression<MatrixExprT> const& me)
{
- return m.size2();
+ return me().size2();
}
}}} // Namespace boost::numeric::ublas
Modified: trunk/boost/numeric/ublas/operation/num_rows.hpp
==============================================================================
--- trunk/boost/numeric/ublas/operation/num_rows.hpp (original)
+++ trunk/boost/numeric/ublas/operation/num_rows.hpp 2012-08-27 19:29:31 EDT (Mon, 27 Aug 2012)
@@ -5,7 +5,7 @@
*
* \brief The \c num_rows operation.
*
- * Copyright (c) 2009, Marco Guazzone
+ * Copyright (c) 2009-2012, Marco Guazzone
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
@@ -19,6 +19,8 @@
#include <boost/numeric/ublas/detail/config.hpp>
+#include <boost/numeric/ublas/expression_types.hpp>
+#include <boost/numeric/ublas/traits.hpp>
namespace boost { namespace numeric { namespace ublas {
@@ -31,9 +33,9 @@
*/
template <typename MatrixExprT>
BOOST_UBLAS_INLINE
- typename MatrixExprT::size_type num_rows(MatrixExprT const& m)
+ typename matrix_traits<MatrixExprT>::size_type num_rows(matrix_expression<MatrixExprT> const& me)
{
- return m.size1();
+ return me().size1();
}
}}} // Namespace boost::numeric::ublas
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk