--- boost-dev.orig/boost/numeric/ublas/operation/size.hpp 2010-07-02 16:01:55.000000000 +0200 +++ boost-dev.new/boost/numeric/ublas/operation/size.hpp 2010-07-02 16:14:48.000000000 +0200 @@ -5,7 +5,7 @@ * * \brief The \c size operation. * - * Copyright (c) 2009, Marco Guazzone + * Copyright (c) 2009-2010, Marco Guazzone * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at @@ -22,251 +22,316 @@ #include #include #include +#include #include namespace boost { namespace numeric { namespace ublas { + //@{ Declarations + + /** + * \brief Return the number of columns. + * \tparam VectorExprT A type which models the matrix expression concept. + * \param m A matrix expression. + * \return The number of columns. + */ + template + typename vector_traits::size_type size(vector_expression const& ve); + + /** + * \brief Return the size of the given dimension for the given expression. + * \tparam Dim The dimension number (starting from 1). + * \tparam VectorExprT An expression type. + * \param e An expression. + * \return The number of columns. + * \return The size associated to the dimension \a Dim. + */ + template + typename vector_traits::size_type size(vector_expression const& ve); + + /** + * \brief Return the size of the given dimension for the given expression. + * \tparam Dim The dimension number (starting from 1). + * \tparam MatrixExprT An expression type. + * \param e An expression. + * \return The number of columns. + * \return The size associated to the dimension \a Dim. + */ + template + typename matrix_traits::size_type size(matrix_expression const& me); + + /** + * \brief Return the size of the given dimension tag for the given expression. + * \tparam TagT The dimension tag type (e.g., tag::major). + * \tparam MatrixExprT An expression type. + * \param e An expression. + * \return The size associated to the dimension tag \a TagT. + */ + template + typename matrix_traits::size_type size_by_tag(matrix_expression const& me); + //typename matrix_traits::size_type size(matrix_expression const& me); //FIXME: don't work + + //@} Declarations + + + //@{ Definitions + namespace detail { + /** + * \brief Auxiliary class for computing the size of the given dimension for + * a container of the given category. + * \tparam Dim The dimension number (starting from 1). + * \tparam CategoryT The category type (e.g., vector_tag). + */ + template + struct size_by_dim_impl; + + + /** + * \brief Auxiliary class for computing the size of the given dimension for + * a container of the given category and with the given orientation. + * \tparam Dim The dimension number (starting from 1). + * \tparam CategoryT The category type (e.g., vector_tag). + * \tparam OrientationT The orientation category type (e.g., row_major_tag). + */ + template + struct size_by_tag_impl; + + + /// \brief Specialization of \c size_by_dim_impl for computing the size of a + /// vector + template <> + struct size_by_dim_impl<1, vector_tag> + { /** - * \brief Auxiliary class for computing the size of the given dimension for - * a container of the given category.. - * \tparam Dim The dimension number (starting from 1). - * \tparam CategoryT The category type (e.g., vector_tag). + * \brief Compute the size of the given vector. + * \tparam ExprT A vector expression type. + * \pre ExprT must be a model of VectorExpression. */ - template - struct size_by_dim_impl; + template + BOOST_UBLAS_INLINE + static typename vector_traits::size_type apply(vector_expression const& ve) + { + return ve().size(); + } + }; - /// \brief Specialization of \c size_by_dim_impl for computing the size of a - /// vector - template <> - struct size_by_dim_impl<1, vector_tag> - { - /** - * \brief Compute the size of the given vector. - * \tparam ExprT A vector expression type. - * \pre ExprT must be a model of VectorExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size(); - } - }; - - - /// \brief Specialization of \c size_by_dim_impl for computing the number of - /// rows of a matrix - template <> - struct size_by_dim_impl<1, matrix_tag> - { - /** - * \brief Compute the number of rows of the given matrix. - * \tparam ExprT A matrix expression type. - * \pre ExprT must be a model of MatrixExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size1(); - } - }; - - - /// \brief Specialization of \c size_by_dim_impl for computing the number of - /// columns of a matrix - template <> - struct size_by_dim_impl<2, matrix_tag> + /// \brief Specialization of \c size_by_dim_impl for computing the number of + /// rows of a matrix + template <> + struct size_by_dim_impl<1, matrix_tag> + { + /** + * \brief Compute the number of rows of the given matrix. + * \tparam ExprT A matrix expression type. + * \pre ExprT must be a model of MatrixExpression. + */ + template + BOOST_UBLAS_INLINE + static typename matrix_traits::size_type apply(matrix_expression const& me) { - /** - * \brief Compute the number of columns of the given matrix. - * \tparam ExprT A matrix expression type. - * \pre ExprT must be a model of MatrixExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size2(); - } - }; + return me().size1(); + } + }; + /// \brief Specialization of \c size_by_dim_impl for computing the number of + /// columns of a matrix + template <> + struct size_by_dim_impl<2, matrix_tag> + { /** - * \brief Auxiliary class for computing the size of the given dimension for - * a container of the given category and with the given orientation.. - * \tparam Dim The dimension number (starting from 1). - * \tparam CategoryT The category type (e.g., vector_tag). - * \tparam OrientationT The orientation category type (e.g., row_major_tag). + * \brief Compute the number of columns of the given matrix. + * \tparam ExprT A matrix expression type. + * \pre ExprT must be a model of MatrixExpression. */ - template - struct size_by_tag_impl; + template + BOOST_UBLAS_INLINE + static typename matrix_traits::size_type apply(matrix_expression const& me) + { + return me().size2(); + } + }; - /// \brief Specialization of \c size_by_tag_impl for computing the size of the - /// major dimension of a row-major oriented matrix. - template <> - struct size_by_tag_impl + /// \brief Specialization of \c size_by_tag_impl for computing the size of the + /// major dimension of a row-major oriented matrix. + template <> + struct size_by_tag_impl + { + /** + * \brief Compute the number of rows of the given matrix. + * \tparam ExprT A matrix expression type. + * \pre ExprT must be a model of MatrixExpression. + */ + template + BOOST_UBLAS_INLINE + static typename matrix_traits::size_type apply(matrix_expression const& me) { - /** - * \brief Compute the number of rows of the given matrix. - * \tparam ExprT A matrix expression type. - * \pre ExprT must be a model of MatrixExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size1(); - } - }; - - - /// \brief Specialization of \c size_by_tag_impl for computing the size of the - /// minor dimension of a row-major oriented matrix. - template <> - struct size_by_tag_impl + return me().size1(); + } + }; + + + /// \brief Specialization of \c size_by_tag_impl for computing the size of the + /// minor dimension of a row-major oriented matrix. + template <> + struct size_by_tag_impl + { + /** + * \brief Compute the number of columns of the given matrix. + * \tparam ExprT A matrix expression type. + * \pre ExprT must be a model of MatrixExpression. + */ + template + BOOST_UBLAS_INLINE + static typename matrix_traits::size_type apply(matrix_expression const& me) { - /** - * \brief Compute the number of columns of the given matrix. - * \tparam ExprT A matrix expression type. - * \pre ExprT must be a model of MatrixExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size2(); - } - }; - - - /// \brief Specialization of \c size_by_tag_impl for computing the size of the - /// leading dimension of a row-major oriented matrix. - template <> - struct size_by_tag_impl + return me().size2(); + } + }; + + + /// \brief Specialization of \c size_by_tag_impl for computing the size of the + /// leading dimension of a row-major oriented matrix. + template <> + struct size_by_tag_impl + { + /** + * \brief Compute the number of columns of the given matrix. + * \tparam ExprT A matrix expression type. + * \pre ExprT must be a model of MatrixExpression. + */ + template + BOOST_UBLAS_INLINE + static typename matrix_traits::size_type apply(matrix_expression const& me) { - /** - * \brief Compute the number of columns of the given matrix. - * \tparam ExprT A matrix expression type. - * \pre ExprT must be a model of MatrixExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size2(); - } - }; - - - /// \brief Specialization of \c size_by_tag_impl for computing the size of the - /// major dimension of a column-major oriented matrix. - template <> - struct size_by_tag_impl + return me().size2(); + } + }; + + + /// \brief Specialization of \c size_by_tag_impl for computing the size of the + /// major dimension of a column-major oriented matrix. + template <> + struct size_by_tag_impl + { + /** + * \brief Compute the number of columns of the given matrix. + * \tparam ExprT A matrix expression type. + * \pre ExprT must be a model of MatrixExpression. + */ + template + BOOST_UBLAS_INLINE + static typename matrix_traits::size_type apply(matrix_expression const& me) { - /** - * \brief Compute the number of columns of the given matrix. - * \tparam ExprT A matrix expression type. - * \pre ExprT must be a model of MatrixExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size2(); - } - }; - - - /// \brief Specialization of \c size_by_tag_impl for computing the size of the - /// minor dimension of a column-major oriented matrix. - template <> - struct size_by_tag_impl + return me().size2(); + } + }; + + + /// \brief Specialization of \c size_by_tag_impl for computing the size of the + /// minor dimension of a column-major oriented matrix. + template <> + struct size_by_tag_impl + { + /** + * \brief Compute the number of rows of the given matrix. + * \tparam ExprT A matrix expression type. + * \pre ExprT must be a model of MatrixExpression. + */ + template + BOOST_UBLAS_INLINE + static typename matrix_traits::size_type apply(matrix_expression const& me) { - /** - * \brief Compute the number of rows of the given matrix. - * \tparam ExprT A matrix expression type. - * \pre ExprT must be a model of MatrixExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size1(); - } - }; - - - /// \brief Specialization of \c size_by_tag_impl for computing the size of the - /// leading dimension of a column-major oriented matrix. - template <> - struct size_by_tag_impl + return me().size1(); + } + }; + + + /// \brief Specialization of \c size_by_tag_impl for computing the size of the + /// leading dimension of a column-major oriented matrix. + template <> + struct size_by_tag_impl + { + /** + * \brief Compute the number of rows of the given matrix. + * \tparam ExprT A matrix expression type. + * \pre ExprT must be a model of MatrixExpression. + */ + template + BOOST_UBLAS_INLINE + static typename matrix_traits::size_type apply(matrix_expression const& me) { - /** - * \brief Compute the number of rows of the given matrix. - * \tparam ExprT A matrix expression type. - * \pre ExprT must be a model of MatrixExpression. - */ - template - BOOST_UBLAS_INLINE - static typename ExprT::size_type apply(ExprT const& e) - { - return e.size1(); - } - }; + return me().size1(); + } + }; + + + /// \brief Specialization of \c size_by_tag_impl for computing the size of the + /// given dimension of a unknown oriented expression. + template + struct size_by_tag_impl: size_by_tag_impl + { + // Empty + }; } // Namespace detail - /** - * \brief Return the number of columns. - * \tparam MatrixExprT A type which models the matrix expression concept. - * \param m A matrix expression. - * \return The number of columns. - */ template BOOST_UBLAS_INLINE - typename VectorExprT::size_type size(VectorExprT const& v) + typename vector_traits::size_type size(vector_expression const& ve) { - return v.size(); + return ve().size(); } - /** - * \brief Return the size of the given dimension for the given expression. - * \tparam Dim The dimension number (starting from 1). - * \tparam ExprT An expression type. - * \param e An expression. - * \return The number of columns. - * \return The size associated to the dimension \a Dim. - */ - template + template BOOST_UBLAS_INLINE - typename ExprT::size_type size(ExprT const& e) + typename vector_traits::size_type size(vector_expression const& ve) { - return detail::size_by_dim_impl::apply(e); + return detail::size_by_dim_impl::template apply(ve); } - /** - * \brief Return the size of the given dimension tag for the given expression. - * \tparam TagT The dimension tag type (e.g., tag::major). - * \tparam ExprT An expression type. - * \param e An expression. - * \return The size associated to the dimension tag \a TagT. - */ - template + template BOOST_UBLAS_INLINE - typename ExprT::size_type size(ExprT const& e) + typename matrix_traits::size_type size(matrix_expression const& me) { - return detail::size_by_tag_impl::apply(e); + return detail::size_by_dim_impl::template apply(me); } + + //[FIXME]: don't work + ///** + // * \brief Return the size of the given dimension tag for the given expression. + // * \tparam TagT The dimension tag type (e.g., tag::major). + // * \tparam MatrixExprT An expression type. + // * \param e An expression. + // * \return The size associated to the dimension tag \a TagT. + // */ + //template + //BOOST_UBLAS_INLINE + //typename matrix_traits::size_type size(matrix_expression const& me, TagT tag=TagT()) + //{ + // return detail::size_by_tag_impl::orientation_category>::template apply(me); + //} + //[/FIXME] + + + template + BOOST_UBLAS_INLINE + typename matrix_traits::size_type size_by_tag(matrix_expression const& me) + { + return detail::size_by_tag_impl::orientation_category>::template apply(me); + } + + //@} Definitions + }}} // Namespace boost::numeric::ublas --- boost-dev.orig/libs/numeric/ublas/test/size.cpp 2010-07-02 16:18:07.000000000 +0200 +++ boost-dev.new/libs/numeric/ublas/test/size.cpp 2010-07-02 16:22:37.000000000 +0200 @@ -1,4 +1,16 @@ -/** -*- c++ -*- \file size.hpp \brief Test the \c size operation. */ +/** + * \file size.cpp + * + * \brief Test the \c size operation. + * + * Copyright (c) 2010, Marco Guazzone + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompwhiching file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * \author Marco Guazzone, marco.guazzone@gmail.com + */ #include #include @@ -127,16 +139,22 @@ BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size<2>(A) == A.size2()) ); // size(A) - BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size1() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size1()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size1() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size1()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size_by_tag(A)) << " ==> " << A.size1() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(A) == A.size1()) ); // size(A) - BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size2() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size2()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size2() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size2()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size_by_tag(A)) << " ==> " << A.size2() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(A) == A.size2()) ); // size(A) - BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size2() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size2()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size2() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size2()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size_by_tag(A)) << " ==> " << A.size2() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(A) == A.size2()) ); } @@ -165,16 +183,22 @@ BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size<2>(A) == A.size2()) ); // size(A) - BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size2() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size2()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size2() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size2()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size_by_tag(A)) << " ==> " << A.size2() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(A) == A.size2()) ); // size(A) - BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size1() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size1()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size1() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size1()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size_by_tag(A)) << " ==> " << A.size1() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(A) == A.size1()) ); // size(A) - BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size1() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size1()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size(A)) << " ==> " << A.size1() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(A) == A.size1()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A) = " << (boost::numeric::ublas::size_by_tag(A)) << " ==> " << A.size1() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(A) == A.size1()) ); } @@ -203,16 +227,22 @@ BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size<2>(boost::numeric::ublas::trans(A)) == A.size1()) ); // size(A') [A is row-major => A' column-major, and viceversa] - BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size(boost::numeric::ublas::trans(A))) << " ==> " << A.size1() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(boost::numeric::ublas::trans(A)) == A.size1()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size(boost::numeric::ublas::trans(A))) << " ==> " << A.size1() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(boost::numeric::ublas::trans(A)) == A.size1()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size_by_tag(boost::numeric::ublas::trans(A))) << " ==> " << A.size1() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(boost::numeric::ublas::trans(A)) == A.size1()) ); // size(A') [A is row-major => A' column-major, and viceversa] - BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size(boost::numeric::ublas::trans(A))) << " ==> " << A.size2() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(boost::numeric::ublas::trans(A)) == A.size2()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size(boost::numeric::ublas::trans(A))) << " ==> " << A.size2() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(boost::numeric::ublas::trans(A)) == A.size2()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size_by_tag(boost::numeric::ublas::trans(A))) << " ==> " << A.size2() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(boost::numeric::ublas::trans(A)) == A.size2()) ); // size(A') [A row-major => A' column-major, and viceversa] - BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size(boost::numeric::ublas::trans(A))) << " ==> " << A.size2() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(boost::numeric::ublas::trans(A)) == A.size2()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size(boost::numeric::ublas::trans(A))) << " ==> " << A.size2() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(boost::numeric::ublas::trans(A)) == A.size2()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(A') = " << (boost::numeric::ublas::size_by_tag(boost::numeric::ublas::trans(A))) << " ==> " << A.size2() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(boost::numeric::ublas::trans(A)) == A.size2()) ); } @@ -242,16 +272,22 @@ BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size<2>(matrix_reference_type(A)) == matrix_reference_type(A).size2()) ); // size(reference(A)) - BOOST_UBLAS_DEBUG_TRACE( "size(reference(A) = " << (boost::numeric::ublas::size(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size1() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(matrix_reference_type(A)) == matrix_reference_type(A).size1()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(reference(A) = " << (boost::numeric::ublas::size(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size1() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(matrix_reference_type(A)) == matrix_reference_type(A).size1()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(reference(A) = " << (boost::numeric::ublas::size_by_tag(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size1() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(matrix_reference_type(A)) == matrix_reference_type(A).size1()) ); // size(reference(A)) - BOOST_UBLAS_DEBUG_TRACE( "size(reference(A)) = " << (boost::numeric::ublas::size(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size2() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(matrix_reference_type(A)) == matrix_reference_type(A).size2()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(reference(A)) = " << (boost::numeric::ublas::size(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size2() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(matrix_reference_type(A)) == matrix_reference_type(A).size2()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(reference(A)) = " << (boost::numeric::ublas::size_by_tag(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size2() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(matrix_reference_type(A)) == matrix_reference_type(A).size2()) ); // size(reference(A)) - BOOST_UBLAS_DEBUG_TRACE( "size(reference(A)) = " << (boost::numeric::ublas::size(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size2() ); - BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(matrix_reference_type(A)) == matrix_reference_type(A).size2()) ); + //BOOST_UBLAS_DEBUG_TRACE( "size(reference(A)) = " << (boost::numeric::ublas::size(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size2() ); + //BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size(matrix_reference_type(A)) == matrix_reference_type(A).size2()) ); + BOOST_UBLAS_DEBUG_TRACE( "size(reference(A)) = " << (boost::numeric::ublas::size_by_tag(matrix_reference_type(A))) << " ==> " << matrix_reference_type(A).size2() ); + BOOST_UBLAS_TEST_CHECK( (boost::numeric::ublas::size_by_tag(matrix_reference_type(A)) == matrix_reference_type(A).size2()) ); }