From e9fab4418dee1e84edfc258aecd3992c80fd7a43 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Mon, 27 Jun 2005 12:49:31 +0000 Subject: [PATCH] FIX insert/erase_element Added c_vector/matrix to models [SVN r29807] --- doc/container_concept.htm | 51 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/doc/container_concept.htm b/doc/container_concept.htm index ae9d0a62..1b3f0816 100644 --- a/doc/container_concept.htm +++ b/doc/container_concept.htm @@ -77,7 +77,6 @@ vectors.

V - Insert v.insert_element (i, t) v is mutable. @@ -139,19 +138,19 @@ from, or is not defined in Insert v.insert_element (i, t) -0 <= i < v.size () and
-v (i) is equal to value_type (0). -A copy of t is inserted in v. -v (i) is a copy of t. +0 <= i < v.size (). +Inserts an element at v (i) with value t. +The storage requirement of the Vector may be increased. +v (i) is equal to t. Erase v.erase_element (i) 0 <= i < v.size () -Destroys the element v (i) and replaces it with -value_type (). -v (i) is a copy of value_type -(). +Destroys the element as v (i) and replaces it with the default +value_type (). +The storage requirement of the Vector may be decreased. +v (i) is equal to value_type (). Clear @@ -159,7 +158,7 @@ from, or is not defined in
  Equivalent to
for (i = 0; i < v.size (); ++ i)
v.erase (i);v.erase_element (i);   @@ -186,15 +185,15 @@ When p == false then existing elements are not preserved and elemen

The run-time complexity of the sizing constructor is linear in the vector's size.

The run-time complexity of insert_element and erase_element is specific for the -vector.

+Vector model and it depends on increases/decreases in storage requirements.

The run-time complexity of resize is linear in the vector's size.

Invariants

Models

Notes

[1] @@ -327,20 +326,20 @@ n2. Insert m.insert_element (i, j, t) 0 <= i < m.size1 (),
-0 <= j < m.size2 ()and
-m (i, j)
is equal to value_type (0). -A copy of t is inserted in m. -m (i, j) is a copy of t. +0 <= j < m.size2 (). +Inserts an element at m (i, j) with value t. +The storage requirement of the Matrix may be increased. +m (i, j) is equal to t. Erase -m.erase (i, j) +m.erase_element (i, j) 0 <= i < m.size1 ()and
0 <= j < m.size2
-Destroys the element m (i, j) and replaces it with -value_type (). -m (i, j) is a copy of value_type -(). +Destroys the element as m (i, j) and replaces it with the default +value_type (). +The storage requirement of the Matrix may be decreased. +m (i, j) is equal to value_type (). Clear @@ -349,7 +348,7 @@ m (i, j) is equal to value_type (0). Equivalent to
for (i = 0; i < m.size1 (); ++ i)
  for (j = 0; j < m.size2 (); ++ j)
-    m.erase (i, j); +    m.erase_element (i, j);   @@ -379,13 +378,13 @@ When p == false then existing elements are not preserved and elemen

The run-time complexity of the sizing constructor is quadratic in the matrix's size.

The run-time complexity of insert_element and erase_element is specific for the -matrix.

+Matrix model and it depends on increases/decreases in storage requirements.

The run-time complexity of resize is quadratic in the matrix's size.

Invariants

Models