Chris@16: /** Chris@16: * -*- c++ -*- Chris@16: * Chris@16: * \file num_rows.hpp Chris@16: * Chris@16: * \brief The \c num_rows operation. Chris@16: * Chris@16: * Copyright (c) 2009-2012, Marco Guazzone Chris@16: * Chris@16: * Distributed under the Boost Software License, Version 1.0. (See Chris@16: * accompanying file LICENSE_1_0.txt or copy at Chris@16: * http://www.boost.org/LICENSE_1_0.txt) Chris@16: * Chris@16: * \author Marco Guazzone, marco.guazzone@gmail.com Chris@16: */ Chris@16: Chris@16: #ifndef BOOST_NUMERIC_UBLAS_OPERATION_NUM_ROWS_HPP Chris@16: #define BOOST_NUMERIC_UBLAS_OPERATION_NUM_ROWS_HPP Chris@16: Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: Chris@16: namespace boost { namespace numeric { namespace ublas { Chris@16: Chris@16: /** Chris@16: * \brief Return the number of rows. Chris@16: * \tparam MatrixExprT A type which models the matrix expression concept. Chris@16: * \param m A matrix expression. Chris@16: * \return The number of rows. Chris@16: */ Chris@16: template Chris@16: BOOST_UBLAS_INLINE Chris@16: typename matrix_traits::size_type num_rows(matrix_expression const& me) Chris@16: { Chris@16: return me().size1(); Chris@16: } Chris@16: Chris@16: }}} // Namespace boost::numeric::ublas Chris@16: Chris@16: Chris@16: #endif // BOOST_NUMERIC_UBLAS_OPERATION_NUM_ROWS_HPP