From a14d3f463ce49972b565282b245e0738730ceeb9 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Mon, 20 Sep 2004 09:45:31 +0000 Subject: [PATCH] uninitialized resize form no longer needs to be called resize_new svn path=/trunk/boost/libs/numeric/ublas/; revision=25264 --- doc/storage.htm | 4 ++-- include/boost/numeric/ublas/storage.hpp | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/storage.htm b/doc/storage.htm index 2a7319d5..62c061d8 100644 --- a/doc/storage.htm +++ b/doc/storage.htm @@ -103,7 +103,7 @@ The unbounded_array is reallocated only if the size changes. Element values are preserved, additional elements are assigned the value of init. -void resize_new (size_type size) +void resize (size_type size) Resizes an unbounded_array to hold at most size elements.
The unbounded_array is reallocated only if the size changes. @@ -270,7 +270,7 @@ elements are assigned the value of init. Throws a bad_size exceptio if the size exeeds the bound. -void resize_new (size_type size) +void resize (size_type size) Resizes a bounded_array to hold at most size elements. The elements values are undefined. Throws a bad_size exception if the size exeeds the bound. diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index f59a0598..02315162 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -183,7 +183,7 @@ namespace boost { namespace numeric { namespace ublas { } public: BOOST_UBLAS_INLINE - void resize_new (size_type size) { + void resize (size_type size) { resize_internal (size, value_type (), false); } BOOST_UBLAS_INLINE @@ -212,7 +212,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE unbounded_array &operator = (const unbounded_array &a) { if (this != &a) { - resize_new (a.size_); + resize (a.size_); std::copy (a.data_, a.data_ + a.size_, data_); } return *this; @@ -350,7 +350,7 @@ namespace boost { namespace numeric { namespace ublas { // Resizing BOOST_UBLAS_INLINE - void resize_new (size_type size) { + void resize (size_type size) { if (size > N) bad_size ().raise (); size_ = size; @@ -385,7 +385,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE bounded_array &operator = (const bounded_array &a) { if (this != &a) { - resize_new (a.size_); + resize (a.size_); std::copy (a.data_, a.data_ + a.size_, data_); } return *this; @@ -545,7 +545,7 @@ namespace boost { namespace numeric { namespace ublas { } public: BOOST_UBLAS_INLINE - void resize_new (size_type size) { + void resize (size_type size) { resize_internal (size, value_type (), false); } BOOST_UBLAS_INLINE @@ -553,7 +553,7 @@ namespace boost { namespace numeric { namespace ublas { resize_internal (size, init, true); } BOOST_UBLAS_INLINE - void resize_new (size_type size, pointer data) { + void resize (size_type size, pointer data) { resize_internal (size, data, value_type (), false); } BOOST_UBLAS_INLINE @@ -582,7 +582,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE array_adaptor &operator = (const array_adaptor &a) { if (this != &a) { - resize_new (a.size_); + resize (a.size_); std::copy (a.data_, a.data_ + a.size_, data_); } return *this; @@ -751,7 +751,7 @@ namespace boost { namespace numeric { namespace ublas { } public: BOOST_UBLAS_INLINE - void resize_new (size_type size) { + void resize (size_type size) { resize_internal (size, value_type (), false); } BOOST_UBLAS_INLINE @@ -759,7 +759,7 @@ namespace boost { namespace numeric { namespace ublas { resize_internal (size, init, true); } BOOST_UBLAS_INLINE - void resize_new (size_type size, pointer data) { + void resize (size_type size, pointer data) { resize_internal (size, data, value_type (), false); } BOOST_UBLAS_INLINE @@ -788,7 +788,7 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE shallow_array_adaptor &operator = (const shallow_array_adaptor &a) { if (this != &a) { - resize_new (a.size_); + resize (a.size_); std::copy (a.data_.get (), a.data_.get () + a.size_, data_.get ()); } return *this;