|
||||
File indexing completed on 2025-01-18 09:43:01
0001 /** 0002 * -*- c++ -*- 0003 * 0004 * \file num_columns.hpp 0005 * 0006 * \brief The \c num_columns operation. 0007 * 0008 * Copyright (c) 2009, Marco Guazzone 0009 * 0010 * Distributed under the Boost Software License, Version 1.0. (See 0011 * accompanying file LICENSE_1_0.txt or copy at 0012 * http://www.boost.org/LICENSE_1_0.txt) 0013 * 0014 * \author Marco Guazzone, marco.guazzone@gmail.com 0015 */ 0016 0017 0018 #ifndef BOOST_NUMERIC_UBLAS_OPERATION_NUM_COLUMNS_HPP 0019 #define BOOST_NUMERIC_UBLAS_OPERATION_NUM_COLUMNS_HPP 0020 0021 0022 #include <boost/numeric/ublas/detail/config.hpp> 0023 #include <boost/numeric/ublas/expression_types.hpp> 0024 #include <boost/numeric/ublas/traits.hpp> 0025 0026 0027 namespace boost { namespace numeric { namespace ublas { 0028 0029 /** 0030 * \brief Return the number of columns. 0031 * \tparam MatrixExprT A type which models the matrix expression concept. 0032 * \param m A matrix expression. 0033 * \return The number of columns. 0034 */ 0035 template <typename MatrixExprT> 0036 BOOST_UBLAS_INLINE 0037 typename matrix_traits<MatrixExprT>::size_type num_columns(matrix_expression<MatrixExprT> const& me) 0038 { 0039 return me().size2(); 0040 } 0041 0042 }}} // Namespace boost::numeric::ublas 0043 0044 0045 #endif // BOOST_NUMERIC_UBLAS_OPERATION_NUM_COLUMNS_HPP
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |