From 089f44157b9e9c1352f7c4bac7c631224fa2522c Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 5 Apr 2006 08:31:37 +0000 Subject: [PATCH 01/65] ADD Allow operation with compiler with serious defects [SVN r33546] --- include/boost/numeric/ublas/detail/config.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/ublas/detail/config.hpp b/include/boost/numeric/ublas/detail/config.hpp index 65a03ef2..ef692cf9 100644 --- a/include/boost/numeric/ublas/detail/config.hpp +++ b/include/boost/numeric/ublas/detail/config.hpp @@ -162,13 +162,15 @@ namespace std { #endif -// Detect other compilers with serious defects +// Detect other compilers with serious defects - override by defineing BOOST_UBLAS_UNSUPPORTED_COMPILER=0 +#ifndef BOOST_UBLAS_UNSUPPORTED_COMPILER #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STDC_NAMESPACE) #define BOOST_UBLAS_UNSUPPORTED_COMPILER #endif +#endif // Cannot continue with an unsupported compiler -#ifdef BOOST_UBLAS_UNSUPPORTED_COMPILER +#if defined(BOOST_UBLAS_UNSUPPORTED_COMPILER) && (BOOST_UBLAS_UNSUPPORTED_COMPILER != 0) #error Your compiler is unsupported by this verions of uBLAS. Boost 1.32.0 includes uBLAS with support for many old compilers. #endif From 10a934e340b7bbbd16ead4bda1faf8eb3490564c Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 5 Apr 2006 08:33:18 +0000 Subject: [PATCH 02/65] ADD ignore_unsued for zero_::iterators FIX define closure_type for scalar_ [SVN r33548] --- include/boost/numeric/ublas/matrix.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 68c57e0d..a05e31ef 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -2169,6 +2169,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE bool operator == (const const_iterator1 &it) const { BOOST_UBLAS_CHECK (&(*this) () == &it (), external_logic ()); + detail::ignore_unused_variable_warning(it); return true; } }; @@ -2278,6 +2279,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE bool operator == (const const_iterator2 &it) const { BOOST_UBLAS_CHECK (&(*this) () == &it (), external_logic ()); + detail::ignore_unused_variable_warning(it); return true; } }; @@ -2724,6 +2726,7 @@ namespace boost { namespace numeric { namespace ublas { typedef const T &const_reference; typedef T &reference; typedef const matrix_reference const_closure_type; + typedef matrix_reference closure_type; typedef dense_tag storage_category; typedef unknown_orientation_tag orientation_category; From e7063e9dfe7c40dcd4bcee2b2a4c8486a49d5018 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 5 Apr 2006 08:34:47 +0000 Subject: [PATCH 03/65] FIX define closure_type for scalar_ [SVN r33549] --- include/boost/numeric/ublas/vector.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index 7c4e47ed..9778a9f8 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -989,6 +989,7 @@ namespace boost { namespace numeric { namespace ublas { typedef const T &const_reference; typedef T &reference; typedef const vector_reference const_closure_type; + typedef vector_reference closure_type; typedef dense_tag storage_category; // Construction and destruction From 90677ea5de82d55dbcd62fe6457dd457f6911f87 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 5 Apr 2006 08:36:28 +0000 Subject: [PATCH 04/65] CHANGE some but not all constructor explicty construct base type. For consistency remove explict contructions [SVN r33550] --- include/boost/numeric/ublas/storage.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index 28a109b5..9c07c288 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -87,7 +87,6 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE unbounded_array (const unbounded_array &c): - storage_array (), alloc_ (c.alloc_), size_ (c.size_) { if (size_) { data_ = alloc_.allocate (size_); @@ -316,7 +315,6 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE bounded_array (const bounded_array &c): - storage_array (), size_ (c.size_) { // ISSUE elements should be copy constructed here, but we must copy instead as already default constructed std::copy (c.data_, c.data_ + c.size_, data_); From eef17a00ab7991c310240ed4eec4196c38e8c528 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 16 Apr 2006 09:26:15 +0000 Subject: [PATCH 05/65] Reintroduced _array_adaptor needs testing [SVN r33708] --- include/boost/numeric/ublas/storage.hpp | 319 ++++++++++++++++++++---- 1 file changed, 275 insertions(+), 44 deletions(-) diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index 9c07c288..54bf2274 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -18,6 +18,9 @@ #define BOOST_UBLAS_STORAGE_H #include +#ifdef BOOST_UBLAS_SHALLOW_ARRAY_ADAPTOR +#include +#endif #include #include @@ -435,13 +438,12 @@ namespace boost { namespace numeric { namespace ublas { }; - // C Array adaptor - // As the element storage must be fixed to a C array this class cannot be copy constructed + // Array adaptor with normal deep copy semantics of elements template - class carray_adaptor: - public storage_array > { + class array_adaptor: + public storage_array > { - typedef carray_adaptor self_type; + typedef array_adaptor self_type; public: typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; @@ -453,60 +455,86 @@ namespace boost { namespace numeric { namespace ublas { // Construction and destruction BOOST_UBLAS_INLINE - carray_adaptor (): - size_ (0), data_ (0) { + array_adaptor (): + size_ (0), own_ (true), data_ (new value_type [0]) { + } + explicit BOOST_UBLAS_INLINE + array_adaptor (size_type size): + size_ (size), own_ (true), data_ (new value_type [size]) { } BOOST_UBLAS_INLINE - carray_adaptor (size_type size, pointer data): - size_ (size), data_ (data) {} - BOOST_UBLAS_INLINE - carray_adaptor (size_type size, pointer data, const value_type &init): - size_ (size), data_ (data) { - std::fill (begin(), end(), init) ; + array_adaptor (size_type size, const value_type &init): + size_ (size), own_ (true), data_ (new value_type [size]) { + std::fill (data_, data_ + size_, init); } BOOST_UBLAS_INLINE - ~carray_adaptor () { + array_adaptor (size_type size, pointer data): + size_ (size), own_ (false), data_ (data) {} + BOOST_UBLAS_INLINE + array_adaptor (const array_adaptor &a): + storage_array (), + size_ (a.size_), own_ (true), data_ (new value_type [a.size_]) { + *this = a; + } + BOOST_UBLAS_INLINE + ~array_adaptor () { + if (own_) { + delete [] data_; + } } - // No copy constructor - private: - carray_adaptor (const carray_adaptor& ); - - public: // Resizing + private: + BOOST_UBLAS_INLINE + void resize_internal (size_type size, value_type init, bool preserve = true) { + if (size != size_) { + pointer data = new value_type [size]; + if (preserve) { + std::copy (data_, data_ + (std::min) (size, size_), data); + std::fill (data + (std::min) (size, size_), data + size, init); + } + if (own_) + delete [] data_; + size_ = size; + own_ = true; + data_ = data; + } + } + BOOST_UBLAS_INLINE + void resize_internal (size_type size, pointer data, value_type init, bool preserve = true) { + if (data != data_) { + if (preserve) { + std::copy (data_, data_ + (std::min) (size, size_), data); + std::fill (data + (std::min) (size, size_), data + size, init); + } + if (own_) + delete [] data_; + own_ = false; + data_ = data; + } + else { + std::fill (data + (std::min) (size, size_), data + size, init); + } + size_ = size; + } + public: BOOST_UBLAS_INLINE void resize (size_type size) { - size_ = size; + resize_internal (size, value_type (), false); } BOOST_UBLAS_INLINE void resize (size_type size, value_type init) { - std::fill (data_ + size_, data_ + size, init); - size_ = size; + resize_internal (size, init, true); } BOOST_UBLAS_INLINE void resize (size_type size, pointer data) { - size_ = size; - data_ = data; + resize_internal (size, data, value_type (), false); } BOOST_UBLAS_INLINE void resize (size_type size, pointer data, value_type init) { - std::copy (data_, data_ + std::min (size_, size), data); - std::fill (data_ + size_, data_ + size, init); - size_ = size; - data_ = data; + resize_internal (size, data, init, true); } - // Random Access Container - BOOST_UBLAS_INLINE - size_type max_size () const { - return std::numeric_limits::max (); - } - - BOOST_UBLAS_INLINE - bool empty () const { - return size_ == 0; - } - BOOST_UBLAS_INLINE size_type size () const { return size_; @@ -526,7 +554,7 @@ namespace boost { namespace numeric { namespace ublas { // Assignment BOOST_UBLAS_INLINE - carray_adaptor &operator = (const carray_adaptor &a) { + array_adaptor &operator = (const array_adaptor &a) { if (this != &a) { resize (a.size_); std::copy (a.data_, a.data_ + a.size_, data_); @@ -534,21 +562,25 @@ namespace boost { namespace numeric { namespace ublas { return *this; } BOOST_UBLAS_INLINE - carray_adaptor &assign_temporary (carray_adaptor &a) { - *this = a; + array_adaptor &assign_temporary (array_adaptor &a) { + if (own_ && a.own_) + swap (a); + else + *this = a; return *this; } // Swapping BOOST_UBLAS_INLINE - void swap (carray_adaptor &a) { + void swap (array_adaptor &a) { if (this != &a) { std::swap (size_, a.size_); + std::swap (own_, a.own_); std::swap (data_, a.data_); } } BOOST_UBLAS_INLINE - friend void swap (carray_adaptor &a1, carray_adaptor &a2) { + friend void swap (array_adaptor &a1, array_adaptor &a2) { a1.swap (a2); } @@ -599,9 +631,208 @@ namespace boost { namespace numeric { namespace ublas { private: size_type size_; + bool own_; pointer data_; }; +#ifdef BOOST_UBLAS_SHALLOW_ARRAY_ADAPTOR + // Array adaptor with shallow (reference) copy semantics of elements. + // shared_array is used to maintain reference counts. + // This class breaks the normal copy semantics for a storage container and is very dangerous! + template + class shallow_array_adaptor: + public storage_array > { + + typedef shallow_array_adaptor self_type; + + template + struct leaker { + typedef void result_type; + typedef TT *argument_type; + + BOOST_UBLAS_INLINE + result_type operator () (argument_type x) {} + }; + + public: + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef T value_type; + typedef const T &const_reference; + typedef T &reference; + typedef const T *const_pointer; + typedef T *pointer; + + // Construction and destruction + BOOST_UBLAS_INLINE + shallow_array_adaptor (): + size_ (0), own_ (true), data_ (new value_type [0]) { + } + explicit BOOST_UBLAS_INLINE + shallow_array_adaptor (size_type size): + size_ (size), own_ (true), data_ (new value_type [size]) { + } + BOOST_UBLAS_INLINE + shallow_array_adaptor (size_type size, const value_type &init): + size_ (size), own_ (true), data_ (new value_type [size]) { + std::fill (data_.get (), data_.get () + size_, init); + } + BOOST_UBLAS_INLINE + shallow_array_adaptor (size_type size, pointer data): + size_ (size), own_ (false), data_ (data, leaker ()) {} + + BOOST_UBLAS_INLINE + shallow_array_adaptor (const shallow_array_adaptor &a): + storage_array (), + size_ (a.size_), own_ (a.own_), data_ (a.data_) {} + + BOOST_UBLAS_INLINE + ~shallow_array_adaptor () { + } + + // Resizing + private: + BOOST_UBLAS_INLINE + void resize_internal (size_type size, value_type init, bool preserve = true) { + if (size != size_) { + shared_array data (new value_type [size]); + if (preserve) { + std::copy (data_.get (), data_.get () + (std::min) (size, size_), data.get ()); + std::fill (data.get () + (std::min) (size, size_), data.get () + size, init); + } + size_ = size; + data_ = data; + } + } + BOOST_UBLAS_INLINE + void resize_internal (size_type size, pointer data, value_type init, bool preserve = true) { + if (preserve) { + std::copy (data_.get (), data_.get () + (std::min) (size, size_), data); + std::fill (data + (std::min) (size, size_), data + size, init); + } + size_ = size; + data_ = data; + } + public: + BOOST_UBLAS_INLINE + void resize (size_type size) { + resize_internal (size, value_type (), false); + } + BOOST_UBLAS_INLINE + void resize (size_type size, value_type init) { + resize_internal (size, init, true); + } + BOOST_UBLAS_INLINE + void resize (size_type size, pointer data) { + resize_internal (size, data, value_type (), false); + } + BOOST_UBLAS_INLINE + void resize (size_type size, pointer data, value_type init) { + resize_internal (size, data, init, true); + } + + BOOST_UBLAS_INLINE + size_type size () const { + return size_; + } + + // Element access + BOOST_UBLAS_INLINE + const_reference operator [] (size_type i) const { + BOOST_UBLAS_CHECK (i < size_, bad_index ()); + return data_ [i]; + } + BOOST_UBLAS_INLINE + reference operator [] (size_type i) { + BOOST_UBLAS_CHECK (i < size_, bad_index ()); + return data_ [i]; + } + + // Assignment + BOOST_UBLAS_INLINE + shallow_array_adaptor &operator = (const shallow_array_adaptor &a) { + if (this != &a) { + resize (a.size_); + std::copy (a.data_.get (), a.data_.get () + a.size_, data_.get ()); + } + return *this; + } + BOOST_UBLAS_INLINE + shallow_array_adaptor &assign_temporary (shallow_array_adaptor &a) { + if (own_ && a.own_) + swap (a); + else + *this = a; + return *this; + } + + // Swapping + BOOST_UBLAS_INLINE + void swap (shallow_array_adaptor &a) { + if (this != &a) { + std::swap (size_, a.size_); + std::swap (own_, a.own_); + std::swap (data_, a.data_); + } + } + BOOST_UBLAS_INLINE + friend void swap (shallow_array_adaptor &a1, shallow_array_adaptor &a2) { + a1.swap (a2); + } + + // Iterators simply are pointers. + + typedef const_pointer const_iterator; + + BOOST_UBLAS_INLINE + const_iterator begin () const { + return data_.get (); + } + BOOST_UBLAS_INLINE + const_iterator end () const { + return data_.get () + size_; + } + + typedef pointer iterator; + + BOOST_UBLAS_INLINE + iterator begin () { + return data_.get (); + } + BOOST_UBLAS_INLINE + iterator end () { + return data_.get () + size_; + } + + // Reverse iterators + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + + BOOST_UBLAS_INLINE + const_reverse_iterator rbegin () const { + return const_reverse_iterator (end ()); + } + BOOST_UBLAS_INLINE + const_reverse_iterator rend () const { + return const_reverse_iterator (begin ()); + } + BOOST_UBLAS_INLINE + reverse_iterator rbegin () { + return reverse_iterator (end ()); + } + BOOST_UBLAS_INLINE + reverse_iterator rend () { + return reverse_iterator (begin ()); + } + + private: + size_type size_; + bool own_; + shared_array data_; + }; + +#endif + // Range class template From d9e12768bc41a8c7f41ed4c0354b4e8473296536 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 17 May 2006 16:21:54 +0000 Subject: [PATCH 06/65] uBLAS FIX indexed_terator1/2 pass incorrect difference_type to random_access_iterator_base. Thanks to Vardan for fix [SVN r33984] --- include/boost/numeric/ublas/detail/iterator.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp index 8fdbffd3..516d2ada 100644 --- a/include/boost/numeric/ublas/detail/iterator.hpp +++ b/include/boost/numeric/ublas/detail/iterator.hpp @@ -203,7 +203,7 @@ namespace boost { namespace numeric { namespace ublas { * is LessThan Comparable. */ template - // ISSUE the default here seems rather dangerous as it can easlly be (silently) incorrect + // ISSUE the default for D seems rather dangerous as it can easily be (silently) incorrect struct random_access_iterator_base: public std::iterator { typedef I derived_iterator_type; @@ -878,7 +878,7 @@ namespace boost { namespace numeric { namespace ublas { public random_access_iterator_base, typename C::value_type, - typename C::reference> { + typename C::difference_type> { public: typedef C container_type; typedef IC iterator_category; @@ -1024,7 +1024,7 @@ namespace boost { namespace numeric { namespace ublas { public random_access_iterator_base, typename C::value_type, - typename C::const_reference> { + typename C::difference_type> { public: typedef C container_type; typedef IC iterator_category; @@ -1169,7 +1169,7 @@ namespace boost { namespace numeric { namespace ublas { public random_access_iterator_base, typename C::value_type, - typename C::reference> { + typename C::difference_type> { public: typedef C container_type; typedef IC iterator_category; @@ -1312,7 +1312,7 @@ namespace boost { namespace numeric { namespace ublas { public random_access_iterator_base, typename C::value_type, - typename C::const_reference> { + typename C::difference_type> { public: typedef C container_type; typedef IC iterator_category; From 31ce5aee40974383d87380efe10b94f1cebfa2d7 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 17 May 2006 16:43:19 +0000 Subject: [PATCH 07/65] uBLAS FIX corrected basic_full::packed_size interface. Thanks to Hidekaz Ikeno [SVN r33985] --- include/boost/numeric/ublas/functional.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/functional.hpp b/include/boost/numeric/ublas/functional.hpp index d3885dfc..f321b41e 100644 --- a/include/boost/numeric/ublas/functional.hpp +++ b/include/boost/numeric/ublas/functional.hpp @@ -1750,7 +1750,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type packed_size (size_type size1, size_type size2) { + size_type packed_size (L, size_type size1, size_type size2) { return L::storage_size (size1, size2); } From 5202908ae0480c3c4fdb7117a259064cae0d08e6 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 18 May 2006 16:44:57 +0000 Subject: [PATCH 08/65] uBLAS CHANGE row_major/column_major functor so they have a consistent element access abstraction and naming [SVN r34007] --- include/boost/numeric/ublas/functional.hpp | 494 +++++++++--------- include/boost/numeric/ublas/matrix.hpp | 100 ++-- include/boost/numeric/ublas/matrix_sparse.hpp | 400 +++++++------- .../boost/numeric/ublas/vector_of_vector.hpp | 130 ++--- 4 files changed, 563 insertions(+), 561 deletions(-) diff --git a/include/boost/numeric/ublas/functional.hpp b/include/boost/numeric/ublas/functional.hpp index f321b41e..f3beaf4c 100644 --- a/include/boost/numeric/ublas/functional.hpp +++ b/include/boost/numeric/ublas/functional.hpp @@ -1370,8 +1370,8 @@ namespace boost { namespace numeric { namespace ublas { } }; - // This functor computes the address translation - // matrix [i] [j] -> storage [i * size2 + j] + // This functor defines storage layout and it's properties + // matrix (i,j) -> storage [i * size_i + j] template struct basic_row_major { typedef Z size_type; @@ -1380,90 +1380,133 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE - size_type storage_size (size_type size1, size_type size2) { + size_type storage_size (size_type size_i, size_type size_j) { // Guard against size_type overflow - BOOST_UBLAS_CHECK (size2 == 0 || size1 <= (std::numeric_limits::max) () / size2, bad_size ()); - return size1 * size2; + BOOST_UBLAS_CHECK (size_j == 0 || size_i <= (std::numeric_limits::max) () / size_j, bad_size ()); + return size_i * size_j; } - // Indexing + // Indexing conversion to storage element static BOOST_UBLAS_INLINE - size_type element (size_type i, size_type size1, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (i < size1, bad_index ()); - BOOST_UBLAS_CHECK (j < size2, bad_index ()); - detail::ignore_unused_variable_warning(size1); + size_type element (size_type i, size_type size_i, size_type j, size_type size_j) { + BOOST_UBLAS_CHECK (i < size_i, bad_index ()); + BOOST_UBLAS_CHECK (j < size_j, bad_index ()); + detail::ignore_unused_variable_warning(size_i); // Guard against size_type overflow - BOOST_UBLAS_CHECK (i <= ((std::numeric_limits::max) () - j) / size2, bad_index ()); - return i * size2 + j; + BOOST_UBLAS_CHECK (i <= ((std::numeric_limits::max) () - j) / size_j, bad_index ()); + return i * size_j + j; } static BOOST_UBLAS_INLINE - size_type address (size_type i, size_type size1, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (i <= size1, bad_index ()); - BOOST_UBLAS_CHECK (j <= size2, bad_index ()); - // Guard against size_type overflow - address may be size2 past end of storage - BOOST_UBLAS_CHECK (size2 == 0 || i <= ((std::numeric_limits::max) () - j) / size2, bad_index ()); - detail::ignore_unused_variable_warning(size1); - return i * size2 + j; + size_type address (size_type i, size_type size_i, size_type j, size_type size_j) { + BOOST_UBLAS_CHECK (i <= size_i, bad_index ()); + BOOST_UBLAS_CHECK (j <= size_j, bad_index ()); + // Guard against size_type overflow - address may be size_j past end of storage + BOOST_UBLAS_CHECK (size_j == 0 || i <= ((std::numeric_limits::max) () - j) / size_j, bad_index ()); + detail::ignore_unused_variable_warning(size_i); + return i * size_j + j; + } + + // Storage element to index conversion + static + BOOST_UBLAS_INLINE + difference_type distance_i (difference_type k, size_type /* size_i */, size_type size_j) { + return size_j != 0 ? k / size_j : 0; } static BOOST_UBLAS_INLINE - difference_type distance1 (difference_type k, size_type /* size1 */, size_type size2) { - return size2 != 0 ? k / size2 : 0; - } - static - BOOST_UBLAS_INLINE - difference_type distance2 (difference_type k, size_type /* size1 */, size_type /* size2 */) { + difference_type distance_j (difference_type k, size_type /* size_i */, size_type /* size_j */) { return k; } static BOOST_UBLAS_INLINE - size_type index1 (difference_type k, size_type /* size1 */, size_type size2) { - return size2 != 0 ? k / size2 : 0; + size_type index_i (difference_type k, size_type /* size_i */, size_type size_j) { + return size_j != 0 ? k / size_j : 0; } static BOOST_UBLAS_INLINE - size_type index2 (difference_type k, size_type /* size1 */, size_type size2) { - return size2 != 0 ? k % size2 : 0; + size_type index_j (difference_type k, size_type /* size_i */, size_type size_j) { + return size_j != 0 ? k % size_j : 0; } static BOOST_UBLAS_INLINE - bool fast1 () { + bool fast_i () { return false; } static BOOST_UBLAS_INLINE - size_type one1 (size_type /* size1 */, size_type size2) { - return size2; - } - static - BOOST_UBLAS_INLINE - bool fast2 () { + bool fast_j () { return true; } + + // Iterating storage elements + template static BOOST_UBLAS_INLINE - size_type one2 (size_type /* size1 */, size_type /* size2 */) { - return 1; + void increment_i (I &it, size_type /* size_i */, size_type size_j) { + it += size_j; + } + template + static + BOOST_UBLAS_INLINE + void increment_i (I &it, difference_type n, size_type /* size_i */, size_type size_j) { + it += n * size_j; + } + template + static + BOOST_UBLAS_INLINE + void decrement_i (I &it, size_type /* size_i */, size_type size_j) { + it -= size_j; + } + template + static + BOOST_UBLAS_INLINE + void decrement_i (I &it, difference_type n, size_type /* size_i */, size_type size_j) { + it -= n * size_j; + } + template + static + BOOST_UBLAS_INLINE + void increment_j (I &it, size_type /* size_i */, size_type /* size_j */) { + ++ it; + } + template + static + BOOST_UBLAS_INLINE + void increment_j (I &it, difference_type n, size_type /* size_i */, size_type /* size_j */) { + it += n; + } + template + static + BOOST_UBLAS_INLINE + void decrement_j (I &it, size_type /* size_i */, size_type /* size_j */) { + -- it; + } + template + static + BOOST_UBLAS_INLINE + void decrement_j (I &it, difference_type n, size_type /* size_i */, size_type /* size_j */) { + it -= n; } + // Triangular access static BOOST_UBLAS_INLINE - size_type triangular_size (size_type size1, size_type size2) { - size_type size = (std::max) (size1, size2); + size_type triangular_size (size_type size_i, size_type size_j) { + size_type size = (std::max) (size_i, size_j); // Guard against size_type overflow - simplified BOOST_UBLAS_CHECK (size == 0 || size / 2 < (std::numeric_limits::max) () / size /* +1/2 */, bad_size ()); return ((size + 1) * size) / 2; } static BOOST_UBLAS_INLINE - size_type lower_element (size_type i, size_type size1, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (i < size1, bad_index ()); - BOOST_UBLAS_CHECK (j < size2, bad_index ()); + size_type lower_element (size_type i, size_type size_i, size_type j, size_type size_j) { + BOOST_UBLAS_CHECK (i < size_i, bad_index ()); + BOOST_UBLAS_CHECK (j < size_j, bad_index ()); BOOST_UBLAS_CHECK (i >= j, bad_index ()); - detail::ignore_unused_variable_warning(size1); - detail::ignore_unused_variable_warning(size2); + detail::ignore_unused_variable_warning(size_i); + detail::ignore_unused_variable_warning(size_j); // FIXME size_type overflow // sigma_i (i + 1) = (i + 1) * i / 2 // i = 0 1 2 3, sigma = 0 1 3 6 @@ -1471,94 +1514,41 @@ namespace boost { namespace numeric { namespace ublas { } static BOOST_UBLAS_INLINE - size_type upper_element (size_type i, size_type size1, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (i < size1, bad_index ()); - BOOST_UBLAS_CHECK (j < size2, bad_index ()); + size_type upper_element (size_type i, size_type size_i, size_type j, size_type size_j) { + BOOST_UBLAS_CHECK (i < size_i, bad_index ()); + BOOST_UBLAS_CHECK (j < size_j, bad_index ()); BOOST_UBLAS_CHECK (i <= j, bad_index ()); // FIXME size_type overflow // sigma_i (size - i) = size * i - i * (i - 1) / 2 // i = 0 1 2 3, sigma = 0 4 7 9 - return (i * (2 * (std::max) (size1, size2) - i + 1)) / 2 + j - i; + return (i * (2 * (std::max) (size_i, size_j) - i + 1)) / 2 + j - i; } + // Major and minor indices static BOOST_UBLAS_INLINE - size_type element1 (size_type i, size_type size1, size_type /* j */, size_type /* size2 */) { - BOOST_UBLAS_CHECK (i < size1, bad_index ()); - detail::ignore_unused_variable_warning(size1); - return i; - } - static - BOOST_UBLAS_INLINE - size_type element2 (size_type /* i */, size_type /* size1 */, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (j < size2, bad_index ()); - detail::ignore_unused_variable_warning(size2); - return j; - } - static - BOOST_UBLAS_INLINE - size_type address1 (size_type i, size_type size1, size_type /* j */, size_type /* size2 */) { - BOOST_UBLAS_CHECK (i <= size1, bad_index ()); - detail::ignore_unused_variable_warning(size1); - return i; - } - static - BOOST_UBLAS_INLINE - size_type address2 (size_type /* i */, size_type /* size1 */, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (j <= size2, bad_index ()); - detail::ignore_unused_variable_warning(size2); - return j; - } - static - BOOST_UBLAS_INLINE - size_type index1 (size_type index1, size_type /* index2 */) { + size_type index_M (size_type index1, size_type /* index2 */) { return index1; } static BOOST_UBLAS_INLINE - size_type index2 (size_type /* index1 */, size_type index2) { + size_type index_m (size_type /* index1 */, size_type index2) { return index2; } static BOOST_UBLAS_INLINE - size_type size1 (size_type size1, size_type /* size2 */) { - return size1; + size_type size_M (size_type size_i, size_type /* size_j */) { + return size_i; } static BOOST_UBLAS_INLINE - size_type size2 (size_type /* size1 */, size_type size2) { - return size2; - } - - // Iterating - template - static - BOOST_UBLAS_INLINE - void increment1 (I &it, size_type /* size1 */, size_type size2) { - it += size2; - } - template - static - BOOST_UBLAS_INLINE - void decrement1 (I &it, size_type /* size1 */, size_type size2) { - it -= size2; - } - template - static - BOOST_UBLAS_INLINE - void increment2 (I &it, size_type /* size1 */, size_type /* size2 */) { - ++ it; - } - template - static - BOOST_UBLAS_INLINE - void decrement2 (I &it, size_type /* size1 */, size_type /* size2 */) { - -- it; + size_type size_m (size_type /* size_i */, size_type size_j) { + return size_j; } }; - // This functor computes the address translation - // matrix [i] [j] -> storage [i + j * size1] + // This functor defines storage layout and it's properties + // matrix (i,j) -> storage [i + j * size_i] template struct basic_column_major { typedef Z size_type; @@ -1567,98 +1557,141 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE - size_type storage_size (size_type size1, size_type size2) { + size_type storage_size (size_type size_i, size_type size_j) { // Guard against size_type overflow - BOOST_UBLAS_CHECK (size1 == 0 || size2 <= (std::numeric_limits::max) () / size1, bad_size ()); - return size1 * size2; + BOOST_UBLAS_CHECK (size_i == 0 || size_j <= (std::numeric_limits::max) () / size_i, bad_size ()); + return size_i * size_j; } - // Indexing + // Indexing conversion to storage element static BOOST_UBLAS_INLINE - size_type element (size_type i, size_type size1, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (i < size1, bad_index ()); - BOOST_UBLAS_CHECK (j < size2, bad_index ()); - detail::ignore_unused_variable_warning(size2); + size_type element (size_type i, size_type size_i, size_type j, size_type size_j) { + BOOST_UBLAS_CHECK (i < size_i, bad_index ()); + BOOST_UBLAS_CHECK (j < size_j, bad_index ()); + detail::ignore_unused_variable_warning(size_j); // Guard against size_type overflow - BOOST_UBLAS_CHECK (j <= ((std::numeric_limits::max) () - i) / size1, bad_index ()); - return i + j * size1; + BOOST_UBLAS_CHECK (j <= ((std::numeric_limits::max) () - i) / size_i, bad_index ()); + return i + j * size_i; } static BOOST_UBLAS_INLINE - size_type address (size_type i, size_type size1, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (i <= size1, bad_index ()); - BOOST_UBLAS_CHECK (j <= size2, bad_index ()); - detail::ignore_unused_variable_warning(size2); - // Guard against size_type overflow - address may be size1 past end of storage - BOOST_UBLAS_CHECK (size1 == 0 || j <= ((std::numeric_limits::max) () - i) / size1, bad_index ()); - return i + j * size1; + size_type address (size_type i, size_type size_i, size_type j, size_type size_j) { + BOOST_UBLAS_CHECK (i <= size_i, bad_index ()); + BOOST_UBLAS_CHECK (j <= size_j, bad_index ()); + detail::ignore_unused_variable_warning(size_j); + // Guard against size_type overflow - address may be size_i past end of storage + BOOST_UBLAS_CHECK (size_i == 0 || j <= ((std::numeric_limits::max) () - i) / size_i, bad_index ()); + return i + j * size_i; } + + // Storage element to index conversion static BOOST_UBLAS_INLINE - difference_type distance1 (difference_type k, size_type /* size1 */, size_type /* size2 */) { + difference_type distance_i (difference_type k, size_type /* size_i */, size_type /* size_j */) { return k; } static BOOST_UBLAS_INLINE - difference_type distance2 (difference_type k, size_type size1, size_type /* size2 */) { - return size1 != 0 ? k / size1 : 0; + difference_type distance_j (difference_type k, size_type size_i, size_type /* size_j */) { + return size_i != 0 ? k / size_i : 0; } static BOOST_UBLAS_INLINE - size_type index1 (difference_type k, size_type size1, size_type /* size2 */) { - return size1 != 0 ? k % size1 : 0; + size_type index_i (difference_type k, size_type size_i, size_type /* size_j */) { + return size_i != 0 ? k % size_i : 0; } static BOOST_UBLAS_INLINE - size_type index2 (difference_type k, size_type size1, size_type /* size2 */) { - return size1 != 0 ? k / size1 : 0; + size_type index_j (difference_type k, size_type size_i, size_type /* size_j */) { + return size_i != 0 ? k / size_i : 0; } static BOOST_UBLAS_INLINE - bool fast1 () { + bool fast_i () { return true; } static BOOST_UBLAS_INLINE - size_type one1 (size_type /* size1 */, size_type /* size2 */) { - return 1; - } - static - BOOST_UBLAS_INLINE - bool fast2 () { + bool fast_j () { return false; } + + // Iterating + template static BOOST_UBLAS_INLINE - size_type one2 (size_type size1, size_type /* size2 */) { - return size1; + void increment_i (I &it, size_type /* size_i */, size_type /* size_j */) { + ++ it; + } + template + static + BOOST_UBLAS_INLINE + void increment_i (I &it, difference_type n, size_type /* size_i */, size_type /* size_j */) { + it += n; + } + template + static + BOOST_UBLAS_INLINE + void decrement_i (I &it, size_type /* size_i */, size_type /* size_j */) { + -- it; + } + template + static + BOOST_UBLAS_INLINE + void decrement_i (I &it, difference_type n, size_type /* size_i */, size_type /* size_j */) { + it -= n; + } + template + static + BOOST_UBLAS_INLINE + void increment_j (I &it, size_type size_i, size_type /* size_j */) { + it += size_i; + } + template + static + BOOST_UBLAS_INLINE + void increment_j (I &it, difference_type n, size_type size_i, size_type /* size_j */) { + it += n * size_i; + } + template + static + BOOST_UBLAS_INLINE + void decrement_j (I &it, size_type size_i, size_type /* size_j */) { + it -= size_i; + } + template + static + BOOST_UBLAS_INLINE + void decrement_j (I &it, difference_type n, size_type size_i, size_type /* size_j */) { + it -= n* size_i; } + // Triangular access static BOOST_UBLAS_INLINE - size_type triangular_size (size_type size1, size_type size2) { - size_type size = (std::max) (size1, size2); + size_type triangular_size (size_type size_i, size_type size_j) { + size_type size = (std::max) (size_i, size_j); // Guard against size_type overflow - simplified BOOST_UBLAS_CHECK (size == 0 || size / 2 < (std::numeric_limits::max) () / size /* +1/2 */, bad_size ()); return ((size + 1) * size) / 2; } static BOOST_UBLAS_INLINE - size_type lower_element (size_type i, size_type size1, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (i < size1, bad_index ()); - BOOST_UBLAS_CHECK (j < size2, bad_index ()); + size_type lower_element (size_type i, size_type size_i, size_type j, size_type size_j) { + BOOST_UBLAS_CHECK (i < size_i, bad_index ()); + BOOST_UBLAS_CHECK (j < size_j, bad_index ()); BOOST_UBLAS_CHECK (i >= j, bad_index ()); // FIXME size_type overflow // sigma_j (size - j) = size * j - j * (j - 1) / 2 // j = 0 1 2 3, sigma = 0 4 7 9 - return i - j + (j * (2 * (std::max) (size1, size2) - j + 1)) / 2; + return i - j + (j * (2 * (std::max) (size_i, size_j) - j + 1)) / 2; } static BOOST_UBLAS_INLINE - size_type upper_element (size_type i, size_type size1, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (i < size1, bad_index ()); - BOOST_UBLAS_CHECK (j < size2, bad_index ()); + size_type upper_element (size_type i, size_type size_i, size_type j, size_type size_j) { + BOOST_UBLAS_CHECK (i < size_i, bad_index ()); + BOOST_UBLAS_CHECK (j < size_j, bad_index ()); BOOST_UBLAS_CHECK (i <= j, bad_index ()); // FIXME size_type overflow // sigma_j (j + 1) = (j + 1) * j / 2 @@ -1666,79 +1699,26 @@ namespace boost { namespace numeric { namespace ublas { return i + ((j + 1) * j) / 2; } + // Major and minor indices static BOOST_UBLAS_INLINE - size_type element1 (size_type /* i */, size_type /* size1 */, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (j < size2, bad_index ()); - detail::ignore_unused_variable_warning(size2); - return j; - } - static - BOOST_UBLAS_INLINE - size_type element2 (size_type i, size_type size1, size_type /* j */, size_type /* size2 */) { - BOOST_UBLAS_CHECK (i < size1, bad_index ()); - detail::ignore_unused_variable_warning(size1); - return i; - } - static - BOOST_UBLAS_INLINE - size_type address1 (size_type /* i */, size_type /* size1 */, size_type j, size_type size2) { - BOOST_UBLAS_CHECK (j <= size2, bad_index ()); - detail::ignore_unused_variable_warning(size2); - return j; - } - static - BOOST_UBLAS_INLINE - size_type address2 (size_type i, size_type size1, size_type /* j */, size_type /* size2 */) { - BOOST_UBLAS_CHECK (i <= size1, bad_index ()); - detail::ignore_unused_variable_warning(size1); - return i; - } - static - BOOST_UBLAS_INLINE - size_type index1 (size_type /* index1 */, size_type index2) { + size_type index_M (size_type /* index1 */, size_type index2) { return index2; } static BOOST_UBLAS_INLINE - size_type index2 (size_type index1, size_type /* index2 */) { + size_type index_m (size_type index1, size_type /* index2 */) { return index1; } static BOOST_UBLAS_INLINE - size_type size1 (size_type /* size1 */, size_type size2) { - return size2; + size_type size_M (size_type /* size_i */, size_type size_j) { + return size_j; } static BOOST_UBLAS_INLINE - size_type size2 (size_type size1, size_type /* size2 */) { - return size1; - } - - // Iterating - template - static - BOOST_UBLAS_INLINE - void increment1 (I &it, size_type /* size1 */, size_type /* size2 */) { - ++ it; - } - template - static - BOOST_UBLAS_INLINE - void decrement1 (I &it, size_type /* size1 */, size_type /* size2 */) { - -- it; - } - template - static - BOOST_UBLAS_INLINE - void increment2 (I &it, size_type size1, size_type /* size2 */) { - it += size1; - } - template - static - BOOST_UBLAS_INLINE - void decrement2 (I &it, size_type size1, size_type /* size2 */) { - it -= size1; + size_type size_m (size_type size_i, size_type /* size_j */) { + return size_i; } }; @@ -1750,8 +1730,8 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type packed_size (L, size_type size1, size_type size2) { - return L::storage_size (size1, size2); + size_type packed_size (L, size_type size_i, size_type size_j) { + return L::storage_size (size_i, size_j); } static @@ -1769,6 +1749,26 @@ namespace boost { namespace numeric { namespace ublas { bool other (size_type /* i */, size_type /* j */) { return true; } + static + BOOST_UBLAS_INLINE + size_type restrict1 (size_type i, size_type j) { + return i; + } + static + BOOST_UBLAS_INLINE + size_type restrict2 (size_type i, size_type j) { + return j; + } + static + BOOST_UBLAS_INLINE + size_type mutable_restrict1 (size_type i, size_type j) { + return i; + } + static + BOOST_UBLAS_INLINE + size_type mutable_restrict2 (size_type i, size_type j) { + return j; + } }; template @@ -1778,8 +1778,8 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type packed_size (L, size_type size1, size_type size2) { - return L::triangular_size (size1, size2); + size_type packed_size (L, size_type size_i, size_type size_j) { + return L::triangular_size (size_i, size_j); } static @@ -1800,8 +1800,8 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type element (L, size_type i, size_type size1, size_type j, size_type size2) { - return L::lower_element (i, size1, j, size2); + size_type element (L, size_type i, size_type size_i, size_type j, size_type size_j) { + return L::lower_element (i, size_i, j, size_j); } static @@ -1832,8 +1832,8 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type packed_size (L, size_type size1, size_type size2) { - return L::triangular_size (size1, size2); + size_type packed_size (L, size_type size_i, size_type size_j) { + return L::triangular_size (size_i, size_j); } static @@ -1854,8 +1854,8 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type element (L, size_type i, size_type size1, size_type j, size_type size2) { - return L::upper_element (i, size1, j, size2); + size_type element (L, size_type i, size_type size_i, size_type j, size_type size_j) { + return L::upper_element (i, size_i, j, size_j); } static @@ -1886,10 +1886,10 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type packed_size (L, size_type size1, size_type size2) { + size_type packed_size (L, size_type size_i, size_type size_j) { // Zero size strict triangles are bad at this point - BOOST_UBLAS_CHECK (size1 != 0 && size2 != 0, bad_index ()); - return L::triangular_size (size1 - 1, size2 - 1); + BOOST_UBLAS_CHECK (size_i != 0 && size_j != 0, bad_index ()); + return L::triangular_size (size_i - 1, size_j - 1); } static @@ -1905,10 +1905,10 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type element (L, size_type i, size_type size1, size_type j, size_type size2) { + size_type element (L, size_type i, size_type size_i, size_type j, size_type size_j) { // Zero size strict triangles are bad at this point - BOOST_UBLAS_CHECK (size1 != 0 && size2 != 0, bad_index ()); - return L::lower_element (i, size1 - 1, j, size2 - 1); + BOOST_UBLAS_CHECK (size_i != 0 && size_j != 0, bad_index ()); + return L::lower_element (i, size_i - 1, j, size_j - 1); } static @@ -1929,10 +1929,10 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type packed_size (L, size_type size1, size_type size2) { + size_type packed_size (L, size_type size_i, size_type size_j) { // Zero size strict triangles are bad at this point - BOOST_UBLAS_CHECK (size1 != 0 && size2 != 0, bad_index ()); - return L::triangular_size (size1 - 1, size2 - 1); + BOOST_UBLAS_CHECK (size_i != 0 && size_j != 0, bad_index ()); + return L::triangular_size (size_i - 1, size_j - 1); } static @@ -1948,10 +1948,10 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type element (L, size_type i, size_type size1, size_type j, size_type size2) { + size_type element (L, size_type i, size_type size_i, size_type j, size_type size_j) { // Zero size strict triangles are bad at this point - BOOST_UBLAS_CHECK (size1 != 0 && size2 != 0, bad_index ()); - return L::upper_element (i, size1 - 1, j, size2 - 1); + BOOST_UBLAS_CHECK (size_i != 0 && size_j != 0, bad_index ()); + return L::upper_element (i, size_i - 1, j, size_j - 1); } static @@ -1972,10 +1972,10 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type packed_size (L, size_type size1, size_type size2) { + size_type packed_size (L, size_type size_i, size_type size_j) { // Zero size strict triangles are bad at this point - BOOST_UBLAS_CHECK (size1 != 0 && size2 != 0, bad_index ()); - return L::triangular_size (size1 - 1, size2 - 1); + BOOST_UBLAS_CHECK (size_i != 0 && size_j != 0, bad_index ()); + return L::triangular_size (size_i - 1, size_j - 1); } static @@ -1996,10 +1996,10 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type element (L, size_type i, size_type size1, size_type j, size_type size2) { + size_type element (L, size_type i, size_type size_i, size_type j, size_type size_j) { // Zero size strict triangles are bad at this point - BOOST_UBLAS_CHECK (size1 != 0 && size2 != 0, bad_index ()); - return L::lower_element (i, size1 - 1, j, size2 - 1); + BOOST_UBLAS_CHECK (size_i != 0 && size_j != 0, bad_index ()); + return L::lower_element (i, size_i - 1, j, size_j - 1); } static @@ -2030,10 +2030,10 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type packed_size (L, size_type size1, size_type size2) { + size_type packed_size (L, size_type size_i, size_type size_j) { // Zero size strict triangles are bad at this point - BOOST_UBLAS_CHECK (size1 != 0 && size2 != 0, bad_index ()); - return L::triangular_size (size1 - 1, size2 - 1); + BOOST_UBLAS_CHECK (size_i != 0 && size_j != 0, bad_index ()); + return L::triangular_size (size_i - 1, size_j - 1); } static @@ -2054,10 +2054,10 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE - size_type element (L, size_type i, size_type size1, size_type j, size_type size2) { + size_type element (L, size_type i, size_type size_i, size_type j, size_type size_j) { // Zero size strict triangles are bad at this point - BOOST_UBLAS_CHECK (size1 != 0 && size2 != 0, bad_index ()); - return L::upper_element (i, size1 - 1, j, size2 - 1); + BOOST_UBLAS_CHECK (size_i != 0 && size_j != 0, bad_index ()); + return L::upper_element (i, size_i - 1, j, size_j - 1); } static diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index a05e31ef..68a9d3f8 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -41,15 +41,17 @@ namespace boost { namespace numeric { namespace ublas { // Common elements to preserve const size_type size1_min = (std::min) (size1, msize1); const size_type size2_min = (std::min) (size2, msize2); - // Order loop for i-major and j-minor sizes - const size_type i_size = layout_type::size1 (size1_min, size2_min); - const size_type j_size = layout_type::size2 (size1_min, size2_min); - for (size_type i = 0; i != i_size; ++i) { // indexing copy over major - for (size_type j = 0; j != j_size; ++j) { - const size_type element1 = layout_type::element1(i,i_size, j,j_size); - const size_type element2 = layout_type::element2(i,i_size, j,j_size); - temporary.data () [layout_type::element (element1, size1, element2, size2)] = - m.data() [layout_type::element (element1, msize1, element2, msize2)]; + // Order for major and minor sizes + const size_type major_size = layout_type::size_M (size1_min, size2_min); + const size_type minor_size = layout_type::size_m (size1_min, size2_min); + // Indexing copy over major + for (size_type major = 0; major != major_size; ++major) { + for (size_type minor = 0; minor != minor_size; ++minor) { + // find indexes - use invertability of element_ functions + const size_type i1 = layout_type::index_M(major, minor); + const size_type i2 = layout_type::index_m(major, minor); + temporary.data () [layout_type::element (i1, size1, i2, size2)] = + m.data() [layout_type::element (i1, msize1, i2, msize2)]; } } m.assign_temporary (temporary); @@ -355,28 +357,28 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator1 &operator ++ () { - layout_type::increment1 (it_, (*this) ().size1 (), (*this) ().size2 ()); + layout_type::increment_i (it_, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE const_iterator1 &operator -- () { - layout_type::decrement1 (it_, (*this) ().size1 (), (*this) ().size2 ()); + layout_type::decrement_i (it_, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE const_iterator1 &operator += (difference_type n) { - it_ += n * layout_type::one1 ((*this) ().size1 (), (*this) ().size2 ()); + layout_type::increment_i (it_, n, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE const_iterator1 &operator -= (difference_type n) { - it_ -= n * layout_type::one1 ((*this) ().size1 (), (*this) ().size2 ()); + layout_type::decrement_i (it_, n, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE difference_type operator - (const const_iterator1 &it) const { BOOST_UBLAS_CHECK (&(*this) () == &it (), external_logic ()); - return layout_type::distance1 (it_ - it.it_, (*this) ().size1 (), (*this) ().size2 ()); + return layout_type::distance_i (it_ - it.it_, (*this) ().size1 (), (*this) ().size2 ()); } // Dereference @@ -428,12 +430,12 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { const self_type &m = (*this) (); - return layout_type::index1 (it_ - m.begin1 ().it_, m.size1 (), m.size2 ()); + return layout_type::index_i (it_ - m.begin1 ().it_, m.size1 (), m.size2 ()); } BOOST_UBLAS_INLINE size_type index2 () const { const self_type &m = (*this) (); - return layout_type::index2 (it_ - m.begin1 ().it_, m.size1 (), m.size2 ()); + return layout_type::index_j (it_ - m.begin1 ().it_, m.size1 (), m.size2 ()); } // Assignment @@ -497,28 +499,28 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator1 &operator ++ () { - layout_type::increment1 (it_, (*this) ().size1 (), (*this) ().size2 ()); + layout_type::increment_i (it_, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE iterator1 &operator -- () { - layout_type::decrement1 (it_, (*this) ().size1 (), (*this) ().size2 ()); + layout_type::decrement_i (it_, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE iterator1 &operator += (difference_type n) { - it_ += n * layout_type::one1 ((*this) ().size1 (), (*this) ().size2 ()); + layout_type::increment_i (it_, n, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE iterator1 &operator -= (difference_type n) { - it_ -= n * layout_type::one1 ((*this) ().size1 (), (*this) ().size2 ()); + layout_type::decrement_i (it_, n, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE difference_type operator - (const iterator1 &it) const { BOOST_UBLAS_CHECK (&(*this) () == &it (), external_logic ()); - return layout_type::distance1 (it_ - it.it_, (*this) ().size1 (), (*this) ().size2 ()); + return layout_type::distance_i (it_ - it.it_, (*this) ().size1 (), (*this) ().size2 ()); } // Dereference @@ -570,12 +572,12 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { self_type &m = (*this) (); - return layout_type::index1 (it_ - m.begin1 ().it_, m.size1 (), m.size2 ()); + return layout_type::index_i (it_ - m.begin1 ().it_, m.size1 (), m.size2 ()); } BOOST_UBLAS_INLINE size_type index2 () const { self_type &m = (*this) (); - return layout_type::index2 (it_ - m.begin1 ().it_, m.size1 (), m.size2 ()); + return layout_type::index_j (it_ - m.begin1 ().it_, m.size1 (), m.size2 ()); } // Assignment @@ -642,28 +644,28 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator2 &operator ++ () { - layout_type::increment2 (it_, (*this) ().size1 (), (*this) ().size2 ()); + layout_type::increment_j (it_, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE const_iterator2 &operator -- () { - layout_type::decrement2 (it_, (*this) ().size1 (), (*this) ().size2 ()); + layout_type::decrement_j (it_, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE const_iterator2 &operator += (difference_type n) { - it_ += n * layout_type::one2 ((*this) ().size1 (), (*this) ().size2 ()); + layout_type::increment_j (it_, n, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE const_iterator2 &operator -= (difference_type n) { - it_ -= n * layout_type::one2 ((*this) ().size1 (), (*this) ().size2 ()); + layout_type::decrement_j (it_, n, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE difference_type operator - (const const_iterator2 &it) const { BOOST_UBLAS_CHECK (&(*this) () == &it (), external_logic ()); - return layout_type::distance2 (it_ - it.it_, (*this) ().size1 (), (*this) ().size2 ()); + return layout_type::distance_j (it_ - it.it_, (*this) ().size1 (), (*this) ().size2 ()); } // Dereference @@ -715,12 +717,12 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { const self_type &m = (*this) (); - return layout_type::index1 (it_ - m.begin2 ().it_, m.size1 (), m.size2 ()); + return layout_type::index_i (it_ - m.begin2 ().it_, m.size1 (), m.size2 ()); } BOOST_UBLAS_INLINE size_type index2 () const { const self_type &m = (*this) (); - return layout_type::index2 (it_ - m.begin2 ().it_, m.size1 (), m.size2 ()); + return layout_type::index_j (it_ - m.begin2 ().it_, m.size1 (), m.size2 ()); } // Assignment @@ -784,28 +786,28 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator2 &operator ++ () { - layout_type::increment2 (it_, (*this) ().size1 (), (*this) ().size2 ()); + layout_type::increment_j (it_, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE iterator2 &operator -- () { - layout_type::decrement2 (it_, (*this) ().size1 (), (*this) ().size2 ()); + layout_type::decrement_j (it_, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE iterator2 &operator += (difference_type n) { - it_ += n * layout_type::one2 ((*this) ().size1 (), (*this) ().size2 ()); + layout_type::increment_j (it_, n, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE iterator2 &operator -= (difference_type n) { - it_ -= n * layout_type::one2 ((*this) ().size1 (), (*this) ().size2 ()); + layout_type::decrement_j (it_, n, (*this) ().size1 (), (*this) ().size2 ()); return *this; } BOOST_UBLAS_INLINE difference_type operator - (const iterator2 &it) const { BOOST_UBLAS_CHECK (&(*this) () == &it (), external_logic ()); - return layout_type::distance2 (it_ - it.it_, (*this) ().size1 (), (*this) ().size2 ()); + return layout_type::distance_j (it_ - it.it_, (*this) ().size1 (), (*this) ().size2 ()); } // Dereference @@ -857,12 +859,12 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { self_type &m = (*this) (); - return layout_type::index1 (it_ - m.begin2 ().it_, m.size1 (), m.size2 ()); + return layout_type::index_i (it_ - m.begin2 ().it_, m.size1 (), m.size2 ()); } BOOST_UBLAS_INLINE size_type index2 () const { self_type &m = (*this) (); - return layout_type::index2 (it_ - m.begin2 ().it_, m.size1 (), m.size2 ()); + return layout_type::index_j (it_ - m.begin2 ().it_, m.size1 (), m.size2 ()); } // Assignment @@ -1249,7 +1251,7 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR return const_iterator1 (*this, i, j); #else - return const_iterator1 (*this, i, j, data () [layout_type::address1 (i, size1_, j, size2_)].begin () + layout_type::address2 (i, size1_, j, size2_)); + return const_iterator1 (*this, i, j, data () [layout_type::index_M (i, j)].begin () + layout_type::index_m (i, j)); #endif } BOOST_UBLAS_INLINE @@ -1257,7 +1259,7 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR return iterator1 (*this, i, j); #else - return iterator1 (*this, i, j, data () [layout_type::address1 (i, size1_, j, size2_)].begin () + layout_type::address2 (i, size1_, j, size2_)); + return iterator1 (*this, i, j, data () [layout_type::index_M (i, j)].begin () + layout_type::index_m (i, j)); #endif } BOOST_UBLAS_INLINE @@ -1265,7 +1267,7 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR return const_iterator2 (*this, i, j); #else - return const_iterator2 (*this, i, j, data () [layout_type::address1 (i, size1_, j, size2_)].begin () + layout_type::address2 (i, size1_, j, size2_)); + return const_iterator2 (*this, i, j, data () [layout_type::index_M (i, j)].begin () + layout_type::index_m (i, j)); #endif } BOOST_UBLAS_INLINE @@ -1273,7 +1275,7 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR return iterator2 (*this, i, j); #else - return iterator2 (*this, i, j, data () [layout_type::address1 (i, size1_, j, size2_)].begin () + layout_type::address2 (i, size1_, j, size2_)); + return iterator2 (*this, i, j, data () [layout_type::index_M (i, j)].begin () + layout_type::index_m (i, j)); #endif } @@ -1308,7 +1310,7 @@ namespace boost { namespace numeric { namespace ublas { const_iterator1 &operator ++ () { ++ i_; const self_type &m = (*this) (); - if (layout_type::fast1 ()) + if (layout_type::fast_i ()) ++ it_; else it_ = m.find1 (1, i_, j_).it_; @@ -1318,7 +1320,7 @@ namespace boost { namespace numeric { namespace ublas { const_iterator1 &operator -- () { -- i_; const self_type &m = (*this) (); - if (layout_type::fast1 ()) + if (layout_type::fast_i ()) -- it_; else it_ = m.find1 (1, i_, j_).it_; @@ -1467,7 +1469,7 @@ namespace boost { namespace numeric { namespace ublas { iterator1 &operator ++ () { ++ i_; self_type &m = (*this) (); - if (layout_type::fast1 ()) + if (layout_type::fast_i ()) ++ it_; else it_ = m.find1 (1, i_, j_).it_; @@ -1477,7 +1479,7 @@ namespace boost { namespace numeric { namespace ublas { iterator1 &operator -- () { -- i_; self_type &m = (*this) (); - if (layout_type::fast1 ()) + if (layout_type::fast_i ()) -- it_; else it_ = m.find1 (1, i_, j_).it_; @@ -1629,7 +1631,7 @@ namespace boost { namespace numeric { namespace ublas { const_iterator2 &operator ++ () { ++ j_; const self_type &m = (*this) (); - if (layout_type::fast2 ()) + if (layout_type::fast_j ()) ++ it_; else it_ = m.find2 (1, i_, j_).it_; @@ -1639,7 +1641,7 @@ namespace boost { namespace numeric { namespace ublas { const_iterator2 &operator -- () { -- j_; const self_type &m = (*this) (); - if (layout_type::fast2 ()) + if (layout_type::fast_j ()) -- it_; else it_ = m.find2 (1, i_, j_).it_; @@ -1788,7 +1790,7 @@ namespace boost { namespace numeric { namespace ublas { iterator2 &operator ++ () { ++ j_; self_type &m = (*this) (); - if (layout_type::fast2 ()) + if (layout_type::fast_j ()) ++ it_; else it_ = m.find2 (1, i_, j_).it_; @@ -1798,7 +1800,7 @@ namespace boost { namespace numeric { namespace ublas { iterator2 &operator -- () { -- j_; self_type &m = (*this) (); - if (layout_type::fast2 ()) + if (layout_type::fast_j ()) -- it_; else it_ = m.find2 (1, i_, j_).it_; diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index 3bb02f95..3b5fb893 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -552,8 +552,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 = size_type (-1); size_type index2 = size_type (-1); while (rank == 1 && it != it_end) { - index1 = layout_type::index1 ((*it).first, size1_, size2_); - index2 = layout_type::index2 ((*it).first, size1_, size2_); + index1 = layout_type::index_i ((*it).first, size1_, size2_); + index2 = layout_type::index_j ((*it).first, size1_, size2_); if (direction > 0) { if ((index1 >= i && index2 == j) || (i >= size1_)) break; @@ -581,8 +581,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 = size_type (-1); size_type index2 = size_type (-1); while (rank == 1 && it != it_end) { - index1 = layout_type::index1 ((*it).first, size1_, size2_); - index2 = layout_type::index2 ((*it).first, size1_, size2_); + index1 = layout_type::index_i ((*it).first, size1_, size2_); + index2 = layout_type::index_j ((*it).first, size1_, size2_); if (direction > 0) { if ((index1 >= i && index2 == j) || (i >= size1_)) break; @@ -610,8 +610,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 = size_type (-1); size_type index2 = size_type (-1); while (rank == 1 && it != it_end) { - index1 = layout_type::index1 ((*it).first, size1_, size2_); - index2 = layout_type::index2 ((*it).first, size1_, size2_); + index1 = layout_type::index_i ((*it).first, size1_, size2_); + index2 = layout_type::index_j ((*it).first, size1_, size2_); if (direction > 0) { if ((index2 >= j && index1 == i) || (j >= size2_)) break; @@ -639,8 +639,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 = size_type (-1); size_type index2 = size_type (-1); while (rank == 1 && it != it_end) { - index1 = layout_type::index1 ((*it).first, size1_, size2_); - index2 = layout_type::index2 ((*it).first, size1_, size2_); + index1 = layout_type::index_i ((*it).first, size1_, size2_); + index2 = layout_type::index_j ((*it).first, size1_, size2_); if (direction > 0) { if ((index2 >= j && index1 == i) || (j >= size2_)) break; @@ -690,7 +690,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else *this = (*this) ().find1 (rank_, index1 () + 1, j_, 1); @@ -698,7 +698,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else *this = (*this) ().find1 (rank_, index1 () - 1, j_, -1); @@ -756,8 +756,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { const self_type &m = (*this) (); - BOOST_UBLAS_CHECK (layout_type::index1 ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*it_).first, m.size1 (), m.size2 ()); + BOOST_UBLAS_CHECK (layout_type::index_i ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size1 (), bad_index ()); + return layout_type::index_i ((*it_).first, m.size1 (), m.size2 ()); } else { return i_; } @@ -766,8 +766,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { if (rank_ == 1) { const self_type &m = (*this) (); - BOOST_UBLAS_CHECK (layout_type::index2 ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*it_).first, m.size1 (), m.size2 ()); + BOOST_UBLAS_CHECK (layout_type::index_j ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size2 (), bad_index ()); + return layout_type::index_j ((*it_).first, m.size1 (), m.size2 ()); } else { return j_; } @@ -836,7 +836,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else *this = (*this) ().find1 (rank_, index1 () + 1, j_, 1); @@ -844,7 +844,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else *this = (*this) ().find1 (rank_, index1 () - 1, j_, -1); @@ -902,8 +902,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { const self_type &m = (*this) (); - BOOST_UBLAS_CHECK (layout_type::index1 ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*it_).first, m.size1 (), m.size2 ()); + BOOST_UBLAS_CHECK (layout_type::index_i ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size1 (), bad_index ()); + return layout_type::index_i ((*it_).first, m.size1 (), m.size2 ()); } else { return i_; } @@ -912,8 +912,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { if (rank_ == 1) { const self_type &m = (*this) (); - BOOST_UBLAS_CHECK (layout_type::index2 ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*it_).first, m.size1 (), m.size2 ()); + BOOST_UBLAS_CHECK (layout_type::index_j ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size2 (), bad_index ()); + return layout_type::index_j ((*it_).first, m.size1 (), m.size2 ()); } else { return j_; } @@ -987,7 +987,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else *this = (*this) ().find2 (rank_, i_, index2 () + 1, 1); @@ -995,7 +995,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else *this = (*this) ().find2 (rank_, i_, index2 () - 1, -1); @@ -1052,8 +1052,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { if (rank_ == 1) { const self_type &m = (*this) (); - BOOST_UBLAS_CHECK (layout_type::index1 ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*it_).first, m.size1 (), m.size2 ()); + BOOST_UBLAS_CHECK (layout_type::index_i ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size1 (), bad_index ()); + return layout_type::index_i ((*it_).first, m.size1 (), m.size2 ()); } else { return i_; } @@ -1063,8 +1063,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { const self_type &m = (*this) (); - BOOST_UBLAS_CHECK (layout_type::index2 ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*it_).first, m.size1 (), m.size2 ()); + BOOST_UBLAS_CHECK (layout_type::index_j ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size2 (), bad_index ()); + return layout_type::index_j ((*it_).first, m.size1 (), m.size2 ()); } else { return j_; } @@ -1133,7 +1133,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else *this = (*this) ().find2 (rank_, i_, index2 () + 1, 1); @@ -1141,7 +1141,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else *this = (*this) ().find2 (rank_, i_, index2 () - 1, -1); @@ -1198,8 +1198,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { if (rank_ == 1) { const self_type &m = (*this) (); - BOOST_UBLAS_CHECK (layout_type::index1 ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*it_).first, m.size1 (), m.size2 ()); + BOOST_UBLAS_CHECK (layout_type::index_i ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size1 (), bad_index ()); + return layout_type::index_i ((*it_).first, m.size1 (), m.size2 ()); } else { return i_; } @@ -1209,8 +1209,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { const self_type &m = (*this) (); - BOOST_UBLAS_CHECK (layout_type::index2 ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*it_).first, m.size1 (), m.size2 ()); + BOOST_UBLAS_CHECK (layout_type::index_j ((*it_).first, m.size1 (), m.size2 ()) < (*this) ().size2 (), bad_index ()); + return layout_type::index_j ((*it_).first, m.size1 (), m.size2 ()); } else { return j_; } @@ -1344,13 +1344,13 @@ namespace boost { namespace numeric { namespace ublas { mapped_vector_of_mapped_vector (): matrix_container (), size1_ (0), size2_ (0), data_ () { - data_ [layout_type::size1 (size1_, size2_)] = vector_data_value_type (); + data_ [layout_type::size_M (size1_, size2_)] = vector_data_value_type (); } BOOST_UBLAS_INLINE mapped_vector_of_mapped_vector (size_type size1, size_type size2, size_type non_zeros = 0): matrix_container (), size1_ (size1), size2_ (size2), data_ () { - data_ [layout_type::size1 (size1_, size2_)] = vector_data_value_type (); + data_ [layout_type::size_M (size1_, size2_)] = vector_data_value_type (); } BOOST_UBLAS_INLINE mapped_vector_of_mapped_vector (const mapped_vector_of_mapped_vector &m): @@ -1361,7 +1361,7 @@ namespace boost { namespace numeric { namespace ublas { mapped_vector_of_mapped_vector (const matrix_expression &ae, size_type non_zeros = 0): matrix_container (), size1_ (ae ().size1 ()), size2_ (ae ().size2 ()), data_ () { - data_ [layout_type::size1 (size1_, size2_)] = vector_data_value_type (); + data_ [layout_type::size_M (size1_, size2_)] = vector_data_value_type (); matrix_assign (*this, ae); } @@ -1407,7 +1407,7 @@ namespace boost { namespace numeric { namespace ublas { size1_ = size1; size2_ = size2; data ().clear (); - data () [layout_type::size1 (size1_, size2_)] = vector_data_value_type (); + data () [layout_type::size_M (size1_, size2_)] = vector_data_value_type (); } // Element support @@ -1417,8 +1417,8 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_pointer find_element (size_type i, size_type j) const { - const size_type element1 = layout_type::element1 (i, size1_, j, size2_); - const size_type element2 = layout_type::element2 (i, size1_, j, size2_); + const size_type element1 = layout_type::index_M (i, j); + const size_type element2 = layout_type::index_m (i, j); vector_const_subiterator_type itv (data ().find (element1)); if (itv == data ().end ()) return 0; @@ -1433,8 +1433,8 @@ namespace boost { namespace numeric { namespace ublas { // Element access BOOST_UBLAS_INLINE const_reference operator () (size_type i, size_type j) const { - const size_type element1 = layout_type::element1 (i, size1_, j, size2_); - const size_type element2 = layout_type::element2 (i, size1_, j, size2_); + const size_type element1 = layout_type::index_M (i, j); + const size_type element2 = layout_type::index_m (i, j); vector_const_subiterator_type itv (data ().find (element1)); if (itv == data ().end ()) return zero_; @@ -1448,8 +1448,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE reference operator () (size_type i, size_type j) { #ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE - const size_type element1 = layout_type::element1 (i, size1_, j, size2_); - const size_type element2 = layout_type::element2 (i, size1_, j, size2_); + const size_type element1 = layout_type::index_M (i, j); + const size_type element2 = layout_type::index_m (i, j); vector_data_value_type& vd (data () [element1]); std::pair ii (vd.insert (typename array_type::value_type::second_type::value_type (element2, value_type/*zero*/()))); BOOST_UBLAS_CHECK ((ii.first)->first == element2, internal_logic ()); // broken map @@ -1463,8 +1463,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE true_reference insert_element (size_type i, size_type j, const_reference t) { BOOST_UBLAS_CHECK (!find_element (i, j), bad_index ()); // duplicate element - const size_type element1 = layout_type::element1 (i, size1_, j, size2_); - const size_type element2 = layout_type::element2 (i, size1_, j, size2_); + const size_type element1 = layout_type::index_M (i, j); + const size_type element2 = layout_type::index_m (i, j); vector_data_value_type& vd (data () [element1]); std::pair ii (vd.insert (typename vector_data_value_type::value_type (element2, t))); @@ -1475,10 +1475,10 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE void erase_element (size_type i, size_type j) { - vector_subiterator_type itv (data ().find (layout_type::element1 (i, size1_, j, size2_))); + vector_subiterator_type itv (data ().find (layout_type::index_M (i, j))); if (itv == data ().end ()) return; - subiterator_type it ((*itv).second.find (layout_type::element2 (i, size1_, j, size2_))); + subiterator_type it ((*itv).second.find (layout_type::index_m (i, j))); if (it == (*itv).second.end ()) return; (*itv).second.erase (it); @@ -1488,7 +1488,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE void clear () { data ().clear (); - data_ [layout_type::size1 (size1_, size2_)] = vector_data_value_type (); + data_ [layout_type::size_M (size1_, size2_)] = vector_data_value_type (); } // Assignment @@ -1598,8 +1598,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE true_reference at_element (size_type i, size_type j) { - const size_type element1 = layout_type::element1 (i, size1_, j, size2_); - const size_type element2 = layout_type::element2 (i, size1_, j, size2_); + const size_type element1 = layout_type::index_M (i, j); + const size_type element2 = layout_type::index_m (i, j); vector_subiterator_type itv (data ().find (element1)); BOOST_UBLAS_CHECK (itv != data ().end(), bad_index ()); BOOST_UBLAS_CHECK ((*itv).first == element1, internal_logic ()); // broken map @@ -1625,19 +1625,19 @@ namespace boost { namespace numeric { namespace ublas { const_iterator1 find1 (int rank, size_type i, size_type j, int direction = 1) const { BOOST_UBLAS_CHECK (data ().begin () != data ().end (), internal_logic ()); for (;;) { - vector_const_subiterator_type itv (data ().lower_bound (layout_type::address1 (i, size1_, j, size2_))); + vector_const_subiterator_type itv (data ().lower_bound (layout_type::index_M (i, j))); vector_const_subiterator_type itv_end (data ().end ()); if (itv == itv_end) return const_iterator1 (*this, rank, i, j, itv_end, (*(-- itv)).second.end ()); - const_subiterator_type it ((*itv).second.lower_bound (layout_type::address2 (i, size1_, j, size2_))); + const_subiterator_type it ((*itv).second.lower_bound (layout_type::index_m (i, j))); const_subiterator_type it_end ((*itv).second.end ()); if (rank == 0) return const_iterator1 (*this, rank, i, j, itv, it); - if (it != it_end && (*it).first == layout_type::address2 (i, size1_, j, size2_)) + if (it != it_end && (*it).first == layout_type::index_m (i, j)) return const_iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == it_end) return const_iterator1 (*this, rank, i, j, itv, it); i = (*it).first; @@ -1647,7 +1647,7 @@ namespace boost { namespace numeric { namespace ublas { ++ i; } } else /* if (direction < 0) */ { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == (*itv).second.begin ()) return const_iterator1 (*this, rank, i, j, itv, it); -- it; @@ -1664,19 +1664,19 @@ namespace boost { namespace numeric { namespace ublas { iterator1 find1 (int rank, size_type i, size_type j, int direction = 1) { BOOST_UBLAS_CHECK (data ().begin () != data ().end (), internal_logic ()); for (;;) { - vector_subiterator_type itv (data ().lower_bound (layout_type::address1 (i, size1_, j, size2_))); + vector_subiterator_type itv (data ().lower_bound (layout_type::index_M (i, j))); vector_subiterator_type itv_end (data ().end ()); if (itv == itv_end) return iterator1 (*this, rank, i, j, itv_end, (*(-- itv)).second.end ()); - subiterator_type it ((*itv).second.lower_bound (layout_type::address2 (i, size1_, j, size2_))); + subiterator_type it ((*itv).second.lower_bound (layout_type::index_m (i, j))); subiterator_type it_end ((*itv).second.end ()); if (rank == 0) return iterator1 (*this, rank, i, j, itv, it); - if (it != it_end && (*it).first == layout_type::address2 (i, size1_, j, size2_)) + if (it != it_end && (*it).first == layout_type::index_m (i, j)) return iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == it_end) return iterator1 (*this, rank, i, j, itv, it); i = (*it).first; @@ -1686,7 +1686,7 @@ namespace boost { namespace numeric { namespace ublas { ++ i; } } else /* if (direction < 0) */ { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == (*itv).second.begin ()) return iterator1 (*this, rank, i, j, itv, it); -- it; @@ -1703,19 +1703,19 @@ namespace boost { namespace numeric { namespace ublas { const_iterator2 find2 (int rank, size_type i, size_type j, int direction = 1) const { BOOST_UBLAS_CHECK (data ().begin () != data ().end (), internal_logic ()); for (;;) { - vector_const_subiterator_type itv (data ().lower_bound (layout_type::address1 (i, size1_, j, size2_))); + vector_const_subiterator_type itv (data ().lower_bound (layout_type::index_M (i, j))); vector_const_subiterator_type itv_end (data ().end ()); if (itv == itv_end) return const_iterator2 (*this, rank, i, j, itv_end, (*(-- itv)).second.end ()); - const_subiterator_type it ((*itv).second.lower_bound (layout_type::address2 (i, size1_, j, size2_))); + const_subiterator_type it ((*itv).second.lower_bound (layout_type::index_m (i, j))); const_subiterator_type it_end ((*itv).second.end ()); if (rank == 0) return const_iterator2 (*this, rank, i, j, itv, it); - if (it != it_end && (*it).first == layout_type::address2 (i, size1_, j, size2_)) + if (it != it_end && (*it).first == layout_type::index_m (i, j)) return const_iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == it_end) return const_iterator2 (*this, rank, i, j, itv, it); j = (*it).first; @@ -1725,7 +1725,7 @@ namespace boost { namespace numeric { namespace ublas { ++ j; } } else /* if (direction < 0) */ { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == (*itv).second.begin ()) return const_iterator2 (*this, rank, i, j, itv, it); -- it; @@ -1742,19 +1742,19 @@ namespace boost { namespace numeric { namespace ublas { iterator2 find2 (int rank, size_type i, size_type j, int direction = 1) { BOOST_UBLAS_CHECK (data ().begin () != data ().end (), internal_logic ()); for (;;) { - vector_subiterator_type itv (data ().lower_bound (layout_type::address1 (i, size1_, j, size2_))); + vector_subiterator_type itv (data ().lower_bound (layout_type::index_M (i, j))); vector_subiterator_type itv_end (data ().end ()); if (itv == itv_end) return iterator2 (*this, rank, i, j, itv_end, (*(-- itv)).second.end ()); - subiterator_type it ((*itv).second.lower_bound (layout_type::address2 (i, size1_, j, size2_))); + subiterator_type it ((*itv).second.lower_bound (layout_type::index_m (i, j))); subiterator_type it_end ((*itv).second.end ()); if (rank == 0) return iterator2 (*this, rank, i, j, itv, it); - if (it != it_end && (*it).first == layout_type::address2 (i, size1_, j, size2_)) + if (it != it_end && (*it).first == layout_type::index_m (i, j)) return iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == it_end) return iterator2 (*this, rank, i, j, itv, it); j = (*it).first; @@ -1764,7 +1764,7 @@ namespace boost { namespace numeric { namespace ublas { ++ j; } } else /* if (direction < 0) */ { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == (*itv).second.begin ()) return iterator2 (*this, rank, i, j, itv, it); -- it; @@ -1805,7 +1805,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else { const self_type &m = (*this) (); @@ -1822,7 +1822,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { const self_type &m = (*this) (); @@ -1888,8 +1888,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 ((*itv_).first, (*it_).first) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*itv_).first, (*it_).first); + BOOST_UBLAS_CHECK (layout_type::index_M ((*itv_).first, (*it_).first) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M ((*itv_).first, (*it_).first); } else { return i_; } @@ -1897,8 +1897,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index2 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 ((*itv_).first, (*it_).first) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*itv_).first, (*it_).first); + BOOST_UBLAS_CHECK (layout_type::index_m ((*itv_).first, (*it_).first) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m ((*itv_).first, (*it_).first); } else { return j_; } @@ -1969,7 +1969,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else { self_type &m = (*this) (); @@ -1986,7 +1986,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { self_type &m = (*this) (); @@ -2052,8 +2052,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 ((*itv_).first, (*it_).first) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*itv_).first, (*it_).first); + BOOST_UBLAS_CHECK (layout_type::index_M ((*itv_).first, (*it_).first) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M ((*itv_).first, (*it_).first); } else { return i_; } @@ -2061,8 +2061,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index2 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 ((*itv_).first, (*it_).first) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*itv_).first, (*it_).first); + BOOST_UBLAS_CHECK (layout_type::index_m ((*itv_).first, (*it_).first) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m ((*itv_).first, (*it_).first); } else { return j_; } @@ -2138,7 +2138,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else { const self_type &m = (*this) (); @@ -2155,7 +2155,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { const self_type &m = (*this) (); @@ -2220,8 +2220,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 ((*itv_).first, (*it_).first) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*itv_).first, (*it_).first); + BOOST_UBLAS_CHECK (layout_type::index_M ((*itv_).first, (*it_).first) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M ((*itv_).first, (*it_).first); } else { return i_; } @@ -2230,8 +2230,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 ((*itv_).first, (*it_).first) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*itv_).first, (*it_).first); + BOOST_UBLAS_CHECK (layout_type::index_m ((*itv_).first, (*it_).first) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m ((*itv_).first, (*it_).first); } else { return j_; } @@ -2302,7 +2302,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else { self_type &m = (*this) (); @@ -2319,7 +2319,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { self_type &m = (*this) (); @@ -2384,8 +2384,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 ((*itv_).first, (*it_).first) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*itv_).first, (*it_).first); + BOOST_UBLAS_CHECK (layout_type::index_M ((*itv_).first, (*it_).first) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M ((*itv_).first, (*it_).first); } else { return i_; } @@ -2394,8 +2394,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 ((*itv_).first, (*it_).first) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*itv_).first, (*it_).first); + BOOST_UBLAS_CHECK (layout_type::index_m ((*itv_).first, (*it_).first) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m ((*itv_).first, (*it_).first); } else { return j_; } @@ -2537,7 +2537,7 @@ namespace boost { namespace numeric { namespace ublas { matrix_container (), size1_ (0), size2_ (0), capacity_ (restrict_capacity (0)), filled1_ (1), filled2_ (0), - index1_data_ (layout_type::size1 (size1_, size2_) + 1), index2_data_ (capacity_), value_data_ (capacity_) { + index1_data_ (layout_type::size_M (size1_, size2_) + 1), index2_data_ (capacity_), value_data_ (capacity_) { index1_data_ [filled1_ - 1] = k_based (filled2_); storage_invariants (); } @@ -2546,7 +2546,7 @@ namespace boost { namespace numeric { namespace ublas { matrix_container (), size1_ (size1), size2_ (size2), capacity_ (restrict_capacity (non_zeros)), filled1_ (1), filled2_ (0), - index1_data_ (layout_type::size1 (size1_, size2_) + 1), index2_data_ (capacity_), value_data_ (capacity_) { + index1_data_ (layout_type::size_M (size1_, size2_) + 1), index2_data_ (capacity_), value_data_ (capacity_) { index1_data_ [filled1_ - 1] = k_based (filled2_); storage_invariants (); } @@ -2563,7 +2563,7 @@ namespace boost { namespace numeric { namespace ublas { compressed_matrix (const coordinate_matrix &m): matrix_container (), size1_ (m.size1()), size2_ (m.size2()), - index1_data_ (layout_type::size1 (size1_, size2_) + 1) + index1_data_ (layout_type::size_M (size1_, size2_) + 1) { m.sort(); reserve(m.nnz(), false); @@ -2572,7 +2572,7 @@ namespace boost { namespace numeric { namespace ublas { const_subiterator_type i_end = (i_start + filled2_); const_subiterator_type i = i_start; size_type r = 1; - for (; (r < layout_type::size1 (size1_, size2_)) && (i != i_end); ++r) { + for (; (r < layout_type::size_M (size1_, size2_)) && (i != i_end); ++r) { i = std::lower_bound(i, i_end, r); index1_data_[r] = k_based( i - i_start ); } @@ -2589,7 +2589,7 @@ namespace boost { namespace numeric { namespace ublas { matrix_container (), size1_ (ae ().size1 ()), size2_ (ae ().size2 ()), capacity_ (restrict_capacity (non_zeros)), filled1_ (1), filled2_ (0), - index1_data_ (layout_type::size1 (ae ().size1 (), ae ().size2 ()) + 1), + index1_data_ (layout_type::size_M (ae ().size1 (), ae ().size2 ()) + 1), index2_data_ (capacity_), value_data_ (capacity_) { index1_data_ [filled1_ - 1] = k_based (filled2_); storage_invariants (); @@ -2659,7 +2659,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE void complete_index1_data () { - while (filled1_ <= layout_type::size1 (size1_, size2_)) { + while (filled1_ <= layout_type::size_M (size1_, size2_)) { this->index1_data_ [filled1_] = k_based (filled2_); ++ this->filled1_; } @@ -2686,7 +2686,7 @@ namespace boost { namespace numeric { namespace ublas { capacity_ = restrict_capacity (capacity_); filled1_ = 1; filled2_ = 0; - index1_data_.resize (layout_type::size1 (size1_, size2_) + 1); + index1_data_.resize (layout_type::size_M (size1_, size2_) + 1); index2_data_.resize (capacity_); value_data_.resize (capacity_); index1_data_ [filled1_ - 1] = k_based (filled2_); @@ -2719,8 +2719,8 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_pointer find_element (size_type i, size_type j) const { - size_type element1 (layout_type::element1 (i, size1_, j, size2_)); - size_type element2 (layout_type::element2 (i, size1_, j, size2_)); + size_type element1 (layout_type::index_M (i, j)); + size_type element2 (layout_type::index_m (i, j)); if (filled1_ <= element1 + 1) return 0; vector_const_subiterator_type itv (index1_data_.begin () + element1); @@ -2744,8 +2744,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE reference operator () (size_type i, size_type j) { #ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE - size_type element1 (layout_type::element1 (i, size1_, j, size2_)); - size_type element2 (layout_type::element2 (i, size1_, j, size2_)); + size_type element1 (layout_type::index_M (i, j)); + size_type element2 (layout_type::index_m (i, j)); if (filled1_ <= element1 + 1) return insert_element (i, j, value_type/*zero*/()); pointer p = find_element (i, j); @@ -2765,8 +2765,8 @@ namespace boost { namespace numeric { namespace ublas { if (filled2_ >= capacity_) reserve (2 * filled2_, true); BOOST_UBLAS_CHECK (filled2_ < capacity_, internal_logic ()); - size_type element1 = layout_type::element1 (i, size1_, j, size2_); - size_type element2 = layout_type::element2 (i, size1_, j, size2_); + size_type element1 = layout_type::index_M (i, j); + size_type element2 = layout_type::index_m (i, j); while (filled1_ <= element1 + 1) { index1_data_ [filled1_] = k_based (filled2_); ++ filled1_; @@ -2793,8 +2793,8 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE void erase_element (size_type i, size_type j) { - size_type element1 = layout_type::element1 (i, size1_, j, size2_); - size_type element2 = layout_type::element2 (i, size1_, j, size2_); + size_type element1 = layout_type::index_M (i, j); + size_type element2 = layout_type::index_m (i, j); if (element1 + 1 > filled1_) return; vector_subiterator_type itv (index1_data_.begin () + element1); @@ -2943,8 +2943,8 @@ namespace boost { namespace numeric { namespace ublas { if (filled2_ >= capacity_) reserve (2 * filled2_, true); BOOST_UBLAS_CHECK (filled2_ < capacity_, internal_logic ()); - size_type element1 = layout_type::element1 (i, size1_, j, size2_); - size_type element2 = layout_type::element2 (i, size1_, j, size2_); + size_type element1 = layout_type::index_M (i, j); + size_type element2 = layout_type::index_m (i, j); while (filled1_ < element1 + 2) { index1_data_ [filled1_] = k_based (filled2_); ++ filled1_; @@ -3000,8 +3000,8 @@ namespace boost { namespace numeric { namespace ublas { // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. const_iterator1 find1 (int rank, size_type i, size_type j, int direction = 1) const { for (;;) { - array_size_type address1 (layout_type::address1 (i, size1_, j, size2_)); - array_size_type address2 (layout_type::address2 (i, size1_, j, size2_)); + array_size_type address1 (layout_type::index_M (i, j)); + array_size_type address2 (layout_type::index_m (i, j)); vector_const_subiterator_type itv (index1_data_.begin () + (std::min) (filled1_ - 1, address1)); if (filled1_ <= address1 + 1) return const_iterator1 (*this, rank, i, j, itv, index2_data_.begin () + filled2_); @@ -3015,7 +3015,7 @@ namespace boost { namespace numeric { namespace ublas { if (it != it_end && zero_based (*it) == address2) return const_iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == it_end) return const_iterator1 (*this, rank, i, j, itv, it); i = zero_based (*it); @@ -3025,7 +3025,7 @@ namespace boost { namespace numeric { namespace ublas { ++ i; } } else /* if (direction < 0) */ { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == index2_data_.begin () + zero_based (*itv)) return const_iterator1 (*this, rank, i, j, itv, it); i = zero_based (*(it - 1)); @@ -3040,8 +3040,8 @@ namespace boost { namespace numeric { namespace ublas { // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. iterator1 find1 (int rank, size_type i, size_type j, int direction = 1) { for (;;) { - array_size_type address1 (layout_type::address1 (i, size1_, j, size2_)); - array_size_type address2 (layout_type::address2 (i, size1_, j, size2_)); + array_size_type address1 (layout_type::index_M (i, j)); + array_size_type address2 (layout_type::index_m (i, j)); vector_subiterator_type itv (index1_data_.begin () + (std::min) (filled1_ - 1, address1)); if (filled1_ <= address1 + 1) return iterator1 (*this, rank, i, j, itv, index2_data_.begin () + filled2_); @@ -3055,7 +3055,7 @@ namespace boost { namespace numeric { namespace ublas { if (it != it_end && zero_based (*it) == address2) return iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == it_end) return iterator1 (*this, rank, i, j, itv, it); i = zero_based (*it); @@ -3065,7 +3065,7 @@ namespace boost { namespace numeric { namespace ublas { ++ i; } } else /* if (direction < 0) */ { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == index2_data_.begin () + zero_based (*itv)) return iterator1 (*this, rank, i, j, itv, it); i = zero_based (*(it - 1)); @@ -3080,8 +3080,8 @@ namespace boost { namespace numeric { namespace ublas { // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. const_iterator2 find2 (int rank, size_type i, size_type j, int direction = 1) const { for (;;) { - array_size_type address1 (layout_type::address1 (i, size1_, j, size2_)); - array_size_type address2 (layout_type::address2 (i, size1_, j, size2_)); + array_size_type address1 (layout_type::index_M (i, j)); + array_size_type address2 (layout_type::index_m (i, j)); vector_const_subiterator_type itv (index1_data_.begin () + (std::min) (filled1_ - 1, address1)); if (filled1_ <= address1 + 1) return const_iterator2 (*this, rank, i, j, itv, index2_data_.begin () + filled2_); @@ -3095,7 +3095,7 @@ namespace boost { namespace numeric { namespace ublas { if (it != it_end && zero_based (*it) == address2) return const_iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == it_end) return const_iterator2 (*this, rank, i, j, itv, it); j = zero_based (*it); @@ -3105,7 +3105,7 @@ namespace boost { namespace numeric { namespace ublas { ++ j; } } else /* if (direction < 0) */ { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == index2_data_.begin () + zero_based (*itv)) return const_iterator2 (*this, rank, i, j, itv, it); j = zero_based (*(it - 1)); @@ -3120,8 +3120,8 @@ namespace boost { namespace numeric { namespace ublas { // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. iterator2 find2 (int rank, size_type i, size_type j, int direction = 1) { for (;;) { - array_size_type address1 (layout_type::address1 (i, size1_, j, size2_)); - array_size_type address2 (layout_type::address2 (i, size1_, j, size2_)); + array_size_type address1 (layout_type::index_M (i, j)); + array_size_type address2 (layout_type::index_m (i, j)); vector_subiterator_type itv (index1_data_.begin () + (std::min) (filled1_ - 1, address1)); if (filled1_ <= address1 + 1) return iterator2 (*this, rank, i, j, itv, index2_data_.begin () + filled2_); @@ -3135,7 +3135,7 @@ namespace boost { namespace numeric { namespace ublas { if (it != it_end && zero_based (*it) == address2) return iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == it_end) return iterator2 (*this, rank, i, j, itv, it); j = zero_based (*it); @@ -3145,7 +3145,7 @@ namespace boost { namespace numeric { namespace ublas { ++ j; } } else /* if (direction < 0) */ { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == index2_data_.begin () + zero_based (*itv)) return iterator2 (*this, rank, i, j, itv, it); j = zero_based (*(it - 1)); @@ -3186,7 +3186,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else { i_ = index1 () + 1; @@ -3197,7 +3197,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { i_ = index1 () - 1; @@ -3257,8 +3257,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_M (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); } else { return i_; } @@ -3266,8 +3266,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index2 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_m (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); } else { return j_; } @@ -3338,7 +3338,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else { i_ = index1 () + 1; @@ -3349,7 +3349,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { i_ = index1 () - 1; @@ -3409,8 +3409,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_M (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); } else { return i_; } @@ -3418,8 +3418,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index2 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_m (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); } else { return j_; } @@ -3495,7 +3495,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else { j_ = index2 () + 1; @@ -3506,7 +3506,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { j_ = index2 () - 1; @@ -3565,8 +3565,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_M (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); } else { return i_; } @@ -3575,8 +3575,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_m (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); } else { return j_; } @@ -3647,7 +3647,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else { j_ = index2 () + 1; @@ -3658,7 +3658,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { j_ = index2 (); @@ -3717,8 +3717,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_M (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); } else { return i_; } @@ -3727,8 +3727,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_m (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m (itv_ - (*this) ().index1_data_.begin (), (*this) ().zero_based (*it_)); } else { return j_; } @@ -3817,10 +3817,10 @@ namespace boost { namespace numeric { namespace ublas { private: void storage_invariants () const { - BOOST_UBLAS_CHECK (layout_type::size1 (size1_, size2_) + 1 == index1_data_.size (), internal_logic ()); + BOOST_UBLAS_CHECK (layout_type::size_M (size1_, size2_) + 1 == index1_data_.size (), internal_logic ()); BOOST_UBLAS_CHECK (capacity_ == index2_data_.size (), internal_logic ()); BOOST_UBLAS_CHECK (capacity_ == value_data_.size (), internal_logic ()); - BOOST_UBLAS_CHECK (filled1_ > 0 && filled1_ <= layout_type::size1 (size1_, size2_) + 1, internal_logic ()); + BOOST_UBLAS_CHECK (filled1_ > 0 && filled1_ <= layout_type::size_M (size1_, size2_) + 1, internal_logic ()); BOOST_UBLAS_CHECK (filled2_ <= capacity_, internal_logic ()); BOOST_UBLAS_CHECK (index1_data_ [filled1_ - 1] == k_based (filled2_), internal_logic ()); } @@ -4045,8 +4045,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE const_pointer find_element (size_type i, size_type j) const { sort (); - size_type element1 (layout_type::element1 (i, size1_, j, size2_)); - size_type element2 (layout_type::element2 (i, size1_, j, size2_)); + size_type element1 (layout_type::index_M (i, j)); + size_type element2 (layout_type::index_m (i, j)); vector_const_subiterator_type itv_begin (detail::lower_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (element1), std::less ())); vector_const_subiterator_type itv_end (detail::upper_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (element1), std::less ())); if (itv_begin == itv_end) @@ -4087,8 +4087,8 @@ namespace boost { namespace numeric { namespace ublas { if (filled_ >= capacity_) reserve (2 * filled_, true); BOOST_UBLAS_CHECK (filled_ < capacity_, internal_logic ()); - size_type element1 = layout_type::element1 (i, size1_, j, size2_); - size_type element2 = layout_type::element2 (i, size1_, j, size2_); + size_type element1 = layout_type::index_M (i, j); + size_type element2 = layout_type::index_m (i, j); index1_data_ [filled_] = k_based (element1); index2_data_ [filled_] = k_based (element2); value_data_ [filled_] = t; @@ -4104,8 +4104,8 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE void erase_element (size_type i, size_type j) { - size_type element1 = layout_type::element1 (i, size1_, j, size2_); - size_type element2 = layout_type::element2 (i, size1_, j, size2_); + size_type element1 = layout_type::index_M (i, j); + size_type element2 = layout_type::index_m (i, j); sort (); vector_subiterator_type itv_begin (detail::lower_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (element1), std::less ())); vector_subiterator_type itv_end (detail::upper_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (element1), std::less ())); @@ -4284,8 +4284,8 @@ namespace boost { namespace numeric { namespace ublas { // Back element insertion and erasure BOOST_UBLAS_INLINE void push_back (size_type i, size_type j, const_reference t) { - size_type element1 = layout_type::element1 (i, size1_, j, size2_); - size_type element2 = layout_type::element2 (i, size1_, j, size2_); + size_type element1 = layout_type::index_M (i, j); + size_type element2 = layout_type::index_m (i, j); // must maintain sort order BOOST_UBLAS_CHECK (sorted_ && (filled_ == 0 || @@ -4342,8 +4342,8 @@ namespace boost { namespace numeric { namespace ublas { const_iterator1 find1 (int rank, size_type i, size_type j, int direction = 1) const { sort (); for (;;) { - size_type address1 (layout_type::address1 (i, size1_, j, size2_)); - size_type address2 (layout_type::address2 (i, size1_, j, size2_)); + size_type address1 (layout_type::index_M (i, j)); + size_type address2 (layout_type::index_m (i, j)); vector_const_subiterator_type itv_begin (detail::lower_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (address1), std::less ())); vector_const_subiterator_type itv_end (detail::upper_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (address1), std::less ())); @@ -4357,7 +4357,7 @@ namespace boost { namespace numeric { namespace ublas { if (it != it_end && zero_based (*it) == address2) return const_iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == it_end) return const_iterator1 (*this, rank, i, j, itv, it); i = zero_based (*it); @@ -4367,7 +4367,7 @@ namespace boost { namespace numeric { namespace ublas { ++ i; } } else /* if (direction < 0) */ { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == index2_data_.begin () + zero_based (*itv)) return const_iterator1 (*this, rank, i, j, itv, it); i = zero_based (*(it - 1)); @@ -4383,8 +4383,8 @@ namespace boost { namespace numeric { namespace ublas { iterator1 find1 (int rank, size_type i, size_type j, int direction = 1) { sort (); for (;;) { - size_type address1 (layout_type::address1 (i, size1_, j, size2_)); - size_type address2 (layout_type::address2 (i, size1_, j, size2_)); + size_type address1 (layout_type::index_M (i, j)); + size_type address2 (layout_type::index_m (i, j)); vector_subiterator_type itv_begin (detail::lower_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (address1), std::less ())); vector_subiterator_type itv_end (detail::upper_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (address1), std::less ())); @@ -4398,7 +4398,7 @@ namespace boost { namespace numeric { namespace ublas { if (it != it_end && zero_based (*it) == address2) return iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == it_end) return iterator1 (*this, rank, i, j, itv, it); i = zero_based (*it); @@ -4408,7 +4408,7 @@ namespace boost { namespace numeric { namespace ublas { ++ i; } } else /* if (direction < 0) */ { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == index2_data_.begin () + zero_based (*itv)) return iterator1 (*this, rank, i, j, itv, it); i = zero_based (*(it - 1)); @@ -4424,8 +4424,8 @@ namespace boost { namespace numeric { namespace ublas { const_iterator2 find2 (int rank, size_type i, size_type j, int direction = 1) const { sort (); for (;;) { - size_type address1 (layout_type::address1 (i, size1_, j, size2_)); - size_type address2 (layout_type::address2 (i, size1_, j, size2_)); + size_type address1 (layout_type::index_M (i, j)); + size_type address2 (layout_type::index_m (i, j)); vector_const_subiterator_type itv_begin (detail::lower_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (address1), std::less ())); vector_const_subiterator_type itv_end (detail::upper_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (address1), std::less ())); @@ -4439,7 +4439,7 @@ namespace boost { namespace numeric { namespace ublas { if (it != it_end && zero_based (*it) == address2) return const_iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == it_end) return const_iterator2 (*this, rank, i, j, itv, it); j = zero_based (*it); @@ -4449,7 +4449,7 @@ namespace boost { namespace numeric { namespace ublas { ++ j; } } else /* if (direction < 0) */ { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == index2_data_.begin () + zero_based (*itv)) return const_iterator2 (*this, rank, i, j, itv, it); j = zero_based (*(it - 1)); @@ -4465,8 +4465,8 @@ namespace boost { namespace numeric { namespace ublas { iterator2 find2 (int rank, size_type i, size_type j, int direction = 1) { sort (); for (;;) { - size_type address1 (layout_type::address1 (i, size1_, j, size2_)); - size_type address2 (layout_type::address2 (i, size1_, j, size2_)); + size_type address1 (layout_type::index_M (i, j)); + size_type address2 (layout_type::index_m (i, j)); vector_subiterator_type itv_begin (detail::lower_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (address1), std::less ())); vector_subiterator_type itv_end (detail::upper_bound (index1_data_.begin (), index1_data_.begin () + filled_, k_based (address1), std::less ())); @@ -4480,7 +4480,7 @@ namespace boost { namespace numeric { namespace ublas { if (it != it_end && zero_based (*it) == address2) return iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == it_end) return iterator2 (*this, rank, i, j, itv, it); j = zero_based (*it); @@ -4490,7 +4490,7 @@ namespace boost { namespace numeric { namespace ublas { ++ j; } } else /* if (direction < 0) */ { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == index2_data_.begin () + zero_based (*itv)) return iterator2 (*this, rank, i, j, itv, it); j = zero_based (*(it - 1)); @@ -4531,7 +4531,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else { i_ = index1 () + 1; @@ -4542,7 +4542,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { i_ = index1 () - 1; @@ -4602,8 +4602,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_M ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); } else { return i_; } @@ -4611,8 +4611,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index2 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_m ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); } else { return j_; } @@ -4683,7 +4683,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else { i_ = index1 () + 1; @@ -4694,7 +4694,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { i_ = index1 () - 1; @@ -4754,8 +4754,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_M ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); } else { return i_; } @@ -4763,8 +4763,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index2 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_m ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); } else { return j_; } @@ -4840,7 +4840,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else { j_ = index2 () + 1; @@ -4851,7 +4851,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { j_ = index2 () - 1; @@ -4910,8 +4910,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_M ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); } else { return i_; } @@ -4920,8 +4920,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_m ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); } else { return j_; } @@ -4992,7 +4992,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else { j_ = index2 () + 1; @@ -5003,7 +5003,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { j_ = index2 (); @@ -5062,8 +5062,8 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type index1 () const { if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_M ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); } else { return i_; } @@ -5072,8 +5072,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); + BOOST_UBLAS_CHECK (layout_type::index_m ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m ((*this) ().zero_based (*itv_), (*this) ().zero_based (*it_)); } else { return j_; } diff --git a/include/boost/numeric/ublas/vector_of_vector.hpp b/include/boost/numeric/ublas/vector_of_vector.hpp index bbc48cc7..3a1f6fb8 100644 --- a/include/boost/numeric/ublas/vector_of_vector.hpp +++ b/include/boost/numeric/ublas/vector_of_vector.hpp @@ -64,7 +64,7 @@ namespace boost { namespace numeric { namespace ublas { generalized_vector_of_vector (): matrix_container (), size1_ (0), size2_ (0), data_ (1) { - const size_type sizeM = layout_type::size1 (size1_, size2_); + const size_type sizeM = layout_type::size_M (size1_, size2_); // create size1+1 empty vector elements data_.insert_element (sizeM, vector_data_value_type ()); storage_invariants (); @@ -72,9 +72,9 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE generalized_vector_of_vector (size_type size1, size_type size2, size_type non_zeros = 0): matrix_container (), - size1_ (size1), size2_ (size2), data_ (layout_type::size1 (size1_, size2_) + 1) { - const size_type sizeM = layout_type::size1 (size1_, size2_); - const size_type sizem = layout_type::size2 (size1_, size2_); + size1_ (size1), size2_ (size2), data_ (layout_type::size_M (size1_, size2_) + 1) { + const size_type sizeM = layout_type::size_M (size1_, size2_); + const size_type sizem = layout_type::size_m (size1_, size2_); for (size_type i = 0; i < sizeM; ++ i) // create size1 vector elements data_.insert_element (i, vector_data_value_type ()) .resize (sizem, false); data_.insert_element (sizeM, vector_data_value_type ()); @@ -90,9 +90,9 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE generalized_vector_of_vector (const matrix_expression &ae, size_type non_zeros = 0): matrix_container (), - size1_ (ae ().size1 ()), size2_ (ae ().size2 ()), data_ (layout_type::size1 (size1_, size2_) + 1) { - const size_type sizeM = layout_type::size1 (size1_, size2_); - const size_type sizem = layout_type::size2 (size1_, size2_); + size1_ (ae ().size1 ()), size2_ (ae ().size2 ()), data_ (layout_type::size_M (size1_, size2_) + 1) { + const size_type sizeM = layout_type::size_M (size1_, size2_); + const size_type sizem = layout_type::size_m (size1_, size2_); for (size_type i = 0; i < sizeM; ++ i) // create size1 vector elements data_.insert_element (i, vector_data_value_type ()) .resize (sizem, false); data_.insert_element (sizeM, vector_data_value_type ()); @@ -130,11 +130,11 @@ namespace boost { namespace numeric { namespace ublas { // Resizing BOOST_UBLAS_INLINE void resize (size_type size1, size_type size2, bool preserve = true) { - const size_type oldM = layout_type::size1 (size1_, size2_); + const size_type oldM = layout_type::size_M (size1_, size2_); size1_ = size1; size2_ = size2; - const size_type sizeM = layout_type::size1 (size1_, size2_); - const size_type sizem = layout_type::size2 (size1_, size2_); + const size_type sizeM = layout_type::size_M (size1_, size2_); + const size_type sizem = layout_type::size_m (size1_, size2_); data ().resize (sizeM + 1, preserve); if (preserve) { for (size_type i = 0; (i <= oldM) && (i < sizeM); ++ i) @@ -161,8 +161,8 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_pointer find_element (size_type i, size_type j) const { - const size_type elementM = layout_type::element1 (i, size1_, j, size2_); - const size_type elementm = layout_type::element2 (i, size1_, j, size2_); + const size_type elementM = layout_type::index_M (i, j); + const size_type elementm = layout_type::index_m (i, j); // optimise: check the storage_type and index directly if element always exists if (boost::is_convertible::value) { return & (data () [elementM] [elementm]); @@ -293,31 +293,31 @@ namespace boost { namespace numeric { namespace ublas { // Element insertion and erasure BOOST_UBLAS_INLINE true_reference insert_element (size_type i, size_type j, const_reference t) { - const size_type elementM = layout_type::element1 (i, size1_, j, size2_); - const size_type elementm = layout_type::element2 (i, size1_, j, size2_); + const size_type elementM = layout_type::index_M (i, j); + const size_type elementm = layout_type::index_m (i, j); vector_data_value_type& vd (ref (data () [elementM])); storage_invariants (); return vd.insert_element (elementm, t); } BOOST_UBLAS_INLINE void append_element (size_type i, size_type j, const_reference t) { - const size_type elementM = layout_type::element1 (i, size1_, j, size2_); - const size_type elementm = layout_type::element2 (i, size1_, j, size2_); + const size_type elementM = layout_type::index_M (i, j); + const size_type elementm = layout_type::index_m (i, j); vector_data_value_type& vd (ref (data () [elementM])); storage_invariants (); return vd.append_element (elementm, t); } BOOST_UBLAS_INLINE void erase_element (size_type i, size_type j) { - vectoriterator_type itv (data ().find (layout_type::element1 (i, size1_, j, size2_))); + vectoriterator_type itv (data ().find (layout_type::index_M (i, j))); if (itv == data ().end ()) return; - (*itv).erase_element (layout_type::element2 (i, size1_, j, size2_)); + (*itv).erase_element (layout_type::index_m (i, j)); storage_invariants (); } BOOST_UBLAS_INLINE void clear () { - const size_type sizeM = layout_type::size1 (size1_, size2_); + const size_type sizeM = layout_type::size_M (size1_, size2_); // FIXME should clear data () if this is done via value_type/*zero*/() then it is not size preserving for (size_type i = 0; i < sizeM; ++ i) ref (data () [i]).clear (); @@ -334,7 +334,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE true_reference at_element (size_type i, size_type j) { - return ref (ref (data () [layout_type::element1 (i, size1_, j, size2_)]) [layout_type::element2 (i, size1_, j, size2_)]); + return ref (ref (data () [layout_type::index_M (i, j)]) [layout_type::index_m (i, j)]); } public: @@ -351,19 +351,19 @@ namespace boost { namespace numeric { namespace ublas { // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. const_iterator1 find1 (int rank, size_type i, size_type j, int direction = 1) const { for (;;) { - const_vectoriterator_type itv (data ().find (layout_type::address1 (i, size1_, j, size2_))); + const_vectoriterator_type itv (data ().find (layout_type::index_M (i, j))); const_vectoriterator_type itv_end (data ().end ()); if (itv == itv_end) return const_iterator1 (*this, rank, i, j, itv_end, (*(-- itv)).end ()); - const_subiterator_type it ((*itv).find (layout_type::address2 (i, size1_, j, size2_))); + const_subiterator_type it ((*itv).find (layout_type::index_m (i, j))); const_subiterator_type it_end ((*itv).end ()); if (rank == 0) return const_iterator1 (*this, rank, i, j, itv, it); - if (it != it_end && it.index () == layout_type::address2 (i, size1_, j, size2_)) + if (it != it_end && it.index () == layout_type::index_m (i, j)) return const_iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == it_end) return const_iterator1 (*this, rank, i, j, itv, it); i = it.index (); @@ -373,7 +373,7 @@ namespace boost { namespace numeric { namespace ublas { ++ i; } } else /* if (direction < 0) */ { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == (*itv).begin ()) return const_iterator1 (*this, rank, i, j, itv, it); --it; @@ -389,19 +389,19 @@ namespace boost { namespace numeric { namespace ublas { // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. iterator1 find1 (int rank, size_type i, size_type j, int direction = 1) { for (;;) { - vectoriterator_type itv (data ().find (layout_type::address1 (i, size1_, j, size2_))); + vectoriterator_type itv (data ().find (layout_type::index_M (i, j))); vectoriterator_type itv_end (data ().end ()); if (itv == itv_end) return iterator1 (*this, rank, i, j, itv_end, (*(-- itv)).end ()); - subiterator_type it ((*itv).find (layout_type::address2 (i, size1_, j, size2_))); + subiterator_type it ((*itv).find (layout_type::index_m (i, j))); subiterator_type it_end ((*itv).end ()); if (rank == 0) return iterator1 (*this, rank, i, j, itv, it); - if (it != it_end && it.index () == layout_type::address2 (i, size1_, j, size2_)) + if (it != it_end && it.index () == layout_type::index_m (i, j)) return iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == it_end) return iterator1 (*this, rank, i, j, itv, it); i = it.index (); @@ -411,7 +411,7 @@ namespace boost { namespace numeric { namespace ublas { ++ i; } } else /* if (direction < 0) */ { - if (layout_type::fast1 ()) { + if (layout_type::fast_i ()) { if (it == (*itv).begin ()) return iterator1 (*this, rank, i, j, itv, it); --it; @@ -427,19 +427,19 @@ namespace boost { namespace numeric { namespace ublas { // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. const_iterator2 find2 (int rank, size_type i, size_type j, int direction = 1) const { for (;;) { - const_vectoriterator_type itv (data ().find (layout_type::address1 (i, size1_, j, size2_))); + const_vectoriterator_type itv (data ().find (layout_type::index_M (i, j))); const_vectoriterator_type itv_end (data ().end ()); if (itv == itv_end) return const_iterator2 (*this, rank, i, j, itv_end, (*(-- itv)).end ()); - const_subiterator_type it ((*itv).find (layout_type::address2 (i, size1_, j, size2_))); + const_subiterator_type it ((*itv).find (layout_type::index_m (i, j))); const_subiterator_type it_end ((*itv).end ()); if (rank == 0) return const_iterator2 (*this, rank, i, j, itv, it); - if (it != it_end && it.index () == layout_type::address2 (i, size1_, j, size2_)) + if (it != it_end && it.index () == layout_type::index_m (i, j)) return const_iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == it_end) return const_iterator2 (*this, rank, i, j, itv, it); j = it.index (); @@ -449,7 +449,7 @@ namespace boost { namespace numeric { namespace ublas { ++ j; } } else /* if (direction < 0) */ { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == (*itv).begin ()) return const_iterator2 (*this, rank, i, j, itv, it); --it; @@ -465,19 +465,19 @@ namespace boost { namespace numeric { namespace ublas { // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. iterator2 find2 (int rank, size_type i, size_type j, int direction = 1) { for (;;) { - vectoriterator_type itv (data ().find (layout_type::address1 (i, size1_, j, size2_))); + vectoriterator_type itv (data ().find (layout_type::index_M (i, j))); vectoriterator_type itv_end (data ().end ()); if (itv == itv_end) return iterator2 (*this, rank, i, j, itv_end, (*(-- itv)).end ()); - subiterator_type it ((*itv).find (layout_type::address2 (i, size1_, j, size2_))); + subiterator_type it ((*itv).find (layout_type::index_m (i, j))); subiterator_type it_end ((*itv).end ()); if (rank == 0) return iterator2 (*this, rank, i, j, itv, it); - if (it != it_end && it.index () == layout_type::address2 (i, size1_, j, size2_)) + if (it != it_end && it.index () == layout_type::index_m (i, j)) return iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == it_end) return iterator2 (*this, rank, i, j, itv, it); j = it.index (); @@ -487,7 +487,7 @@ namespace boost { namespace numeric { namespace ublas { ++ j; } } else /* if (direction < 0) */ { - if (layout_type::fast2 ()) { + if (layout_type::fast_j ()) { if (it == (*itv).begin ()) return iterator2 (*this, rank, i, j, itv, it); --it; @@ -529,7 +529,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else { const self_type &m = (*this) (); @@ -546,7 +546,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { const self_type &m = (*this) (); @@ -612,8 +612,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 (itv_.index (), it_.index ()) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 (itv_.index (), it_.index ()); + BOOST_UBLAS_CHECK (layout_type::index_M (itv_.index (), it_.index ()) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M (itv_.index (), it_.index ()); } else { return i_; } @@ -622,8 +622,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 (itv_.index (), it_.index ()) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 (itv_.index (), it_.index ()); + BOOST_UBLAS_CHECK (layout_type::index_m (itv_.index (), it_.index ()) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m (itv_.index (), it_.index ()); } else { return j_; } @@ -694,7 +694,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator1 &operator ++ () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) ++ it_; else { self_type &m = (*this) (); @@ -711,7 +711,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator1 &operator -- () { - if (rank_ == 1 && layout_type::fast1 ()) + if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { self_type &m = (*this) (); @@ -777,8 +777,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 (itv_.index (), it_.index ()) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 (itv_.index (), it_.index ()); + BOOST_UBLAS_CHECK (layout_type::index_M (itv_.index (), it_.index ()) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M (itv_.index (), it_.index ()); } else { return i_; } @@ -787,8 +787,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find1 (0, (*this) ().size1 (), j_), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 (itv_.index (), it_.index ()) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 (itv_.index (), it_.index ()); + BOOST_UBLAS_CHECK (layout_type::index_m (itv_.index (), it_.index ()) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m (itv_.index (), it_.index ()); } else { return j_; } @@ -864,7 +864,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE const_iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else { const self_type &m = (*this) (); @@ -881,7 +881,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE const_iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { const self_type &m = (*this) (); @@ -947,8 +947,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 (itv_.index (), it_.index ()) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 (itv_.index (), it_.index ()); + BOOST_UBLAS_CHECK (layout_type::index_M (itv_.index (), it_.index ()) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M (itv_.index (), it_.index ()); } else { return i_; } @@ -957,8 +957,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 (itv_.index (), it_.index ()) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 (itv_.index (), it_.index ()); + BOOST_UBLAS_CHECK (layout_type::index_m (itv_.index (), it_.index ()) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m (itv_.index (), it_.index ()); } else { return j_; } @@ -1029,7 +1029,7 @@ namespace boost { namespace numeric { namespace ublas { // Arithmetic BOOST_UBLAS_INLINE iterator2 &operator ++ () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) ++ it_; else { self_type &m = (*this) (); @@ -1046,7 +1046,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE iterator2 &operator -- () { - if (rank_ == 1 && layout_type::fast2 ()) + if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { self_type &m = (*this) (); @@ -1112,8 +1112,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index1 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index1 (itv_.index (), it_.index ()) < (*this) ().size1 (), bad_index ()); - return layout_type::index1 (itv_.index (), it_.index ()); + BOOST_UBLAS_CHECK (layout_type::index_M (itv_.index (), it_.index ()) < (*this) ().size1 (), bad_index ()); + return layout_type::index_M (itv_.index (), it_.index ()); } else { return i_; } @@ -1122,8 +1122,8 @@ namespace boost { namespace numeric { namespace ublas { size_type index2 () const { BOOST_UBLAS_CHECK (*this != (*this) ().find2 (0, i_, (*this) ().size2 ()), bad_index ()); if (rank_ == 1) { - BOOST_UBLAS_CHECK (layout_type::index2 (itv_.index (), it_.index ()) < (*this) ().size2 (), bad_index ()); - return layout_type::index2 (itv_.index (), it_.index ()); + BOOST_UBLAS_CHECK (layout_type::index_m (itv_.index (), it_.index ()) < (*this) ().size2 (), bad_index ()); + return layout_type::index_m (itv_.index (), it_.index ()); } else { return j_; } @@ -1213,7 +1213,7 @@ namespace boost { namespace numeric { namespace ublas { private: void storage_invariants () const { - BOOST_UBLAS_CHECK (layout_type::size1 (size1_, size2_) + 1 == data_.size (), internal_logic ()); + BOOST_UBLAS_CHECK (layout_type::size_M (size1_, size2_) + 1 == data_.size (), internal_logic ()); BOOST_UBLAS_CHECK (data ().begin () != data ().end (), internal_logic ()); } From 48324767fa5c562add3c60ca981062c105833b4f Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 18 May 2006 16:50:26 +0000 Subject: [PATCH 09/65] uBLAS CHANGE removed UBLAS_TYPE_CHECK from sparse_prod. The tests trigger in many numeric situations (NaN) and are only there to pickup gross programming errors [SVN r34008] --- .../boost/numeric/ublas/operation_sparse.hpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/include/boost/numeric/ublas/operation_sparse.hpp b/include/boost/numeric/ublas/operation_sparse.hpp index 8210a21f..25ce264e 100644 --- a/include/boost/numeric/ublas/operation_sparse.hpp +++ b/include/boost/numeric/ublas/operation_sparse.hpp @@ -41,12 +41,6 @@ namespace boost { namespace numeric { namespace ublas { // ISSUE why is there a dense vector here? vector temporary (e2 ().size2 ()); temporary.clear (); -#if BOOST_UBLAS_TYPE_CHECK - matrix cm (m.size1 (), m.size2 ()); - typedef typename type_traits::real_type real_type; - real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2)); - indexing_matrix_assign (cm, prod (e1, e2), row_major_tag ()); -#endif typename expression1_type::const_iterator1 it1 (e1 ().begin1 ()); typename expression1_type::const_iterator1 it1_end (e1 ().end1 ()); while (it1 != it1_end) { @@ -86,9 +80,6 @@ namespace boost { namespace numeric { namespace ublas { } ++ it1; } -#if BOOST_UBLAS_TYPE_CHECK - BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits::epsilon () * merrorbound, internal_logic ()); -#endif return m; } @@ -109,12 +100,6 @@ namespace boost { namespace numeric { namespace ublas { // ISSUE why is there a dense vector here? vector temporary (e1 ().size1 ()); temporary.clear (); -#if BOOST_UBLAS_TYPE_CHECK - matrix cm (m.size1 (), m.size2 ()); - typedef typename type_traits::real_type real_type; - real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2)); - indexing_matrix_assign (cm, prod (e1, e2), column_major_tag ()); -#endif typename expression2_type::const_iterator2 it2 (e2 ().begin2 ()); typename expression2_type::const_iterator2 it2_end (e2 ().end2 ()); while (it2 != it2_end) { @@ -154,9 +139,6 @@ namespace boost { namespace numeric { namespace ublas { } ++ it2; } -#if BOOST_UBLAS_TYPE_CHECK - BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits::epsilon () * merrorbound, internal_logic ()); -#endif return m; } From 79a455dbea9317fe0601a64fa49e617757b5b0b9 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 8 Jun 2006 20:40:18 +0000 Subject: [PATCH 10/65] FIX Workaround BBc2 problem on linking source from subdirectories. The link command line tried to link on the directory [SVN r34251] --- test/Jamfile | 50 ++++++++++++++++++------------------- test/Jamfile.v2 | 50 ++++++++++++++++++------------------- test/{test1 => }/test1.cpp | 0 test/{test1 => }/test1.hpp | 2 +- test/test1/Jamfile | 31 ----------------------- test/{test1 => }/test11.cpp | 0 test/{test1 => }/test12.cpp | 0 test/{test1 => }/test13.cpp | 0 test/{test2 => }/test2.cpp | 0 test/{test2 => }/test2.hpp | 2 +- test/test2/Jamfile | 28 --------------------- test/{test2 => }/test21.cpp | 0 test/{test2 => }/test22.cpp | 0 test/{test2 => }/test23.cpp | 0 test/{test3 => }/test3.cpp | 0 test/{test3 => }/test3.hpp | 2 +- test/test3/Jamfile | 28 --------------------- test/{test3 => }/test31.cpp | 0 test/{test3 => }/test32.cpp | 0 test/{test3 => }/test33.cpp | 0 test/{test4 => }/test4.cpp | 0 test/{test4 => }/test4.hpp | 2 +- test/test4/Jamfile | 28 --------------------- test/{test4 => }/test42.cpp | 0 test/{test4 => }/test43.cpp | 0 test/{test5 => }/test5.cpp | 0 test/{test5 => }/test5.hpp | 2 +- test/test5/Jamfile | 28 --------------------- test/{test5 => }/test52.cpp | 0 test/{test5 => }/test53.cpp | 0 test/{test6 => }/test6.cpp | 0 test/{test6 => }/test6.hpp | 2 +- test/test6/Jamfile | 28 --------------------- test/{test6 => }/test62.cpp | 0 test/{test6 => }/test63.cpp | 0 test/{test7 => }/test7.cpp | 0 test/{test7 => }/test7.hpp | 2 +- test/test7/Jamfile | 32 ------------------------ test/{test7 => }/test71.cpp | 0 test/{test7 => }/test72.cpp | 0 test/{test7 => }/test73.cpp | 0 41 files changed, 57 insertions(+), 260 deletions(-) rename test/{test1 => }/test1.cpp (100%) rename test/{test1 => }/test1.hpp (97%) delete mode 100644 test/test1/Jamfile rename test/{test1 => }/test11.cpp (100%) rename test/{test1 => }/test12.cpp (100%) rename test/{test1 => }/test13.cpp (100%) rename test/{test2 => }/test2.cpp (100%) rename test/{test2 => }/test2.hpp (97%) delete mode 100644 test/test2/Jamfile rename test/{test2 => }/test21.cpp (100%) rename test/{test2 => }/test22.cpp (100%) rename test/{test2 => }/test23.cpp (100%) rename test/{test3 => }/test3.cpp (100%) rename test/{test3 => }/test3.hpp (97%) delete mode 100644 test/test3/Jamfile rename test/{test3 => }/test31.cpp (100%) rename test/{test3 => }/test32.cpp (100%) rename test/{test3 => }/test33.cpp (100%) rename test/{test4 => }/test4.cpp (100%) rename test/{test4 => }/test4.hpp (97%) delete mode 100644 test/test4/Jamfile rename test/{test4 => }/test42.cpp (100%) rename test/{test4 => }/test43.cpp (100%) rename test/{test5 => }/test5.cpp (100%) rename test/{test5 => }/test5.hpp (97%) delete mode 100644 test/test5/Jamfile rename test/{test5 => }/test52.cpp (100%) rename test/{test5 => }/test53.cpp (100%) rename test/{test6 => }/test6.cpp (100%) rename test/{test6 => }/test6.hpp (97%) delete mode 100644 test/test6/Jamfile rename test/{test6 => }/test62.cpp (100%) rename test/{test6 => }/test63.cpp (100%) rename test/{test7 => }/test7.cpp (100%) rename test/{test7 => }/test7.hpp (97%) delete mode 100644 test/test7/Jamfile rename test/{test7 => }/test71.cpp (100%) rename test/{test7 => }/test72.cpp (100%) rename test/{test7 => }/test73.cpp (100%) diff --git a/test/Jamfile b/test/Jamfile index a2ca2a41..ea55bffe 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -45,10 +45,10 @@ UBLAS_TESTSET_SPARSE ?= test-suite numeric/uBLAS - : [ run test1/test1.cpp - test1/test11.cpp - test1/test12.cpp - test1/test13.cpp + : [ run test1.cpp + test11.cpp + test12.cpp + test13.cpp : # args : # input files : # requirements @@ -56,47 +56,47 @@ test-suite numeric/uBLAS <*>"-fpstkchk" # Try and pick up runtime failures <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" [ cond [ is-subset Darwin : $(JAMUNAME) ] : <*>"-fabi-version=0" ] ] - [ run test2/test2.cpp - test2/test21.cpp - test2/test22.cpp - test2/test23.cpp + [ run test2.cpp + test21.cpp + test22.cpp + test23.cpp : # args : # input files : # requirements $(UBLAS_TESTSET) <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] - [ run test3/test3.cpp - test3/test31.cpp - test3/test32.cpp - test3/test33.cpp + [ run test3.cpp + test31.cpp + test32.cpp + test33.cpp : # args : # input files : # requirements $(UBLAS_TESTSET_SPARSE) <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] - [ run test4/test4.cpp - test4/test42.cpp - test4/test43.cpp + [ run test4.cpp + test42.cpp + test43.cpp : # args : # input files : # requirements $(UBLAS_TESTSET) <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] - [ run test5/test5.cpp - test5/test52.cpp - test5/test53.cpp + [ run test5.cpp + test52.cpp + test53.cpp : # args : # input files : # requirements $(UBLAS_TESTSET) <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] - [ run test6/test6.cpp - test6/test62.cpp - test6/test63.cpp + [ run test6.cpp + test62.cpp + test63.cpp : # args : # input files : # requirements @@ -105,10 +105,10 @@ test-suite numeric/uBLAS ] # Test7 checks uBLAS operation with interval types. # This causes too much compiler badness. Issues need to be addressed for VC7.1 VC8 CW9 and Intel 8 (windows) -# [ run test7/test7.cpp -# test7/test71.cpp -# test7/test72.cpp -# test7/test73.cpp +# [ run test7.cpp +# test71.cpp +# test72.cpp +# test73.cpp # : # args # : # input files # : # requirements diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 81dd2dab..a1b401ed 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -47,52 +47,52 @@ project test-suite numeric/uBLAS - : [ run test1/test1.cpp - test1/test11.cpp - test1/test12.cpp - test1/test13.cpp + : [ run test1.cpp + test11.cpp + test12.cpp + test13.cpp : # args : # input files : # requirements $(UBLAS_TESTSET) ] - [ run test2/test2.cpp - test2/test21.cpp - test2/test22.cpp - test2/test23.cpp + [ run test2.cpp + test21.cpp + test22.cpp + test23.cpp : : : $(UBLAS_TESTSET) ] - [ run test3/test3.cpp - test3/test31.cpp - test3/test32.cpp - test3/test33.cpp + [ run test3.cpp + test31.cpp + test32.cpp + test33.cpp : : : $(UBLAS_TESTSET_SPARSE) ] - [ run test4/test4.cpp - test4/test42.cpp - test4/test43.cpp + [ run test4.cpp + test42.cpp + test43.cpp : : : $(UBLAS_TESTSET) ] - [ run test5/test5.cpp - test5/test52.cpp - test5/test53.cpp + [ run test5.cpp + test52.cpp + test53.cpp : : : $(UBLAS_TESTSET) ] - [ run test6/test6.cpp - test6/test62.cpp - test6/test63.cpp + [ run test6.cpp + test62.cpp + test63.cpp : : : $(UBLAS_TESTSET) ] # Test commented out, just like in V1 Jamfile -# [ run test7/test7.cpp -# test7/test71.cpp -# test7/test72.cpp -# test7/test73.cpp +# [ run test7.cpp +# test71.cpp +# test72.cpp +# test73.cpp # : : : # BOOST_UBLAS_USE_INTERVAL # $(UBLAS_TESTSET) diff --git a/test/test1/test1.cpp b/test/test1.cpp similarity index 100% rename from test/test1/test1.cpp rename to test/test1.cpp diff --git a/test/test1/test1.hpp b/test/test1.hpp similarity index 97% rename from test/test1/test1.hpp rename to test/test1.hpp index f62dc8bf..84dd7307 100644 --- a/test/test1/test1.hpp +++ b/test/test1.hpp @@ -27,7 +27,7 @@ namespace ublas = boost::numeric::ublas; -#include "../common/init.hpp" +#include "common/init.hpp" void test_vector (); void test_matrix_vector (); diff --git a/test/test1/Jamfile b/test/test1/Jamfile deleted file mode 100644 index dbfef0d7..00000000 --- a/test/test1/Jamfile +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/test1 ; - -SOURCES = test1 test11 test12 test13 ; - -exe test1 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# <*>"-fabi-version=0" - <*>"-Xc" - ; - - - - diff --git a/test/test1/test11.cpp b/test/test11.cpp similarity index 100% rename from test/test1/test11.cpp rename to test/test11.cpp diff --git a/test/test1/test12.cpp b/test/test12.cpp similarity index 100% rename from test/test1/test12.cpp rename to test/test12.cpp diff --git a/test/test1/test13.cpp b/test/test13.cpp similarity index 100% rename from test/test1/test13.cpp rename to test/test13.cpp diff --git a/test/test2/test2.cpp b/test/test2.cpp similarity index 100% rename from test/test2/test2.cpp rename to test/test2.cpp diff --git a/test/test2/test2.hpp b/test/test2.hpp similarity index 97% rename from test/test2/test2.hpp rename to test/test2.hpp index b38e5f56..0e9e7777 100644 --- a/test/test2/test2.hpp +++ b/test/test2.hpp @@ -27,7 +27,7 @@ namespace ublas = boost::numeric::ublas; -#include "../common/init.hpp" +#include "common/init.hpp" template struct test_blas_1 { diff --git a/test/test2/Jamfile b/test/test2/Jamfile deleted file mode 100644 index 9e4c3849..00000000 --- a/test/test2/Jamfile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/test2 ; - -SOURCES = test2 test21 test22 test23 ; - -exe test2 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# <*>"-fabi-version=0" - <*>"-Xc" - ; - diff --git a/test/test2/test21.cpp b/test/test21.cpp similarity index 100% rename from test/test2/test21.cpp rename to test/test21.cpp diff --git a/test/test2/test22.cpp b/test/test22.cpp similarity index 100% rename from test/test2/test22.cpp rename to test/test22.cpp diff --git a/test/test2/test23.cpp b/test/test23.cpp similarity index 100% rename from test/test2/test23.cpp rename to test/test23.cpp diff --git a/test/test3/test3.cpp b/test/test3.cpp similarity index 100% rename from test/test3/test3.cpp rename to test/test3.cpp diff --git a/test/test3/test3.hpp b/test/test3.hpp similarity index 97% rename from test/test3/test3.hpp rename to test/test3.hpp index 6a78c38b..99f298f9 100644 --- a/test/test3/test3.hpp +++ b/test/test3.hpp @@ -33,7 +33,7 @@ namespace ublas = boost::numeric::ublas; -#include "../common/init.hpp" +#include "common/init.hpp" void test_vector (); void test_matrix_vector (); diff --git a/test/test3/Jamfile b/test/test3/Jamfile deleted file mode 100644 index 76589e0b..00000000 --- a/test/test3/Jamfile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/test3 ; - -SOURCES = test3 test31 test32 test33 ; - -exe test3 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# <*>"-fabi-version=0" - <*>"-Xc" - ; - diff --git a/test/test3/test31.cpp b/test/test31.cpp similarity index 100% rename from test/test3/test31.cpp rename to test/test31.cpp diff --git a/test/test3/test32.cpp b/test/test32.cpp similarity index 100% rename from test/test3/test32.cpp rename to test/test32.cpp diff --git a/test/test3/test33.cpp b/test/test33.cpp similarity index 100% rename from test/test3/test33.cpp rename to test/test33.cpp diff --git a/test/test4/test4.cpp b/test/test4.cpp similarity index 100% rename from test/test4/test4.cpp rename to test/test4.cpp diff --git a/test/test4/test4.hpp b/test/test4.hpp similarity index 97% rename from test/test4/test4.hpp rename to test/test4.hpp index 24436240..4a4b946d 100644 --- a/test/test4/test4.hpp +++ b/test/test4.hpp @@ -27,7 +27,7 @@ namespace ublas = boost::numeric::ublas; -#include "../common/init.hpp" +#include "common/init.hpp" //#define USE_BANDED #define USE_DIAGONAL diff --git a/test/test4/Jamfile b/test/test4/Jamfile deleted file mode 100644 index e7be5dcf..00000000 --- a/test/test4/Jamfile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/test4 ; - -SOURCES = test4 test42 test43 ; - -exe test4 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# <*>"-fabi-version=0" - <*>"-Xc" - ; - diff --git a/test/test4/test42.cpp b/test/test42.cpp similarity index 100% rename from test/test4/test42.cpp rename to test/test42.cpp diff --git a/test/test4/test43.cpp b/test/test43.cpp similarity index 100% rename from test/test4/test43.cpp rename to test/test43.cpp diff --git a/test/test5/test5.cpp b/test/test5.cpp similarity index 100% rename from test/test5/test5.cpp rename to test/test5.cpp diff --git a/test/test5/test5.hpp b/test/test5.hpp similarity index 97% rename from test/test5/test5.hpp rename to test/test5.hpp index aeec1d8a..a1269310 100644 --- a/test/test5/test5.hpp +++ b/test/test5.hpp @@ -27,7 +27,7 @@ namespace ublas = boost::numeric::ublas; -#include "../common/init.hpp" +#include "common/init.hpp" void test_matrix_vector (); void test_matrix (); diff --git a/test/test5/Jamfile b/test/test5/Jamfile deleted file mode 100644 index 91b34119..00000000 --- a/test/test5/Jamfile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/test5 ; - -SOURCES = test5 test52 test53 ; - -exe test5 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# <*>"-fabi-version=0" - <*>"-Xc" - ; - diff --git a/test/test5/test52.cpp b/test/test52.cpp similarity index 100% rename from test/test5/test52.cpp rename to test/test52.cpp diff --git a/test/test5/test53.cpp b/test/test53.cpp similarity index 100% rename from test/test5/test53.cpp rename to test/test53.cpp diff --git a/test/test6/test6.cpp b/test/test6.cpp similarity index 100% rename from test/test6/test6.cpp rename to test/test6.cpp diff --git a/test/test6/test6.hpp b/test/test6.hpp similarity index 97% rename from test/test6/test6.hpp rename to test/test6.hpp index 0097ac14..0517fa1a 100644 --- a/test/test6/test6.hpp +++ b/test/test6.hpp @@ -27,7 +27,7 @@ namespace ublas = boost::numeric::ublas; -#include "../common/init.hpp" +#include "common/init.hpp" void test_matrix_vector (); void test_matrix (); diff --git a/test/test6/Jamfile b/test/test6/Jamfile deleted file mode 100644 index 7da15ade..00000000 --- a/test/test6/Jamfile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/test6 ; - -SOURCES = test6 test62 test63 ; - -exe test6 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# <*>"-fabi-version=0" - <*>"-Xc" - ; - diff --git a/test/test6/test62.cpp b/test/test62.cpp similarity index 100% rename from test/test6/test62.cpp rename to test/test62.cpp diff --git a/test/test6/test63.cpp b/test/test63.cpp similarity index 100% rename from test/test6/test63.cpp rename to test/test63.cpp diff --git a/test/test7/test7.cpp b/test/test7.cpp similarity index 100% rename from test/test7/test7.cpp rename to test/test7.cpp diff --git a/test/test7/test7.hpp b/test/test7.hpp similarity index 97% rename from test/test7/test7.hpp rename to test/test7.hpp index 94a5c710..75e41a5f 100644 --- a/test/test7/test7.hpp +++ b/test/test7.hpp @@ -30,7 +30,7 @@ namespace ublas = boost::numeric::ublas; -#include "../common/init.hpp" +#include "common/init.hpp" void test_vector (); void test_matrix_vector (); diff --git a/test/test7/Jamfile b/test/test7/Jamfile deleted file mode 100644 index e31f96e1..00000000 --- a/test/test7/Jamfile +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/test7 ; - -SOURCES = test7 test71 test72 test73 ; - -exe test7 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - BOOST_UBLAS_USE_INTERVAL -# <*>"-fabi-version=0" - <*>"-Xc" -; - - - - diff --git a/test/test7/test71.cpp b/test/test71.cpp similarity index 100% rename from test/test7/test71.cpp rename to test/test71.cpp diff --git a/test/test7/test72.cpp b/test/test72.cpp similarity index 100% rename from test/test7/test72.cpp rename to test/test72.cpp diff --git a/test/test7/test73.cpp b/test/test73.cpp similarity index 100% rename from test/test7/test73.cpp rename to test/test73.cpp From ffbfa4718194524c14a2b33b3c00f162b66eecde Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Tue, 20 Jun 2006 18:55:30 +0000 Subject: [PATCH 11/65] FIX index_pair and index_tripler LessTen Comparable [SVN r34361] --- include/boost/numeric/ublas/storage.hpp | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index 54bf2274..c5ec770f 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -1582,10 +1582,15 @@ namespace boost { namespace numeric { namespace ublas { bool equal(const self_type& rhs) const { return (v1_ == rhs.v1_); } + BOOST_UBLAS_INLINE bool less(const self_type& rhs) const { return (v1_ < rhs.v1_); } BOOST_UBLAS_INLINE + bool greater(const self_type& rhs) const { + return (v1_ > rhs.v1_); + } + BOOST_UBLAS_INLINE friend bool operator == (const self_type& lhs, const self_type& rhs) { return lhs.equal(rhs); } @@ -1597,6 +1602,18 @@ namespace boost { namespace numeric { namespace ublas { friend bool operator < (const self_type& lhs, const self_type& rhs) { return lhs.less(rhs); } + BOOST_UBLAS_INLINE + friend bool operator >= (const self_type& lhs, const self_type& rhs) { + return !lhs.less(rhs); + } + BOOST_UBLAS_INLINE + friend bool operator > (const self_type& lhs, const self_type& rhs) { + return lhs.greater(rhs); + } + BOOST_UBLAS_INLINE + friend bool operator <= (const self_type& lhs, const self_type& rhs) { + return !lhs.greater(rhs); + } private: size_type i_; @@ -1747,6 +1764,11 @@ namespace boost { namespace numeric { namespace ublas { (v1_ == rhs.v1_ && v2_ < rhs.v2_)); } BOOST_UBLAS_INLINE + bool greater(const self_type& rhs) const { + return ((v1_ > rhs.v1_) || + (v1_ == rhs.v1_ && v2_ > rhs.v2_)); + } + BOOST_UBLAS_INLINE friend bool operator == (const self_type& lhs, const self_type& rhs) { return lhs.equal(rhs); } @@ -1758,6 +1780,18 @@ namespace boost { namespace numeric { namespace ublas { friend bool operator < (const self_type& lhs, const self_type& rhs) { return lhs.less(rhs); } + BOOST_UBLAS_INLINE + friend bool operator >= (const self_type& lhs, const self_type& rhs) { + return !lhs.less(rhs); + } + BOOST_UBLAS_INLINE + friend bool operator > (const self_type& lhs, const self_type& rhs) { + return lhs.greater(rhs); + } + BOOST_UBLAS_INLINE + friend bool operator <= (const self_type& lhs, const self_type& rhs) { + return !lhs.greater(rhs); + } private: size_type i_; From c454f5cb9537159e2ea26d71b41712b26353e7f6 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 21 Jun 2006 18:17:53 +0000 Subject: [PATCH 12/65] CHANGE Remove greater for testing and replece with rhs.less(lhs) [SVN r34365] --- include/boost/numeric/ublas/storage.hpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index c5ec770f..95b47ca7 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -1587,10 +1587,6 @@ namespace boost { namespace numeric { namespace ublas { return (v1_ < rhs.v1_); } BOOST_UBLAS_INLINE - bool greater(const self_type& rhs) const { - return (v1_ > rhs.v1_); - } - BOOST_UBLAS_INLINE friend bool operator == (const self_type& lhs, const self_type& rhs) { return lhs.equal(rhs); } @@ -1608,11 +1604,11 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE friend bool operator > (const self_type& lhs, const self_type& rhs) { - return lhs.greater(rhs); + return rhs.less(lhs); } BOOST_UBLAS_INLINE friend bool operator <= (const self_type& lhs, const self_type& rhs) { - return !lhs.greater(rhs); + return !rhs.less(lhs); } private: @@ -1764,11 +1760,6 @@ namespace boost { namespace numeric { namespace ublas { (v1_ == rhs.v1_ && v2_ < rhs.v2_)); } BOOST_UBLAS_INLINE - bool greater(const self_type& rhs) const { - return ((v1_ > rhs.v1_) || - (v1_ == rhs.v1_ && v2_ > rhs.v2_)); - } - BOOST_UBLAS_INLINE friend bool operator == (const self_type& lhs, const self_type& rhs) { return lhs.equal(rhs); } @@ -1786,11 +1777,11 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE friend bool operator > (const self_type& lhs, const self_type& rhs) { - return lhs.greater(rhs); + return rhs.less(lhs); } BOOST_UBLAS_INLINE friend bool operator <= (const self_type& lhs, const self_type& rhs) { - return !lhs.greater(rhs); + return !rhs.less(lhs); } private: From 44b6b5d564085f63e8d1cad17a5d52f39c7ee544 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Mon, 10 Jul 2006 16:21:28 +0000 Subject: [PATCH 13/65] [uBLAS] FIX unspoorted compilers set BOOST_UBLAS_UNSUPPORTED_COMPILER=1 so we can compare with !=- to override [SVN r34501] --- include/boost/numeric/ublas/detail/config.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/numeric/ublas/detail/config.hpp b/include/boost/numeric/ublas/detail/config.hpp index ef692cf9..37bf297e 100644 --- a/include/boost/numeric/ublas/detail/config.hpp +++ b/include/boost/numeric/ublas/detail/config.hpp @@ -38,7 +38,7 @@ // Version 6.0 and 7.0 #if BOOST_MSVC <= 1300 -#define BOOST_UBLAS_UNSUPPORTED_COMPILER +#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1 #endif // Version 7.1 @@ -63,7 +63,7 @@ #endif #if __GNUC__ < 3 -#define BOOST_UBLAS_UNSUPPORTED_COMPILER +#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1 #endif #endif @@ -78,7 +78,7 @@ #endif #if (BOOST_INTEL < 700) -#define BOOST_UBLAS_UNSUPPORTED_COMPILER +#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1 #endif // Define swap for index_pair and triple. @@ -156,7 +156,7 @@ namespace std { // 8.x #if __MWERKS__ <= 0x3003 -#define BOOST_UBLAS_UNSUPPORTED_COMPILER +#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1 #endif #endif @@ -165,7 +165,7 @@ namespace std { // Detect other compilers with serious defects - override by defineing BOOST_UBLAS_UNSUPPORTED_COMPILER=0 #ifndef BOOST_UBLAS_UNSUPPORTED_COMPILER #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STDC_NAMESPACE) -#define BOOST_UBLAS_UNSUPPORTED_COMPILER +#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1 #endif #endif From 095953d8e2ab169615626ba61e3c661b868cdccb Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 16 Jul 2006 13:13:42 +0000 Subject: [PATCH 14/65] FIX use new layout_type::index_Mm operations. Thanks Gunter for spoting this [SVN r34554] --- include/boost/numeric/ublas/matrix.hpp | 4 ++-- include/boost/numeric/ublas/operation.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 68a9d3f8..a8cc1372 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -1100,11 +1100,11 @@ namespace boost { namespace numeric { namespace ublas { // Element access BOOST_UBLAS_INLINE const_reference operator () (size_type i, size_type j) const { - return data () [layout_type::element1 (i, size1_, j, size2_)] [layout_type::element2 (i, size1_, j, size2_)]; + return data () [layout_type::index_M (i, j)] [layout_type::index_m (i, j)]; } BOOST_UBLAS_INLINE reference at_element (size_type i, size_type j) { - return data () [layout_type::element1 (i, size1_, j, size2_)] [layout_type::element2 (i, size1_, j, size2_)]; + return data () [layout_type::index_M (i, j)] [layout_type::index_m (i, j)]; } BOOST_UBLAS_INLINE reference operator () (size_type i, size_type j) { diff --git a/include/boost/numeric/ublas/operation.hpp b/include/boost/numeric/ublas/operation.hpp index 48bf2056..0a624c48 100644 --- a/include/boost/numeric/ublas/operation.hpp +++ b/include/boost/numeric/ublas/operation.hpp @@ -119,8 +119,8 @@ namespace boost { namespace numeric { namespace ublas { } for (size_type i = 0; i < e1.nnz(); ++i) { - size_type row_index = layout_type::element1( e1.index1_data () [i], size1, e1.index2_data () [i], size2 ); - size_type col_index = layout_type::element2( e1.index1_data () [i], size1, e1.index2_data () [i], size2 ); + size_type row_index = layout_type::index_M( e1.index1_data () [i], e1.index2_data () [i] ); + size_type col_index = layout_type::index_m( e1.index1_data () [i], e1.index2_data () [i] ); v( row_index ) += e1.value_data () [i] * e2 () (col_index); } return v; From 264e81b5fa344c416bf3bb7a5f15881f3163eff5 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 16 Jul 2006 13:19:34 +0000 Subject: [PATCH 15/65] CHANGE Remove carray_adaptor which is not in the source! [SVN r34555] --- doc/array_adaptor.htm | 215 ---------------------------------------- doc/storage_concept.htm | 1 - 2 files changed, 216 deletions(-) delete mode 100644 doc/array_adaptor.htm diff --git a/doc/array_adaptor.htm b/doc/array_adaptor.htm deleted file mode 100644 index 930b31c9..00000000 --- a/doc/array_adaptor.htm +++ /dev/null @@ -1,215 +0,0 @@ - - - - - -Bounded Array; - - -

-Array Storage

-

Array Adaptor

-

Description

-

The templated class carray_adaptor<T> implements a storage array using a pointer to an existing memory buffer (a C array for example). The storage specified array size must never exceed the size of the memory buffer.

-

carray_adaptor defines size_type as size_t and difference_type as std::ptrdiff_t. -

-

Example

-
-#include <boost/numeric/ublas/storage.hpp>
-
-int main () {
-    using namespace boost::numeric::ublas;
-    double aarray[10];
-    carray_adaptor<double> a (aarray, 3);
-    for (unsigned i = 0; i < a.size (); ++ i) {
-        a [i] = i;
-        std::cout << a [i] << std::endl;
-    }
-}
-
-

Definition

-

Defined in the header storage.hpp.

-

Template parameters

- - - - - - - - - - - - - -
ParameterDescriptionDefault
TThe type of object stored in the array.
-

Model of

-

Storage but NOT Copy Constructable

-

Type requirements

-

None, except for those imposed by the requirements of Storage.

-

Public base classes

-

None.

-

Members

-
    -
  • The description does not describe what the member actually does, this can be looked up -in the corresponding concept documentation, but instead contains a remark on the implementation of the -member inside this model of the concept.
  • -
  • Typography: -
      -
    • Members that are not part of the implemented concepts are in blue.
    • -
    • Differences compared to the concept are in red.
    • -
    -
  • -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberWhere definedDescription
value_typeContainer
pointerContainerDefined as value_type*
const_pointerContainerDefined as const value_type*
referenceContainerDefined as value_type&
const_referenceContainerDefined as const value_type&
size_typeContainerDefined as Alloc::size_type
difference_typeContainerDefined as Alloc::difference_type
iteratorContainerDefined as pointer
const_iteratorContainerDefined as const_pointer
revere_iteratorContainerDefined as std::reverse_iterator<iterator>
const_revere_iteratorContainerDefined as std::reverse_iterator<const_iterator>
carray_adaptor ()StorageCreates an carray_adaptor that holds zero elements.
carray_adaptor (size_type size)Storage -The size-constructor is undefined. A carray_adaptor cannot be constructed like this as a memory buffer cannot -be specifed in this context.
carray_adaptor (size_type size, const T& init)Storage -The fill-constructor is undefined. A carray_adaptor cannot be constructed like this as a memory buffer cannot -be specifed in this context.
bounded_array (size_type size, pointer data)StorageCreates a uninitialized bounded_array that holds size elements from the memory buffer data. All the elements are default constructed.
bounded_array (size_type size, pointer data, const T& init)StorageCreates an initialized bounded_array that holds size elements from the memory buffer data. All the elements are constructed from the init value.
carray_adaptor (const carray_adaptor &c)ContainerThe copy constructor is private and undefined. A carray_adaptor cannot be constructed like this as a memory buffer cannot -be specifed in this context.
~carray_adaptor ()ContainerDeallocates the carray_adaptor itself.
void resize (size_type size)Storage -Reallocates a carray_adaptor to hold size elements.
void resize (size_type size, const T& t)Storage -Reallocates a carray_adaptor to hold size elements.
void resize (size_type size pointer data)Storage -Reallocates a carray_adaptor to hold size elements.
void resize (size_type size pointer data, const T& t)Storage -Reallocates a carray_adaptor to hold size elements.
size_type size () constContainerReturns the size of the carray_adaptor.
const_reference operator [] (size_type i) constContainerReturns a const reference of the i -th element.
reference operator [] (size_type i)ContainerReturns a reference of the i-th element.
carray_adaptor &operator = (const carray_adaptor &a)ContainerThe assignment operator.
carray_adaptor &assign_temporary (carray_adaptor &a)Assigns a temporary. May change the array a.
void swap (carray_adaptor &a)ContainerSwaps the contents of the arrays.
const_iterator begin () constContainerReturns a const_iterator pointing to the beginning of the carray_adaptor.
const_iterator end () constContainerReturns a const_iterator pointing to the end of the carray_adaptor.
iterator begin ()ContainerReturns a iterator pointing to the beginning of the carray_adaptor.
iterator end ()ContainerReturns a iterator pointing to the end of the carray_adaptor.
const_reverse_iterator rbegin () constReversible ContainerReturns a const_reverse_iterator pointing to the beginning of the reversed carray_adaptor.
const_reverse_iterator rend () constReversible ContainerReturns a const_reverse_iterator pointing to the end of the reversed carray_adaptor.
reverse_iterator rbegin ()Reversible ContainerReturns a reverse_iterator pointing to the beginning of the reversed carray_adaptor.
reverse_iterator rend ()Reversible ContainerReturns a reverse_iterator pointing to the end of the reversed carray_adaptor.
- - diff --git a/doc/storage_concept.htm b/doc/storage_concept.htm index b39a48ee..6735522c 100644 --- a/doc/storage_concept.htm +++ b/doc/storage_concept.htm @@ -133,7 +133,6 @@ each element value may be a previously assigned value or default construced valu

Notes

From c4bf66eda01dcadbbb9726998141990578b7bbe7 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 16 Jul 2006 13:48:52 +0000 Subject: [PATCH 16/65] FIX nnz and nnz_capacitz added. Thanks Gunter [SVN r34556] --- include/boost/numeric/ublas/vector_of_vector.hpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/include/boost/numeric/ublas/vector_of_vector.hpp b/include/boost/numeric/ublas/vector_of_vector.hpp index 3a1f6fb8..ef9d78fb 100644 --- a/include/boost/numeric/ublas/vector_of_vector.hpp +++ b/include/boost/numeric/ublas/vector_of_vector.hpp @@ -110,10 +110,17 @@ namespace boost { namespace numeric { namespace ublas { return size2_; } BOOST_UBLAS_INLINE - size_type non_zeros () const { + size_type nnz_capacity () const { size_type non_zeros = 0; - for (const_vectoriterator_type itv = data_ ().begin (); itv != data_ ().end (); ++ itv) - non_zeros += (*itv).size (); + for (const_vectoriterator_type itv = data_.begin (); itv != data_.end (); ++ itv) + non_zeros += (*itv).nnz_capacity (); + return non_zeros; + } + BOOST_UBLAS_INLINE + size_type nnz () const { + size_type non_zeros = 0; + for (const_vectoriterator_type itv = data_.begin (); itv != data_.end (); ++ itv) + non_zeros += (*itv).nnz (); return non_zeros; } From 3b22b10997a56a7f54a29a2b0235eab3d17c9008 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 16 Jul 2006 20:33:17 +0000 Subject: [PATCH 17/65] uBLAS MINOR removed tabs [SVN r34564] --- test/placement_new.cpp | 2 +- test/test11.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/placement_new.cpp b/test/placement_new.cpp index 4179d771..6e07d46c 100644 --- a/test/placement_new.cpp +++ b/test/placement_new.cpp @@ -22,7 +22,7 @@ public: } ~udt () {} // required for GCC prior to 3.4 to generate cookie - static udt* base_pointer; + static udt* base_pointer; }; udt* udt::base_pointer; diff --git a/test/test11.cpp b/test/test11.cpp index 4bbad7fb..ff852edf 100644 --- a/test/test11.cpp +++ b/test/test11.cpp @@ -34,7 +34,7 @@ struct test_my_vector { template void test_expression_with (VP &v1, VP &v2, VP &v3) const { - // Expression type tests + // Expression type tests value_type t; size_type i; real_type n; From 6b76444cb51fff50b1212274fd04ccf1503e471d Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Thu, 20 Jul 2006 12:35:49 +0000 Subject: [PATCH 18/65] fixed typos reported in http://bugs.debian.org/378016 (there seems to be no mention of the erroneous names in the docs); NOTE(!): license reference text to be fixed; guard macro name beginning with underscore [SVN r34625] --- include/boost/numeric/ublas/matrix_expression.hpp | 10 +++++----- include/boost/numeric/ublas/vector_expression.hpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/boost/numeric/ublas/matrix_expression.hpp b/include/boost/numeric/ublas/matrix_expression.hpp index 4576f027..ac86f658 100644 --- a/include/boost/numeric/ublas/matrix_expression.hpp +++ b/include/boost/numeric/ublas/matrix_expression.hpp @@ -42,7 +42,7 @@ namespace boost { namespace numeric { namespace ublas { typedef typename boost::mpl::if_, typename E::const_reference, typename E::reference>::type reference; - typedef E refered_type; + typedef E referred_type; typedef const self_type const_closure_type; typedef self_type closure_type; typedef typename E::orientation_category orientation_category; @@ -50,7 +50,7 @@ namespace boost { namespace numeric { namespace ublas { // Construction and destruction BOOST_UBLAS_INLINE - explicit matrix_reference (refered_type &e): + explicit matrix_reference (referred_type &e): e_ (e) {} // Accessors @@ -66,11 +66,11 @@ namespace boost { namespace numeric { namespace ublas { public: // Expression accessors - const correct BOOST_UBLAS_INLINE - const refered_type &expression () const { + const referred_type &expression () const { return e_; } BOOST_UBLAS_INLINE - refered_type &expression () { + referred_type &expression () { return e_; } @@ -269,7 +269,7 @@ namespace boost { namespace numeric { namespace ublas { } private: - refered_type &e_; + referred_type &e_; }; diff --git a/include/boost/numeric/ublas/vector_expression.hpp b/include/boost/numeric/ublas/vector_expression.hpp index 313f9248..f5588de4 100644 --- a/include/boost/numeric/ublas/vector_expression.hpp +++ b/include/boost/numeric/ublas/vector_expression.hpp @@ -43,14 +43,14 @@ namespace boost { namespace numeric { namespace ublas { typedef typename boost::mpl::if_, typename E::const_reference, typename E::reference>::type reference; - typedef E refered_type; + typedef E referred_type; typedef const self_type const_closure_type; typedef self_type closure_type; typedef typename E::storage_category storage_category; // Construction and destruction BOOST_UBLAS_INLINE - explicit vector_reference (refered_type &e): + explicit vector_reference (referred_type &e): e_ (e) {} // Accessors @@ -62,11 +62,11 @@ namespace boost { namespace numeric { namespace ublas { public: // Expression accessors - const correct BOOST_UBLAS_INLINE - const refered_type &expression () const { + const referred_type &expression () const { return e_; } BOOST_UBLAS_INLINE - refered_type &expression () { + referred_type &expression () { return e_; } @@ -227,7 +227,7 @@ namespace boost { namespace numeric { namespace ublas { } private: - refered_type &e_; + referred_type &e_; }; From 3eac2be57abbc218b83a444e8076321ab338bd2a Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Thu, 27 Jul 2006 10:27:37 +0000 Subject: [PATCH 19/65] boost guidelines (mainly from inspect tool: tabs, license reference text, etc.) [SVN r34752] --- include/boost/numeric/ublas/functional.hpp | 4 ++-- include/boost/numeric/ublas/matrix.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/numeric/ublas/functional.hpp b/include/boost/numeric/ublas/functional.hpp index f3beaf4c..7b071272 100644 --- a/include/boost/numeric/ublas/functional.hpp +++ b/include/boost/numeric/ublas/functional.hpp @@ -1490,7 +1490,7 @@ namespace boost { namespace numeric { namespace ublas { it -= n; } - // Triangular access + // Triangular access static BOOST_UBLAS_INLINE size_type triangular_size (size_type size_i, size_type size_j) { @@ -1667,7 +1667,7 @@ namespace boost { namespace numeric { namespace ublas { it -= n* size_i; } - // Triangular access + // Triangular access static BOOST_UBLAS_INLINE size_type triangular_size (size_type size_i, size_type size_j) { diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index a8cc1372..6e9d2e8f 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -47,7 +47,7 @@ namespace boost { namespace numeric { namespace ublas { // Indexing copy over major for (size_type major = 0; major != major_size; ++major) { for (size_type minor = 0; minor != minor_size; ++minor) { - // find indexes - use invertability of element_ functions + // find indexes - use invertability of element_ functions const size_type i1 = layout_type::index_M(major, minor); const size_type i2 = layout_type::index_m(major, minor); temporary.data () [layout_type::element (i1, size1, i2, size2)] = From 01031b656f847fd92e542038f4e3b16c251a3171 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 5 Oct 2006 09:02:23 +0000 Subject: [PATCH 20/65] [uBLAS] make VC8 workaround use self_type consistently [SVN r35496] --- include/boost/numeric/ublas/vector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index 9778a9f8..9e967d74 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -299,7 +299,7 @@ namespace boost { namespace numeric { namespace ublas { const_iterator (const self_type &v, const const_subiterator_type &it): container_const_reference (v), it_ (it) {} BOOST_UBLAS_INLINE - const_iterator (const typename vector::iterator &it): // ISSUE vector:: stops VC8 using std::iterator here + const_iterator (const typename self_type::iterator &it): // ISSUE vector:: stops VC8 using std::iterator here container_const_reference (it ()), it_ (it.it_) {} // Arithmetic From 757aacfb680d87035f80d97c260193023ca4418c Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sat, 7 Oct 2006 17:04:47 +0000 Subject: [PATCH 21/65] FIX allow abs and sqrt to be found via ADL. Thanks to John Maddock [SVN r35518] --- include/boost/numeric/ublas/traits.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp index a23fa171..9f3454ae 100644 --- a/include/boost/numeric/ublas/traits.hpp +++ b/include/boost/numeric/ublas/traits.hpp @@ -86,13 +86,17 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE real_type type_abs (const_reference t) { - return std::abs (t); // must use explict std:: as bultin types are not in std namespace +            // we'll find either std::abs or else another version via ADL: +            using namespace std; +            return abs (t); } static BOOST_UBLAS_INLINE value_type type_sqrt (const_reference t) { - // force a type conversion back to value_type for intgral types - return value_type (std::sqrt (t)); // must use explict std:: as bultin types are not in std namespace +            using namespace std; +            // force a type conversion back to value_type for intgral types +            // we'll find either std::sqrt or else another version via ADL: +            return value_type (sqrt (t)); } static From 18d22622d94ca6b3ad66301d1676fad2a1b9d06d Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sat, 7 Oct 2006 18:18:01 +0000 Subject: [PATCH 22/65] FIX remove none space space in last commit FIX interval was not compilable due to rename to scalar_traits CHANGE interval handling to use general abs/sqrt from last commit [SVN r35519] --- include/boost/numeric/ublas/traits.hpp | 73 ++++---------------------- 1 file changed, 11 insertions(+), 62 deletions(-) diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp index 9f3454ae..d3b3caad 100644 --- a/include/boost/numeric/ublas/traits.hpp +++ b/include/boost/numeric/ublas/traits.hpp @@ -49,7 +49,7 @@ namespace boost { namespace numeric { namespace ublas { }; - // Type traits - generic numeric properties and functions + // Type traits - generic numeric properties and functions template struct type_traits; @@ -86,17 +86,17 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE real_type type_abs (const_reference t) { -            // we'll find either std::abs or else another version via ADL: -            using namespace std; -            return abs (t); + // we'll find either std::abs or else another version via ADL: + using namespace std; + return abs (t); } static BOOST_UBLAS_INLINE value_type type_sqrt (const_reference t) { -            using namespace std; -            // force a type conversion back to value_type for intgral types -            // we'll find either std::sqrt or else another version via ADL: -            return value_type (sqrt (t)); + using namespace std; + // force a type conversion back to value_type for intgral types + // we'll find either std::sqrt or else another version via ADL: + return value_type (sqrt (t)); } static @@ -268,59 +268,9 @@ namespace boost { namespace numeric { namespace ublas { }; #ifdef BOOST_UBLAS_USE_INTERVAL - // Define properties for a generic scalar interval type - template - struct scalar_interval_type_traits : scalar_type_traits { - typedef scalar_interval_type_traits self_type; - typedef boost::numeric::interval value_type; - typedef const value_type &const_reference; - typedef value_type &reference; - typedef value_type real_type; - typedef real_type precision_type; // we do not know what type has more precision then the real_type - - static const unsigned plus_complexity = 1; - static const unsigned multiplies_complexity = 1; - - static - BOOST_UBLAS_INLINE - real_type type_abs (const_reference t) { - return abs (t); - } - static - BOOST_UBLAS_INLINE - value_type type_sqrt (const_reference t) { - return sqrt (t); - } - - static - BOOST_UBLAS_INLINE - real_type norm_1 (const_reference t) { - return self_type::type_abs (t); - } - static - BOOST_UBLAS_INLINE - real_type norm_2 (const_reference t) { - return self_type::type_abs (t); - } - static - BOOST_UBLAS_INLINE - real_type norm_inf (const_reference t) { - return self_type::type_abs (t); - } - - static - BOOST_UBLAS_INLINE - bool equals (const_reference t1, const_reference t2) { - return self_type::norm_inf (t1 - t2) < BOOST_UBLAS_TYPE_CHECK_EPSILON * - (std::max) ((std::max) (self_type::norm_inf (t1), - self_type::norm_inf (t2)), - BOOST_UBLAS_TYPE_CHECK_MIN); - } - }; - // Define scalar interval type traits template<> - struct type_traits > : scalar_interval_type_traits > { + struct type_traits > : scalar_traits > { typedef type_traits > self_type; typedef boost::numeric::interval value_type; typedef const value_type &const_reference; @@ -330,7 +280,7 @@ namespace boost { namespace numeric { namespace ublas { }; template<> - struct type_traits > : scalar_interval_type_traits > { + struct type_traits > : scalar_traits > { typedef type_traits > self_type; typedef boost::numeric::interval value_type; typedef const value_type &const_reference; @@ -339,7 +289,7 @@ namespace boost { namespace numeric { namespace ublas { typedef boost::numeric::interval precision_type; }; template<> - struct type_traits > : scalar_interval_type_traits > { + struct type_traits > : scalar_traits > { typedef type_traits > self_type; typedef boost::numeric::interval value_type; typedef const value_type &const_reference; @@ -347,7 +297,6 @@ namespace boost { namespace numeric { namespace ublas { typedef value_type real_type; typedef value_type precision_type; }; - #endif From 6805b2f39cb726bb076e5c430a8633fee67b824c Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Tue, 7 Nov 2006 19:11:57 +0000 Subject: [PATCH 23/65] Add copyright, license [SVN r35905] --- index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index f8ce2ff8..3100f73a 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,10 @@ Automatic redirection failed, please go to -doc/index.htm +doc/index.htm  
+

© Copyright Beman Dawes, 2001

+

Distributed under the Boost Software License, Version 1.0. (See accompanying +file LICENSE_1_0.txt or copy +at www.boost.org/LICENSE_1_0.txt)

- + \ No newline at end of file From 7281804fd284d07f68ae160609da524ac8b01005 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 16 Nov 2006 09:47:44 +0000 Subject: [PATCH 24/65] [uBLAS] CHANGE implement uBLAS preserve option in vector resize. Thanks to Gunter Winkler and Vassilis Virvilis [SVN r36053] --- include/boost/numeric/ublas/vector_sparse.hpp | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/include/boost/numeric/ublas/vector_sparse.hpp b/include/boost/numeric/ublas/vector_sparse.hpp index abbd28dc..baa8e80d 100644 --- a/include/boost/numeric/ublas/vector_sparse.hpp +++ b/include/boost/numeric/ublas/vector_sparse.hpp @@ -868,13 +868,21 @@ namespace boost { namespace numeric { namespace ublas { public: BOOST_UBLAS_INLINE void resize (size_type size, bool preserve = true) { - // FIXME preserve unimplemented - BOOST_UBLAS_CHECK (!preserve, internal_logic ()); size_ = size; capacity_ = restrict_capacity (capacity_); - index_data_. resize (capacity_); - value_data_. resize (capacity_); - filled_ = 0; + if (preserve) { + index_data_. resize (capacity_, size_type ()); + value_data_. resize (capacity_, value_type ()); + filled_ = (std::min) (capacity_, filled_); + while ((filled_ > 0) && (zero_based(index_data_[filled_ - 1]) >= size)) { + --filled_; + } + } + else { + index_data_. resize (capacity_); + value_data_. resize (capacity_); + filled_ = 0; + } storage_invariants (); } @@ -1316,6 +1324,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_CHECK (capacity_ == index_data_.size (), internal_logic ()); BOOST_UBLAS_CHECK (capacity_ == value_data_.size (), internal_logic ()); BOOST_UBLAS_CHECK (filled_ <= capacity_, internal_logic ()); + BOOST_UBLAS_CHECK ((0 == filled_) || (zero_based(index_data_[filled_ - 1]) < size_), internal_logic ()); } size_type size_; @@ -1471,11 +1480,15 @@ namespace boost { namespace numeric { namespace ublas { void resize (size_type size, bool preserve = true) { if (preserve) sort (); // remove duplicate elements. + size_ = size; capacity_ = restrict_capacity (capacity_); if (preserve) { index_data_. resize (capacity_, size_type ()); value_data_. resize (capacity_, value_type ()); filled_ = (std::min) (capacity_, filled_); + while ((filled_ > 0) && (zero_based(index_data_[filled_ - 1]) >= size)) { + --filled_; + } } else { index_data_. resize (capacity_); @@ -1483,7 +1496,6 @@ namespace boost { namespace numeric { namespace ublas { filled_ = 0; } sorted_filled_ = filled_; - size_ = size; storage_invariants (); } // Reserving @@ -1977,6 +1989,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_CHECK (filled_ <= capacity_, internal_logic ()); BOOST_UBLAS_CHECK (sorted_filled_ <= filled_, internal_logic ()); BOOST_UBLAS_CHECK (sorted_ == (sorted_filled_ == filled_), internal_logic ()); + BOOST_UBLAS_CHECK ((0 == filled_) || (zero_based(index_data_[filled_ - 1]) < size_), internal_logic ()); } size_type size_; From a434830ff4d59bb384f78a9fc4c358a10faa1476 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 16 Nov 2006 13:26:36 +0000 Subject: [PATCH 25/65] [uBLAS] ADD manual tests. ADD sparse resize test for vectors [SVN r36059] --- test/manual/Jamfile.v2 | 6 +++++ test/manual/sp_resize.cpp | 55 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 test/manual/Jamfile.v2 create mode 100644 test/manual/sp_resize.cpp diff --git a/test/manual/Jamfile.v2 b/test/manual/Jamfile.v2 new file mode 100644 index 00000000..7c5668d9 --- /dev/null +++ b/test/manual/Jamfile.v2 @@ -0,0 +1,6 @@ +# Copyright (c) 2006 Michael Stevens +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +exe sp_resize : sp_resize.cpp ; diff --git a/test/manual/sp_resize.cpp b/test/manual/sp_resize.cpp new file mode 100644 index 00000000..665a4a5a --- /dev/null +++ b/test/manual/sp_resize.cpp @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2006 Michael Stevens + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#include + +#include + +typedef double Real; + +template +void printV(const V& v) { + std::cout << "size: " << v.size() << " nnz_capacity: " << v.nnz_capacity() << " nnz: " << v.nnz() << std::endl; + for (typename V::const_iterator i = v.begin(); i != v.end(); i++) { + std::cout << i.index() << ":" << (*i) << " "; + } + std::cout << std::endl; +} + +template +void run_test() +{ + V v(10); + + v[0] = 1; + v[5] = 1; + v[8] = 1; + v[9] = 1; + + printV(v); + + v.resize(9); printV(v); + v.resize(12); printV(v); + v.resize(2); printV(v); + v.resize(0); printV(v); + + v.resize(5); v[0] = 1; printV(v); + v.resize(5,false); printV(v); +} + +int main(int, char **) { + + std::cout << "---- MAPPED ----\n"; + run_test< boost::numeric::ublas::mapped_vector >(); + std::cout << "---- COMPRESSED ----\n"; + run_test< boost::numeric::ublas::compressed_vector >(); + std::cout << "---- COORDINATE ----\n"; + run_test< boost::numeric::ublas::coordinate_vector >(); + + return 0; +} + From bedfd18cd39c76966420406c2c383181550c0d57 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 30 Nov 2006 11:30:29 +0000 Subject: [PATCH 26/65] [uBLAS] COMMENT fix mutable/immutable [SVN r36208] --- include/boost/numeric/ublas/detail/iterator.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp index 516d2ada..f4223446 100644 --- a/include/boost/numeric/ublas/detail/iterator.hpp +++ b/include/boost/numeric/ublas/detail/iterator.hpp @@ -634,7 +634,7 @@ namespace boost { namespace numeric { namespace ublas { /** \brief A class implementing an indexed random access iterator. * - * \param C the mutable container type + * \param C the (mutable) container type * \param IC the iterator category * * This class implements a random access iterator. The current @@ -739,7 +739,7 @@ namespace boost { namespace numeric { namespace ublas { /** \brief A class implementing an indexed random access iterator. * - * \param C the mutable container type + * \param C the (immutable) container type * \param IC the iterator category * * This class implements a random access iterator. The current @@ -857,7 +857,7 @@ namespace boost { namespace numeric { namespace ublas { /** \brief A class implementing an indexed random access iterator * of a matrix. * - * \param C the mutable container type + * \param C the (mutable) container type * \param IC the iterator category * * This class implements a random access iterator. The current @@ -1150,7 +1150,7 @@ namespace boost { namespace numeric { namespace ublas { /** \brief A class implementing an indexed random access iterator * of a matrix. * - * \param C the mutable container type + * \param C the (mutable) container type * \param IC the iterator category * * This class implements a random access iterator. The current From 8c173fcfa8daa72a123ad979780460e5d3c1c3eb Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 30 Nov 2006 18:14:07 +0000 Subject: [PATCH 27/65] [uBLAS] FIX default copy constructor missed j_. Use implict copy constructor instead [SVN r36216] --- include/boost/numeric/ublas/hermitian.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/boost/numeric/ublas/hermitian.hpp b/include/boost/numeric/ublas/hermitian.hpp index de88a769..88dc0d5c 100644 --- a/include/boost/numeric/ublas/hermitian.hpp +++ b/include/boost/numeric/ublas/hermitian.hpp @@ -59,9 +59,6 @@ namespace boost { namespace numeric { namespace ublas { hermitian_matrix_element (matrix_type &m, size_type i, size_type j, value_type d): container_reference (m), i_ (i), j_ (j), d_ (d), dirty_ (false) {} BOOST_UBLAS_INLINE - hermitian_matrix_element (const hermitian_matrix_element &p): - container_reference (p), i_ (p.i_), d_ (p.d_), dirty_ (p.dirty_) {} - BOOST_UBLAS_INLINE ~hermitian_matrix_element () { if (dirty_) (*this) ().insert_element (i_, j_, d_); From 350bc1c7f6663edf2a74224645b2edd8c8ca2451 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Fri, 1 Dec 2006 16:44:03 +0000 Subject: [PATCH 28/65] [uBLAS] document type row instead of column [SVN r36234] --- doc/matrix_proxy.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/matrix_proxy.htm b/doc/matrix_proxy.htm index aaacd654..77acb906 100644 --- a/doc/matrix_proxy.htm +++ b/doc/matrix_proxy.htm @@ -274,7 +274,7 @@ int main () {

Model of

Vector Expression .

-

If the specified row falls outside that of the column index +

If the specified column falls outside that of the column index range of the matrix, then the matrix_column is not a well formed Vector Expression. That is, access to an element which is outside of the matrix is undefined.

From e6b11310f6c098ec64cfb58a8c4631757fd13562 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 6 Dec 2006 09:34:01 +0000 Subject: [PATCH 29/65] CHANGE zero/identity/scalar _ vector/matrix add ALLOC template parameter to specify size/difference_type CHANGE implement function object to use container size/difference_type [SVN r36283] --- include/boost/numeric/ublas/functional.hpp | 380 ++++++++---------- include/boost/numeric/ublas/fwd.hpp | 12 +- include/boost/numeric/ublas/matrix.hpp | 38 +- .../boost/numeric/ublas/matrix_expression.hpp | 64 +-- include/boost/numeric/ublas/matrix_sparse.hpp | 29 +- include/boost/numeric/ublas/vector.hpp | 42 +- .../boost/numeric/ublas/vector_expression.hpp | 44 +- 7 files changed, 288 insertions(+), 321 deletions(-) diff --git a/include/boost/numeric/ublas/functional.hpp b/include/boost/numeric/ublas/functional.hpp index 7b071272..08757fe0 100644 --- a/include/boost/numeric/ublas/functional.hpp +++ b/include/boost/numeric/ublas/functional.hpp @@ -222,7 +222,7 @@ namespace boost { namespace numeric { namespace ublas { #if BOOST_WORKAROUND( __IBMCPP__, <=600 ) static const bool computed ; #else - static const bool computed = true ; + static const bool computed = true ; #endif static BOOST_UBLAS_INLINE @@ -331,35 +331,32 @@ namespace boost { namespace numeric { namespace ublas { // Vector functors // Unary returning scalar - template + template struct vector_scalar_unary_functor { - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T value_type; - typedef T result_type; + typedef typename V::value_type value_type; + typedef typename V::value_type result_type; }; - template + template struct vector_sum: - public vector_scalar_unary_functor { - typedef typename vector_scalar_unary_functor::size_type size_type; - typedef typename vector_scalar_unary_functor::difference_type difference_type; - typedef typename vector_scalar_unary_functor::value_type value_type; - typedef typename vector_scalar_unary_functor::result_type result_type; + public vector_scalar_unary_functor { + typedef typename vector_scalar_unary_functor::value_type value_type; + typedef typename vector_scalar_unary_functor::result_type result_type; template static BOOST_UBLAS_INLINE result_type apply (const vector_expression &e) { result_type t = result_type (0); - size_type size (e ().size ()); - for (size_type i = 0; i < size; ++ i) + typedef typename E::size_type vector_size_type; + vector_size_type size (e ().size ()); + for (vector_size_type i = 0; i < size; ++ i) t += e () (i); return t; } // Dense case - template + template static BOOST_UBLAS_INLINE - result_type apply (difference_type size, I it) { + result_type apply (D size, I it) { result_type t = result_type (0); while (-- size >= 0) t += *it, ++ it; @@ -377,39 +374,36 @@ namespace boost { namespace numeric { namespace ublas { }; // Unary returning real scalar - template + template struct vector_scalar_real_unary_functor { - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T value_type; - typedef typename type_traits::real_type real_type; + typedef typename V::value_type value_type; + typedef typename type_traits::real_type real_type; typedef real_type result_type; }; - template + template struct vector_norm_1: - public vector_scalar_real_unary_functor { - typedef typename vector_scalar_real_unary_functor::size_type size_type; - typedef typename vector_scalar_real_unary_functor::difference_type difference_type; - typedef typename vector_scalar_real_unary_functor::value_type value_type; - typedef typename vector_scalar_real_unary_functor::real_type real_type; - typedef typename vector_scalar_real_unary_functor::result_type result_type; + public vector_scalar_real_unary_functor { + typedef typename vector_scalar_real_unary_functor::value_type value_type; + typedef typename vector_scalar_real_unary_functor::real_type real_type; + typedef typename vector_scalar_real_unary_functor::result_type result_type; template static BOOST_UBLAS_INLINE result_type apply (const vector_expression &e) { real_type t = real_type (); - size_type size (e ().size ()); - for (size_type i = 0; i < size; ++ i) { + typedef typename E::size_type vector_size_type; + vector_size_type size (e ().size ()); + for (vector_size_type i = 0; i < size; ++ i) { real_type u (type_traits::type_abs (e () (i))); t += u; } return t; } // Dense case - template + template static BOOST_UBLAS_INLINE - result_type apply (difference_type size, I it) { + result_type apply (D size, I it) { real_type t = real_type (); while (-- size >= 0) { real_type u (type_traits::norm_1 (*it)); @@ -431,22 +425,21 @@ namespace boost { namespace numeric { namespace ublas { return t; } }; - template + template struct vector_norm_2: - public vector_scalar_real_unary_functor { - typedef typename vector_scalar_real_unary_functor::size_type size_type; - typedef typename vector_scalar_real_unary_functor::difference_type difference_type; - typedef typename vector_scalar_real_unary_functor::value_type value_type; - typedef typename vector_scalar_real_unary_functor::real_type real_type; - typedef typename vector_scalar_real_unary_functor::result_type result_type; + public vector_scalar_real_unary_functor { + typedef typename vector_scalar_real_unary_functor::value_type value_type; + typedef typename vector_scalar_real_unary_functor::real_type real_type; + typedef typename vector_scalar_real_unary_functor::result_type result_type; template static BOOST_UBLAS_INLINE result_type apply (const vector_expression &e) { #ifndef BOOST_UBLAS_SCALED_NORM real_type t = real_type (); - size_type size (e ().size ()); - for (size_type i = 0; i < size; ++ i) { + typedef typename E::size_type vector_size_type; + vector_size_type size (e ().size ()); + for (vector_size_type i = 0; i < size; ++ i) { real_type u (type_traits::norm_2 (e () (i))); t += u * u; } @@ -470,9 +463,9 @@ namespace boost { namespace numeric { namespace ublas { #endif } // Dense case - template + template static BOOST_UBLAS_INLINE - result_type apply (difference_type size, I it) { + result_type apply (D size, I it) { #ifndef BOOST_UBLAS_SCALED_NORM real_type t = real_type (); while (-- size >= 0) { @@ -530,21 +523,20 @@ namespace boost { namespace numeric { namespace ublas { #endif } }; - template + template struct vector_norm_inf: - public vector_scalar_real_unary_functor { - typedef typename vector_scalar_real_unary_functor::size_type size_type; - typedef typename vector_scalar_real_unary_functor::difference_type difference_type; - typedef typename vector_scalar_real_unary_functor::value_type value_type; - typedef typename vector_scalar_real_unary_functor::real_type real_type; - typedef typename vector_scalar_real_unary_functor::result_type result_type; + public vector_scalar_real_unary_functor { + typedef typename vector_scalar_real_unary_functor::value_type value_type; + typedef typename vector_scalar_real_unary_functor::real_type real_type; + typedef typename vector_scalar_real_unary_functor::result_type result_type; template static BOOST_UBLAS_INLINE result_type apply (const vector_expression &e) { real_type t = real_type (); - size_type size (e ().size ()); - for (size_type i = 0; i < size; ++ i) { + typedef typename E::size_type vector_size_type; + vector_size_type size (e ().size ()); + for (vector_size_type i = 0; i < size; ++ i) { real_type u (type_traits::norm_inf (e () (i))); if (u > t) t = u; @@ -552,9 +544,9 @@ namespace boost { namespace numeric { namespace ublas { return t; } // Dense case - template + template static BOOST_UBLAS_INLINE - result_type apply (difference_type size, I it) { + result_type apply (D size, I it) { real_type t = real_type (); while (-- size >= 0) { real_type u (type_traits::norm_inf (*it)); @@ -580,23 +572,19 @@ namespace boost { namespace numeric { namespace ublas { }; // Unary returning index - template + template struct vector_scalar_index_unary_functor { - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T value_type; - typedef typename type_traits::real_type real_type; - typedef size_type result_type; + typedef typename V::value_type value_type; + typedef typename type_traits::real_type real_type; + typedef typename V::size_type result_type; }; - template + template struct vector_index_norm_inf: - public vector_scalar_index_unary_functor { - typedef typename vector_scalar_index_unary_functor::size_type size_type; - typedef typename vector_scalar_index_unary_functor::difference_type difference_type; - typedef typename vector_scalar_index_unary_functor::value_type value_type; - typedef typename vector_scalar_index_unary_functor::real_type real_type; - typedef typename vector_scalar_index_unary_functor::result_type result_type; + public vector_scalar_index_unary_functor { + typedef typename vector_scalar_index_unary_functor::value_type value_type; + typedef typename vector_scalar_index_unary_functor::real_type real_type; + typedef typename vector_scalar_index_unary_functor::result_type result_type; template static BOOST_UBLAS_INLINE @@ -604,8 +592,9 @@ namespace boost { namespace numeric { namespace ublas { // ISSUE For CBLAS compatibility return 0 index in empty case result_type i_norm_inf (0); real_type t = real_type (); - size_type size (e ().size ()); - for (size_type i = 0; i < size; ++ i) { + typedef typename E::size_type vector_size_type; + vector_size_type size (e ().size ()); + for (vector_size_type i = 0; i < size; ++ i) { real_type u (type_traits::norm_inf (e () (i))); if (u > t) { i_norm_inf = i; @@ -615,9 +604,9 @@ namespace boost { namespace numeric { namespace ublas { return i_norm_inf; } // Dense case - template + template static BOOST_UBLAS_INLINE - result_type apply (difference_type size, I it) { + result_type apply (D size, I it) { // ISSUE For CBLAS compatibility return 0 index in empty case result_type i_norm_inf (0); real_type t = real_type (); @@ -651,21 +640,17 @@ namespace boost { namespace numeric { namespace ublas { }; // Binary returning scalar - template + template struct vector_scalar_binary_functor { - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef TR value_type; - typedef TR result_type; + typedef TV value_type; + typedef TV result_type; }; - template + template struct vector_inner_prod: - public vector_scalar_binary_functor { - typedef typename vector_scalar_binary_functor::size_type size_type ; - typedef typename vector_scalar_binary_functor::difference_type difference_type; - typedef typename vector_scalar_binary_functor::value_type value_type; - typedef typename vector_scalar_binary_functor::result_type result_type; + public vector_scalar_binary_functor { + typedef typename vector_scalar_binary_functor::value_type value_type; + typedef typename vector_scalar_binary_functor::result_type result_type; template static BOOST_UBLAS_INLINE @@ -673,23 +658,24 @@ namespace boost { namespace numeric { namespace ublas { const vector_container &c2) { #ifdef BOOST_UBLAS_USE_SIMD using namespace raw; - size_type size (BOOST_UBLAS_SAME (c1 ().size (), c2 ().size ())); - const T1 *data1 = data_const (c1 ()); - const T2 *data2 = data_const (c2 ()); - size_type s1 = stride (c1 ()); - size_type s2 = stride (c2 ()); + typedef typename C1::size_type vector_size_type; + vector_size_type size (BOOST_UBLAS_SAME (c1 ().size (), c2 ().size ())); + const typename V1::value_type *data1 = data_const (c1 ()); + const typename V1::value_type *data2 = data_const (c2 ()); + vector_size_type s1 = stride (c1 ()); + vector_size_type s2 = stride (c2 ()); result_type t = result_type (0); if (s1 == 1 && s2 == 1) { - for (size_type i = 0; i < size; ++ i) + for (vector_size_type i = 0; i < size; ++ i) t += data1 [i] * data2 [i]; } else if (s2 == 1) { - for (size_type i = 0, i1 = 0; i < size; ++ i, i1 += s1) + for (vector_size_type i = 0, i1 = 0; i < size; ++ i, i1 += s1) t += data1 [i1] * data2 [i]; } else if (s1 == 1) { - for (size_type i = 0, i2 = 0; i < size; ++ i, i2 += s2) + for (vector_size_type i = 0, i2 = 0; i < size; ++ i, i2 += s2) t += data1 [i] * data2 [i2]; } else { - for (size_type i = 0, i1 = 0, i2 = 0; i < size; ++ i, i1 += s1, i2 += s2) + for (vector_size_type i = 0, i1 = 0, i2 = 0; i < size; ++ i, i1 += s1, i2 += s2) t += data1 [i1] * data2 [i2]; } return t; @@ -703,21 +689,22 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE result_type apply (const vector_expression &e1, const vector_expression &e2) { - size_type size (BOOST_UBLAS_SAME (e1 ().size (), e2 ().size ())); + typedef typename E1::size_type vector_size_type; + vector_size_type size (BOOST_UBLAS_SAME (e1 ().size (), e2 ().size ())); result_type t = result_type (0); #ifndef BOOST_UBLAS_USE_DUFF_DEVICE - for (size_type i = 0; i < size; ++ i) + for (vector_size_type i = 0; i < size; ++ i) t += e1 () (i) * e2 () (i); #else - size_type i (0); + vector_size_type i (0); DD (size, 4, r, (t += e1 () (i) * e2 () (i), ++ i)); #endif return t; } // Dense case - template + template static BOOST_UBLAS_INLINE - result_type apply (difference_type size, I1 it1, I2 it2) { + result_type apply (D size, I1 it1, I2 it2) { result_type t = result_type (0); #ifndef BOOST_UBLAS_USE_DUFF_DEVICE while (-- size >= 0) @@ -732,13 +719,14 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &it1_end, I2 it2, const I2 &it2_end) { result_type t = result_type (0); - difference_type it1_size (it1_end - it1); - difference_type it2_size (it2_end - it2); - difference_type diff (0); + typedef typename I1::difference_type vector_difference_type; + vector_difference_type it1_size (it1_end - it1); + vector_difference_type it2_size (it2_end - it2); + vector_difference_type diff (0); if (it1_size > 0 && it2_size > 0) diff = it2.index () - it1.index (); if (diff != 0) { - difference_type size = (std::min) (diff, it1_size); + vector_difference_type size = (std::min) (diff, it1_size); if (size > 0) { it1 += size; it1_size -= size; @@ -751,7 +739,7 @@ namespace boost { namespace numeric { namespace ublas { diff += size; } } - difference_type size ((std::min) (it1_size, it2_size)); + vector_difference_type size ((std::min) (it1_size, it2_size)); while (-- size >= 0) t += *it1 * *it2, ++ it1, ++ it2; return t; @@ -762,27 +750,18 @@ namespace boost { namespace numeric { namespace ublas { result_type apply (I1 it1, const I1 &it1_end, I2 it2, const I2 &it2_end, sparse_bidirectional_iterator_tag) { result_type t = result_type (0); if (it1 != it1_end && it2 != it2_end) { - size_type it1_index = it1.index (), it2_index = it2.index (); while (true) { - difference_type compare = it1_index - it2_index; - if (compare == 0) { + if (it1.index () == it2.index ()) { t += *it1 * *it2, ++ it1, ++ it2; - if (it1 != it1_end && it2 != it2_end) { - it1_index = it1.index (); - it2_index = it2.index (); - } else + if (it1 == it1_end || it2 == it2_end) break; - } else if (compare < 0) { - increment (it1, it1_end, - compare); - if (it1 != it1_end) - it1_index = it1.index (); - else + } else if (it1.index () < it2.index ()) { + increment (it1, it1_end, it2.index () - it1.index ()); + if (it1 == it1_end) break; - } else if (compare > 0) { - increment (it2, it2_end, compare); - if (it2 != it2_end) - it2_index = it2.index (); - else + } else if (it1.index () > it2.index ()) { + increment (it2, it2_end, it1.index () - it2.index ()); + if (it2 == it2_end) break; } } @@ -794,21 +773,21 @@ namespace boost { namespace numeric { namespace ublas { // Matrix functors // Binary returning vector - template + template struct matrix_vector_binary_functor { - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef TR value_type; - typedef TR result_type; + typedef typename M1::size_type size_type; + typedef typename M1::difference_type difference_type; + typedef TV value_type; + typedef TV result_type; }; - template + template struct matrix_vector_prod1: - public matrix_vector_binary_functor { - typedef typename matrix_vector_binary_functor::size_type size_type; - typedef typename matrix_vector_binary_functor::difference_type difference_type; - typedef typename matrix_vector_binary_functor::value_type value_type; - typedef typename matrix_vector_binary_functor::result_type result_type; + public matrix_vector_binary_functor { + typedef typename matrix_vector_binary_functor::size_type size_type; + typedef typename matrix_vector_binary_functor::difference_type difference_type; + typedef typename matrix_vector_binary_functor::value_type value_type; + typedef typename matrix_vector_binary_functor::result_type result_type; template static BOOST_UBLAS_INLINE @@ -818,8 +797,8 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_USE_SIMD using namespace raw; size_type size = BOOST_UBLAS_SAME (c1 ().size2 (), c2 ().size ()); - const T1 *data1 = data_const (c1 ()) + i * stride1 (c1 ()); - const T2 *data2 = data_const (c2 ()); + const typename M1::value_type *data1 = data_const (c1 ()) + i * stride1 (c1 ()); + const typename M2::value_type *data2 = data_const (c2 ()); size_type s1 = stride2 (c1 ()); size_type s2 = stride (c2 ()); result_type t = result_type (0); @@ -846,7 +825,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (const matrix_expression &e1, - const vector_expression &e2, + const vector_expression &e2, size_type i) { size_type size = BOOST_UBLAS_SAME (e1 ().size2 (), e2 ().size ()); result_type t = result_type (0); @@ -905,7 +884,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &it1_end, I2 it2, const I2 &it2_end, - sparse_bidirectional_iterator_tag, sparse_bidirectional_iterator_tag) { + sparse_bidirectional_iterator_tag, sparse_bidirectional_iterator_tag) { result_type t = result_type (0); if (it1 != it1_end && it2 != it2_end) { size_type it1_index = it1.index2 (), it2_index = it2.index (); @@ -939,7 +918,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &it1_end, I2 it2, const I2 &/* it2_end */, - sparse_bidirectional_iterator_tag, packed_random_access_iterator_tag) { + sparse_bidirectional_iterator_tag, packed_random_access_iterator_tag) { result_type t = result_type (0); while (it1 != it1_end) { t += *it1 * it2 () (it1.index2 ()); @@ -951,7 +930,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &/* it1_end */, I2 it2, const I2 &it2_end, - packed_random_access_iterator_tag, sparse_bidirectional_iterator_tag) { + packed_random_access_iterator_tag, sparse_bidirectional_iterator_tag) { result_type t = result_type (0); while (it2 != it2_end) { t += it1 () (it1.index1 (), it2.index ()) * *it2; @@ -963,20 +942,20 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &it1_end, I2 it2, const I2 &it2_end, - sparse_bidirectional_iterator_tag) { + sparse_bidirectional_iterator_tag) { typedef typename I1::iterator_category iterator1_category; typedef typename I2::iterator_category iterator2_category; return apply (it1, it1_end, it2, it2_end, iterator1_category (), iterator2_category ()); } }; - template + template struct matrix_vector_prod2: - public matrix_vector_binary_functor { - typedef typename matrix_vector_binary_functor::size_type size_type; - typedef typename matrix_vector_binary_functor::difference_type difference_type; - typedef typename matrix_vector_binary_functor::value_type value_type; - typedef typename matrix_vector_binary_functor::result_type result_type; + public matrix_vector_binary_functor { + typedef typename matrix_vector_binary_functor::size_type size_type; + typedef typename matrix_vector_binary_functor::difference_type difference_type; + typedef typename matrix_vector_binary_functor::value_type value_type; + typedef typename matrix_vector_binary_functor::result_type result_type; template static BOOST_UBLAS_INLINE @@ -986,8 +965,8 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_USE_SIMD using namespace raw; size_type size = BOOST_UBLAS_SAME (c1 ().size (), c2 ().size1 ()); - const T1 *data1 = data_const (c1 ()); - const T2 *data2 = data_const (c2 ()) + i * stride2 (c2 ()); + const typename M1::value_type *data1 = data_const (c1 ()); + const typename M2::value_type *data2 = data_const (c2 ()) + i * stride2 (c2 ()); size_type s1 = stride (c1 ()); size_type s2 = stride1 (c2 ()); result_type t = result_type (0); @@ -1014,7 +993,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (const vector_expression &e1, - const matrix_expression &e2, + const matrix_expression &e2, size_type i) { size_type size = BOOST_UBLAS_SAME (e1 ().size (), e2 ().size1 ()); result_type t = result_type (0); @@ -1073,7 +1052,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &it1_end, I2 it2, const I2 &it2_end, - sparse_bidirectional_iterator_tag, sparse_bidirectional_iterator_tag) { + sparse_bidirectional_iterator_tag, sparse_bidirectional_iterator_tag) { result_type t = result_type (0); if (it1 != it1_end && it2 != it2_end) { size_type it1_index = it1.index (), it2_index = it2.index1 (); @@ -1107,7 +1086,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &/* it1_end */, I2 it2, const I2 &it2_end, - packed_random_access_iterator_tag, sparse_bidirectional_iterator_tag) { + packed_random_access_iterator_tag, sparse_bidirectional_iterator_tag) { result_type t = result_type (0); while (it2 != it2_end) { t += it1 () (it2.index1 ()) * *it2; @@ -1119,7 +1098,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &it1_end, I2 it2, const I2 &/* it2_end */, - sparse_bidirectional_iterator_tag, packed_random_access_iterator_tag) { + sparse_bidirectional_iterator_tag, packed_random_access_iterator_tag) { result_type t = result_type (0); while (it1 != it1_end) { t += *it1 * it2 () (it1.index (), it2.index2 ()); @@ -1131,7 +1110,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (I1 it1, const I1 &it1_end, I2 it2, const I2 &it2_end, - sparse_bidirectional_iterator_tag) { + sparse_bidirectional_iterator_tag) { typedef typename I1::iterator_category iterator1_category; typedef typename I2::iterator_category iterator2_category; return apply (it1, it1_end, it2, it2_end, iterator1_category (), iterator2_category ()); @@ -1139,21 +1118,21 @@ namespace boost { namespace numeric { namespace ublas { }; // Binary returning matrix - template + template struct matrix_matrix_binary_functor { - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef TR value_type; - typedef TR result_type; + typedef typename M1::size_type size_type; + typedef typename M1::difference_type difference_type; + typedef TV value_type; + typedef TV result_type; }; - template + template struct matrix_matrix_prod: - public matrix_matrix_binary_functor { - typedef typename matrix_matrix_binary_functor::size_type size_type; - typedef typename matrix_matrix_binary_functor::difference_type difference_type; - typedef typename matrix_matrix_binary_functor::value_type value_type; - typedef typename matrix_matrix_binary_functor::result_type result_type; + public matrix_matrix_binary_functor { + typedef typename matrix_matrix_binary_functor::size_type size_type; + typedef typename matrix_matrix_binary_functor::difference_type difference_type; + typedef typename matrix_matrix_binary_functor::value_type value_type; + typedef typename matrix_matrix_binary_functor::result_type result_type; template static BOOST_UBLAS_INLINE @@ -1163,8 +1142,8 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_USE_SIMD using namespace raw; size_type size = BOOST_UBLAS_SAME (c1 ().size2 (), c2 ().sizc1 ()); - const T1 *data1 = data_const (c1 ()) + i * stride1 (c1 ()); - const T2 *data2 = data_const (c2 ()) + j * stride2 (c2 ()); + const typename M1::value_type *data1 = data_const (c1 ()) + i * stride1 (c1 ()); + const typename M2::value_type *data2 = data_const (c2 ()) + j * stride2 (c2 ()); size_type s1 = stride2 (c1 ()); size_type s2 = stride1 (c2 ()); result_type t = result_type (0); @@ -1191,7 +1170,7 @@ namespace boost { namespace numeric { namespace ublas { template static BOOST_UBLAS_INLINE result_type apply (const matrix_expression &e1, - const matrix_expression &e2, + const matrix_expression &e2, size_type i, size_type j) { size_type size = BOOST_UBLAS_SAME (e1 ().size2 (), e2 ().size1 ()); result_type t = result_type (0); @@ -1254,7 +1233,7 @@ namespace boost { namespace numeric { namespace ublas { if (it1 != it1_end && it2 != it2_end) { size_type it1_index = it1.index2 (), it2_index = it2.index1 (); while (true) { - difference_type compare = it1_index - it2_index; + difference_type compare = difference_type (it1_index - it2_index); if (compare == 0) { t += *it1 * *it2, ++ it1, ++ it2; if (it1 != it1_end && it2 != it2_end) { @@ -1282,33 +1261,30 @@ namespace boost { namespace numeric { namespace ublas { }; // Unary returning scalar norm - template + template struct matrix_scalar_real_unary_functor { - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T value_type; - typedef typename type_traits::real_type real_type; + typedef typename M::value_type value_type; + typedef typename type_traits::real_type real_type; typedef real_type result_type; }; - template + template struct matrix_norm_1: - public matrix_scalar_real_unary_functor { - typedef typename matrix_scalar_real_unary_functor::size_type size_type; - typedef typename matrix_scalar_real_unary_functor::difference_type difference_type; - typedef typename matrix_scalar_real_unary_functor::value_type value_type; - typedef typename matrix_scalar_real_unary_functor::real_type real_type; - typedef typename matrix_scalar_real_unary_functor::result_type result_type; + public matrix_scalar_real_unary_functor { + typedef typename matrix_scalar_real_unary_functor::value_type value_type; + typedef typename matrix_scalar_real_unary_functor::real_type real_type; + typedef typename matrix_scalar_real_unary_functor::result_type result_type; template static BOOST_UBLAS_INLINE result_type apply (const matrix_expression &e) { real_type t = real_type (); - size_type size2 (e ().size2 ()); - for (size_type j = 0; j < size2; ++ j) { + typedef typename E::size_type matrix_size_type; + matrix_size_type size2 (e ().size2 ()); + for (matrix_size_type j = 0; j < size2; ++ j) { real_type u = real_type (); - size_type size1 (e ().size1 ()); - for (size_type i = 0; i < size1; ++ i) { + matrix_size_type size1 (e ().size1 ()); + for (matrix_size_type i = 0; i < size1; ++ i) { real_type v (type_traits::norm_1 (e () (i, j))); u += v; } @@ -1318,23 +1294,23 @@ namespace boost { namespace numeric { namespace ublas { return t; } }; - template + + template struct matrix_norm_frobenius: - public matrix_scalar_real_unary_functor { - typedef typename matrix_scalar_real_unary_functor::size_type size_type; - typedef typename matrix_scalar_real_unary_functor::difference_type difference_type; - typedef typename matrix_scalar_real_unary_functor::value_type value_type; - typedef typename matrix_scalar_real_unary_functor::real_type real_type; - typedef typename matrix_scalar_real_unary_functor::result_type result_type; + public matrix_scalar_real_unary_functor { + typedef typename matrix_scalar_real_unary_functor::value_type value_type; + typedef typename matrix_scalar_real_unary_functor::real_type real_type; + typedef typename matrix_scalar_real_unary_functor::result_type result_type; template static BOOST_UBLAS_INLINE result_type apply (const matrix_expression &e) { real_type t = real_type (); - size_type size1 (e ().size1 ()); - for (size_type i = 0; i < size1; ++ i) { - size_type size2 (e ().size2 ()); - for (size_type j = 0; j < size2; ++ j) { + typedef typename E::size_type matrix_size_type; + matrix_size_type size1 (e ().size1 ()); + for (matrix_size_type i = 0; i < size1; ++ i) { + matrix_size_type size2 (e ().size2 ()); + for (matrix_size_type j = 0; j < size2; ++ j) { real_type u (type_traits::norm_2 (e () (i, j))); t += u * u; } @@ -1342,24 +1318,24 @@ namespace boost { namespace numeric { namespace ublas { return type_traits::type_sqrt (t); } }; - template + + template struct matrix_norm_inf: - public matrix_scalar_real_unary_functor { - typedef typename matrix_scalar_real_unary_functor::size_type size_type; - typedef typename matrix_scalar_real_unary_functor::difference_type difference_type; - typedef typename matrix_scalar_real_unary_functor::value_type value_type; - typedef typename matrix_scalar_real_unary_functor::real_type real_type; - typedef typename matrix_scalar_real_unary_functor::result_type result_type; + public matrix_scalar_real_unary_functor { + typedef typename matrix_scalar_real_unary_functor::value_type value_type; + typedef typename matrix_scalar_real_unary_functor::real_type real_type; + typedef typename matrix_scalar_real_unary_functor::result_type result_type; template static BOOST_UBLAS_INLINE result_type apply (const matrix_expression &e) { real_type t = real_type (); - size_type size1 (e ().size1 ()); - for (size_type i = 0; i < size1; ++ i) { + typedef typename E::size_type matrix_size_type; + matrix_size_type size1 (e ().size1 ()); + for (matrix_size_type i = 0; i < size1; ++ i) { real_type u = real_type (); - size_type size2 (e ().size2 ()); - for (size_type j = 0; j < size2; ++ j) { + matrix_size_type size2 (e ().size2 ()); + for (matrix_size_type j = 0; j < size2; ++ j) { real_type v (type_traits::norm_inf (e () (i, j))); u += v; } diff --git a/include/boost/numeric/ublas/fwd.hpp b/include/boost/numeric/ublas/fwd.hpp index 57f912c6..d7a9eb22 100644 --- a/include/boost/numeric/ublas/fwd.hpp +++ b/include/boost/numeric/ublas/fwd.hpp @@ -93,11 +93,11 @@ namespace boost { namespace numeric { namespace ublas { template class bounded_vector; - template + template > class unit_vector; - template + template > class zero_vector; - template + template > class scalar_vector; template @@ -130,11 +130,11 @@ namespace boost { namespace numeric { namespace ublas { template class bounded_matrix; - template + template > class identity_matrix; - template + template > class zero_matrix; - template + template > class scalar_matrix; template diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 6e9d2e8f..4112feab 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -1968,18 +1968,18 @@ namespace boost { namespace numeric { namespace ublas { // Zero matrix class - template + template class zero_matrix: - public matrix_container > { + public matrix_container > { typedef const T *const_pointer; - typedef zero_matrix self_type; + typedef zero_matrix self_type; public: #ifdef BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS using matrix_container::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename ALLOC::size_type size_type; + typedef typename ALLOC::difference_type difference_type; typedef T value_type; typedef const T &const_reference; typedef T &reference; @@ -2323,23 +2323,23 @@ namespace boost { namespace numeric { namespace ublas { static const value_type zero_; }; - template - const typename zero_matrix::value_type zero_matrix::zero_ (0); + template + const typename zero_matrix::value_type zero_matrix::zero_ (0); // Identity matrix class - template + template class identity_matrix: - public matrix_container > { + public matrix_container > { typedef const T *const_pointer; - typedef identity_matrix self_type; + typedef identity_matrix self_type; public: #ifdef BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS using matrix_container::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename ALLOC::size_type size_type; + typedef typename ALLOC::difference_type difference_type; typedef T value_type; typedef const T &const_reference; typedef T &reference; @@ -2705,19 +2705,19 @@ namespace boost { namespace numeric { namespace ublas { static const value_type one_; }; - template - const typename identity_matrix::value_type identity_matrix::zero_ (0); - template - const typename identity_matrix::value_type identity_matrix::one_ (1); + template + const typename identity_matrix::value_type identity_matrix::zero_ (0); + template + const typename identity_matrix::value_type identity_matrix::one_ (1); // Scalar matrix class - template + template class scalar_matrix: - public matrix_container > { + public matrix_container > { typedef const T *const_pointer; - typedef scalar_matrix self_type; + typedef scalar_matrix self_type; public: #ifdef BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS using matrix_container::operator (); diff --git a/include/boost/numeric/ublas/matrix_expression.hpp b/include/boost/numeric/ublas/matrix_expression.hpp index ac86f658..6da4e457 100644 --- a/include/boost/numeric/ublas/matrix_expression.hpp +++ b/include/boost/numeric/ublas/matrix_expression.hpp @@ -2482,7 +2482,7 @@ namespace boost { namespace numeric { namespace ublas { operator + (const matrix_expression &e1, const matrix_expression &e2) { typedef typename matrix_binary_traits >::expression_type expression_type; + typename E2::value_type> >::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -2494,7 +2494,7 @@ namespace boost { namespace numeric { namespace ublas { operator - (const matrix_expression &e1, const matrix_expression &e2) { typedef typename matrix_binary_traits >::expression_type expression_type; + typename E2::value_type> >::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -2506,7 +2506,7 @@ namespace boost { namespace numeric { namespace ublas { element_prod (const matrix_expression &e1, const matrix_expression &e2) { typedef typename matrix_binary_traits >::expression_type expression_type; + typename E2::value_type> >::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -2514,11 +2514,11 @@ namespace boost { namespace numeric { namespace ublas { template BOOST_UBLAS_INLINE typename matrix_binary_traits >::result_type + typename E2::value_type> >::result_type element_div (const matrix_expression &e1, const matrix_expression &e2) { typedef typename matrix_binary_traits >::expression_type expression_type; + typename E2::value_type> >::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -3689,7 +3689,7 @@ namespace boost { namespace numeric { namespace ublas { typedef unknown_storage_tag storage_category; typedef row_major_tag orientation_category; typedef typename promote_traits::promote_type promote_type; - typedef matrix_vector_binary1 > expression_type; + typedef matrix_vector_binary1 > expression_type; #ifndef BOOST_UBLAS_SIMPLE_ET_DEBUG typedef expression_type result_type; #else @@ -3706,7 +3706,7 @@ namespace boost { namespace numeric { namespace ublas { unknown_storage_tag, row_major_tag) { typedef typename matrix_vector_binary1_traits::expression_type expression_type; + typename E2::value_type, E2>::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -3719,9 +3719,9 @@ namespace boost { namespace numeric { namespace ublas { const vector_expression &e2) { BOOST_STATIC_ASSERT (E2::complexity == 0); typedef typename matrix_vector_binary1_traits::storage_category storage_category; + typename E2::value_type, E2>::storage_category storage_category; typedef typename matrix_vector_binary1_traits::orientation_category orientation_category; + typename E2::value_type, E2>::orientation_category orientation_category; return prod (e1, e2, storage_category (), orientation_category ()); } @@ -3734,7 +3734,7 @@ namespace boost { namespace numeric { namespace ublas { unknown_storage_tag, row_major_tag) { typedef typename matrix_vector_binary1_traits::precision_type, E1, - typename type_traits::precision_type, E2>::expression_type expression_type; + typename type_traits::precision_type, E2>::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -3747,9 +3747,9 @@ namespace boost { namespace numeric { namespace ublas { const vector_expression &e2) { BOOST_STATIC_ASSERT (E2::complexity == 0); typedef typename matrix_vector_binary1_traits::precision_type, E1, - typename type_traits::precision_type, E2>::storage_category storage_category; + typename type_traits::precision_type, E2>::storage_category storage_category; typedef typename matrix_vector_binary1_traits::precision_type, E1, - typename type_traits::precision_type, E2>::orientation_category orientation_category; + typename type_traits::precision_type, E2>::orientation_category orientation_category; return prec_prod (e1, e2, storage_category (), orientation_category ()); } @@ -4079,7 +4079,7 @@ namespace boost { namespace numeric { namespace ublas { typedef unknown_storage_tag storage_category; typedef column_major_tag orientation_category; typedef typename promote_traits::promote_type promote_type; - typedef matrix_vector_binary2 > expression_type; + typedef matrix_vector_binary2 > expression_type; #ifndef BOOST_UBLAS_SIMPLE_ET_DEBUG typedef expression_type result_type; #else @@ -4096,7 +4096,7 @@ namespace boost { namespace numeric { namespace ublas { unknown_storage_tag, column_major_tag) { typedef typename matrix_vector_binary2_traits::expression_type expression_type; + typename E2::value_type, E2>::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -4109,9 +4109,9 @@ namespace boost { namespace numeric { namespace ublas { const matrix_expression &e2) { BOOST_STATIC_ASSERT (E1::complexity == 0); typedef typename matrix_vector_binary2_traits::storage_category storage_category; + typename E2::value_type, E2>::storage_category storage_category; typedef typename matrix_vector_binary2_traits::orientation_category orientation_category; + typename E2::value_type, E2>::orientation_category orientation_category; return prod (e1, e2, storage_category (), orientation_category ()); } @@ -4124,7 +4124,7 @@ namespace boost { namespace numeric { namespace ublas { unknown_storage_tag, column_major_tag) { typedef typename matrix_vector_binary2_traits::precision_type, E1, - typename type_traits::precision_type, E2>::expression_type expression_type; + typename type_traits::precision_type, E2>::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -4137,9 +4137,9 @@ namespace boost { namespace numeric { namespace ublas { const matrix_expression &e2) { BOOST_STATIC_ASSERT (E1::complexity == 0); typedef typename matrix_vector_binary2_traits::precision_type, E1, - typename type_traits::precision_type, E2>::storage_category storage_category; + typename type_traits::precision_type, E2>::storage_category storage_category; typedef typename matrix_vector_binary2_traits::precision_type, E1, - typename type_traits::precision_type, E2>::orientation_category orientation_category; + typename type_traits::precision_type, E2>::orientation_category orientation_category; return prec_prod (e1, e2, storage_category (), orientation_category ()); } @@ -4784,7 +4784,7 @@ namespace boost { namespace numeric { namespace ublas { typedef unknown_storage_tag storage_category; typedef unknown_orientation_tag orientation_category; typedef typename promote_traits::promote_type promote_type; - typedef matrix_matrix_binary > expression_type; + typedef matrix_matrix_binary > expression_type; #ifndef BOOST_UBLAS_SIMPLE_ET_DEBUG typedef expression_type result_type; #else @@ -4801,7 +4801,7 @@ namespace boost { namespace numeric { namespace ublas { unknown_storage_tag, unknown_orientation_tag) { typedef typename matrix_matrix_binary_traits::expression_type expression_type; + typename E2::value_type, E2>::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -4814,9 +4814,9 @@ namespace boost { namespace numeric { namespace ublas { const matrix_expression &e2) { BOOST_STATIC_ASSERT (E1::complexity == 0 && E2::complexity == 0); typedef typename matrix_matrix_binary_traits::storage_category storage_category; + typename E2::value_type, E2>::storage_category storage_category; typedef typename matrix_matrix_binary_traits::orientation_category orientation_category; + typename E2::value_type, E2>::orientation_category orientation_category; return prod (e1, e2, storage_category (), orientation_category ()); } @@ -4829,7 +4829,7 @@ namespace boost { namespace numeric { namespace ublas { unknown_storage_tag, unknown_orientation_tag) { typedef typename matrix_matrix_binary_traits::precision_type, E1, - typename type_traits::precision_type, E2>::expression_type expression_type; + typename type_traits::precision_type, E2>::expression_type expression_type; return expression_type (e1 (), e2 ()); } @@ -4842,9 +4842,9 @@ namespace boost { namespace numeric { namespace ublas { const matrix_expression &e2) { BOOST_STATIC_ASSERT (E1::complexity == 0 && E2::complexity == 0); typedef typename matrix_matrix_binary_traits::precision_type, E1, - typename type_traits::precision_type, E2>::storage_category storage_category; + typename type_traits::precision_type, E2>::storage_category storage_category; typedef typename matrix_matrix_binary_traits::precision_type, E1, - typename type_traits::precision_type, E2>::orientation_category orientation_category; + typename type_traits::precision_type, E2>::orientation_category orientation_category; return prec_prod (e1, e2, storage_category (), orientation_category ()); } @@ -4925,25 +4925,25 @@ namespace boost { namespace numeric { namespace ublas { template BOOST_UBLAS_INLINE - typename matrix_scalar_unary_traits >::result_type + typename matrix_scalar_unary_traits >::result_type norm_1 (const matrix_expression &e) { - typedef typename matrix_scalar_unary_traits >::expression_type expression_type; + typedef typename matrix_scalar_unary_traits >::expression_type expression_type; return expression_type (e ()); } template BOOST_UBLAS_INLINE - typename matrix_scalar_unary_traits >::result_type + typename matrix_scalar_unary_traits >::result_type norm_frobenius (const matrix_expression &e) { - typedef typename matrix_scalar_unary_traits >::expression_type expression_type; + typedef typename matrix_scalar_unary_traits >::expression_type expression_type; return expression_type (e ()); } template BOOST_UBLAS_INLINE - typename matrix_scalar_unary_traits >::result_type + typename matrix_scalar_unary_traits >::result_type norm_inf (const matrix_expression &e) { - typedef typename matrix_scalar_unary_traits >::expression_type expression_type; + typedef typename matrix_scalar_unary_traits >::expression_type expression_type; return expression_type (e ()); } diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index 3b5fb893..70f6648f 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -2512,7 +2512,7 @@ namespace boost { namespace numeric { namespace ublas { // is_convertable (IA::size_type, TA::size_type) typedef typename IA::value_type size_type; // size_type for the data arrays. - typedef typename IA::size_type array_size_type; + typedef typename IA::size_type array_size_type; // FIXME difference type for sparse storage iterators should it be in the container? typedef typename IA::difference_type difference_type; typedef T value_type; @@ -3869,13 +3869,12 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS using matrix_container::operator (); #endif - // ISSUE require type consistency check - // is_convertable (IA::size_type, TA::size_type) + // ISSUE require type consistency check, is_convertable (IA::size_type, TA::size_type) typedef typename IA::value_type size_type; + // ISSUE difference_type cannot be deduced for sparse indices, we only know the value_type + typedef typename std::ptrdiff_t difference_type; // size_type for the data arrays. - typedef typename IA::size_type array_size_type; - // FIXME difference type for sprase storage iterators should it be in the container? - typedef typename IA::difference_type difference_type; + typedef typename IA::size_type array_size_type; typedef T value_type; typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE @@ -3902,7 +3901,7 @@ namespace boost { namespace numeric { namespace ublas { storage_invariants (); } BOOST_UBLAS_INLINE - coordinate_matrix (size_type size1, size_type size2, size_type non_zeros = 0): + coordinate_matrix (size_type size1, size_type size2, array_size_type non_zeros = 0): matrix_container (), size1_ (size1), size2_ (size2), capacity_ (restrict_capacity (non_zeros)), filled_ (0), sorted_filled_ (filled_), sorted_ (true), @@ -3919,7 +3918,7 @@ namespace boost { namespace numeric { namespace ublas { } template BOOST_UBLAS_INLINE - coordinate_matrix (const matrix_expression &ae, size_type non_zeros = 0): + coordinate_matrix (const matrix_expression &ae, array_size_type non_zeros = 0): matrix_container (), size1_ (ae ().size1 ()), size2_ (ae ().size2 ()), capacity_ (restrict_capacity (non_zeros)), filled_ (0), sorted_filled_ (filled_), sorted_ (true), @@ -3993,9 +3992,9 @@ namespace boost { namespace numeric { namespace ublas { // Resizing private: BOOST_UBLAS_INLINE - size_type restrict_capacity (size_type non_zeros) const { + array_size_type restrict_capacity (array_size_type non_zeros) const { // minimum non_zeros - non_zeros = (std::max) (non_zeros, (std::min) (size1_, size2_)); + non_zeros = (std::max) (non_zeros, array_size_type((std::min) (size1_, size2_))); // ISSUE no maximum as coordinate may contain inserted duplicates return non_zeros; } @@ -4018,7 +4017,7 @@ namespace boost { namespace numeric { namespace ublas { // Reserving BOOST_UBLAS_INLINE - void reserve (size_type non_zeros, bool preserve = true) { + void reserve (array_size_type non_zeros, bool preserve = true) { sort (); // remove duplicate elements capacity_ = restrict_capacity (non_zeros); if (preserve) { @@ -4368,7 +4367,7 @@ namespace boost { namespace numeric { namespace ublas { } } else /* if (direction < 0) */ { if (layout_type::fast_i ()) { - if (it == index2_data_.begin () + zero_based (*itv)) + if (it == index2_data_.begin () + array_size_type (zero_based (*itv))) return const_iterator1 (*this, rank, i, j, itv, it); i = zero_based (*(it - 1)); } else { @@ -4409,7 +4408,7 @@ namespace boost { namespace numeric { namespace ublas { } } else /* if (direction < 0) */ { if (layout_type::fast_i ()) { - if (it == index2_data_.begin () + zero_based (*itv)) + if (it == index2_data_.begin () + array_size_type (zero_based (*itv))) return iterator1 (*this, rank, i, j, itv, it); i = zero_based (*(it - 1)); } else { @@ -4450,7 +4449,7 @@ namespace boost { namespace numeric { namespace ublas { } } else /* if (direction < 0) */ { if (layout_type::fast_j ()) { - if (it == index2_data_.begin () + zero_based (*itv)) + if (it == index2_data_.begin () + array_size_type (zero_based (*itv))) return const_iterator2 (*this, rank, i, j, itv, it); j = zero_based (*(it - 1)); } else { @@ -4491,7 +4490,7 @@ namespace boost { namespace numeric { namespace ublas { } } else /* if (direction < 0) */ { if (layout_type::fast_j ()) { - if (it == index2_data_.begin () + zero_based (*itv)) + if (it == index2_data_.begin () + array_size_type (zero_based (*itv))) return iterator2 (*this, rank, i, j, itv, it); j = zero_based (*(it - 1)); } else { diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index 9e967d74..d77f97dc 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -569,18 +569,18 @@ namespace boost { namespace numeric { namespace ublas { // Zero vector class - template + template class zero_vector: - public vector_container > { + public vector_container > { typedef const T *const_pointer; - typedef zero_vector self_type; + typedef zero_vector self_type; public: #ifdef BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS using vector_container::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename ALLOC::size_type size_type; + typedef typename ALLOC::difference_type difference_type; typedef T value_type; typedef const T &const_reference; typedef T &reference; @@ -754,23 +754,23 @@ namespace boost { namespace numeric { namespace ublas { static const_value_type zero_; }; - template - typename zero_vector::const_value_type zero_vector::zero_ (0); + template + typename zero_vector::const_value_type zero_vector::zero_ (0); // Unit vector class - template + template class unit_vector: - public vector_container > { + public vector_container > { typedef const T *const_pointer; - typedef unit_vector self_type; + typedef unit_vector self_type; public: #ifdef BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS using vector_container::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename ALLOC::size_type size_type; + typedef typename ALLOC::difference_type difference_type; typedef T value_type; typedef const T &const_reference; typedef T &reference; @@ -966,25 +966,25 @@ namespace boost { namespace numeric { namespace ublas { static const_value_type one_; }; - template - typename unit_vector::const_value_type unit_vector::zero_ (0); - template - typename unit_vector::const_value_type unit_vector::one_ (1); + template + typename unit_vector::const_value_type unit_vector::zero_ (0); + template + typename unit_vector::const_value_type unit_vector::one_ (1); // Scalar vector class - template + template class scalar_vector: - public vector_container > { + public vector_container > { typedef const T *const_pointer; - typedef scalar_vector self_type; + typedef scalar_vector self_type; public: #ifdef BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS using vector_container::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename ALLOC::size_type size_type; + typedef typename ALLOC::difference_type difference_type; typedef T value_type; typedef const T &const_reference; typedef T &reference; diff --git a/include/boost/numeric/ublas/vector_expression.hpp b/include/boost/numeric/ublas/vector_expression.hpp index f5588de4..a466ae68 100644 --- a/include/boost/numeric/ublas/vector_expression.hpp +++ b/include/boost/numeric/ublas/vector_expression.hpp @@ -1427,8 +1427,6 @@ namespace boost { namespace numeric { namespace ublas { typedef typename E::const_iterator::iterator_category iterator_category; typedef vector_scalar_unary self_type; public: - typedef typename F::size_type size_type; - typedef typename F::difference_type difference_type; typedef typename F::result_type value_type; typedef const self_type const_closure_type; typedef const_closure_type closure_type; @@ -1501,9 +1499,9 @@ namespace boost { namespace numeric { namespace ublas { // sum v = sum (v [i]) template BOOST_UBLAS_INLINE - typename vector_scalar_unary_traits >::result_type + typename vector_scalar_unary_traits >::result_type sum (const vector_expression &e) { - typedef typename vector_scalar_unary_traits >::expression_type expression_type; + typedef typename vector_scalar_unary_traits >::expression_type expression_type; return expression_type (e ()); } @@ -1511,9 +1509,9 @@ namespace boost { namespace numeric { namespace ublas { // complex: norm_1 v = sum (abs (real (v [i])) + abs (imag (v [i]))) template BOOST_UBLAS_INLINE - typename vector_scalar_unary_traits >::result_type + typename vector_scalar_unary_traits >::result_type norm_1 (const vector_expression &e) { - typedef typename vector_scalar_unary_traits >::expression_type expression_type; + typedef typename vector_scalar_unary_traits >::expression_type expression_type; return expression_type (e ()); } @@ -1521,9 +1519,9 @@ namespace boost { namespace numeric { namespace ublas { // complex: norm_2 v = sqrt (sum (v [i] * conj (v [i]))) template BOOST_UBLAS_INLINE - typename vector_scalar_unary_traits >::result_type + typename vector_scalar_unary_traits >::result_type norm_2 (const vector_expression &e) { - typedef typename vector_scalar_unary_traits >::expression_type expression_type; + typedef typename vector_scalar_unary_traits >::expression_type expression_type; return expression_type (e ()); } @@ -1531,18 +1529,18 @@ namespace boost { namespace numeric { namespace ublas { // complex: norm_inf v = maximum (maximum (abs (real (v [i])), abs (imag (v [i])))) template BOOST_UBLAS_INLINE - typename vector_scalar_unary_traits >::result_type + typename vector_scalar_unary_traits >::result_type norm_inf (const vector_expression &e) { - typedef typename vector_scalar_unary_traits >::expression_type expression_type; + typedef typename vector_scalar_unary_traits >::expression_type expression_type; return expression_type (e ()); } // real: index_norm_inf v = minimum (i: abs (v [i]) == maximum (abs (v [i]))) template BOOST_UBLAS_INLINE - typename vector_scalar_unary_traits >::result_type + typename vector_scalar_unary_traits >::result_type index_norm_inf (const vector_expression &e) { - typedef typename vector_scalar_unary_traits >::expression_type expression_type; + typedef typename vector_scalar_unary_traits >::expression_type expression_type; return expression_type (e ()); } @@ -1560,8 +1558,6 @@ namespace boost { namespace numeric { namespace ublas { typedef vector_scalar_binary self_type; public: static const unsigned complexity = 1; - typedef typename F::size_type size_type; - typedef typename F::difference_type difference_type; typedef typename F::result_type value_type; typedef const self_type const_closure_type; typedef const_closure_type closure_type; @@ -1639,31 +1635,27 @@ namespace boost { namespace numeric { namespace ublas { // inner_prod (v1, v2) = sum (v1 [i] * v2 [i]) template BOOST_UBLAS_INLINE - typename vector_scalar_binary_traits::promote_type> >::result_type inner_prod (const vector_expression &e1, const vector_expression &e2) { - typedef typename vector_scalar_binary_traits::promote_type> >::expression_type expression_type; + typedef typename vector_scalar_binary_traits::promote_type> >::expression_type expression_type; return expression_type (e1 (), e2 ()); } template BOOST_UBLAS_INLINE - typename vector_scalar_binary_traits::promote_type>::precision_type> >::result_type prec_inner_prod (const vector_expression &e1, const vector_expression &e2) { - typedef typename vector_scalar_binary_traits::promote_type>::precision_type> >::expression_type expression_type; + typedef typename vector_scalar_binary_traits::promote_type>::precision_type> >::expression_type expression_type; return expression_type (e1 (), e2 ()); } From 545672c8a8af2139cb8ced09c6c80ee7030acd78 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Tue, 12 Dec 2006 19:26:25 +0000 Subject: [PATCH 30/65] [uBLAS] FIX other is static member function [SVN r36351] --- include/boost/numeric/ublas/operation.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/operation.hpp b/include/boost/numeric/ublas/operation.hpp index 0a624c48..38916f3f 100644 --- a/include/boost/numeric/ublas/operation.hpp +++ b/include/boost/numeric/ublas/operation.hpp @@ -642,7 +642,7 @@ namespace boost { namespace numeric { namespace ublas { typename matrix_column::const_iterator itc (mc.begin ()); typename matrix_column::const_iterator itc_end (mc.end ()); while (itc != itc_end) { - if (triangular_restriction::functor_type ().other (itc.index (), it2.index2 ())) +                    if (triangular_restriction::other (itc.index (), it2.index2 ())) m (itc.index (), it2.index2 ()) += *it1 * *itc; ++ itc; } From cea00903815937bb11c1e4d5293e064d4c94d2a8 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 13 Dec 2006 15:34:05 +0000 Subject: [PATCH 31/65] [uBLAS] CHANGE zero/identity/scalar _ vector/matrix add ALLOC template parameter to specify size/difference_type [SVN r36356] --- doc/matrix.htm | 21 ++++++++++++++++++--- doc/vector.htm | 21 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/doc/matrix.htm b/doc/matrix.htm index d1f91ddf..a3de0969 100644 --- a/doc/matrix.htm +++ b/doc/matrix.htm @@ -304,7 +304,7 @@ for the storage array are unbounded_array<T> , std::vector<T> .

Identity Matrix

Description

-

The templated class identity_matrix<T> +

The templated class identity_matrix<T, ALLOC> represents identity matrices. For a (m x n)-dimensional identity matrix and 0 <= i < m, 0 <= j < n holds idi, j = 0, if @@ -336,6 +336,11 @@ int main () { The type of object stored in the matrix. int + +ALLOC +An STL Allocator for size_type and difference_type. +std::allocator +

Model of

@@ -449,7 +454,7 @@ end of the reversed identity_matrix.

Zero Matrix

Description

-

The templated class zero_matrix<T> represents +

The templated class zero_matrix<T, ALLOC> represents zero matrices. For a (m x n)-dimensional zero matrix and 0 <= i < m, 0 <= j < n holds zi, j = 0.

@@ -479,6 +484,11 @@ int main () { The type of object stored in the matrix. int + +ALLOC +An STL Allocator for size_type and difference_type. +std::allocator +

Model of

@@ -590,7 +600,7 @@ end of the reversed zero_matrix.

Scalar Matrix

Description

-

The templated class scalar_matrix<T> +

The templated class scalar_matrix<T, ALLOC> represents scalar matrices. For a (m x n)-dimensional scalar matrix and 0 <= i < m, 0 <= j < n holds zi, j = s.

@@ -620,6 +630,11 @@ int main () { The type of object stored in the matrix. int + +ALLOC +An STL Allocator for size_type and difference_type. +std::allocator +

Model of

diff --git a/doc/vector.htm b/doc/vector.htm index a07f245c..125bebfd 100644 --- a/doc/vector.htm +++ b/doc/vector.htm @@ -350,7 +350,7 @@ for the Storage array are unbounded_array<T> , std::vector<T> .

Unit Vector

Description

-

The templated class unit_vector<T> represents +

The templated class unit_vector<T, ALLOC> represents canonical unit vectors. For the k-th n-dimensional canonical unit vector and 0 <= i < n holds uki @@ -385,6 +385,11 @@ int main () { The type of object stored in the vector. int + +ALLOC +An STL Allocator for size_type and difference_type. +std::allocator +

Model of

@@ -479,7 +484,7 @@ end of the reversed unit_vector.

Zero Vector

Description

-

The templated class zero_vector<T> represents +

The templated class zero_vector<T, ALLOC> represents zero vectors. For a n-dimensional zero vector and 0 <= i < n holds zi = 0.

@@ -509,6 +514,11 @@ int main () { The type of object stored in the vector. int + +ALLOC +An STL Allocator for size_type and difference_type. +std::allocator +

Model of

@@ -599,7 +609,7 @@ end of the reversed zero_vector.

Scalar Vector

Description

-

The templated class scalar_vector<T> +

The templated class scalar_vector<T, ALLOC> represents scalar vectors. For a n-dimensional scalar vector and 0 <= i < n holds zi = s.

@@ -629,6 +639,11 @@ int main () { The type of object stored in the vector. int + +ALLOC +An STL Allocator for size_type and difference_type. +std::allocator +

Model of

From 0f9ea9dd64f33e3174b5f7fcbb0232ccf2989e3b Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 13 Dec 2006 15:34:41 +0000 Subject: [PATCH 32/65] [uBLAS] orignal copyright assignment for split off doc files [SVN r36357] --- doc/storage_concept.htm | 8 ++++++++ doc/unbounded_array.htm | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/doc/storage_concept.htm b/doc/storage_concept.htm index 6735522c..f1ec40a1 100644 --- a/doc/storage_concept.htm +++ b/doc/storage_concept.htm @@ -135,5 +135,13 @@ each element value may be a previously assigned value or default construced valu
  • bounded_array

    Notes

    +
    +

    Copyright (©) 2000-2002 Joerg Walter, Mathias Koch
    +Permission to copy, use, modify, sell and distribute this document +is granted provided this copyright notice appears in all copies. +This document is provided ``as is'' without express or implied +warranty, and with no claim as to its suitability for any +purpose.

    + \ No newline at end of file diff --git a/doc/unbounded_array.htm b/doc/unbounded_array.htm index 5b2b87be..f7e56071 100644 --- a/doc/unbounded_array.htm +++ b/doc/unbounded_array.htm @@ -198,5 +198,12 @@ the unbounded_array. +
    +

    Copyright (©) 2000-2002 Joerg Walter, Mathias Koch
    +Permission to copy, use, modify, sell and distribute this document +is granted provided this copyright notice appears in all copies. +This document is provided ``as is'' without express or implied +warranty, and with no claim as to its suitability for any +purpose.

    From b0e455918839de1cf11937eb668a09865faf9ac5 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 13 Dec 2006 15:35:03 +0000 Subject: [PATCH 33/65] [uBLAS] Pre 1.34 release notes [SVN r36358] --- doc/Release_notes.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Release_notes.txt b/doc/Release_notes.txt index f99d5a2e..7cfb2ecd 100644 --- a/doc/Release_notes.txt +++ b/doc/Release_notes.txt @@ -1,3 +1,3 @@ -POST 1.33.0 -array_adaptor and shallow_array_adaptor removed -carray_adaptor included and documented +PRE 1.34.0 + FIX size_type and difference_type can be non defaults and uBLAS expressions use the correct types. + \ No newline at end of file From cfc7f534e458936de0ca057de7cb0009db88f15c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 22 Dec 2006 10:08:28 +0000 Subject: [PATCH 34/65] Fix whitespace so VC8 doesn't complain. [SVN r36485] --- include/boost/numeric/ublas/operation.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/ublas/operation.hpp b/include/boost/numeric/ublas/operation.hpp index 38916f3f..ec30a3f6 100644 --- a/include/boost/numeric/ublas/operation.hpp +++ b/include/boost/numeric/ublas/operation.hpp @@ -642,8 +642,8 @@ namespace boost { namespace numeric { namespace ublas { typename matrix_column::const_iterator itc (mc.begin ()); typename matrix_column::const_iterator itc_end (mc.end ()); while (itc != itc_end) { -                    if (triangular_restriction::other (itc.index (), it2.index2 ())) - m (itc.index (), it2.index2 ()) += *it1 * *itc; + if(triangular_restriction::other (itc.index (), it2.index2 ())) + m (itc.index (), it2.index2 ()) += *it1 * *itc; ++ itc; } ++ it1; From 40552c11a0df7f21df3249e3f6a3ae0a4e25178e Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 21 Feb 2007 10:18:45 +0000 Subject: [PATCH 35/65] [uBLAS] MINOR improve unsupported message [SVN r37027] --- include/boost/numeric/ublas/detail/config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/detail/config.hpp b/include/boost/numeric/ublas/detail/config.hpp index 37bf297e..9752c708 100644 --- a/include/boost/numeric/ublas/detail/config.hpp +++ b/include/boost/numeric/ublas/detail/config.hpp @@ -171,7 +171,7 @@ namespace std { // Cannot continue with an unsupported compiler #if defined(BOOST_UBLAS_UNSUPPORTED_COMPILER) && (BOOST_UBLAS_UNSUPPORTED_COMPILER != 0) -#error Your compiler is unsupported by this verions of uBLAS. Boost 1.32.0 includes uBLAS with support for many old compilers. +#error Your compiler and/or configuration is unsupported by this verions of uBLAS. Define BOOST_UBLAS_UNSUPPORTED_COMPILER=0 to override this message. Boost 1.32.0 includes uBLAS with support for many older compilers. #endif From 2bdbf318f559fcf528077ab1f8ca306740f10f14 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 28 Feb 2007 11:47:41 +0000 Subject: [PATCH 36/65] [uBLAS] FIX array_adaptor.htm was never written, remove broken link [SVN r37113] --- doc/index.htm | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/index.htm b/doc/index.htm index e54b4887..11d7cf99 100644 --- a/doc/index.htm +++ b/doc/index.htm @@ -153,7 +153,6 @@ Matrix Operations
  • From bee922f7e1e7ffb49615f6fe5c398f67d2acdc78 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Fri, 16 Mar 2007 21:17:54 +0000 Subject: [PATCH 37/65] - fix bug in vector_of_vector by replacing old 'size1' and 'size2' with new 'size_M' and 'size_m' [SVN r37204] --- include/boost/numeric/ublas/matrix.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 4112feab..9b08c8d7 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -1054,9 +1054,9 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE vector_of_vector (const matrix_expression &ae): matrix_container (), - size1_ (ae ().size1 ()), size2_ (ae ().size2 ()), data_ (layout_type::size1 (size1_, size2_) + 1) { - for (size_type k = 0; k < layout_type::size1 (size1_, size2_); ++ k) - data ()[k].resize (layout_type::size2 (size1_, size2_)); + size1_ (ae ().size1 ()), size2_ (ae ().size2 ()), data_ (layout_type::size_M (size1_, size2_) + 1) { + for (size_type k = 0; k < layout_type::size_M (size1_, size2_); ++ k) + data ()[k].resize (layout_type::size_m (size1_, size2_)); matrix_assign (*this, ae); } @@ -1086,14 +1086,14 @@ namespace boost { namespace numeric { namespace ublas { size1_ = size1; size2_ = size2; if (preserve) - data ().resize (layout_type::size1 (size1, size2) + 1, typename array_type::value_type ()); + data ().resize (layout_type::size_M (size1, size2) + 1, typename array_type::value_type ()); else - data ().resize (layout_type::size1 (size1, size2) + 1); - for (size_type k = 0; k < layout_type::size1 (size1, size2); ++ k) { + data ().resize (layout_type::size_M (size1, size2) + 1); + for (size_type k = 0; k < layout_type::size_M (size1, size2); ++ k) { if (preserve) - data () [k].resize (layout_type::size2 (size1, size2), value_type ()); + data () [k].resize (layout_type::size_m (size1, size2), value_type ()); else - data () [k].resize (layout_type::size2 (size1, size2)); + data () [k].resize (layout_type::size_m (size1, size2)); } } @@ -1124,7 +1124,7 @@ namespace boost { namespace numeric { namespace ublas { // Zeroing BOOST_UBLAS_INLINE void clear () { - for (size_type k = 0; k < layout_type::size1 (size1_, size2_); ++ k) + for (size_type k = 0; k < layout_type::size_M (size1_, size2_); ++ k) std::fill (data () [k].begin (), data () [k].end (), value_type/*zero*/()); } From 2adb3b8127b75dc7ee8bebde4aecc99fc61da40a Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Fri, 16 Mar 2007 21:23:13 +0000 Subject: [PATCH 38/65] - fixed bug in compressed_matrix::(const_)iterator's decrement [SVN r37205] --- include/boost/numeric/ublas/matrix_sparse.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index 70f6648f..3d41eec4 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -3200,7 +3200,7 @@ namespace boost { namespace numeric { namespace ublas { if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { - i_ = index1 () - 1; + --i_; if (rank_ == 1) *this = (*this) ().find1 (rank_, i_, j_, -1); } @@ -3352,7 +3352,7 @@ namespace boost { namespace numeric { namespace ublas { if (rank_ == 1 && layout_type::fast_i ()) -- it_; else { - i_ = index1 () - 1; + --i_; if (rank_ == 1) *this = (*this) ().find1 (rank_, i_, j_, -1); } @@ -3509,7 +3509,7 @@ namespace boost { namespace numeric { namespace ublas { if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { - j_ = index2 () - 1; + --j_; if (rank_ == 1) *this = (*this) ().find2 (rank_, i_, j_, -1); } @@ -3661,7 +3661,7 @@ namespace boost { namespace numeric { namespace ublas { if (rank_ == 1 && layout_type::fast_j ()) -- it_; else { - j_ = index2 (); + --j_; if (rank_ == 1) *this = (*this) ().find2 (rank_, i_, j_, -1); } From 7deace95edcaae0d6d5ea0e68ea75501c309b3fc Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Fri, 16 Mar 2007 21:26:39 +0000 Subject: [PATCH 39/65] - fixed unit_vector::find() [SVN r37206] --- include/boost/numeric/ublas/vector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index d77f97dc..b47fe138 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -867,7 +867,7 @@ namespace boost { namespace numeric { namespace ublas { // Element lookup BOOST_UBLAS_INLINE const_iterator find (size_type i) const { - return const_iterator (*this, i == index_); + return const_iterator (*this, i <= index_); } class const_iterator: From f121d74478f97eca9537420916e08d8c8161e400 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Fri, 16 Mar 2007 21:29:16 +0000 Subject: [PATCH 40/65] - updated error msg in vector_assign (debug build only) when the structure check fails [SVN r37207] --- .../boost/numeric/ublas/detail/vector_assign.hpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/boost/numeric/ublas/detail/vector_assign.hpp b/include/boost/numeric/ublas/detail/vector_assign.hpp index a93cd1c4..0ed1352d 100644 --- a/include/boost/numeric/ublas/detail/vector_assign.hpp +++ b/include/boost/numeric/ublas/detail/vector_assign.hpp @@ -340,8 +340,9 @@ namespace detail { it += size; } #if BOOST_UBLAS_TYPE_CHECK - if (! disable_type_check::value) - BOOST_UBLAS_CHECK (detail::expression_type_check (v, cv), external_logic ()); + if (! disable_type_check::value) + BOOST_UBLAS_CHECK (detail::expression_type_check (v, cv), + external_logic ("external logic or bad condition of inputs")); #endif } // Sparse case @@ -367,8 +368,9 @@ namespace detail { ++ ite; } #if BOOST_UBLAS_TYPE_CHECK - if (! disable_type_check::value) - BOOST_UBLAS_CHECK (detail::expression_type_check (v, cv), external_logic ()); + if (! disable_type_check::value) + BOOST_UBLAS_CHECK (detail::expression_type_check (v, cv), + external_logic ("external logic or bad condition of inputs")); #endif } // Sparse proxy or functional case @@ -434,7 +436,8 @@ namespace detail { } #if BOOST_UBLAS_TYPE_CHECK if (! disable_type_check::value) - BOOST_UBLAS_CHECK (detail::expression_type_check (v, cv), external_logic ()); + BOOST_UBLAS_CHECK (detail::expression_type_check (v, cv), + external_logic ("external logic or bad condition of inputs")); #endif } From dd61d4e5be0c7472a397683477b0d5220cfcc95b Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Fri, 16 Mar 2007 22:31:46 +0000 Subject: [PATCH 41/65] - replaced row_major/column_major in compressed-axpy_prod now they work with uncommon size_types and may be abused to compute y += A^T x [SVN r37208] --- include/boost/numeric/ublas/operation.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/numeric/ublas/operation.hpp b/include/boost/numeric/ublas/operation.hpp index ec30a3f6..3e661ad8 100644 --- a/include/boost/numeric/ublas/operation.hpp +++ b/include/boost/numeric/ublas/operation.hpp @@ -29,10 +29,10 @@ namespace boost { namespace numeric { namespace ublas { - template + template BOOST_UBLAS_INLINE V & - axpy_prod (const compressed_matrix &e1, + axpy_prod (const compressed_matrix &e1, const vector_expression &e2, V &v, row_major_tag) { typedef typename V::size_type size_type; @@ -49,10 +49,10 @@ namespace boost { namespace numeric { namespace ublas { return v; } - template + template BOOST_UBLAS_INLINE V & - axpy_prod (const compressed_matrix &e1, + axpy_prod (const compressed_matrix &e1, const vector_expression &e2, V &v, column_major_tag) { typedef typename V::size_type size_type; From 46dea3c416715736c267f4d022deb7b24fd07fbd Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Fri, 16 Mar 2007 22:39:17 +0000 Subject: [PATCH 42/65] - add optimizations for trivial constructors to array types - add initializing constructors to matix<> and vector<> usage: matrix m(3,3,5.0); vector v(3,5.0); - avoid constructor call for std::complex, user can specialize detail::has_trivial_constructor to control this behavior [SVN r37209] --- include/boost/numeric/ublas/exception.hpp | 10 ++++- include/boost/numeric/ublas/matrix.hpp | 4 ++ include/boost/numeric/ublas/storage.hpp | 50 +++++++++++------------ include/boost/numeric/ublas/traits.hpp | 20 +++++++++ include/boost/numeric/ublas/vector.hpp | 4 ++ 5 files changed, 61 insertions(+), 27 deletions(-) diff --git a/include/boost/numeric/ublas/exception.hpp b/include/boost/numeric/ublas/exception.hpp index 90f32e41..f9eb8140 100644 --- a/include/boost/numeric/ublas/exception.hpp +++ b/include/boost/numeric/ublas/exception.hpp @@ -267,11 +267,19 @@ namespace boost { namespace numeric { namespace ublas { // return (std::min) (size1, size2); // } // #define BOOST_UBLAS_SAME(size1, size2) same_impl ((size1), (size2)) - template + // need two types here because different containers can have + // different size_types (especially sparse types) + template BOOST_UBLAS_INLINE // Kresimir Fresl and Dan Muller reported problems with COMO. // We better change the signature instead of libcomo ;-) // const T &same_impl_ex (const T &size1, const T &size2, const char *file, int line) { + T1 same_impl_ex (const T1 &size1, const T2 &size2, const char *file, int line) { + BOOST_UBLAS_CHECK_EX (size1 == size2, file, line, bad_argument ()); + return (size1 < size2)?(size1):(size2); + } + template + BOOST_UBLAS_INLINE T same_impl_ex (const T &size1, const T &size2, const char *file, int line) { BOOST_UBLAS_CHECK_EX (size1 == size2, file, line, bad_argument ()); return (std::min) (size1, size2); diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 9b08c8d7..306c7a5a 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -97,6 +97,10 @@ namespace boost { namespace numeric { namespace ublas { matrix_container (), size1_ (size1), size2_ (size2), data_ (layout_type::storage_size (size1, size2)) { } + matrix (size_type size1, size_type size2, const value_type &init): + matrix_container (), + size1_ (size1), size2_ (size2), data_ (layout_type::storage_size (size1, size2), init) { + } BOOST_UBLAS_INLINE matrix (size_type size1, size_type size2, const array_type &data): matrix_container (), diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index 95b47ca7..02ebf95d 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -23,6 +23,7 @@ #endif #include +#include #include @@ -63,19 +64,15 @@ namespace boost { namespace numeric { namespace ublas { explicit BOOST_UBLAS_INLINE unbounded_array (size_type size, const ALLOC &a = ALLOC()): alloc_(a), size_ (size) { - if (size_) { - data_ = alloc_.allocate (size_); - // ISSUE some compilers may zero POD here -#ifdef BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW - // array form fails on some compilers due to size cookie, is it standard conforming? - new (data_) value_type[size_]; -#else - for (pointer d = data_; d != data_ + size_; ++d) - new (d) value_type; -#endif - } - else - data_ = 0; + if (size_) { + data_ = alloc_.allocate (size_); + if (not detail::has_trivial_constructor::value) { + for (pointer d = data_; d != data_ + size_; ++d) + alloc_.construct(d, value_type()); + } + } + else + data_ = 0; } // No value initialised, but still be default constructed BOOST_UBLAS_INLINE @@ -101,9 +98,12 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE ~unbounded_array () { if (size_) { - const iterator i_end = end(); - for (iterator i = begin (); i != i_end; ++i) { - iterator_destroy (i); + if (not detail::has_trivial_destructor::value) { + // std::_Destroy (begin(), end(), alloc_); + const iterator i_end = end(); + for (iterator i = begin (); i != i_end; ++i) { + iterator_destroy (i); + } } alloc_.deallocate (data_, size_); } @@ -137,20 +137,18 @@ namespace boost { namespace numeric { namespace ublas { } } else { - // ISSUE some compilers may zero POD here -#ifdef BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW - // array form fails on some compilers due to size cookie, is it standard conforming? - new (data_) value_type[size]; -#else - for (pointer di = data_; di != data_ + size; ++di) - new (di) value_type; -#endif + if (not detail::has_trivial_constructor::value) { + for (pointer di = data_; di != data_ + size; ++di) + alloc_.construct (di, value_type()); + } } } if (size_) { - for (pointer si = p_data; si != p_data + size_; ++si) - alloc_.destroy (si); + if (not detail::has_trivial_destructor::value) { + for (pointer si = p_data; si != p_data + size_; ++si) + alloc_.destroy (si); + } alloc_.deallocate (p_data, size_); } diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp index d3b3caad..d1b1cf06 100644 --- a/include/boost/numeric/ublas/traits.hpp +++ b/include/boost/numeric/ublas/traits.hpp @@ -25,6 +25,8 @@ #include #include +#include +#include namespace boost { namespace numeric { namespace ublas { @@ -485,6 +487,24 @@ namespace boost { namespace numeric { namespace ublas { it = it_end; } + namespace detail { + + // specialisation which define whether a type has a trivial constructor + // or not. This is used by array types. + template + struct has_trivial_constructor : public boost::has_trivial_constructor {}; + + template + struct has_trivial_destructor : public boost::has_trivial_destructor {}; + + template + struct has_trivial_constructor > : public boost::true_type {}; + + template + struct has_trivial_destructor > : public boost::true_type {}; + + } + }}} #endif diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index b47fe138..072efa8f 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -63,6 +63,10 @@ namespace boost { namespace numeric { namespace ublas { vector_container (), data_ (data) {} BOOST_UBLAS_INLINE + vector (size_type size, const value_type &init): + vector_container (), + data_ (size, init) {} + BOOST_UBLAS_INLINE vector (const vector &v): vector_container (), data_ (v.data_) {} From 7b111f2cbfca85f86d3a641bf7ea59ba6877df50 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Sat, 17 Mar 2007 11:46:07 +0000 Subject: [PATCH 43/65] - fixed mistake in storage.hpp: s/not /! /g [SVN r37212] --- include/boost/numeric/ublas/storage.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index 02ebf95d..340af68e 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -66,7 +66,7 @@ namespace boost { namespace numeric { namespace ublas { alloc_(a), size_ (size) { if (size_) { data_ = alloc_.allocate (size_); - if (not detail::has_trivial_constructor::value) { + if (! detail::has_trivial_constructor::value) { for (pointer d = data_; d != data_ + size_; ++d) alloc_.construct(d, value_type()); } @@ -98,7 +98,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE ~unbounded_array () { if (size_) { - if (not detail::has_trivial_destructor::value) { + if (! detail::has_trivial_destructor::value) { // std::_Destroy (begin(), end(), alloc_); const iterator i_end = end(); for (iterator i = begin (); i != i_end; ++i) { @@ -137,7 +137,7 @@ namespace boost { namespace numeric { namespace ublas { } } else { - if (not detail::has_trivial_constructor::value) { + if (! detail::has_trivial_constructor::value) { for (pointer di = data_; di != data_ + size; ++di) alloc_.construct (di, value_type()); } @@ -145,7 +145,7 @@ namespace boost { namespace numeric { namespace ublas { } if (size_) { - if (not detail::has_trivial_destructor::value) { + if (! detail::has_trivial_destructor::value) { for (pointer si = p_data; si != p_data + size_; ++si) alloc_.destroy (si); } From 2984f60fcd17243d1f816b8c1a48c605c32a5f5c Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Sat, 17 Mar 2007 11:54:39 +0000 Subject: [PATCH 44/65] - removed wrong 'typename' in coordinate_matrix [SVN r37213] --- include/boost/numeric/ublas/matrix_sparse.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index 3d41eec4..77b51c8e 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -3872,7 +3872,7 @@ namespace boost { namespace numeric { namespace ublas { // ISSUE require type consistency check, is_convertable (IA::size_type, TA::size_type) typedef typename IA::value_type size_type; // ISSUE difference_type cannot be deduced for sparse indices, we only know the value_type - typedef typename std::ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; // size_type for the data arrays. typedef typename IA::size_type array_size_type; typedef T value_type; From 5f08a94e2c440e41a70c06aea2ec650a2a023d2b Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Sat, 7 Apr 2007 20:51:38 +0000 Subject: [PATCH 45/65] - new directive BOOST_UBLAS_NDEBUG to disable all debug actions of uBLAS It has an equivalent effect as defining NDEBUG in all uBLAS headers. [SVN r37392] --- doc/index.htm | 4 +++- include/boost/numeric/ublas/detail/config.hpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/index.htm b/doc/index.htm index 11d7cf99..542f9f1d 100644 --- a/doc/index.htm +++ b/doc/index.htm @@ -273,7 +273,9 @@ enabled, expression templates disabled) and release mode (size and type conformance checks disabled, expression templates enabled). Please check, if the preprocessor symbol NDEBUG of cassert is defined. NDEBUG enables -release mode, which in turn uses expression templates.

    +release mode, which in turn uses expression templates. You can +optionally define BOOST_UBLAS_NDEBUG to disable all +bounds, structure and similar checks of uBLAS.

    Q: I've written some uBLAS tests, which try to incorrectly assign different matrix types or overrun vector and matrix dimensions. Why don't I get a compile time or runtime diff --git a/include/boost/numeric/ublas/detail/config.hpp b/include/boost/numeric/ublas/detail/config.hpp index 9752c708..376bf60e 100644 --- a/include/boost/numeric/ublas/detail/config.hpp +++ b/include/boost/numeric/ublas/detail/config.hpp @@ -177,7 +177,7 @@ namespace std { // Enable performance options in RELEASE mode -#ifdef NDEBUG +#if defined (NDEBUG) || defined (BOOST_UBLAS_NDEBUG) #ifndef BOOST_UBLAS_INLINE #define BOOST_UBLAS_INLINE inline From 05ccd103e1bfdd5ecc1f605d7c2c6599dc37cd3e Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Sat, 7 Apr 2007 21:12:26 +0000 Subject: [PATCH 46/65] - changes static initialization of zero_(0) to zero_ = T() This should be replaces by value_traits::zero and the definition of one_ = 1 should be replaced by value_traits::one [SVN r37393] --- include/boost/numeric/ublas/matrix.hpp | 6 +++--- include/boost/numeric/ublas/vector.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 306c7a5a..b9b90942 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -2328,7 +2328,7 @@ namespace boost { namespace numeric { namespace ublas { }; template - const typename zero_matrix::value_type zero_matrix::zero_ (0); + const typename zero_matrix::value_type zero_matrix::zero_ = T(/*zero*/); // Identity matrix class @@ -2710,9 +2710,9 @@ namespace boost { namespace numeric { namespace ublas { }; template - const typename identity_matrix::value_type identity_matrix::zero_ (0); + const typename identity_matrix::value_type identity_matrix::zero_ = T(/*zero*/); template - const typename identity_matrix::value_type identity_matrix::one_ (1); + const typename identity_matrix::value_type identity_matrix::one_ (1); // ISSUE: need 'one'-traits here // Scalar matrix class diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index 072efa8f..d7733c91 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -759,7 +759,7 @@ namespace boost { namespace numeric { namespace ublas { }; template - typename zero_vector::const_value_type zero_vector::zero_ (0); + typename zero_vector::const_value_type zero_vector::zero_ = T(/*zero*/); // Unit vector class @@ -971,9 +971,9 @@ namespace boost { namespace numeric { namespace ublas { }; template - typename unit_vector::const_value_type unit_vector::zero_ (0); + typename unit_vector::const_value_type unit_vector::zero_ = T(/*zero*/); template - typename unit_vector::const_value_type unit_vector::one_ (1); + typename unit_vector::const_value_type unit_vector::one_ (1); // ISSUE: need 'one'-traits here // Scalar vector class From ded593c1bd1d641be2aacb738fc034fea0717eee Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Mon, 16 Apr 2007 21:58:23 +0000 Subject: [PATCH 47/65] - fixed bug: removed wrong () in subslice [SVN r37454] --- include/boost/numeric/ublas/matrix_proxy.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/matrix_proxy.hpp b/include/boost/numeric/ublas/matrix_proxy.hpp index 764461d2..f0d51fa1 100644 --- a/include/boost/numeric/ublas/matrix_proxy.hpp +++ b/include/boost/numeric/ublas/matrix_proxy.hpp @@ -4111,7 +4111,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE matrix_slice subslice (const M &data, typename M::size_type start1, typename M::difference_type stride1, typename M::size_type size1, typename M::size_type start2, typename M::difference_type stride2, typename M::size_type size2) { typedef basic_slice slice_type; - return matrix_slice (data (), slice_type (start1, stride1, size1), slice_type (start2, stride2, size2)); + return matrix_slice (data, slice_type (start1, stride1, size1), slice_type (start2, stride2, size2)); } // Generic Projections From cc80e857d58a51c558cd4e21e7717243121d9b9d Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Mon, 16 Apr 2007 22:28:13 +0000 Subject: [PATCH 48/65] * fixed wrong markup [SVN r37455] --- doc/iterator_concept.htm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/iterator_concept.htm b/doc/iterator_concept.htm index a2c2b20b..2b06024b 100644 --- a/doc/iterator_concept.htm +++ b/doc/iterator_concept.htm @@ -254,12 +254,12 @@ then --it1 == it2. and
    it.index () < it ().size () If it1 == it2,
    -then it1.index () == it2.index ().
    +then it1.index () == it2.index ().
    If it1 == it2,
    -then it1.index () < (++ it2).index +then it1.index () < (++ it2).index ().
    If it1 == it2,
    -then it1.index () > (-- it2).index +then it1.index () > (-- it2).index (). From a91910b8de44a98ec06dadc5edaa3cad0f45cdb1 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Tue, 1 May 2007 12:30:39 +0000 Subject: [PATCH 49/65] - fixed bug in triangular_matrix::resize and hermitian_matrix::resize by adding new matrix_resize_preserve specialization for those types [SVN r37549] --- include/boost/numeric/ublas/hermitian.hpp | 3 +- include/boost/numeric/ublas/triangular.hpp | 38 +++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/ublas/hermitian.hpp b/include/boost/numeric/ublas/hermitian.hpp index 88dc0d5c..600f9678 100644 --- a/include/boost/numeric/ublas/hermitian.hpp +++ b/include/boost/numeric/ublas/hermitian.hpp @@ -18,6 +18,7 @@ #define BOOST_UBLAS_HERMITIAN_H #include +#include // for resize_preserve #include // Iterators based on ideas of Jeremy Siek @@ -317,7 +318,7 @@ namespace boost { namespace numeric { namespace ublas { void resize (size_type size, bool preserve = true) { if (preserve) { self_type temporary (size, size); - detail::matrix_resize_preserve (*this, temporary); + detail::matrix_resize_preserve (*this, temporary); } else { data ().resize (triangular_type::packed_size (layout_type (), size, size)); diff --git a/include/boost/numeric/ublas/triangular.hpp b/include/boost/numeric/ublas/triangular.hpp index 3979282a..3b56dfae 100644 --- a/include/boost/numeric/ublas/triangular.hpp +++ b/include/boost/numeric/ublas/triangular.hpp @@ -25,6 +25,42 @@ namespace boost { namespace numeric { namespace ublas { + namespace detail { + using namespace boost::numeric::ublas; + + // Matrix resizing algorithm + template + BOOST_UBLAS_INLINE + void matrix_resize_preserve (M& m, M& temporary) { + typedef L layout_type; + typedef T triangular_type; + typedef typename M::size_type size_type; + const size_type msize1 (m.size1 ()); // original size + const size_type msize2 (m.size2 ()); + const size_type size1 (temporary.size1 ()); // new size is specified by temporary + const size_type size2 (temporary.size2 ()); + // Common elements to preserve + const size_type size1_min = (std::min) (size1, msize1); + const size_type size2_min = (std::min) (size2, msize2); + // Order for major and minor sizes + const size_type major_size = layout_type::size_M (size1_min, size2_min); + const size_type minor_size = layout_type::size_m (size1_min, size2_min); + // Indexing copy over major + for (size_type major = 0; major != major_size; ++major) { + for (size_type minor = 0; minor != minor_size; ++minor) { + // find indexes - use invertability of element_ functions + const size_type i1 = layout_type::index_M(major, minor); + const size_type i2 = layout_type::index_m(major, minor); + if ( triangular_type::other(i1,i2) ) { + temporary.data () [triangular_type::element (layout_type (), i1, size1, i2, size2)] = + m.data() [triangular_type::element (layout_type (), i1, msize1, i2, msize2)]; + } + } + } + m.assign_temporary (temporary); + } + } + // Array based triangular matrix class template class triangular_matrix: @@ -104,7 +140,7 @@ namespace boost { namespace numeric { namespace ublas { void resize (size_type size1, size_type size2, bool preserve = true) { if (preserve) { self_type temporary (size1, size2); - detail::matrix_resize_preserve (*this, temporary); + detail::matrix_resize_preserve (*this, temporary); } else { data ().resize (triangular_type::packed_size (layout_type (), size1, size2)); From 352abadbd8b9ccab69cfee80e96ecb6cfd889a82 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Sat, 2 Jun 2007 11:17:08 +0000 Subject: [PATCH 50/65] - fixed typo in exception.hpp [SVN r37870] --- include/boost/numeric/ublas/exception.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/include/boost/numeric/ublas/exception.hpp b/include/boost/numeric/ublas/exception.hpp index f9eb8140..ab6dde7c 100644 --- a/include/boost/numeric/ublas/exception.hpp +++ b/include/boost/numeric/ublas/exception.hpp @@ -175,7 +175,6 @@ namespace boost { namespace numeric { namespace ublas { explicit singular (const char *) {} void raise () { - throw *this; std::abort (); } #endif From dba05c4dd6a3714bcce8c5cf12580637bcc7dfd0 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Mon, 11 Jun 2007 20:29:08 +0000 Subject: [PATCH 51/65] - added serialization support to most matrix and vector classes - touched files: matrix.hpp matrix_sparse.hpp storage.hpp storage_sparse.hpp vector.hpp vector_of_vector.hpp vector_sparse.hpp - still no regression tests for this :-( [SVN r37970] --- include/boost/numeric/ublas/matrix.hpp | 133 +++++++++++++++++- include/boost/numeric/ublas/matrix_sparse.hpp | 73 +++++++++- include/boost/numeric/ublas/storage.hpp | 36 +++++ .../boost/numeric/ublas/storage_sparse.hpp | 24 ++++ include/boost/numeric/ublas/vector.hpp | 55 ++++++++ .../boost/numeric/ublas/vector_of_vector.hpp | 24 ++++ include/boost/numeric/ublas/vector_sparse.hpp | 47 +++++++ 7 files changed, 388 insertions(+), 4 deletions(-) diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index b9b90942..b62f9aa4 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -1,6 +1,6 @@ // -// Copyright (c) 2000-2002 -// Joerg Walter, Mathias Koch +// Copyright (c) 2000-2007 +// Joerg Walter, Mathias Koch, Gunter Winkler // // Permission to use, copy, modify, distribute and sell this software // and its documentation for any purpose is hereby granted without fee, @@ -20,6 +20,8 @@ #include #include #include +#include +#include // Iterators based on ideas of Jeremy Siek @@ -945,6 +947,27 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + + // we need to copy to a collection_size_type to get a portable + // and efficient serialization + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + + // serialize the sizes + ar & serialization::make_nvp("size1",s1) + & serialization::make_nvp("size2",s2); + + // copy the values back if loading + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + ar & serialization::make_nvp("data",data_); + } + private: size_type size1_; size_type size2_; @@ -1964,6 +1987,27 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + + // we need to copy to a collection_size_type to get a portable + // and efficient serialization + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + + // serialize the sizes + ar & serialization::make_nvp("size1",s1) + & serialization::make_nvp("size2",s2); + + // copy the values back if loading + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + ar & serialization::make_nvp("data",data_); + } + private: size_type size1_; size_type size2_; @@ -2321,6 +2365,26 @@ namespace boost { namespace numeric { namespace ublas { return const_reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + + // we need to copy to a collection_size_type to get a portable + // and efficient serialization + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + + // serialize the sizes + ar & serialization::make_nvp("size1",s1) + & serialization::make_nvp("size2",s2); + + // copy the values back if loading + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + } + private: size_type size1_; size_type size2_; @@ -2701,6 +2765,27 @@ namespace boost { namespace numeric { namespace ublas { return const_reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + + // we need to copy to a collection_size_type to get a portable + // and efficient serialization + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + + // serialize the sizes + ar & serialization::make_nvp("size1",s1) + & serialization::make_nvp("size2",s2); + + // copy the values back if loading + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + size_common_ = ((std::min)(size1_, size2_)); + } + } + private: size_type size1_; size_type size2_; @@ -3140,6 +3225,28 @@ namespace boost { namespace numeric { namespace ublas { return const_reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + + // we need to copy to a collection_size_type to get a portable + // and efficient serialization + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + + // serialize the sizes + ar & serialization::make_nvp("size1",s1) + & serialization::make_nvp("size2",s2); + + // copy the values back if loading + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + + ar & serialization::make_nvp("value", value_); + } + private: size_type size1_; size_type size2_; @@ -4043,6 +4150,28 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + + // we need to copy to a collection_size_type to get a portable + // and efficient serialization + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + + // serialize the sizes + ar & serialization::make_nvp("size1",s1) + & serialization::make_nvp("size2",s2); + + // copy the values back if loading + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + // could probably use make_array( &(data[0][0]), N*M ) + ar & serialization::make_array(data_, N); + } + private: size_type size1_; size_type size2_; diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index 77b51c8e..c3b4b5f4 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -1,6 +1,6 @@ // -// Copyright (c) 2000-2002 -// Joerg Walter, Mathias Koch +// Copyright (c) 2000-2007 +// Joerg Walter, Mathias Koch, Gunter Winkler // // Permission to use, copy, modify, distribute and sell this software // and its documentation for any purpose is hereby granted without fee, @@ -1295,6 +1295,20 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + ar & serialization::make_nvp("size1",s1); + ar & serialization::make_nvp("size2",s2); + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + ar & serialization::make_nvp("data", data_); + } + private: size_type size1_; size_type size2_; @@ -2482,6 +2496,20 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + ar & serialization::make_nvp("size1",s1); + ar & serialization::make_nvp("size2",s2); + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + ar & serialization::make_nvp("data", data_); + } + private: size_type size1_; size_type size2_; @@ -3815,6 +3843,26 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + ar & serialization::make_nvp("size1",s1); + ar & serialization::make_nvp("size2",s2); + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + ar & serialization::make_nvp("capacity", capacity_); + ar & serialization::make_nvp("filled1", filled1_); + ar & serialization::make_nvp("filled2", filled2_); + ar & serialization::make_nvp("index1_data", index1_data_); + ar & serialization::make_nvp("index2_data", index2_data_); + ar & serialization::make_nvp("value_data", value_data_); + storage_invariants(); + } + private: void storage_invariants () const { BOOST_UBLAS_CHECK (layout_type::size_M (size1_, size2_) + 1 == index1_data_.size (), internal_logic ()); @@ -5159,6 +5207,27 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + ar & serialization::make_nvp("size1",s1); + ar & serialization::make_nvp("size2",s2); + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + ar & serialization::make_nvp("capacity", capacity_); + ar & serialization::make_nvp("filled", filled_); + ar & serialization::make_nvp("sorted_filled", sorted_filled_); + ar & serialization::make_nvp("sorted", sorted_); + ar & serialization::make_nvp("index1_data", index1_data_); + ar & serialization::make_nvp("index2_data", index2_data_); + ar & serialization::make_nvp("value_data", value_data_); + storage_invariants(); + } + private: void storage_invariants () const { diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index 340af68e..e2457754 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -22,6 +22,10 @@ #include #endif +#include +#include +#include + #include #include #include @@ -87,6 +91,7 @@ namespace boost { namespace numeric { namespace ublas { } BOOST_UBLAS_INLINE unbounded_array (const unbounded_array &c): + storage_array >(), alloc_ (c.alloc_), size_ (c.size_) { if (size_) { data_ = alloc_.allocate (size_); @@ -267,6 +272,21 @@ namespace boost { namespace numeric { namespace ublas { return alloc_; } + private: + friend class boost::serialization::access; + + // Serialization + template + void serialize(Archive & ar, const unsigned int version) + { + serialization::collection_size_type s(size_); + ar & serialization::make_nvp("size",s); + if ( Archive::is_loading::value ) { + resize(s); + } + ar & serialization::make_array(data_, s); + } + private: // Handle explict destroy on a (possibly indexed) iterator BOOST_UBLAS_INLINE @@ -430,6 +450,22 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + private: + // Serialization + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int version) + { + serialization::collection_size_type s(size_); + ar & serialization::make_nvp("size", s); + if ( Archive::is_loading::value ) { + if (s > N) bad_size("too large size in bounded_array::load()\n").raise(); + resize(s); + } + ar & serialization::make_array(data_, s); + } + private: size_type size_; BOOST_UBLAS_BOUNDED_ARRAY_ALIGN value_type data_ [N]; diff --git a/include/boost/numeric/ublas/storage_sparse.hpp b/include/boost/numeric/ublas/storage_sparse.hpp index efe7a108..92696208 100644 --- a/include/boost/numeric/ublas/storage_sparse.hpp +++ b/include/boost/numeric/ublas/storage_sparse.hpp @@ -18,6 +18,11 @@ #define _BOOST_UBLAS_STORAGE_SPARSE_ #include +#include +#include +#include +#include +#include #include @@ -197,8 +202,16 @@ namespace boost { namespace numeric { namespace ublas { // FIXME should use ALLOC for map but std::allocator of std::pair and std::pair fail to compile template class map_std : public std::map { + public: + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & serialization::make_nvp("base", boost::serialization::base_object< std::map >(*this)); + } }; + + // Map array // Implementation requires pair allocator definition (without const) @@ -478,6 +491,17 @@ namespace boost { namespace numeric { namespace ublas { return alloc_; } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s (size_); + ar & serialization::make_nvp("size",s); + if (Archive::is_loading::value) { + resize(s); + } + ar & serialization::make_array(data_, s); + } + private: // Provide destroy as a non member function BOOST_UBLAS_INLINE diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index d7733c91..b640b7c6 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -20,6 +20,8 @@ #include #include #include +#include +#include // Iterators based on ideas of Jeremy Siek @@ -509,6 +511,12 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & serialization::make_nvp("data",data_); + } + private: array_type data_; }; @@ -752,6 +760,16 @@ namespace boost { namespace numeric { namespace ublas { return const_reverse_iterator (begin ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s (size_); + ar & serialization::make_nvp("size",s); + if (Archive::is_loading::value) { + size_ = s; + } + } + private: size_type size_; typedef const value_type const_value_type; @@ -962,6 +980,17 @@ namespace boost { namespace numeric { namespace ublas { return const_reverse_iterator (begin ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s (size_); + ar & serialization::make_nvp("size",s); + if (Archive::is_loading::value) { + size_ = s; + } + ar & serialization::make_nvp("index", index_); + } + private: size_type size_; size_type index_; @@ -1196,6 +1225,17 @@ namespace boost { namespace numeric { namespace ublas { return const_reverse_iterator (begin ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s (size_); + ar & serialization::make_nvp("size",s); + if (Archive::is_loading::value) { + size_ = s; + } + ar & serialization::make_nvp("value", value_); + } + private: size_type size_; value_type value_; @@ -1678,6 +1718,21 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s (size_); + ar & serialization::make_nvp("size",s); + + // copy the value back if loading + if (Archive::is_loading::value) { + if (s > N) bad_size("too large size in bounded_vector::load()\n").raise(); + size_ = s; + } + // ISSUE: this writes the full array + ar & serialization::make_nvp("data",data_); + } + private: size_type size_; array_type data_; diff --git a/include/boost/numeric/ublas/vector_of_vector.hpp b/include/boost/numeric/ublas/vector_of_vector.hpp index ef9d78fb..4f61349d 100644 --- a/include/boost/numeric/ublas/vector_of_vector.hpp +++ b/include/boost/numeric/ublas/vector_of_vector.hpp @@ -1217,6 +1217,30 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator2 (begin2 ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + + // we need to copy to a collection_size_type to get a portable + // and efficient serialization + serialization::collection_size_type s1 (size1_); + serialization::collection_size_type s2 (size2_); + + // serialize the sizes + ar & serialization::make_nvp("size1",s1) + & serialization::make_nvp("size2",s2); + + // copy the values back if loading + if (Archive::is_loading::value) { + size1_ = s1; + size2_ = s2; + } + + ar & serialization::make_nvp("data", data_); + + storage_invariants(); + } + private: void storage_invariants () const { diff --git a/include/boost/numeric/ublas/vector_sparse.hpp b/include/boost/numeric/ublas/vector_sparse.hpp index baa8e80d..1bc8e65c 100644 --- a/include/boost/numeric/ublas/vector_sparse.hpp +++ b/include/boost/numeric/ublas/vector_sparse.hpp @@ -738,6 +738,17 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s (size_); + ar & serialization::make_nvp("size",s); + if (Archive::is_loading::value) { + size_ = s; + } + ar & serialization::make_nvp("data", data_); + } + private: size_type size_; array_type data_; @@ -1318,6 +1329,23 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s (size_); + ar & serialization::make_nvp("size",s); + if (Archive::is_loading::value) { + size_ = s; + } + // ISSUE: filled may be much less than capacity + // ISSUE: index_data_ and value_data_ are undefined between filled and capacity (trouble with 'nan'-values) + ar & serialization::make_nvp("capacity", capacity_); + ar & serialization::make_nvp("filled", filled_); + ar & serialization::make_nvp("index_data", index_data_); + ar & serialization::make_nvp("value_data", value_data_); + storage_invariants(); + } + private: void storage_invariants () const { @@ -1981,6 +2009,25 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + serialization::collection_size_type s (size_); + ar & serialization::make_nvp("size",s); + if (Archive::is_loading::value) { + size_ = s; + } + // ISSUE: filled may be much less than capacity + // ISSUE: index_data_ and value_data_ are undefined between filled and capacity (trouble with 'nan'-values) + ar & serialization::make_nvp("capacity", capacity_); + ar & serialization::make_nvp("filled", filled_); + ar & serialization::make_nvp("sorted_filled", sorted_filled_); + ar & serialization::make_nvp("sorted", sorted_); + ar & serialization::make_nvp("index_data", index_data_); + ar & serialization::make_nvp("value_data", value_data_); + storage_invariants(); + } + private: void storage_invariants () const { From e1854bcd3bca097831d902d7f982815f561b6bcd Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Sat, 30 Jun 2007 12:50:54 +0000 Subject: [PATCH 52/65] - matrix.hpp: added missing include, serialization/array.hpp [SVN r38116] --- include/boost/numeric/ublas/matrix.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index b62f9aa4..3ca86dd1 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include // Iterators based on ideas of Jeremy Siek From f7bdeb6619ae305de09c4460392718ec694c662f Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Mon, 9 Jul 2007 18:59:54 +0000 Subject: [PATCH 53/65] - vector_expression.hpp: added size check to vector_scalar_binary because inner_product operations require equal sized operands [SVN r38173] --- include/boost/numeric/ublas/vector_expression.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/numeric/ublas/vector_expression.hpp b/include/boost/numeric/ublas/vector_expression.hpp index a466ae68..51be3a6d 100644 --- a/include/boost/numeric/ublas/vector_expression.hpp +++ b/include/boost/numeric/ublas/vector_expression.hpp @@ -1589,6 +1589,7 @@ namespace boost { namespace numeric { namespace ublas { // Dense random access specialization BOOST_UBLAS_INLINE value_type evaluate (dense_random_access_iterator_tag) const { + BOOST_UBLAS_CHECK (e1_.size () == e2_.size (), external_logic()); #ifdef BOOST_UBLAS_USE_INDEXING return functor_type::apply (e1_, e2_); #elif BOOST_UBLAS_USE_ITERATING @@ -1606,12 +1607,14 @@ namespace boost { namespace numeric { namespace ublas { // Packed bidirectional specialization BOOST_UBLAS_INLINE value_type evaluate (packed_random_access_iterator_tag) const { + BOOST_UBLAS_CHECK (e1_.size () == e2_.size (), external_logic()); return functor_type::apply (e1_.begin (), e1_.end (), e2_.begin (), e2_.end ()); } // Sparse bidirectional specialization BOOST_UBLAS_INLINE value_type evaluate (sparse_bidirectional_iterator_tag) const { + BOOST_UBLAS_CHECK (e1_.size () == e2_.size (), external_logic()); return functor_type::apply (e1_.begin (), e1_.end (), e2_.begin (), e2_.end (), sparse_bidirectional_iterator_tag ()); } From d7619262b85b990eabb702863bdde4d09c913c41 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Aug 2007 19:02:26 +0000 Subject: [PATCH 54/65] Remove V1 Jamfiles [SVN r38516] --- bench1/Jamfile | 43 ----- bench2/Jamfile | 28 --- bench3/Jamfile | 29 --- bench4/Jamfile | 30 --- doc/samples/Jamfile | 433 -------------------------------------------- test/Jamfile | 128 ------------- 6 files changed, 691 deletions(-) delete mode 100644 bench1/Jamfile delete mode 100644 bench2/Jamfile delete mode 100644 bench3/Jamfile delete mode 100644 bench4/Jamfile delete mode 100644 doc/samples/Jamfile delete mode 100644 test/Jamfile diff --git a/bench1/Jamfile b/bench1/Jamfile deleted file mode 100644 index 02d4fc9a..00000000 --- a/bench1/Jamfile +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/bench1 ; - -SOURCES = bench1 bench11 bench12 bench13 ; - -exe bench1 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# "-s -static -fomit-frame-pointer -fexpensive-optimizations -funroll-loops -malign-double -fschedule-insns2 -march=pentium4 -msse -mfpmath=sse -finline-functions -finline-limit=2048" -# <*>"-fabi-version=0" - "-Xc" - "-unroll -march=pentium4 -Zp16" - ; - - - - - - - - - - - - - - diff --git a/bench2/Jamfile b/bench2/Jamfile deleted file mode 100644 index da2d61bd..00000000 --- a/bench2/Jamfile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/bench2 ; - -SOURCES = bench2 bench21 bench22 bench23 ; - -exe bench2 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# <*>"-fabi-version=0" - <*>"-Xc" - ; - diff --git a/bench3/Jamfile b/bench3/Jamfile deleted file mode 100644 index bb5750c4..00000000 --- a/bench3/Jamfile +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/bench3 ; - -SOURCES = bench3 bench31 bench32 bench33 ; - -exe bench3 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) -# <*>"-fabi-version=0" - <*>"-Xc" - ; - - diff --git a/bench4/Jamfile b/bench4/Jamfile deleted file mode 100644 index 7e44ae3d..00000000 --- a/bench4/Jamfile +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/bench4 ; - -SOURCES = bench4 bench41 bench42 bench43 ; - -exe bench4 - : $(SOURCES).cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - BOOST_UBLAS_USE_INTERVAL -# <*>"-fabi-version=0" - <*>"-Xc" - ; - - diff --git a/doc/samples/Jamfile b/doc/samples/Jamfile deleted file mode 100644 index 7da70284..00000000 --- a/doc/samples/Jamfile +++ /dev/null @@ -1,433 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/doc/samples ; - -exe unbounded_array - : unbounded_array.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe bounded_array - : bounded_array.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe range - : range.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe slice - : slice.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe map_array - : map_array.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector - : vector.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe unit_vector - : unit_vector.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe zero_vector - : zero_vector.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe mapped_vector - : mapped_vector.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe compressed_vector - : compressed_vector.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe coordinate_vector - : coordinate_vector.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_range - : vector_range.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_range_project - : vector_range_project.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_slice - : vector_slice.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_slice_project - : vector_slice_project.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_unary - : vector_unary.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_binary - : vector_binary.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_binary_outer - : vector_binary_outer.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_binary_scalar - : vector_binary_scalar.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_unary_redux - : vector_unary_redux.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe vector_binary_redux - : vector_binary_redux.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix - : matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe identity_matrix - : identity_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe zero_matrix - : zero_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe mapped_matrix - : mapped_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe compressed_matrix - : compressed_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe coordinate_matrix - : coordinate_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_row - : matrix_row.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_row_project - : matrix_row_project.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_column - : matrix_column.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_column_project - : matrix_column_project.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_vector_range - : matrix_vector_range.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_vector_slice - : matrix_vector_slice.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_range - : matrix_range.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_range_project - : matrix_range_project.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_slice - : matrix_slice.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_slice_project - : matrix_slice_project.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_unary - : matrix_unary.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_binary - : matrix_binary.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_binary_scalar - : matrix_binary_scalar.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_vector_binary - : matrix_vector_binary.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_vector_solve - : matrix_vector_solve.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_matrix_binary - : matrix_matrix_binary.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe matrix_matrix_solve - : matrix_matrix_solve.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe banded_matrix - : banded_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe banded_adaptor - : banded_adaptor.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe hermitian_matrix - : hermitian_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe hermitian_adaptor - : hermitian_adaptor.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe symmetric_matrix - : symmetric_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe symmetric_adaptor - : symmetric_adaptor.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe triangular_matrix - : triangular_matrix.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; - -exe triangular_adaptor - : triangular_adaptor.cpp - : $(BOOST_ROOT) - $(BOOST_ROOT) - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - <*>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092" - ; diff --git a/test/Jamfile b/test/Jamfile deleted file mode 100644 index ea55bffe..00000000 --- a/test/Jamfile +++ /dev/null @@ -1,128 +0,0 @@ -# -# Copyright (c) 2000-2002 -# Joerg Walter, Mathias Koch -# -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appear in all copies and -# that both that copyright notice and this permission notice appear -# in supporting documentation. The authors make no representations -# about the suitability of this software for any purpose. -# It is provided "as is" without express or implied warranty. -# -# The authors gratefully acknowledge the support of -# GeNeSys mbH & Co. KG in producing this work. -# - -subproject libs/numeric/ublas/test ; -# bring in rules for testing -import testing ; - -# Define features to test: -# Value types: USE_FLOAT USE_DOUBLE USE_STD_COMPLEX -# Proxies: USE_RANGE USE_SLICE -# Storage types: USE_BOUNDED_ARRAY USE_UNBOUNDED_ARRAY -# Vector types: USE_STD_VECTOR USE_BOUNDED_VECTOR -# Matrix types: USE_MATRIX USE_BOUNDED_MATRIX USE_VECTOR_OF_VECTOR -# Adaptors: USE_ADAPTOR - -UBLAS_TESTSET ?= - USE_DOUBLE USE_STD_COMPLEX - USE_RANGE USE_SLICE - USE_UNBOUNDED_ARRAY USE_BOUNDED_VECTOR USE_MATRIX ; - -# Sparse storage: USE_MAP_ARRAY USE_STD_MAP -# Sparse vectors: USE_MAPPED_VECTOR USE_COMPRESSED_VECTOR USE_COORDINATE_VECTOR -# Sparse matrices: USE_MAPPED_MATRIX USE_COMPRESSED_MATRIX USE_COORDINATE_MATRIX USE_MAPPED_VECTOR_OF_MAPPED_VECTOR USE_GENERALIZED_VECTOR_OF_VECTOR - -UBLAS_TESTSET_SPARSE ?= - USE_DOUBLE USE_STD_COMPLEX -# USE_RANGE USE_SLICE Too complex for regression testing - USE_UNBOUNDED_ARRAY - USE_STD_MAP - USE_MAPPED_VECTOR USE_COMPRESSED_VECTOR USE_COORDINATE_VECTOR - USE_MAPPED_MATRIX USE_COMPRESSED_MATRIX USE_COORDINATE_MATRIX ; - - -test-suite numeric/uBLAS - : [ run test1.cpp - test11.cpp - test12.cpp - test13.cpp - : # args - : # input files - : # requirements - $(UBLAS_TESTSET) - <*>"-fpstkchk" # Try and pick up runtime failures - <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" - [ cond [ is-subset Darwin : $(JAMUNAME) ] : <*>"-fabi-version=0" ] ] - [ run test2.cpp - test21.cpp - test22.cpp - test23.cpp - : # args - : # input files - : # requirements - $(UBLAS_TESTSET) - <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" - ] - [ run test3.cpp - test31.cpp - test32.cpp - test33.cpp - : # args - : # input files - : # requirements - $(UBLAS_TESTSET_SPARSE) - <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" - ] - [ run test4.cpp - test42.cpp - test43.cpp - : # args - : # input files - : # requirements - $(UBLAS_TESTSET) - <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" - ] - [ run test5.cpp - test52.cpp - test53.cpp - : # args - : # input files - : # requirements - $(UBLAS_TESTSET) - <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" - ] - [ run test6.cpp - test62.cpp - test63.cpp - : # args - : # input files - : # requirements - $(UBLAS_TESTSET) - <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" - ] -# Test7 checks uBLAS operation with interval types. -# This causes too much compiler badness. Issues need to be addressed for VC7.1 VC8 CW9 and Intel 8 (windows) -# [ run test7.cpp -# test71.cpp -# test72.cpp -# test73.cpp -# : # args -# : # input files -# : # requirements -# BOOST_UBLAS_USE_INTERVAL -# $(UBLAS_TESTSET) -# <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" -# ] - - [ run placement_new.cpp - ] - [ compile concepts.cpp - : # requirements - EXTERNAL - <*>"-Xc" - <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" - ] - ; From e3ff91766dc9cd6524fea7cb39973eb752549095 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Wed, 12 Sep 2007 21:44:37 +0000 Subject: [PATCH 55/65] lu.hpp: introduced temporary to avoid strange compiler problem. [SVN r39227] --- include/boost/numeric/ublas/lu.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/ublas/lu.hpp b/include/boost/numeric/ublas/lu.hpp index 73b5fed2..7fc5bf74 100644 --- a/include/boost/numeric/ublas/lu.hpp +++ b/include/boost/numeric/ublas/lu.hpp @@ -101,7 +101,8 @@ namespace boost { namespace numeric { namespace ublas { matrix_column mci (column (m, i)); matrix_row mri (row (m, i)); if (m (i, i) != value_type/*zero*/()) { - project (mci, range (i + 1, size1)) *= value_type (1) / m (i, i); + value_type m_inv = value_type (1) / m (i, i); + project (mci, range (i + 1, size1)) *= m_inv; } else if (singular == 0) { singular = i + 1; } @@ -144,7 +145,8 @@ namespace boost { namespace numeric { namespace ublas { } else { BOOST_UBLAS_CHECK (pm (i) == i_norm_inf, external_logic ()); } - project (mci, range (i + 1, size1)) *= value_type (1) / m (i, i); + value_type m_inv = value_type (1) / m (i, i); + project (mci, range (i + 1, size1)) *= m_inv; } else if (singular == 0) { singular = i + 1; } From 7f4be729d7fce0bafedcfa9c1aaa52288976e1b3 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Thu, 13 Sep 2007 12:13:20 +0000 Subject: [PATCH 56/65] overview.htm: fixed typo [SVN r39233] --- doc/overview.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/overview.htm b/doc/overview.htm index a9b475b5..a008b38a 100644 --- a/doc/overview.htm +++ b/doc/overview.htm @@ -305,7 +305,7 @@ matrices.

    i_amax norm_inf (x)
    -norm_inf_index (x)
    +index_norm_inf (x)
    max |xi| Computes the l2 (maximum) norm of a vector.
    BLAS computes the index of the first element having this From c9904428660dea85fac50fd89456d746a066534b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 18 Sep 2007 17:19:41 +0000 Subject: [PATCH 57/65] Updated licences using blanket_permission.txt. [SVN r39369] --- bench1/bench1.cpp | 10 +++------- bench1/bench1.hpp | 10 +++------- bench1/bench11.cpp | 10 +++------- bench1/bench12.cpp | 10 +++------- bench1/bench13.cpp | 10 +++------- bench2/bench2.cpp | 10 +++------- bench2/bench2.hpp | 10 +++------- bench2/bench21.cpp | 10 +++------- bench2/bench22.cpp | 10 +++------- bench2/bench23.cpp | 10 +++------- bench3/bench3.cpp | 10 +++------- bench3/bench3.hpp | 10 +++------- bench3/bench31.cpp | 10 +++------- bench3/bench32.cpp | 10 +++------- bench3/bench33.cpp | 10 +++------- bench4/bench4.cpp | 10 +++------- bench4/bench41.cpp | 10 +++------- bench4/bench42.cpp | 10 +++------- bench4/bench43.cpp | 10 +++------- doc/samples/banded_adaptor.cpp | 10 +++------- doc/samples/banded_matrix.cpp | 10 +++------- doc/samples/bounded_array.cpp | 10 +++------- doc/samples/compressed_matrix.cpp | 10 +++------- doc/samples/compressed_vector.cpp | 10 +++------- doc/samples/coordinate_matrix.cpp | 10 +++------- doc/samples/coordinate_vector.cpp | 10 +++------- doc/samples/hermitian_adaptor.cpp | 10 +++------- doc/samples/hermitian_matrix.cpp | 10 +++------- doc/samples/identity_matrix.cpp | 10 +++------- doc/samples/map_array.cpp | 10 +++------- doc/samples/mapped_matrix.cpp | 10 +++------- doc/samples/mapped_vector.cpp | 10 +++------- doc/samples/matrix.cpp | 10 +++------- doc/samples/matrix_binary.cpp | 10 +++------- doc/samples/matrix_binary_scalar.cpp | 10 +++------- doc/samples/matrix_column.cpp | 10 +++------- doc/samples/matrix_column_project.cpp | 10 +++------- doc/samples/matrix_matrix_binary.cpp | 10 +++------- doc/samples/matrix_matrix_solve.cpp | 10 +++------- doc/samples/matrix_range.cpp | 10 +++------- doc/samples/matrix_range_project.cpp | 10 +++------- doc/samples/matrix_row.cpp | 10 +++------- doc/samples/matrix_row_project.cpp | 10 +++------- doc/samples/matrix_slice.cpp | 10 +++------- doc/samples/matrix_slice_project.cpp | 10 +++------- doc/samples/matrix_unary.cpp | 10 +++------- doc/samples/matrix_vector_binary.cpp | 10 +++------- doc/samples/matrix_vector_range.cpp | 10 +++------- doc/samples/matrix_vector_slice.cpp | 10 +++------- doc/samples/matrix_vector_solve.cpp | 10 +++------- doc/samples/range.cpp | 10 +++------- doc/samples/slice.cpp | 10 +++------- doc/samples/symmetric_adaptor.cpp | 10 +++------- doc/samples/symmetric_matrix.cpp | 10 +++------- doc/samples/triangular_adaptor.cpp | 10 +++------- doc/samples/triangular_matrix.cpp | 10 +++------- doc/samples/unbounded_array.cpp | 10 +++------- doc/samples/unit_vector.cpp | 10 +++------- doc/samples/vector.cpp | 10 +++------- doc/samples/vector_binary.cpp | 10 +++------- doc/samples/vector_binary_outer.cpp | 10 +++------- doc/samples/vector_binary_redux.cpp | 10 +++------- doc/samples/vector_binary_scalar.cpp | 10 +++------- doc/samples/vector_range.cpp | 10 +++------- doc/samples/vector_range_project.cpp | 10 +++------- doc/samples/vector_slice.cpp | 10 +++------- doc/samples/vector_slice_project.cpp | 10 +++------- doc/samples/vector_unary.cpp | 10 +++------- doc/samples/vector_unary_redux.cpp | 10 +++------- doc/samples/zero_matrix.cpp | 10 +++------- doc/samples/zero_vector.cpp | 10 +++------- include/boost/numeric/ublas/banded.hpp | 10 +++------- include/boost/numeric/ublas/blas.hpp | 10 +++------- include/boost/numeric/ublas/detail/concepts.hpp | 10 +++------- include/boost/numeric/ublas/detail/config.hpp | 10 +++------- include/boost/numeric/ublas/detail/definitions.hpp | 10 +++------- include/boost/numeric/ublas/detail/duff.hpp | 10 +++------- include/boost/numeric/ublas/detail/iterator.hpp | 10 +++------- include/boost/numeric/ublas/detail/matrix_assign.hpp | 10 +++------- include/boost/numeric/ublas/detail/raw.hpp | 10 +++------- include/boost/numeric/ublas/detail/temporary.hpp | 10 +++------- include/boost/numeric/ublas/detail/vector_assign.hpp | 10 +++------- include/boost/numeric/ublas/exception.hpp | 10 +++------- include/boost/numeric/ublas/expression_types.hpp | 10 +++------- include/boost/numeric/ublas/functional.hpp | 10 +++------- include/boost/numeric/ublas/fwd.hpp | 10 +++------- include/boost/numeric/ublas/hermitian.hpp | 10 +++------- include/boost/numeric/ublas/io.hpp | 10 +++------- include/boost/numeric/ublas/lu.hpp | 10 +++------- include/boost/numeric/ublas/matrix.hpp | 10 +++------- include/boost/numeric/ublas/matrix_expression.hpp | 10 +++------- include/boost/numeric/ublas/matrix_proxy.hpp | 10 +++------- include/boost/numeric/ublas/matrix_sparse.hpp | 10 +++------- include/boost/numeric/ublas/operation.hpp | 10 +++------- include/boost/numeric/ublas/operation_blocked.hpp | 10 +++------- include/boost/numeric/ublas/operation_sparse.hpp | 10 +++------- include/boost/numeric/ublas/storage.hpp | 10 +++------- include/boost/numeric/ublas/storage_sparse.hpp | 10 +++------- include/boost/numeric/ublas/symmetric.hpp | 10 +++------- include/boost/numeric/ublas/traits.hpp | 10 +++------- include/boost/numeric/ublas/triangular.hpp | 10 +++------- include/boost/numeric/ublas/vector.hpp | 10 +++------- include/boost/numeric/ublas/vector_expression.hpp | 10 +++------- include/boost/numeric/ublas/vector_of_vector.hpp | 10 +++------- include/boost/numeric/ublas/vector_proxy.hpp | 10 +++------- include/boost/numeric/ublas/vector_sparse.hpp | 10 +++------- test/concepts.cpp | 10 +++------- test/test1.cpp | 10 +++------- test/test1.hpp | 10 +++------- test/test11.cpp | 10 +++------- test/test12.cpp | 10 +++------- test/test13.cpp | 10 +++------- test/test2.cpp | 10 +++------- test/test2.hpp | 10 +++------- test/test21.cpp | 10 +++------- test/test22.cpp | 10 +++------- test/test23.cpp | 10 +++------- test/test3.cpp | 10 +++------- test/test3.hpp | 10 +++------- test/test31.cpp | 10 +++------- test/test32.cpp | 10 +++------- test/test33.cpp | 10 +++------- test/test4.cpp | 10 +++------- test/test4.hpp | 10 +++------- test/test42.cpp | 10 +++------- test/test43.cpp | 10 +++------- test/test5.cpp | 10 +++------- test/test5.hpp | 10 +++------- test/test52.cpp | 10 +++------- test/test53.cpp | 10 +++------- test/test6.cpp | 10 +++------- test/test6.hpp | 10 +++------- test/test62.cpp | 10 +++------- test/test63.cpp | 10 +++------- test/test7.cpp | 10 +++------- test/test7.hpp | 10 +++------- test/test71.cpp | 10 +++------- test/test72.cpp | 10 +++------- test/test73.cpp | 10 +++------- 139 files changed, 417 insertions(+), 973 deletions(-) diff --git a/bench1/bench1.cpp b/bench1/bench1.cpp index 0f97d853..87478e13 100644 --- a/bench1/bench1.cpp +++ b/bench1/bench1.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench1/bench1.hpp b/bench1/bench1.hpp index e2fa5886..08376c9b 100644 --- a/bench1/bench1.hpp +++ b/bench1/bench1.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench1/bench11.cpp b/bench1/bench11.cpp index d75a3172..633d8272 100644 --- a/bench1/bench11.cpp +++ b/bench1/bench11.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench1/bench12.cpp b/bench1/bench12.cpp index 90ebc054..50c57d73 100644 --- a/bench1/bench12.cpp +++ b/bench1/bench12.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench1/bench13.cpp b/bench1/bench13.cpp index 9b983610..fadb0b67 100644 --- a/bench1/bench13.cpp +++ b/bench1/bench13.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench2/bench2.cpp b/bench2/bench2.cpp index 680b99bc..43ba152f 100644 --- a/bench2/bench2.cpp +++ b/bench2/bench2.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench2/bench2.hpp b/bench2/bench2.hpp index e7a7ad76..713fec5f 100644 --- a/bench2/bench2.hpp +++ b/bench2/bench2.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench2/bench21.cpp b/bench2/bench21.cpp index 070d6b34..2cf33326 100644 --- a/bench2/bench21.cpp +++ b/bench2/bench21.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench2/bench22.cpp b/bench2/bench22.cpp index ea1bfe1b..ce054786 100644 --- a/bench2/bench22.cpp +++ b/bench2/bench22.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench2/bench23.cpp b/bench2/bench23.cpp index a59d9f6d..bb363f53 100644 --- a/bench2/bench23.cpp +++ b/bench2/bench23.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench3/bench3.cpp b/bench3/bench3.cpp index a073e195..390d226c 100644 --- a/bench3/bench3.cpp +++ b/bench3/bench3.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench3/bench3.hpp b/bench3/bench3.hpp index 287a7251..4959348a 100644 --- a/bench3/bench3.hpp +++ b/bench3/bench3.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench3/bench31.cpp b/bench3/bench31.cpp index 6d783f05..66ca7802 100644 --- a/bench3/bench31.cpp +++ b/bench3/bench31.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench3/bench32.cpp b/bench3/bench32.cpp index 68c01783..4c1b2bc3 100644 --- a/bench3/bench32.cpp +++ b/bench3/bench32.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench3/bench33.cpp b/bench3/bench33.cpp index 57e20c2c..9b8e1070 100644 --- a/bench3/bench33.cpp +++ b/bench3/bench33.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench4/bench4.cpp b/bench4/bench4.cpp index 824676f3..6d460eb1 100644 --- a/bench4/bench4.cpp +++ b/bench4/bench4.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench4/bench41.cpp b/bench4/bench41.cpp index bf3fbf20..2ef2d696 100644 --- a/bench4/bench41.cpp +++ b/bench4/bench41.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench4/bench42.cpp b/bench4/bench42.cpp index f0640cdf..55f9060b 100644 --- a/bench4/bench42.cpp +++ b/bench4/bench42.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/bench4/bench43.cpp b/bench4/bench43.cpp index 432283ae..c39655a4 100644 --- a/bench4/bench43.cpp +++ b/bench4/bench43.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/banded_adaptor.cpp b/doc/samples/banded_adaptor.cpp index 5660c088..8aa5a217 100644 --- a/doc/samples/banded_adaptor.cpp +++ b/doc/samples/banded_adaptor.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/banded_matrix.cpp b/doc/samples/banded_matrix.cpp index 0ece8fed..73746b7a 100644 --- a/doc/samples/banded_matrix.cpp +++ b/doc/samples/banded_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/bounded_array.cpp b/doc/samples/bounded_array.cpp index 200a33ae..bc827a31 100644 --- a/doc/samples/bounded_array.cpp +++ b/doc/samples/bounded_array.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/compressed_matrix.cpp b/doc/samples/compressed_matrix.cpp index f8852df7..997106ea 100644 --- a/doc/samples/compressed_matrix.cpp +++ b/doc/samples/compressed_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/compressed_vector.cpp b/doc/samples/compressed_vector.cpp index ef05c3a7..33353e49 100644 --- a/doc/samples/compressed_vector.cpp +++ b/doc/samples/compressed_vector.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/coordinate_matrix.cpp b/doc/samples/coordinate_matrix.cpp index 70dc00a4..ee09515d 100644 --- a/doc/samples/coordinate_matrix.cpp +++ b/doc/samples/coordinate_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/coordinate_vector.cpp b/doc/samples/coordinate_vector.cpp index 2c43176d..44893fca 100644 --- a/doc/samples/coordinate_vector.cpp +++ b/doc/samples/coordinate_vector.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/hermitian_adaptor.cpp b/doc/samples/hermitian_adaptor.cpp index 1e2bc696..889ae4e1 100644 --- a/doc/samples/hermitian_adaptor.cpp +++ b/doc/samples/hermitian_adaptor.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/hermitian_matrix.cpp b/doc/samples/hermitian_matrix.cpp index 3fb2cb8a..1a71ad5c 100644 --- a/doc/samples/hermitian_matrix.cpp +++ b/doc/samples/hermitian_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/identity_matrix.cpp b/doc/samples/identity_matrix.cpp index 0dbba804..0e98683e 100644 --- a/doc/samples/identity_matrix.cpp +++ b/doc/samples/identity_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/map_array.cpp b/doc/samples/map_array.cpp index 31229d99..12dc519a 100644 --- a/doc/samples/map_array.cpp +++ b/doc/samples/map_array.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/mapped_matrix.cpp b/doc/samples/mapped_matrix.cpp index 75a9887b..92b5ca7b 100644 --- a/doc/samples/mapped_matrix.cpp +++ b/doc/samples/mapped_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/mapped_vector.cpp b/doc/samples/mapped_vector.cpp index 4e65196a..73e6d8f2 100644 --- a/doc/samples/mapped_vector.cpp +++ b/doc/samples/mapped_vector.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix.cpp b/doc/samples/matrix.cpp index 85693b0a..63d3c7d5 100644 --- a/doc/samples/matrix.cpp +++ b/doc/samples/matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_binary.cpp b/doc/samples/matrix_binary.cpp index 33f8f505..66edf62d 100644 --- a/doc/samples/matrix_binary.cpp +++ b/doc/samples/matrix_binary.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_binary_scalar.cpp b/doc/samples/matrix_binary_scalar.cpp index e5df4b56..fb3282f7 100644 --- a/doc/samples/matrix_binary_scalar.cpp +++ b/doc/samples/matrix_binary_scalar.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_column.cpp b/doc/samples/matrix_column.cpp index be95b371..9eb0ca4e 100644 --- a/doc/samples/matrix_column.cpp +++ b/doc/samples/matrix_column.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_column_project.cpp b/doc/samples/matrix_column_project.cpp index 53767375..d2585c6f 100644 --- a/doc/samples/matrix_column_project.cpp +++ b/doc/samples/matrix_column_project.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_matrix_binary.cpp b/doc/samples/matrix_matrix_binary.cpp index 659f1511..17e33a64 100644 --- a/doc/samples/matrix_matrix_binary.cpp +++ b/doc/samples/matrix_matrix_binary.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_matrix_solve.cpp b/doc/samples/matrix_matrix_solve.cpp index a659c299..07d05a34 100644 --- a/doc/samples/matrix_matrix_solve.cpp +++ b/doc/samples/matrix_matrix_solve.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_range.cpp b/doc/samples/matrix_range.cpp index bf5021a8..048ab9fc 100644 --- a/doc/samples/matrix_range.cpp +++ b/doc/samples/matrix_range.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_range_project.cpp b/doc/samples/matrix_range_project.cpp index 5ff6842f..3ee095c2 100644 --- a/doc/samples/matrix_range_project.cpp +++ b/doc/samples/matrix_range_project.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_row.cpp b/doc/samples/matrix_row.cpp index 9af8e3c7..156c1f5e 100644 --- a/doc/samples/matrix_row.cpp +++ b/doc/samples/matrix_row.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_row_project.cpp b/doc/samples/matrix_row_project.cpp index b9208985..6cc35698 100644 --- a/doc/samples/matrix_row_project.cpp +++ b/doc/samples/matrix_row_project.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_slice.cpp b/doc/samples/matrix_slice.cpp index 61b88f53..d3911f69 100644 --- a/doc/samples/matrix_slice.cpp +++ b/doc/samples/matrix_slice.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_slice_project.cpp b/doc/samples/matrix_slice_project.cpp index 5c698cab..0b6150a9 100644 --- a/doc/samples/matrix_slice_project.cpp +++ b/doc/samples/matrix_slice_project.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_unary.cpp b/doc/samples/matrix_unary.cpp index 000e6584..044b2945 100644 --- a/doc/samples/matrix_unary.cpp +++ b/doc/samples/matrix_unary.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_vector_binary.cpp b/doc/samples/matrix_vector_binary.cpp index 4112b762..a53665bf 100644 --- a/doc/samples/matrix_vector_binary.cpp +++ b/doc/samples/matrix_vector_binary.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_vector_range.cpp b/doc/samples/matrix_vector_range.cpp index 4ac98af0..3a4c7e70 100644 --- a/doc/samples/matrix_vector_range.cpp +++ b/doc/samples/matrix_vector_range.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_vector_slice.cpp b/doc/samples/matrix_vector_slice.cpp index b2e2ad2b..335c06cb 100644 --- a/doc/samples/matrix_vector_slice.cpp +++ b/doc/samples/matrix_vector_slice.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/matrix_vector_solve.cpp b/doc/samples/matrix_vector_solve.cpp index bbd48b07..819856fe 100644 --- a/doc/samples/matrix_vector_solve.cpp +++ b/doc/samples/matrix_vector_solve.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/range.cpp b/doc/samples/range.cpp index 3d891c00..35526ff8 100644 --- a/doc/samples/range.cpp +++ b/doc/samples/range.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/slice.cpp b/doc/samples/slice.cpp index 1a57c6c2..394251e3 100644 --- a/doc/samples/slice.cpp +++ b/doc/samples/slice.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/symmetric_adaptor.cpp b/doc/samples/symmetric_adaptor.cpp index 35924a88..4a3f67c4 100644 --- a/doc/samples/symmetric_adaptor.cpp +++ b/doc/samples/symmetric_adaptor.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/symmetric_matrix.cpp b/doc/samples/symmetric_matrix.cpp index 28addc34..c9bed51f 100644 --- a/doc/samples/symmetric_matrix.cpp +++ b/doc/samples/symmetric_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/triangular_adaptor.cpp b/doc/samples/triangular_adaptor.cpp index 845c4aa3..7f7647ee 100644 --- a/doc/samples/triangular_adaptor.cpp +++ b/doc/samples/triangular_adaptor.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/triangular_matrix.cpp b/doc/samples/triangular_matrix.cpp index 7ec4c6e3..91772335 100644 --- a/doc/samples/triangular_matrix.cpp +++ b/doc/samples/triangular_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/unbounded_array.cpp b/doc/samples/unbounded_array.cpp index 18f7bbf7..2331f576 100644 --- a/doc/samples/unbounded_array.cpp +++ b/doc/samples/unbounded_array.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/unit_vector.cpp b/doc/samples/unit_vector.cpp index 222a8cad..63fc825d 100644 --- a/doc/samples/unit_vector.cpp +++ b/doc/samples/unit_vector.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector.cpp b/doc/samples/vector.cpp index f9bdfa19..1f8310c7 100644 --- a/doc/samples/vector.cpp +++ b/doc/samples/vector.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_binary.cpp b/doc/samples/vector_binary.cpp index 70a8adba..8b42d065 100644 --- a/doc/samples/vector_binary.cpp +++ b/doc/samples/vector_binary.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_binary_outer.cpp b/doc/samples/vector_binary_outer.cpp index b77246d2..094a0a9d 100644 --- a/doc/samples/vector_binary_outer.cpp +++ b/doc/samples/vector_binary_outer.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_binary_redux.cpp b/doc/samples/vector_binary_redux.cpp index 278dbd4c..abc36412 100644 --- a/doc/samples/vector_binary_redux.cpp +++ b/doc/samples/vector_binary_redux.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_binary_scalar.cpp b/doc/samples/vector_binary_scalar.cpp index 1d2bdebe..8f853e54 100644 --- a/doc/samples/vector_binary_scalar.cpp +++ b/doc/samples/vector_binary_scalar.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_range.cpp b/doc/samples/vector_range.cpp index 51fa426c..bf48c231 100644 --- a/doc/samples/vector_range.cpp +++ b/doc/samples/vector_range.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_range_project.cpp b/doc/samples/vector_range_project.cpp index 852cd670..ebe34816 100644 --- a/doc/samples/vector_range_project.cpp +++ b/doc/samples/vector_range_project.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_slice.cpp b/doc/samples/vector_slice.cpp index 2b6d8d09..478631b7 100644 --- a/doc/samples/vector_slice.cpp +++ b/doc/samples/vector_slice.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_slice_project.cpp b/doc/samples/vector_slice_project.cpp index b4747530..a8f17945 100644 --- a/doc/samples/vector_slice_project.cpp +++ b/doc/samples/vector_slice_project.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_unary.cpp b/doc/samples/vector_unary.cpp index 9a7d93ca..4d9a8b58 100644 --- a/doc/samples/vector_unary.cpp +++ b/doc/samples/vector_unary.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/vector_unary_redux.cpp b/doc/samples/vector_unary_redux.cpp index 850b2af3..7de1918b 100644 --- a/doc/samples/vector_unary_redux.cpp +++ b/doc/samples/vector_unary_redux.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/zero_matrix.cpp b/doc/samples/zero_matrix.cpp index 59de927d..fbdd8d67 100644 --- a/doc/samples/zero_matrix.cpp +++ b/doc/samples/zero_matrix.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/doc/samples/zero_vector.cpp b/doc/samples/zero_vector.cpp index e4329d2d..7a4d77df 100644 --- a/doc/samples/zero_vector.cpp +++ b/doc/samples/zero_vector.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/banded.hpp b/include/boost/numeric/ublas/banded.hpp index 1fb590a2..21bd01a7 100644 --- a/include/boost/numeric/ublas/banded.hpp +++ b/include/boost/numeric/ublas/banded.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/blas.hpp b/include/boost/numeric/ublas/blas.hpp index ab78cb48..e5c7c059 100644 --- a/include/boost/numeric/ublas/blas.hpp +++ b/include/boost/numeric/ublas/blas.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/detail/concepts.hpp b/include/boost/numeric/ublas/detail/concepts.hpp index 943672e9..5f150886 100644 --- a/include/boost/numeric/ublas/detail/concepts.hpp +++ b/include/boost/numeric/ublas/detail/concepts.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/detail/config.hpp b/include/boost/numeric/ublas/detail/config.hpp index 376bf60e..6d25bcc2 100644 --- a/include/boost/numeric/ublas/detail/config.hpp +++ b/include/boost/numeric/ublas/detail/config.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/detail/definitions.hpp b/include/boost/numeric/ublas/detail/definitions.hpp index 7a978e7e..8cf71d99 100644 --- a/include/boost/numeric/ublas/detail/definitions.hpp +++ b/include/boost/numeric/ublas/detail/definitions.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/detail/duff.hpp b/include/boost/numeric/ublas/detail/duff.hpp index bce971f7..b0ec08c9 100644 --- a/include/boost/numeric/ublas/detail/duff.hpp +++ b/include/boost/numeric/ublas/detail/duff.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp index f4223446..1723a301 100644 --- a/include/boost/numeric/ublas/detail/iterator.hpp +++ b/include/boost/numeric/ublas/detail/iterator.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/detail/matrix_assign.hpp b/include/boost/numeric/ublas/detail/matrix_assign.hpp index 195175ca..36bca28d 100644 --- a/include/boost/numeric/ublas/detail/matrix_assign.hpp +++ b/include/boost/numeric/ublas/detail/matrix_assign.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/detail/raw.hpp b/include/boost/numeric/ublas/detail/raw.hpp index 143d31f4..c36c8b06 100644 --- a/include/boost/numeric/ublas/detail/raw.hpp +++ b/include/boost/numeric/ublas/detail/raw.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2002-2003 // Toon Knapen, Kresimir Fresl, Joerg Walter // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // diff --git a/include/boost/numeric/ublas/detail/temporary.hpp b/include/boost/numeric/ublas/detail/temporary.hpp index 0e793592..c2ae468b 100644 --- a/include/boost/numeric/ublas/detail/temporary.hpp +++ b/include/boost/numeric/ublas/detail/temporary.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/detail/vector_assign.hpp b/include/boost/numeric/ublas/detail/vector_assign.hpp index 0ed1352d..80d5016c 100644 --- a/include/boost/numeric/ublas/detail/vector_assign.hpp +++ b/include/boost/numeric/ublas/detail/vector_assign.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/exception.hpp b/include/boost/numeric/ublas/exception.hpp index ab6dde7c..d2beec9a 100644 --- a/include/boost/numeric/ublas/exception.hpp +++ b/include/boost/numeric/ublas/exception.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/expression_types.hpp b/include/boost/numeric/ublas/expression_types.hpp index f6147abd..d74f4d14 100644 --- a/include/boost/numeric/ublas/expression_types.hpp +++ b/include/boost/numeric/ublas/expression_types.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/functional.hpp b/include/boost/numeric/ublas/functional.hpp index 08757fe0..db44c635 100644 --- a/include/boost/numeric/ublas/functional.hpp +++ b/include/boost/numeric/ublas/functional.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/fwd.hpp b/include/boost/numeric/ublas/fwd.hpp index d7a9eb22..5baca043 100644 --- a/include/boost/numeric/ublas/fwd.hpp +++ b/include/boost/numeric/ublas/fwd.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/hermitian.hpp b/include/boost/numeric/ublas/hermitian.hpp index 600f9678..4d828c2c 100644 --- a/include/boost/numeric/ublas/hermitian.hpp +++ b/include/boost/numeric/ublas/hermitian.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/io.hpp b/include/boost/numeric/ublas/io.hpp index ef02d396..d84c8fad 100644 --- a/include/boost/numeric/ublas/io.hpp +++ b/include/boost/numeric/ublas/io.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/lu.hpp b/include/boost/numeric/ublas/lu.hpp index 7fc5bf74..2f785e9e 100644 --- a/include/boost/numeric/ublas/lu.hpp +++ b/include/boost/numeric/ublas/lu.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 3ca86dd1..c667216c 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2007 // Joerg Walter, Mathias Koch, Gunter Winkler // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/matrix_expression.hpp b/include/boost/numeric/ublas/matrix_expression.hpp index 6da4e457..37ef2204 100644 --- a/include/boost/numeric/ublas/matrix_expression.hpp +++ b/include/boost/numeric/ublas/matrix_expression.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/matrix_proxy.hpp b/include/boost/numeric/ublas/matrix_proxy.hpp index f0d51fa1..d097af79 100644 --- a/include/boost/numeric/ublas/matrix_proxy.hpp +++ b/include/boost/numeric/ublas/matrix_proxy.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index c3b4b5f4..a5184928 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2007 // Joerg Walter, Mathias Koch, Gunter Winkler // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/operation.hpp b/include/boost/numeric/ublas/operation.hpp index 3e661ad8..16b7c02a 100644 --- a/include/boost/numeric/ublas/operation.hpp +++ b/include/boost/numeric/ublas/operation.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/operation_blocked.hpp b/include/boost/numeric/ublas/operation_blocked.hpp index d5c5e5a0..e794b925 100644 --- a/include/boost/numeric/ublas/operation_blocked.hpp +++ b/include/boost/numeric/ublas/operation_blocked.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/operation_sparse.hpp b/include/boost/numeric/ublas/operation_sparse.hpp index 25ce264e..b537d581 100644 --- a/include/boost/numeric/ublas/operation_sparse.hpp +++ b/include/boost/numeric/ublas/operation_sparse.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index e2457754..be1d8247 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/storage_sparse.hpp b/include/boost/numeric/ublas/storage_sparse.hpp index 92696208..47be61f3 100644 --- a/include/boost/numeric/ublas/storage_sparse.hpp +++ b/include/boost/numeric/ublas/storage_sparse.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/symmetric.hpp b/include/boost/numeric/ublas/symmetric.hpp index 949e83ae..ef31e122 100644 --- a/include/boost/numeric/ublas/symmetric.hpp +++ b/include/boost/numeric/ublas/symmetric.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp index d1b1cf06..f1e8e8e1 100644 --- a/include/boost/numeric/ublas/traits.hpp +++ b/include/boost/numeric/ublas/traits.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/triangular.hpp b/include/boost/numeric/ublas/triangular.hpp index 3b56dfae..d2907156 100644 --- a/include/boost/numeric/ublas/triangular.hpp +++ b/include/boost/numeric/ublas/triangular.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index b640b7c6..253b6649 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/vector_expression.hpp b/include/boost/numeric/ublas/vector_expression.hpp index 51be3a6d..46cf7a98 100644 --- a/include/boost/numeric/ublas/vector_expression.hpp +++ b/include/boost/numeric/ublas/vector_expression.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/vector_of_vector.hpp b/include/boost/numeric/ublas/vector_of_vector.hpp index 4f61349d..e2e911ef 100644 --- a/include/boost/numeric/ublas/vector_of_vector.hpp +++ b/include/boost/numeric/ublas/vector_of_vector.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2003 // Gunter Winkler, Joerg Walter // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/vector_proxy.hpp b/include/boost/numeric/ublas/vector_proxy.hpp index 8c5cbcea..6e80a27c 100644 --- a/include/boost/numeric/ublas/vector_proxy.hpp +++ b/include/boost/numeric/ublas/vector_proxy.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/include/boost/numeric/ublas/vector_sparse.hpp b/include/boost/numeric/ublas/vector_sparse.hpp index 1bc8e65c..2e66f2c6 100644 --- a/include/boost/numeric/ublas/vector_sparse.hpp +++ b/include/boost/numeric/ublas/vector_sparse.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/concepts.cpp b/test/concepts.cpp index d14f8e82..51ea74e0 100644 --- a/test/concepts.cpp +++ b/test/concepts.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test1.cpp b/test/test1.cpp index a1e6cd04..53de7901 100644 --- a/test/test1.cpp +++ b/test/test1.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test1.hpp b/test/test1.hpp index 84dd7307..fcf3d67a 100644 --- a/test/test1.hpp +++ b/test/test1.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test11.cpp b/test/test11.cpp index ff852edf..29d8fd12 100644 --- a/test/test11.cpp +++ b/test/test11.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test12.cpp b/test/test12.cpp index 134bad1c..8c9e61da 100644 --- a/test/test12.cpp +++ b/test/test12.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test13.cpp b/test/test13.cpp index f57c273f..ecb8eeb7 100644 --- a/test/test13.cpp +++ b/test/test13.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test2.cpp b/test/test2.cpp index 83c4b61f..07a4c755 100644 --- a/test/test2.cpp +++ b/test/test2.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test2.hpp b/test/test2.hpp index 0e9e7777..21b9cbe6 100644 --- a/test/test2.hpp +++ b/test/test2.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test21.cpp b/test/test21.cpp index e23f8890..df631089 100644 --- a/test/test21.cpp +++ b/test/test21.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test22.cpp b/test/test22.cpp index 3681c2b9..6f6d2c21 100644 --- a/test/test22.cpp +++ b/test/test22.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test23.cpp b/test/test23.cpp index de7e045f..b0780560 100644 --- a/test/test23.cpp +++ b/test/test23.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test3.cpp b/test/test3.cpp index 51fde6f6..fb2b94da 100644 --- a/test/test3.cpp +++ b/test/test3.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test3.hpp b/test/test3.hpp index 99f298f9..a9d4fc95 100644 --- a/test/test3.hpp +++ b/test/test3.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test31.cpp b/test/test31.cpp index 68c2a723..77622872 100644 --- a/test/test31.cpp +++ b/test/test31.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test32.cpp b/test/test32.cpp index a6669be9..2ffc5021 100644 --- a/test/test32.cpp +++ b/test/test32.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test33.cpp b/test/test33.cpp index 0a86dc68..bf7a3d28 100644 --- a/test/test33.cpp +++ b/test/test33.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test4.cpp b/test/test4.cpp index f72b3ae0..bf5816f5 100644 --- a/test/test4.cpp +++ b/test/test4.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test4.hpp b/test/test4.hpp index 4a4b946d..fc5b48cb 100644 --- a/test/test4.hpp +++ b/test/test4.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test42.cpp b/test/test42.cpp index 009ae14c..a1fd3f27 100644 --- a/test/test42.cpp +++ b/test/test42.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test43.cpp b/test/test43.cpp index 8e460d92..9db3c9b2 100644 --- a/test/test43.cpp +++ b/test/test43.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test5.cpp b/test/test5.cpp index 3a0fdff4..548cd603 100644 --- a/test/test5.cpp +++ b/test/test5.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test5.hpp b/test/test5.hpp index a1269310..a13dfa2e 100644 --- a/test/test5.hpp +++ b/test/test5.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test52.cpp b/test/test52.cpp index 2b920794..4803ce26 100644 --- a/test/test52.cpp +++ b/test/test52.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test53.cpp b/test/test53.cpp index 7a8e48c7..250d462d 100644 --- a/test/test53.cpp +++ b/test/test53.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test6.cpp b/test/test6.cpp index 03b6930f..61a5c310 100644 --- a/test/test6.cpp +++ b/test/test6.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test6.hpp b/test/test6.hpp index 0517fa1a..766d6b92 100644 --- a/test/test6.hpp +++ b/test/test6.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test62.cpp b/test/test62.cpp index a540647d..5d7feb9a 100644 --- a/test/test62.cpp +++ b/test/test62.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test63.cpp b/test/test63.cpp index 61f82ad3..4a0013d2 100644 --- a/test/test63.cpp +++ b/test/test63.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test7.cpp b/test/test7.cpp index 365434aa..4782975f 100644 --- a/test/test7.cpp +++ b/test/test7.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test7.hpp b/test/test7.hpp index 75e41a5f..5dbae1fc 100644 --- a/test/test7.hpp +++ b/test/test7.hpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test71.cpp b/test/test71.cpp index cd16a966..3d397bd3 100644 --- a/test/test71.cpp +++ b/test/test71.cpp @@ -1,13 +1,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test72.cpp b/test/test72.cpp index 9c7c55ae..bdc3f3e8 100644 --- a/test/test72.cpp +++ b/test/test72.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. diff --git a/test/test73.cpp b/test/test73.cpp index 75dfe55d..cb0a55b5 100644 --- a/test/test73.cpp +++ b/test/test73.cpp @@ -2,13 +2,9 @@ // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. The authors make no representations -// about the suitability of this software for any purpose. -// It is provided "as is" without express or implied warranty. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing this work. From 1e1cb82471a4710347d1c01fd01c4ed3710dac6b Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Mon, 24 Sep 2007 21:01:11 +0000 Subject: [PATCH 58/65] - Ticket #1234 : patch committed as suggested. [SVN r39513] --- include/boost/numeric/ublas/storage.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index be1d8247..a2d9b315 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -334,7 +334,7 @@ namespace boost { namespace numeric { namespace ublas { bounded_array (const bounded_array &c): size_ (c.size_) { // ISSUE elements should be copy constructed here, but we must copy instead as already default constructed - std::copy (c.data_, c.data_ + c.size_, data_); + std::copy (c.begin(), c.end(), begin()); } // Resizing From 740507a4c938b6acdc1474c87d6f1f22b389c0f0 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Mon, 24 Sep 2007 21:26:00 +0000 Subject: [PATCH 59/65] - Ticket #688 : Outer iterators can now skip empty rows. Thus matrix_assign works now as expected. [SVN r39516] --- include/boost/numeric/ublas/matrix_sparse.hpp | 116 +++++++++++++++--- 1 file changed, 100 insertions(+), 16 deletions(-) diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index a5184928..4c24e925 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -1642,8 +1642,18 @@ namespace boost { namespace numeric { namespace ublas { const_subiterator_type it ((*itv).second.lower_bound (layout_type::index_m (i, j))); const_subiterator_type it_end ((*itv).second.end ()); - if (rank == 0) - return const_iterator1 (*this, rank, i, j, itv, it); + if (rank == 0) { + // advance to the first available major index + size_type M = itv->first; + size_type m; + if (it != it_end) { + m = it->first; + } else { + m = layout_type::size_m(size1_, size2_); + } + size_type first_i = layout_type::index_M(M,m); + return const_iterator1 (*this, rank, first_i, j, itv, it); + } if (it != it_end && (*it).first == layout_type::index_m (i, j)) return const_iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { @@ -1681,8 +1691,18 @@ namespace boost { namespace numeric { namespace ublas { subiterator_type it ((*itv).second.lower_bound (layout_type::index_m (i, j))); subiterator_type it_end ((*itv).second.end ()); - if (rank == 0) - return iterator1 (*this, rank, i, j, itv, it); + if (rank == 0) { + // advance to the first available major index + size_type M = itv->first; + size_type m; + if (it != it_end) { + m = it->first; + } else { + m = layout_type::size_m(size1_, size2_); + } + size_type first_i = layout_type::index_M(M,m); + return iterator1 (*this, rank, first_i, j, itv, it); + } if (it != it_end && (*it).first == layout_type::index_m (i, j)) return iterator1 (*this, rank, i, j, itv, it); if (direction > 0) { @@ -1720,8 +1740,18 @@ namespace boost { namespace numeric { namespace ublas { const_subiterator_type it ((*itv).second.lower_bound (layout_type::index_m (i, j))); const_subiterator_type it_end ((*itv).second.end ()); - if (rank == 0) - return const_iterator2 (*this, rank, i, j, itv, it); + if (rank == 0) { + // advance to the first available major index + size_type M = itv->first; + size_type m; + if (it != it_end) { + m = it->first; + } else { + m = layout_type::size_m(size1_, size2_); + } + size_type first_j = layout_type::index_m(M,m); + return const_iterator2 (*this, rank, i, first_j, itv, it); + } if (it != it_end && (*it).first == layout_type::index_m (i, j)) return const_iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { @@ -1759,8 +1789,18 @@ namespace boost { namespace numeric { namespace ublas { subiterator_type it ((*itv).second.lower_bound (layout_type::index_m (i, j))); subiterator_type it_end ((*itv).second.end ()); - if (rank == 0) - return iterator2 (*this, rank, i, j, itv, it); + if (rank == 0) { + // advance to the first available major index + size_type M = itv->first; + size_type m; + if (it != it_end) { + m = it->first; + } else { + m = layout_type::size_m(size1_, size2_); + } + size_type first_j = layout_type::index_m(M,m); + return iterator2 (*this, rank, i, first_j, itv, it); + } if (it != it_end && (*it).first == layout_type::index_m (i, j)) return iterator2 (*this, rank, i, j, itv, it); if (direction > 0) { @@ -1819,7 +1859,12 @@ namespace boost { namespace numeric { namespace ublas { ++ it_; else { const self_type &m = (*this) (); - i_ = index1 () + 1; + if (rank_ == 0) { + ++ itv_; + i_ = itv_->first; + } else { + i_ = index1 () + 1; + } if (rank_ == 1 && ++ itv_ == m.end1 ().itv_) *this = m.find1 (rank_, i_, j_, 1); else if (rank_ == 1) { @@ -1836,7 +1881,13 @@ namespace boost { namespace numeric { namespace ublas { -- it_; else { const self_type &m = (*this) (); - i_ = index1 () - 1; + if (rank_ == 0) { + -- itv_; + i_ = itv_->first; + } else { + i_ = index1 () - 1; + } + // FIXME: this expression should never become true! if (rank_ == 1 && -- itv_ == m.end1 ().itv_) *this = m.find1 (rank_, i_, j_, -1); else if (rank_ == 1) { @@ -1983,7 +2034,12 @@ namespace boost { namespace numeric { namespace ublas { ++ it_; else { self_type &m = (*this) (); - i_ = index1 () + 1; + if (rank_ == 0) { + ++ itv_; + i_ = itv_->first; + } else { + i_ = index1 () + 1; + } if (rank_ == 1 && ++ itv_ == m.end1 ().itv_) *this = m.find1 (rank_, i_, j_, 1); else if (rank_ == 1) { @@ -2000,7 +2056,13 @@ namespace boost { namespace numeric { namespace ublas { -- it_; else { self_type &m = (*this) (); - i_ = index1 () - 1; + if (rank_ == 0) { + -- itv_; + i_ = itv_->first; + } else { + i_ = index1 () - 1; + } + // FIXME: this expression should never become true! if (rank_ == 1 && -- itv_ == m.end1 ().itv_) *this = m.find1 (rank_, i_, j_, -1); else if (rank_ == 1) { @@ -2152,7 +2214,12 @@ namespace boost { namespace numeric { namespace ublas { ++ it_; else { const self_type &m = (*this) (); - j_ = index2 () + 1; + if (rank_ == 0) { + ++ itv_; + j_ = itv_->first; + } else { + j_ = index2 () + 1; + } if (rank_ == 1 && ++ itv_ == m.end2 ().itv_) *this = m.find2 (rank_, i_, j_, 1); else if (rank_ == 1) { @@ -2169,7 +2236,13 @@ namespace boost { namespace numeric { namespace ublas { -- it_; else { const self_type &m = (*this) (); - j_ = index2 () - 1; + if (rank_ == 0) { + -- itv_; + j_ = itv_->first; + } else { + j_ = index2 () - 1; + } + // FIXME: this expression should never become true! if (rank_ == 1 && -- itv_ == m.end2 ().itv_) *this = m.find2 (rank_, i_, j_, -1); else if (rank_ == 1) { @@ -2316,7 +2389,12 @@ namespace boost { namespace numeric { namespace ublas { ++ it_; else { self_type &m = (*this) (); - j_ = index2 () + 1; + if (rank_ == 0) { + ++ itv_; + j_ = itv_->first; + } else { + j_ = index2 () + 1; + } if (rank_ == 1 && ++ itv_ == m.end2 ().itv_) *this = m.find2 (rank_, i_, j_, 1); else if (rank_ == 1) { @@ -2333,7 +2411,13 @@ namespace boost { namespace numeric { namespace ublas { -- it_; else { self_type &m = (*this) (); - j_ = index2 () - 1; + if (rank_ == 0) { + -- itv_; + j_ = itv_->first; + } else { + j_ = index2 () - 1; + } + // FIXME: this expression should never become true! if (rank_ == 1 && -- itv_ == m.end2 ().itv_) *this = m.find2 (rank_, i_, j_, -1); else if (rank_ == 1) { From cf9b2d4d592c8cba76a30a9b40f26e288f134799 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Mon, 1 Oct 2007 13:04:29 +0000 Subject: [PATCH 60/65] - added redirect from index.html to real start page: index.htm [SVN r39638] --- doc/index.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/index.html diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 00000000..32626624 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,12 @@ + + + + + +index.html not found + + +

    Please update your bookmarks to point to index.htm. You will be redirected in a second.

    + + From 5a764ff77631387a8f4597f81b42c44c52fc44a1 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Tue, 16 Oct 2007 21:48:01 +0000 Subject: [PATCH 61/65] - added section "nested products" [SVN r40098] --- doc/operations_overview.htm | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/doc/operations_overview.htm b/doc/operations_overview.htm index cb6cc7d2..48f19633 100644 --- a/doc/operations_overview.htm +++ b/doc/operations_overview.htm @@ -207,8 +207,40 @@ in preference to iterator's for the same reason. For the more darin can be completely turned off in uBLAS by defining the configuration macro BOOST_UBLAS_NO_ELEMENT_PROXIES.

    + +

    Controlling the complexity of nested products

    + +

    What is the complexity (the number of add and multiply operations) required to compute the following? +

    +
    + R = prod(A, prod(B,C)); 
    +
    +

    Firstly the complexity depends on matrix size. Also since prod is transitive (not commutative) +the bracket order affects the complexity. +

    +

    uBLAS evaluates expressions without matrix or vector temporaries and honours +the bracketing structure. However avoiding temporaries for nested product unnecessarly increases the complexity. +Conversly by explictly using temporary matrices the complexity of a nested product can be reduced. +

    +

    uBLAS provides 3 alternative syntaxes for this purpose: +

    +
    + temp_type T = prod(B,C); R = prod(A,T);   // Preferable if T is preallocated
    +
    +
    + prod(A, temp_type(prod(B,C));
    +
    +
    + prod(A, prod<temp_type>(B,C));
    +
    +

    The 'temp_type' is important. Given A,B,C are all of the same type. Say +matrix<float>, the choice is easy. However if the value_type is mixed (int with float or double) +or the matrix type is mixed (sparse with symmetric) the best solution is not so obvious. It is up to you! It +depends on numerical properties of A and the result of the prod(B,C). +

    +
    -

    Copyright (©) 2000-2004 Joerg Walter, Mathias Koch, Gunter +

    Copyright (©) 2000-2007 Joerg Walter, Mathias Koch, Gunter Winkler, Michael Stevens
    Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. From f06bbc273ae1f1a8087fe39e69b134b110f97198 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 22 Oct 2007 19:54:54 +0000 Subject: [PATCH 62/65] Suppress a GCC 4.3 warning and fix a couple header-inclusion issues. Fixes #1338 [SVN r40300] --- include/boost/numeric/ublas/detail/vector_assign.hpp | 1 + include/boost/numeric/ublas/operation_blocked.hpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/boost/numeric/ublas/detail/vector_assign.hpp b/include/boost/numeric/ublas/detail/vector_assign.hpp index 80d5016c..850c5b48 100644 --- a/include/boost/numeric/ublas/detail/vector_assign.hpp +++ b/include/boost/numeric/ublas/detail/vector_assign.hpp @@ -13,6 +13,7 @@ #ifndef _BOOST_UBLAS_VECTOR_ASSIGN_ #define _BOOST_UBLAS_VECTOR_ASSIGN_ +#include // scalar_assign // Required for make_conformant storage #include diff --git a/include/boost/numeric/ublas/operation_blocked.hpp b/include/boost/numeric/ublas/operation_blocked.hpp index e794b925..812b24ea 100644 --- a/include/boost/numeric/ublas/operation_blocked.hpp +++ b/include/boost/numeric/ublas/operation_blocked.hpp @@ -14,6 +14,8 @@ #define _BOOST_UBLAS_OPERATION_BLOCKED_ #include +#include // indexing_vector_assign +#include // indexing_matrix_assign namespace boost { namespace numeric { namespace ublas { From 6d4e86cdd0d976bee3eac0f5d47313f3fefac48f Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Wed, 7 Nov 2007 19:34:03 +0000 Subject: [PATCH 63/65] - io.hpp: added missing include [SVN r40906] --- include/boost/numeric/ublas/io.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/numeric/ublas/io.hpp b/include/boost/numeric/ublas/io.hpp index d84c8fad..795dd9bd 100644 --- a/include/boost/numeric/ublas/io.hpp +++ b/include/boost/numeric/ublas/io.hpp @@ -15,6 +15,7 @@ // Only forward definition required to define stream operations #include +#include #include From b5c1095c5d2d66a056edac273263a1b7377917fe Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Thu, 15 Nov 2007 20:52:37 +0000 Subject: [PATCH 64/65] This patch now lets the Sun compiler work for most of uBLAS. 'test4' is now failing. Too avoid other compilers complaining about missing return values in some functions where exceptions are thrown, code was added so an arbitatry were chosen. [SVN r41116] --- include/boost/numeric/ublas/banded.hpp | 21 ++++++++------ include/boost/numeric/ublas/hermitian.hpp | 10 +++---- include/boost/numeric/ublas/triangular.hpp | 32 ++++++---------------- 3 files changed, 25 insertions(+), 38 deletions(-) diff --git a/include/boost/numeric/ublas/banded.hpp b/include/boost/numeric/ublas/banded.hpp index 21bd01a7..c67e0595 100644 --- a/include/boost/numeric/ublas/banded.hpp +++ b/include/boost/numeric/ublas/banded.hpp @@ -175,21 +175,24 @@ namespace boost { namespace numeric { namespace ublas { #ifdef BOOST_UBLAS_OWN_BANDED const size_type k = (std::max) (i, j); const size_type l = lower_ + j - i; - if (k < (std::max) (size1_, size2_) && - l < lower_ + 1 + upper_) - return data () [layout_type::element (k, (std::max) (size1_, size2_), + if (! (k < (std::max) (size1_, size2_) && + l < lower_ + 1 + upper_) ) { + bad_index ().raise (); + // NEVER reached + } + return data () [layout_type::element (k, (std::max) (size1_, size2_), l, lower_ + 1 + upper_)]; #else const size_type k = j; const size_type l = upper_ + i - j; - if (k < size2_ && - l < lower_ + 1 + upper_) - return data () [layout_type::element (k, size2_, + if (! (k < size2_ && + l < lower_ + 1 + upper_) ) { + bad_index ().raise (); + // NEVER reached + } + return data () [layout_type::element (k, size2_, l, lower_ + 1 + upper_)]; #endif - bad_index ().raise (); - // arbitary return value - return const_cast(zero_); } // Element assignment diff --git a/include/boost/numeric/ublas/hermitian.hpp b/include/boost/numeric/ublas/hermitian.hpp index 4d828c2c..7104d557 100644 --- a/include/boost/numeric/ublas/hermitian.hpp +++ b/include/boost/numeric/ublas/hermitian.hpp @@ -354,13 +354,11 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE reference operator () (size_type i, size_type j) { #ifndef BOOST_UBLAS_STRICT_HERMITIAN - if (triangular_type::other (i, j)) - return at_element (i, j); - else { - external_logic ().raise (); - // arbitary return value - return data () [triangular_type::element (layout_type (), j, size_, i, size_)]; + if (!triangular_type::other (i, j)) { + bad_index ().raise (); + // NEVER reached } + return at_element (i, j); #else if (triangular_type::other (i, j)) return reference (*this, i, j, data () [triangular_type::element (layout_type (), i, size_, j, size_)]); diff --git a/include/boost/numeric/ublas/triangular.hpp b/include/boost/numeric/ublas/triangular.hpp index d2907156..f0be81e9 100644 --- a/include/boost/numeric/ublas/triangular.hpp +++ b/include/boost/numeric/ublas/triangular.hpp @@ -173,13 +173,11 @@ namespace boost { namespace numeric { namespace ublas { reference operator () (size_type i, size_type j) { BOOST_UBLAS_CHECK (i < size1_, bad_index ()); BOOST_UBLAS_CHECK (j < size2_, bad_index ()); - if (triangular_type::other (i, j)) - return data () [triangular_type::element (layout_type (), i, size1_, j, size2_)]; - else { + if (!triangular_type::other (i, j)) { bad_index ().raise (); - // arbitary return value - return const_cast(zero_); + // NEVER reached } + return data () [triangular_type::element (layout_type (), i, size1_, j, size2_)]; } // Element assignment @@ -1019,34 +1017,22 @@ namespace boost { namespace numeric { namespace ublas { reference operator () (size_type i, size_type j) { BOOST_UBLAS_CHECK (i < size1 (), bad_index ()); BOOST_UBLAS_CHECK (j < size2 (), bad_index ()); - if (triangular_type::other (i, j)) - return data () (i, j); - else if (triangular_type::one (i, j)) { + if (!triangular_type::other (i, j)) { bad_index ().raise (); - // arbitary return value - return const_cast(one_); - } else { - bad_index ().raise (); - // arbitary return value - return const_cast(zero_); + // NEVER reached } + return data () (i, j); } #else BOOST_UBLAS_INLINE reference operator () (size_type i, size_type j) const { BOOST_UBLAS_CHECK (i < size1 (), bad_index ()); BOOST_UBLAS_CHECK (j < size2 (), bad_index ()); - if (triangular_type::other (i, j)) - return data () (i, j); - else if (triangular_type::one (i, j)) { + if (!triangular_type::other (i, j)) { bad_index ().raise (); - // arbitary return value - return const_cast(one_); - } else { - bad_index ().raise (); - // arbitary return value - return const_cast(zero_); + // NEVER reached } + return data () (i, j); } #endif From c776a0a0a04153786c753403d79c44e4f80b06c8 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Sun, 25 Nov 2007 13:34:20 +0000 Subject: [PATCH 65/65] - fix and close #1237 - symmetric resize used wrong internal resize method -- Dese und die folgenden Zeilen werden ignoriert -- M symmetric.hpp [SVN r41353] --- include/boost/numeric/ublas/symmetric.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/numeric/ublas/symmetric.hpp b/include/boost/numeric/ublas/symmetric.hpp index ef31e122..0ebbe639 100644 --- a/include/boost/numeric/ublas/symmetric.hpp +++ b/include/boost/numeric/ublas/symmetric.hpp @@ -14,6 +14,7 @@ #define _BOOST_UBLAS_SYMMETRIC_ #include +#include #include // Iterators based on ideas of Jeremy Siek @@ -121,7 +122,7 @@ namespace boost { namespace numeric { namespace ublas { void resize (size_type size, bool preserve = true) { if (preserve) { self_type temporary (size, size); - detail::matrix_resize_preserve (*this, temporary); + detail::matrix_resize_preserve (*this, temporary); } else { data ().resize (triangular_type::packed_size (layout_type (), size, size));