From 07658594e7159daf394ae07b13d79ecbfbc39b03 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Mon, 14 Mar 2005 13:29:04 +0000 Subject: [PATCH] Update doc matches name change sparse_ to mapped_ --- doc/dense_vector_concept.htm~ | 224 ------------------ doc/index.htm | 4 +- doc/matrix_sparse.htm | 116 +++++---- .../{sparse_matrix.cpp => mapped_matrix.cpp} | 0 .../{sparse_vector.cpp => mapped_vector.cpp} | 0 doc/types_overview.htm | 16 +- doc/vector_sparse.htm | 94 ++++---- 7 files changed, 113 insertions(+), 341 deletions(-) delete mode 100644 doc/dense_vector_concept.htm~ rename doc/samples/{sparse_matrix.cpp => mapped_matrix.cpp} (100%) rename doc/samples/{sparse_vector.cpp => mapped_vector.cpp} (100%) diff --git a/doc/dense_vector_concept.htm~ b/doc/dense_vector_concept.htm~ deleted file mode 100644 index 3597bf32..00000000 --- a/doc/dense_vector_concept.htm~ +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - -DenseVector Concept - - -

c++boost.gif -DenseVector Concept

-

DenseVector

-

Description

-

A dense-vector is a, exactly as the name says, a dense vector that is intended to behave well for linear algebra operations

-

Refinement of

-

Vector Expression[1].

-

Associated types

-

-In addition to the types defined int - Vector Expression -

- - - - - - - - -
Storagearray_typeThe type of underlying storage used to store the elements
-

Notation

- - - - - - - - - - - - - - - - - - - - - - - -
VA type that is a model of Vector
vObjects of type V
n, iObjects of a type convertible to size_type
tObject of a type convertible to value_type
pObject of a type convertible to bool
-

Definitions

-

Valid expressions

-

In addition to the expressions defined in Vector Expression the -following expressions must be valid.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameExpressionType requirementsReturn type
Sizing constructorV v (n) V
Element access [1]v[n]n is convertible to size_typereference if v is mutable, const_reference otherwise
Insertv.insert_element (i, t)v is mutable.void
Erasev.erase_element (i)v is mutable.void
Clearv.clear ()v is mutable.void
Resizev.resize (n)
-v.resize (n, p)
v is mutable.void
Storagedata() constconst array_type&
Storagedata()v is mutablearray_type&
-

Expression semantics

-

Semantics of an expression is defined only where it differs -from, or is not defined in Vector Expression .

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameExpressionPreconditionSemanticsPostcondition
Sizing constructorV v (n)n >= 0Allocates a vector ofn elements.v.size () == n.
Element access [1]v[n]0<n>v.size()returns the n-th element in v
Insertv.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.
Erasev.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 -().
Clearv.clear () Equivalent to
-for (i = 0; i < v.size (); ++ i)
v.erase (i);
 
Resizev.resize (n) -
v.resize (n, p)
 Reallocates the vector so that it can hold n -elements.
-Erases or appends elements in order to bring the vector to the prescribed size. Appended elements copies of value_type(). -
-When p == false then existing elements are not preserved and elements will not appended as normal. Instead the vector is in the same state as that after an equivalent sizing constructor.
v.size () == n.
Storagev.data()v is constReturns a reference to the underlying storage
Storagev.data()v is mutableReturns a reference to the underlying storage
-

Complexity guarantees

-

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.

-

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

-

Invariants

-

Models

- -

Notes

-

[1] -As a user you should not care about DenseVector being a refinement of the VectorExpression. Being a refinement of the VectorExpression is only important for the template-expression engine but not the user. -[1]The operator[] is added purely for convenience -and compatibility with the std::vector. In uBLAS however, -generally operator() is used for indexing because this can be -used for both vectors and matrices. - - diff --git a/doc/index.htm b/doc/index.htm index f348aa08..e429f43e 100644 --- a/doc/index.htm +++ b/doc/index.htm @@ -86,7 +86,7 @@ Access Column/Row Iterator

  • Sparse Vector