2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-22 15:52:18 +00:00

uninitialized resize form no longer needs to be called resize_new

svn path=/trunk/boost/libs/numeric/ublas/; revision=25264
This commit is contained in:
Michael Stevens
2004-09-20 09:45:31 +00:00
parent 45b7bdef0e
commit a14d3f463c
2 changed files with 12 additions and 12 deletions

View File

@@ -103,7 +103,7 @@ The <code>unbounded_array</code> is reallocated only if the size changes.
Element values are preserved, additional elements are assigned the value of init.</td>
</tr>
<tr>
<td><code>void resize_new (size_type size)</code></td>
<td><code>void resize (size_type size)</code></td>
<td>Resizes an <code>unbounded_array</code> to hold at most
<code>size</code> elements.<br />
The <code>unbounded_array</code> is reallocated only if the size changes.
@@ -270,7 +270,7 @@ elements are assigned the value of init. Throws a <code>bad_size</code> exceptio
if the size exeeds the bound.</td>
</tr>
<tr>
<td><code>void resize_new (size_type size)</code></td>
<td><code>void resize (size_type size)</code></td>
<td>Resizes a <code>bounded_array</code> to hold at most
<code>size</code> elements. The elements values are undefined. Throws a <code>bad_size</code> exception
if the size exeeds the bound.</td>

View File

@@ -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;