From 8f02e174b436aa049bec94fce7d90cd5233c7580 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 18 Jul 2004 09:52:24 +0000 Subject: [PATCH] tab to space --- Jamfile | 2 +- include/boost/numeric/ublas/blas.hpp | 192 +++++++++--------- include/boost/numeric/ublas/documentation.hpp | 12 +- include/boost/numeric/ublas/exception.hpp | 2 +- include/boost/numeric/ublas/functional.hpp | 4 +- include/boost/numeric/ublas/iterator.hpp | 4 +- include/boost/numeric/ublas/matrix.hpp | 2 +- include/boost/numeric/ublas/matrix_assign.hpp | 8 +- include/boost/numeric/ublas/operation.hpp | 152 +++++++------- include/boost/numeric/ublas/traits.hpp | 12 +- 10 files changed, 195 insertions(+), 195 deletions(-) diff --git a/Jamfile b/Jamfile index 18585ab2..33c16f56 100644 --- a/Jamfile +++ b/Jamfile @@ -99,7 +99,7 @@ test-suite uBLAS : # args : # input files : # requirements - BOOST_UBLAS_USE_INTERVAL + BOOST_UBLAS_USE_INTERVAL # borland warns so often that successful compilation is prevented. <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" diff --git a/include/boost/numeric/ublas/blas.hpp b/include/boost/numeric/ublas/blas.hpp index 67423263..57ecb60b 100644 --- a/include/boost/numeric/ublas/blas.hpp +++ b/include/boost/numeric/ublas/blas.hpp @@ -21,83 +21,83 @@ namespace boost { namespace numeric { namespace ublas { namespace blas_1 { - /** \namespace boost::numeric::ublas::blas_1 - \brief wrapper functions for level 1 blas - */ + /** \namespace boost::numeric::ublas::blas_1 + \brief wrapper functions for level 1 blas + */ - /** \brief 1-Norm: \f$\sum_i |x_i|\f$ - \ingroup blas1 - */ + /** \brief 1-Norm: \f$\sum_i |x_i|\f$ + \ingroup blas1 + */ template typename type_traits::real_type asum (const V &v) { return norm_1 (v); } - /** \brief 2-Norm: \f$\sum_i |x_i|^2\f$ - \ingroup blas1 - */ + /** \brief 2-Norm: \f$\sum_i |x_i|^2\f$ + \ingroup blas1 + */ template typename type_traits::real_type nrm2 (const V &v) { return norm_2 (v); } - /** \brief element with larges absolute value: \f$\max_i |x_i|\f$ - \ingroup blas1 - */ + /** \brief element with larges absolute value: \f$\max_i |x_i|\f$ + \ingroup blas1 + */ template typename type_traits::real_type amax (const V &v) { return norm_inf (v); } - /** \brief inner product of vectors \a v1 and \a v2 - \ingroup blas1 - */ + /** \brief inner product of vectors \a v1 and \a v2 + \ingroup blas1 + */ template typename promote_traits::promote_type dot (const V1 &v1, const V2 &v2) { return inner_prod (v1, v2); } - /** \brief copy vector \a v2 to \a v1 - \ingroup blas1 - */ + /** \brief copy vector \a v2 to \a v1 + \ingroup blas1 + */ template V1 & copy (V1 &v1, const V2 &v2) { return v1.assign (v2); } - /** \brief swap vectors \a v1 and \a v2 - \ingroup blas1 - */ + /** \brief swap vectors \a v1 and \a v2 + \ingroup blas1 + */ template void swap (V1 &v1, V2 &v2) { v1.swap (v2); } - /** \brief scale vector \a v with scalar \a t - \ingroup blas1 - */ + /** \brief scale vector \a v with scalar \a t + \ingroup blas1 + */ template V & scal (V &v, const T &t) { return v *= t; } - /** \brief compute \a v1 = \a v1 + \a t * \a v2 - \ingroup blas1 - */ + /** \brief compute \a v1 = \a v1 + \a t * \a v2 + \ingroup blas1 + */ template V1 & axpy (V1 &v1, const T &t, const V2 &v2) { return v1.plus_assign (t * v2); } - /** \brief apply plane rotation - \ingroup blas1 - */ + /** \brief apply plane rotation + \ingroup blas1 + */ template void rot (const T1 &t1, V1 &v1, const T2 &t2, V2 &v2) { @@ -111,41 +111,41 @@ namespace boost { namespace numeric { namespace ublas { namespace blas_2 { - /** \namespace boost::numeric::ublas::blas_2 - \brief wrapper functions for level 2 blas - */ + /** \namespace boost::numeric::ublas::blas_2 + \brief wrapper functions for level 2 blas + */ - /** \brief multiply vector \a v with triangular matrix \a m - \ingroup blas2 - \todo: check that matrix is really triangular - */ + /** \brief multiply vector \a v with triangular matrix \a m + \ingroup blas2 + \todo: check that matrix is really triangular + */ template V & tmv (V &v, const M &m) { return v = prod (m, v); } - /** \brief solve \a m \a x = \a v in place, \a m is triangular matrix - \ingroup blas2 - */ + /** \brief solve \a m \a x = \a v in place, \a m is triangular matrix + \ingroup blas2 + */ template V & tsv (V &v, const M &m, C) { return v = solve (m, v, C ()); } - /** \brief compute \a v1 = \a t1 * \a v1 + \a t2 * (\a m * \a v2) - \ingroup blas2 - */ + /** \brief compute \a v1 = \a t1 * \a v1 + \a t2 * (\a m * \a v2) + \ingroup blas2 + */ template V1 & gmv (V1 &v1, const T1 &t1, const T2 &t2, const M &m, const V2 &v2) { return v1 = t1 * v1 + t2 * prod (m, v2); } - /** \brief rank 1 update: \a m = \a m + \a t * (\a v1 * \a v2T) - \ingroup blas2 - */ + /** \brief rank 1 update: \a m = \a m + \a t * (\a v1 * \a v2T) + \ingroup blas2 + */ template M & gr (M &m, const T &t, const V1 &v1, const V2 &v2) { @@ -156,9 +156,9 @@ namespace boost { namespace numeric { namespace ublas { #endif } - /** \brief symmetric rank 1 update: \a m = \a m + \a t * (\a v * \a vT) - \ingroup blas2 - */ + /** \brief symmetric rank 1 update: \a m = \a m + \a t * (\a v * \a vT) + \ingroup blas2 + */ template M & sr (M &m, const T &t, const V &v) { @@ -168,9 +168,9 @@ namespace boost { namespace numeric { namespace ublas { return m = m + t * outer_prod (v, v); #endif } - /** \brief hermitian rank 1 update: \a m = \a m + \a t * (\a v * \a vH) - \ingroup blas2 - */ + /** \brief hermitian rank 1 update: \a m = \a m + \a t * (\a v * \a vH) + \ingroup blas2 + */ template M & hr (M &m, const T &t, const V &v) { @@ -181,10 +181,10 @@ namespace boost { namespace numeric { namespace ublas { #endif } - /** \brief symmetric rank 2 update: \a m = \a m + \a t * - (\a v1 * \a v2T + \a v2 * \a v1T) - \ingroup blas2 - */ + /** \brief symmetric rank 2 update: \a m = \a m + \a t * + (\a v1 * \a v2T + \a v2 * \a v1T) + \ingroup blas2 + */ template M & sr2 (M &m, const T &t, const V1 &v1, const V2 &v2) { @@ -194,11 +194,11 @@ namespace boost { namespace numeric { namespace ublas { return m = m + t * (outer_prod (v1, v2) + outer_prod (v2, v1)); #endif } - /** \brief hermitian rank 2 update: \a m = \a m + - \a t * (\a v1 * \a v2H) - + \a v2 * (\a t * \a v1)H) - \ingroup blas2 - */ + /** \brief hermitian rank 2 update: \a m = \a m + + \a t * (\a v1 * \a v2H) + + \a v2 * (\a t * \a v1)H) + \ingroup blas2 + */ template M & hr2 (M &m, const T &t, const V1 &v1, const V2 &v2) { @@ -213,76 +213,76 @@ namespace boost { namespace numeric { namespace ublas { namespace blas_3 { - /** \namespace boost::numeric::ublas::blas_3 - \brief wrapper functions for level 3 blas - */ + /** \namespace boost::numeric::ublas::blas_3 + \brief wrapper functions for level 3 blas + */ - /** \brief triangular matrix multiplication - \ingroup blas3 - */ + /** \brief triangular matrix multiplication + \ingroup blas3 + */ template M1 & tmm (M1 &m1, const T &t, const M2 &m2, const M3 &m3) { return m1 = t * prod (m2, m3); } - /** \brief triangular solve \a m2 * \a x = \a t * \a m1 in place, - \a m2 is a triangular matrix - \ingroup blas3 - */ + /** \brief triangular solve \a m2 * \a x = \a t * \a m1 in place, + \a m2 is a triangular matrix + \ingroup blas3 + */ template M1 & tsm (M1 &m1, const T &t, const M2 &m2, C) { return m1 = solve (m2, t * m1, C ()); } - /** \brief general matrix multiplication - \ingroup blas3 - */ + /** \brief general matrix multiplication + \ingroup blas3 + */ template M1 & gmm (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3) { return m1 = t1 * m1 + t2 * prod (m2, m3); } - /** \brief symmetric rank k update: \a m1 = \a t * \a m1 + - \a t2 * (\a m2 * \a m2T) - \ingroup blas3 - \todo use opb_prod() - */ + /** \brief symmetric rank k update: \a m1 = \a t * \a m1 + + \a t2 * (\a m2 * \a m2T) + \ingroup blas3 + \todo use opb_prod() + */ template M1 & srk (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2) { return m1 = t1 * m1 + t2 * prod (m2, trans (m2)); } - /** \brief hermitian rank k update: \a m1 = \a t * \a m1 + - \a t2 * (\a m2 * \a m2H) - \ingroup blas3 - \todo use opb_prod() - */ + /** \brief hermitian rank k update: \a m1 = \a t * \a m1 + + \a t2 * (\a m2 * \a m2H) + \ingroup blas3 + \todo use opb_prod() + */ template M1 & hrk (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2) { return m1 = t1 * m1 + t2 * prod (m2, herm (m2)); } - /** \brief generalized symmetric rank k update: - \a m1 = \a t1 * \a m1 + \a t2 * (\a m2 * \a m3T) - + \a t2 * (\a m3 * \a m2T) - \ingroup blas3 - \todo use opb_prod() - */ + /** \brief generalized symmetric rank k update: + \a m1 = \a t1 * \a m1 + \a t2 * (\a m2 * \a m3T) + + \a t2 * (\a m3 * \a m2T) + \ingroup blas3 + \todo use opb_prod() + */ template M1 & sr2k (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3) { return m1 = t1 * m1 + t2 * (prod (m2, trans (m3)) + prod (m3, trans (m2))); } - /** \brief generalized hermitian rank k update: - \a m1 = \a t1 * \a m1 + \a t2 * (\a m2 * \a m3H) - + (\a m3 * (\a t2 * \a m2)H) - \ingroup blas3 - \todo use opb_prod() - */ + /** \brief generalized hermitian rank k update: + \a m1 = \a t1 * \a m1 + \a t2 * (\a m2 * \a m3H) + + (\a m3 * (\a t2 * \a m2)H) + \ingroup blas3 + \todo use opb_prod() + */ template M1 & hr2k (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3) { diff --git a/include/boost/numeric/ublas/documentation.hpp b/include/boost/numeric/ublas/documentation.hpp index df2905d0..6c91e328 100644 --- a/include/boost/numeric/ublas/documentation.hpp +++ b/include/boost/numeric/ublas/documentation.hpp @@ -18,20 +18,20 @@ // global to all files /** \namespace boost::numeric::ublas - \brief contains all important classes and functions of uBLAS + \brief contains all important classes and functions of uBLAS - all ublas definitions ... - \todo expand this section + all ublas definitions ... + \todo expand this section */ /** \defgroup blas1 Level 1 BLAS - \brief level 1 basic linear algebra subroutines + \brief level 1 basic linear algebra subroutines */ /** \defgroup blas2 Level 2 BLAS - \brief level 2 basic linear algebra subroutines + \brief level 2 basic linear algebra subroutines */ /** \defgroup blas3 Level 3 BLAS - \brief level 3 basic linear algebra subroutines + \brief level 3 basic linear algebra subroutines */ diff --git a/include/boost/numeric/ublas/exception.hpp b/include/boost/numeric/ublas/exception.hpp index 95663641..a4a7a2a5 100644 --- a/include/boost/numeric/ublas/exception.hpp +++ b/include/boost/numeric/ublas/exception.hpp @@ -223,7 +223,7 @@ namespace boost { namespace numeric { namespace ublas { } #else { - explicit + explicit non_real (const char *s = 0) {} virtual void raise () { diff --git a/include/boost/numeric/ublas/functional.hpp b/include/boost/numeric/ublas/functional.hpp index b13c8154..b8727e80 100644 --- a/include/boost/numeric/ublas/functional.hpp +++ b/include/boost/numeric/ublas/functional.hpp @@ -1408,7 +1408,7 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE size_type storage_size (size_type size1, size_type size2) { - return size1 * size2; + return size1 * size2; } // Indexing @@ -1574,7 +1574,7 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE size_type storage_size (size_type size1, size_type size2) { - return size1 * size2; + return size1 * size2; } // Indexing diff --git a/include/boost/numeric/ublas/iterator.hpp b/include/boost/numeric/ublas/iterator.hpp index a0892d1a..153b778c 100644 --- a/include/boost/numeric/ublas/iterator.hpp +++ b/include/boost/numeric/ublas/iterator.hpp @@ -48,9 +48,9 @@ namespace boost { namespace numeric { namespace ublas { #endif /** \brief Base class of all proxy classes that contain - a reference to an immutable object. + a reference to an immutable object. - \param C the type of the container referred to + \param C the type of the container referred to */ template class container_const_reference { diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 51c3e74c..0cb21020 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -3379,7 +3379,7 @@ namespace boost { namespace numeric { namespace ublas { const size_type size2_min = (std::min) (size2, size2_); for (size_type i = 0; i != size1_min; ++i) { // indexing copy over major for (size_type j = 0; j != size1_min; ++j) { - temporary.data_[i][j] = data_[i][j]; + temporary.data_[i][j] = data_[i][j]; } } assign_temporary (temporary); diff --git a/include/boost/numeric/ublas/matrix_assign.hpp b/include/boost/numeric/ublas/matrix_assign.hpp index c2a21be8..7dcc932a 100644 --- a/include/boost/numeric/ublas/matrix_assign.hpp +++ b/include/boost/numeric/ublas/matrix_assign.hpp @@ -934,8 +934,8 @@ namespace boost { namespace numeric { namespace ublas { template // This function seems to be big. So we do not let the compiler inline it. // BOOST_UBLAS_INLINE - void matrix_assign (scalar_assign, full, M &m, const matrix_expression &e, sparse_tag, row_major_tag) { - BOOST_UBLAS_CHECK (m.size1 () == e ().size1 (), bad_size ()); + void matrix_assign (scalar_assign, full, M &m, const matrix_expression &e, sparse_tag, row_major_tag) { + BOOST_UBLAS_CHECK (m.size1 () == e ().size1 (), bad_size ()); BOOST_UBLAS_CHECK (m.size2 () == e ().size2 (), bad_size ()); typedef typename M::value_type value_type; #if BOOST_UBLAS_TYPE_CHECK @@ -965,8 +965,8 @@ namespace boost { namespace numeric { namespace ublas { template // This function seems to be big. So we do not let the compiler inline it. // BOOST_UBLAS_INLINE - void matrix_assign (scalar_assign, full, M &m, const matrix_expression &e, sparse_tag, column_major_tag) { - BOOST_UBLAS_CHECK (m.size1 () == e ().size1 (), bad_size ()); + void matrix_assign (scalar_assign, full, M &m, const matrix_expression &e, sparse_tag, column_major_tag) { + BOOST_UBLAS_CHECK (m.size1 () == e ().size1 (), bad_size ()); BOOST_UBLAS_CHECK (m.size2 () == e ().size2 (), bad_size ()); typedef typename M::value_type value_type; #if BOOST_UBLAS_TYPE_CHECK diff --git a/include/boost/numeric/ublas/operation.hpp b/include/boost/numeric/ublas/operation.hpp index d67c2a2b..38ca2895 100644 --- a/include/boost/numeric/ublas/operation.hpp +++ b/include/boost/numeric/ublas/operation.hpp @@ -193,29 +193,29 @@ namespace boost { namespace numeric { namespace ublas { /** \brief computes v += A x or v = A x in an - optimized fashion. + optimized fashion. - \param e1 the matrix expression \c A - \param e2 the vector expression \c x - \param v the result vector \c v - \param init a boolean parameter + \param e1 the matrix expression \c A + \param e2 the vector expression \c x + \param v the result vector \c v + \param init a boolean parameter - axpy_prod(A, x, v, init) implements the well known - axpy-product. Setting \a init to \c true is equivalent to call - v.clear() before axpy_prod. Currently \a init - defaults to \c true, but this may change in the future. + axpy_prod(A, x, v, init) implements the well known + axpy-product. Setting \a init to \c true is equivalent to call + v.clear() before axpy_prod. Currently \a init + defaults to \c true, but this may change in the future. - Up to now there are some specialisation for compressed - matrices that give a large speed up compared to prod. - - \ingroup blas2 + Up to now there are some specialisation for compressed + matrices that give a large speed up compared to prod. + + \ingroup blas2 - \internal - - template parameters: - \param V type of the result vector \c v - \param E1 type of a matrix expression \c A - \param E2 type of a vector expression \c x + \internal + + template parameters: + \param V type of the result vector \c v + \param E1 type of a matrix expression \c A + \param E2 type of a vector expression \c x */ template BOOST_UBLAS_INLINE @@ -419,29 +419,29 @@ namespace boost { namespace numeric { namespace ublas { /** \brief computes v += AT x or v = AT x in an - optimized fashion. + optimized fashion. - \param e1 the vector expression \c x - \param e2 the matrix expression \c A - \param v the result vector \c v - \param init a boolean parameter + \param e1 the vector expression \c x + \param e2 the matrix expression \c A + \param v the result vector \c v + \param init a boolean parameter - axpy_prod(x, A, v, init) implements the well known - axpy-product. Setting \a init to \c true is equivalent to call - v.clear() before axpy_prod. Currently \a init - defaults to \c true, but this may change in the future. + axpy_prod(x, A, v, init) implements the well known + axpy-product. Setting \a init to \c true is equivalent to call + v.clear() before axpy_prod. Currently \a init + defaults to \c true, but this may change in the future. - Up to now there are some specialisation for compressed - matrices that give a large speed up compared to prod. - - \ingroup blas2 + Up to now there are some specialisation for compressed + matrices that give a large speed up compared to prod. + + \ingroup blas2 - \internal - - template parameters: - \param V type of the result vector \c v - \param E1 type of a vector expression \c x - \param E2 type of a matrix expression \c A + \internal + + template parameters: + \param V type of the result vector \c v + \param E1 type of a vector expression \c x + \param E2 type of a matrix expression \c A */ template BOOST_UBLAS_INLINE @@ -669,28 +669,28 @@ namespace boost { namespace numeric { namespace ublas { } /** \brief computes M += A X or M = A X in an - optimized fashion. + optimized fashion. - \param e1 the matrix expression \c A - \param e2 the matrix expression \c X - \param m the result matrix \c M - \param init a boolean parameter + \param e1 the matrix expression \c A + \param e2 the matrix expression \c X + \param m the result matrix \c M + \param init a boolean parameter - axpy_prod(A, X, M, init) implements the well known - axpy-product. Setting \a init to \c true is equivalent to call - M.clear() before axpy_prod. Currently \a init - defaults to \c true, but this may change in the future. + axpy_prod(A, X, M, init) implements the well known + axpy-product. Setting \a init to \c true is equivalent to call + M.clear() before axpy_prod. Currently \a init + defaults to \c true, but this may change in the future. - Up to now there are no specialisations. - - \ingroup blas3 + Up to now there are no specialisations. + + \ingroup blas3 - \internal - - template parameters: - \param M type of the result matrix \c M - \param E1 type of a matrix expression \c A - \param E2 type of a matrix expression \c X + \internal + + template parameters: + \param M type of the result matrix \c M + \param E1 type of a matrix expression \c A + \param E2 type of a matrix expression \c X */ template BOOST_UBLAS_INLINE @@ -813,30 +813,30 @@ namespace boost { namespace numeric { namespace ublas { } /** \brief computes M += A X or M = A X in an - optimized fashion. + optimized fashion. - \param e1 the matrix expression \c A - \param e2 the matrix expression \c X - \param m the result matrix \c M - \param init a boolean parameter + \param e1 the matrix expression \c A + \param e2 the matrix expression \c X + \param m the result matrix \c M + \param init a boolean parameter - opb_prod(A, X, M, init) implements the well known - axpy-product. Setting \a init to \c true is equivalent to call - M.clear() before opb_prod. Currently \a init - defaults to \c true, but this may change in the future. + opb_prod(A, X, M, init) implements the well known + axpy-product. Setting \a init to \c true is equivalent to call + M.clear() before opb_prod. Currently \a init + defaults to \c true, but this may change in the future. - This function may give a speedup if \c A has less columns than - rows, because the product is computed as a sum of outer - products. - - \ingroup blas3 + This function may give a speedup if \c A has less columns than + rows, because the product is computed as a sum of outer + products. + + \ingroup blas3 - \internal - - template parameters: - \param M type of the result matrix \c M - \param E1 type of a matrix expression \c A - \param E2 type of a matrix expression \c X + \internal + + template parameters: + \param M type of the result matrix \c M + \param E1 type of a matrix expression \c A + \param E2 type of a matrix expression \c X */ template BOOST_UBLAS_INLINE diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp index fe475c8d..931b731d 100644 --- a/include/boost/numeric/ublas/traits.hpp +++ b/include/boost/numeric/ublas/traits.hpp @@ -36,9 +36,9 @@ namespace boost { namespace numeric { namespace ublas { typedef const T &const_reference; typedef T &reference; - /* - * Don't define unknown properties - * + /* + * Don't define unknown properties + * typedef T real_type; typedef T precision_type; @@ -86,9 +86,9 @@ namespace boost { namespace numeric { namespace ublas { } */ // Dummy definition for compilers that error if undefined even though it is never used -#ifdef BOOST_NO_SFINAE - typedef void real_type; - typedef void precision_type; +#ifdef BOOST_NO_SFINAE + typedef void real_type; + typedef void precision_type; #endif };