mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-20 03:02:13 +00:00
FIX insert/erase_element
Added c_vector/matrix to models [SVN r29807]
This commit is contained in:
@@ -77,7 +77,6 @@ vectors.</p>
|
||||
<td><code>V</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td>Insert</td>
|
||||
<td><code>v.insert_element (i, t)</code></td>
|
||||
<td><code>v</code> is mutable.</td>
|
||||
@@ -139,19 +138,19 @@ from, or is not defined in <a href=
|
||||
<tr>
|
||||
<td>Insert</td>
|
||||
<td><code>v.insert_element (i, t)</code></td>
|
||||
<td><code>0 <= i < v.size ()</code> and<br />
|
||||
<code>v (i)</code> is equal to <code>value_type (0)</code>.</td>
|
||||
<td>A copy of <code>t</code> is inserted in <code>v</code>.</td>
|
||||
<td><code>v (i)</code> is a copy of <code>t</code>.</td>
|
||||
<td><code>0 <= i < v.size ()</code>.</td>
|
||||
<td>Inserts an element at <code>v (i)</code> with value <code>t</code>.
|
||||
The storage requirement of the Vector may be increased.</td>
|
||||
<td><code>v (i)</code> is equal to <code>t</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Erase</td>
|
||||
<td><code>v.erase_element (i)</code></td>
|
||||
<td><code>0 <= i < v.size ()</code></td>
|
||||
<td>Destroys the element <code>v (i)</code> and replaces it with
|
||||
<code>value_type ()</code>.</td>
|
||||
<td><code>v (i)</code> is a copy of <code>value_type
|
||||
()</code>.</td>
|
||||
<td>Destroys the element as <code>v (i)</code> and replaces it with the default
|
||||
<code>value_type ()</code>.
|
||||
The storage requirement of the Vector may be decreased.</td>
|
||||
<td><code>v (i)</code> is equal to <code>value_type ()</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clear</td>
|
||||
@@ -159,7 +158,7 @@ from, or is not defined in <a href=
|
||||
<td> </td>
|
||||
<td>Equivalent to<br />
|
||||
<code>for (i = 0; i < v.size (); ++ i)</code><br />
|
||||
<code>v.erase (i);</code></td>
|
||||
<code>v.erase_element (i);</code></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -186,15 +185,15 @@ When <code>p == false</code> then existing elements are not preserved and elemen
|
||||
<p>The run-time complexity of the sizing constructor is linear in
|
||||
the vector's size.</p>
|
||||
<p>The run-time complexity of insert_element and erase_element is specific for the
|
||||
vector.</p>
|
||||
Vector model and it depends on increases/decreases in storage requirements.</p>
|
||||
<p>The run-time complexity of resize is linear in the vector's
|
||||
size.</p>
|
||||
<h4>Invariants</h4>
|
||||
<h4>Models</h4>
|
||||
<ul>
|
||||
<li><code>vector<T></code> , <code>bounded_vector<T, N></code></li>
|
||||
<li><code>unit_vector<T></code> , <code>zero_vector<T></code> , <code>scalar_vector<T></code></li>
|
||||
<li><code>mapped_vector<T></code> , <code>compressed_vector</code> , <code>coordinate_vector</code></li>
|
||||
<li><code>vector<T></code>, <code>bounded_vector<T, N></code>, <code>c_vector<T, N></code></li>
|
||||
<li><code>unit_vector<T></code>, <code>zero_vector<T></code>, <code>scalar_vector<T></code></li>
|
||||
<li><code>mapped_vector<T></code>, <code>compressed_vector</code>, <code>coordinate_vector</code></li>
|
||||
</ul>
|
||||
<h4>Notes</h4>
|
||||
<p><a name="vector_expression_note">[1]</a>
|
||||
@@ -327,20 +326,20 @@ n2</code>.</td>
|
||||
<td>Insert</td>
|
||||
<td><code>m.insert_element (i, j, t)</code></td>
|
||||
<td><code>0 <= i < m.size1 ()</code>,<br />
|
||||
<code>0 <= j < m.size2 ()</code>and <code><br />
|
||||
m (i, j)</code> is equal to <code>value_type (0)</code>.</td>
|
||||
<td>A copy of <code>t</code> is inserted in <code>m</code>.</td>
|
||||
<td><code>m (i, j)</code> is a copy of <code>t</code>.</td>
|
||||
<code>0 <= j < m.size2 ()</code>.</td>
|
||||
<td>Inserts an element at <code>m (i, j)</code> with value <code>t</code>.
|
||||
The storage requirement of the Matrix may be increased.</td>
|
||||
<td><code>m (i, j)</code> is equal to <code>t</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Erase</td>
|
||||
<td><code>m.erase (i, j)</code></td>
|
||||
<td><code>m.erase_element (i, j)</code></td>
|
||||
<td><code>0 <= i < m.size1 ()</code>and <code><br />
|
||||
0 <= j < m.size2</code></td>
|
||||
<td>Destroys the element <code>m (i, j)</code> and replaces it with
|
||||
<code>value_type ()</code>.</td>
|
||||
<td><code>m (i, j)</code> is a copy of <code>value_type
|
||||
()</code>.</td>
|
||||
<td>Destroys the element as <code>m (i, j)</code> and replaces it with the default
|
||||
<code>value_type ()</code>.
|
||||
The storage requirement of the Matrix may be decreased.</td>
|
||||
<td><code>m (i, j)</code> is equal to <code>value_type ()</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clear</td>
|
||||
@@ -349,7 +348,7 @@ m (i, j)</code> is equal to <code>value_type (0)</code>.</td>
|
||||
<td>Equivalent to<br />
|
||||
<code>for (i = 0; i < m.size1 (); ++ i)</code><br />
|
||||
<code>for (j = 0; j < m.size2 (); ++ j)</code><br />
|
||||
<code>m.erase (i, j);</code></td>
|
||||
<code>m.erase_element (i, j);</code></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -379,13 +378,13 @@ When <code>p == false</code> then existing elements are not preserved and elemen
|
||||
<p>The run-time complexity of the sizing constructor is quadratic
|
||||
in the matrix's size.</p>
|
||||
<p>The run-time complexity of insert_element and erase_element is specific for the
|
||||
matrix.</p>
|
||||
Matrix model and it depends on increases/decreases in storage requirements.</p>
|
||||
<p>The run-time complexity of resize is quadratic in the matrix's
|
||||
size.</p>
|
||||
<h4>Invariants</h4>
|
||||
<h4>Models</h4>
|
||||
<ul>
|
||||
<li><code>matrix<T></code> , <code>bounded_matrix<T, M, N></code></li>
|
||||
<li><code>matrix<T></code>, <code>bounded_matrix<T, M, N></code>, <code>c_matrix<T, M, N></code></li>
|
||||
<li><code>identity_matrix<T></code> , <code>zero_matrix<T></code> , <code>scalar_matrix<T></code></li>
|
||||
<li><code>triangular_matrix<T></code> , <code>symmetric_matrix<T></code> , <code>banded_matrix<T></code></li>
|
||||
<li><code>mapped_matrix<T></code> , <code>compressed_matrix</code> , <code>coordinate_matrix</code></li>
|
||||
|
||||
Reference in New Issue
Block a user