From b91b49fa32ab231796f160d5bb68151ce40f5d40 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 26 Aug 2004 15:51:57 +0000 Subject: [PATCH] use (0) to represent zero rather then default constructor. (1) is require anyway so this does not add further requirements svn path=/trunk/boost/boost/numeric/ublas/; revision=24763 --- include/boost/numeric/ublas/banded.hpp | 4 ++-- include/boost/numeric/ublas/config.hpp | 4 ++-- include/boost/numeric/ublas/matrix.hpp | 4 ++-- include/boost/numeric/ublas/matrix_sparse.hpp | 8 ++++---- include/boost/numeric/ublas/traits.hpp | 2 +- include/boost/numeric/ublas/triangular.hpp | 4 ++-- include/boost/numeric/ublas/vector.hpp | 4 ++-- include/boost/numeric/ublas/vector_of_vector.hpp | 2 +- include/boost/numeric/ublas/vector_sparse.hpp | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/boost/numeric/ublas/banded.hpp b/include/boost/numeric/ublas/banded.hpp index 96c9c6aa..68e8638f 100644 --- a/include/boost/numeric/ublas/banded.hpp +++ b/include/boost/numeric/ublas/banded.hpp @@ -1005,7 +1005,7 @@ namespace boost { namespace numeric { namespace ublas { template typename banded_matrix::value_type banded_matrix::zero_ = - BOOST_UBLAS_TYPENAME banded_matrix::value_type (); + BOOST_UBLAS_TYPENAME banded_matrix::value_type (0); // Diagonal matrix class template @@ -2032,7 +2032,7 @@ namespace boost { namespace numeric { namespace ublas { typename banded_adaptor::matrix_type banded_adaptor::nil_; template typename banded_adaptor::value_type banded_adaptor::zero_ = - BOOST_UBLAS_TYPENAME banded_adaptor::value_type (); + BOOST_UBLAS_TYPENAME banded_adaptor::value_type (0); // Diagonal matrix adaptor class template diff --git a/include/boost/numeric/ublas/config.hpp b/include/boost/numeric/ublas/config.hpp index dff84c62..4329c53c 100644 --- a/include/boost/numeric/ublas/config.hpp +++ b/include/boost/numeric/ublas/config.hpp @@ -229,10 +229,10 @@ namespace std { // Enable compile time typedefs for proxies #define BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS -// #define BOOST_UBLAS_REFERENCE_CONST_MEMBER #define BOOST_UBLAS_CT_PROXY_BASE_TYPEDEFS -// #define BOOST_UBLAS_PROXY_CONST_MEMBER #define BOOST_UBLAS_CT_PROXY_CLOSURE_TYPEDEFS +// #define BOOST_UBLAS_REFERENCE_CONST_MEMBER +// #define BOOST_UBLAS_PROXY_CONST_MEMBER diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index de2bc696..0ddcd4cc 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -2389,7 +2389,7 @@ namespace boost { namespace numeric { namespace ublas { template typename identity_matrix::value_type identity_matrix::zero_ = - BOOST_UBLAS_TYPENAME identity_matrix::value_type (); + BOOST_UBLAS_TYPENAME identity_matrix::value_type (0); template typename identity_matrix::value_type identity_matrix::one_ = BOOST_UBLAS_TYPENAME identity_matrix::value_type (1); @@ -2840,7 +2840,7 @@ namespace boost { namespace numeric { namespace ublas { template typename zero_matrix::value_type zero_matrix::zero_ = - BOOST_UBLAS_TYPENAME zero_matrix::value_type (); + BOOST_UBLAS_TYPENAME zero_matrix::value_type (0); // Scalar matrix class template diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index 288f0949..ef6a94dc 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -1308,7 +1308,7 @@ namespace boost { namespace numeric { namespace ublas { template typename sparse_matrix::value_type sparse_matrix::zero_ = - BOOST_UBLAS_TYPENAME sparse_matrix::value_type (); + BOOST_UBLAS_TYPENAME sparse_matrix::value_type (0); // Array based sparse matrix class template @@ -2491,7 +2491,7 @@ namespace boost { namespace numeric { namespace ublas { template typename sparse_vector_of_sparse_vector::value_type sparse_vector_of_sparse_vector::zero_ = - BOOST_UBLAS_TYPENAME sparse_vector_of_sparse_vector::value_type (); + BOOST_UBLAS_TYPENAME sparse_vector_of_sparse_vector::value_type (0); // Array based sparse matrix class // Thanks to Kresimir Fresl for extending this to cover different index bases. @@ -3822,7 +3822,7 @@ namespace boost { namespace numeric { namespace ublas { template typename compressed_matrix::value_type compressed_matrix::zero_ = - BOOST_UBLAS_TYPENAME compressed_matrix::value_type (); + BOOST_UBLAS_TYPENAME compressed_matrix::value_type (0); // Array based sparse matrix class // Thanks to Kresimir Fresl for extending this to cover different index bases. @@ -5128,7 +5128,7 @@ namespace boost { namespace numeric { namespace ublas { template typename coordinate_matrix::value_type coordinate_matrix::zero_ = - BOOST_UBLAS_TYPENAME coordinate_matrix::value_type (); + BOOST_UBLAS_TYPENAME coordinate_matrix::value_type (0); }}} diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp index d907a079..9bc34c78 100644 --- a/include/boost/numeric/ublas/traits.hpp +++ b/include/boost/numeric/ublas/traits.hpp @@ -1465,7 +1465,7 @@ namespace boost { namespace numeric { namespace ublas { #if BOOST_UBLAS_TYPE_CHECK I cit (it); while (cit != it_end) { - BOOST_UBLAS_CHECK (*cit == BOOST_UBLAS_TYPENAME I::value_type (), internal_logic ()); + BOOST_UBLAS_CHECK (*cit == BOOST_UBLAS_TYPENAME I::value_type (0), internal_logic ()); ++ cit; } #endif diff --git a/include/boost/numeric/ublas/triangular.hpp b/include/boost/numeric/ublas/triangular.hpp index 6708eb82..b9f758f6 100644 --- a/include/boost/numeric/ublas/triangular.hpp +++ b/include/boost/numeric/ublas/triangular.hpp @@ -935,7 +935,7 @@ namespace boost { namespace numeric { namespace ublas { template typename triangular_matrix::value_type triangular_matrix::zero_ = - BOOST_UBLAS_TYPENAME triangular_matrix::value_type (); + BOOST_UBLAS_TYPENAME triangular_matrix::value_type (0); template typename triangular_matrix::value_type triangular_matrix::one_ = BOOST_UBLAS_TYPENAME triangular_matrix::value_type (1); @@ -1847,7 +1847,7 @@ namespace boost { namespace numeric { namespace ublas { typename triangular_adaptor::matrix_type triangular_adaptor::nil_; template typename triangular_adaptor::value_type triangular_adaptor::zero_ = - BOOST_UBLAS_TYPENAME triangular_adaptor::value_type (); + BOOST_UBLAS_TYPENAME triangular_adaptor::value_type (0); template typename triangular_adaptor::value_type triangular_adaptor::one_ = BOOST_UBLAS_TYPENAME triangular_adaptor::value_type (1); diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index a186347c..3ec029eb 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -834,7 +834,7 @@ namespace boost { namespace numeric { namespace ublas { template typename unit_vector::value_type unit_vector::zero_ = - BOOST_UBLAS_TYPENAME unit_vector::value_type (); + BOOST_UBLAS_TYPENAME unit_vector::value_type (0); template typename unit_vector::value_type unit_vector::one_ = BOOST_UBLAS_TYPENAME unit_vector::value_type (1); @@ -1041,7 +1041,7 @@ namespace boost { namespace numeric { namespace ublas { template typename zero_vector::value_type zero_vector::zero_ = - BOOST_UBLAS_TYPENAME zero_vector::value_type (); + BOOST_UBLAS_TYPENAME zero_vector::value_type (0); // Scalar vector class template diff --git a/include/boost/numeric/ublas/vector_of_vector.hpp b/include/boost/numeric/ublas/vector_of_vector.hpp index 12f6a42c..fa8e45c0 100644 --- a/include/boost/numeric/ublas/vector_of_vector.hpp +++ b/include/boost/numeric/ublas/vector_of_vector.hpp @@ -1216,7 +1216,7 @@ namespace boost { namespace numeric { namespace ublas { template typename generalized_vector_of_vector::value_type generalized_vector_of_vector::zero_ = - BOOST_UBLAS_TYPENAME generalized_vector_of_vector::value_type (); + BOOST_UBLAS_TYPENAME generalized_vector_of_vector::value_type (0); }}} diff --git a/include/boost/numeric/ublas/vector_sparse.hpp b/include/boost/numeric/ublas/vector_sparse.hpp index 56259d54..ec4c0d22 100644 --- a/include/boost/numeric/ublas/vector_sparse.hpp +++ b/include/boost/numeric/ublas/vector_sparse.hpp @@ -716,7 +716,7 @@ namespace boost { namespace numeric { namespace ublas { template typename sparse_vector::value_type sparse_vector::zero_ = - BOOST_UBLAS_TYPENAME sparse_vector::value_type (); + BOOST_UBLAS_TYPENAME sparse_vector::value_type (0); // Array based sparse vector class // Thanks to Kresimir Fresl for extending this to cover different index bases. @@ -1274,7 +1274,7 @@ namespace boost { namespace numeric { namespace ublas { template typename compressed_vector::value_type compressed_vector::zero_ = - BOOST_UBLAS_TYPENAME compressed_vector::value_type (); + BOOST_UBLAS_TYPENAME compressed_vector::value_type (0); // Array based sparse vector class // Thanks to Kresimir Fresl for extending this to cover different index bases. @@ -1863,7 +1863,7 @@ namespace boost { namespace numeric { namespace ublas { template typename coordinate_vector::value_type coordinate_vector::zero_ = - BOOST_UBLAS_TYPENAME coordinate_vector::value_type (); + BOOST_UBLAS_TYPENAME coordinate_vector::value_type (0); }}}