Author: alai04 Date: Wed Jan 7 23:44:16 2009 New Revision: 201 Modified: trunk/libs/libraries.htm trunk/libs/numeric/ublas/doc/banded.htm trunk/libs/numeric/ublas/doc/blas.htm trunk/libs/numeric/ublas/doc/bounded_array.htm trunk/libs/numeric/ublas/doc/container_concept.htm trunk/libs/numeric/ublas/doc/expression_concept.htm trunk/libs/numeric/ublas/doc/hermitian.htm trunk/libs/numeric/ublas/doc/index.htm trunk/libs/numeric/ublas/doc/iterator_concept.htm trunk/libs/numeric/ublas/doc/matrix.htm trunk/libs/numeric/ublas/doc/matrix_expression.htm trunk/libs/numeric/ublas/doc/matrix_proxy.htm trunk/libs/numeric/ublas/doc/matrix_sparse.htm trunk/libs/numeric/ublas/doc/operations_overview.htm trunk/libs/numeric/ublas/doc/overview.htm trunk/libs/numeric/ublas/doc/products.htm trunk/libs/numeric/ublas/doc/range.htm trunk/libs/numeric/ublas/doc/storage_concept.htm trunk/libs/numeric/ublas/doc/storage_sparse.htm trunk/libs/numeric/ublas/doc/symmetric.htm trunk/libs/numeric/ublas/doc/triangular.htm trunk/libs/numeric/ublas/doc/types_overview.htm trunk/libs/numeric/ublas/doc/unbounded_array.htm trunk/libs/numeric/ublas/doc/vector.htm trunk/libs/numeric/ublas/doc/vector_expression.htm trunk/libs/numeric/ublas/doc/vector_proxy.htm trunk/libs/numeric/ublas/doc/vector_sparse.htm Log: 代luckycat06提交uBLAS库的译文。 Modified: trunk/libs/libraries.htm ============================================================================== --- trunk/libs/libraries.htm (original) +++ trunk/libs/libraries.htm Wed Jan 7 23:44:16 2009 @@ -15,7 +15,7 @@ </tr> </tbody> </table>-<table style="border-collapse: collapse;" bgcolor="#d7eeff" border="0" bordercolor="#111111" cellpadding="5" cellspacing="0" height="26" width="673"> +<table style="border-collapse: collapse; width: 700px; height: 46px;" bgcolor="#d7eeff" border="0" bordercolor="#111111" cellpadding="5" cellspacing="0">
<tbody> <tr><td height="16" width="663"><a href="../more/getting_started/index.html">入 门</a> <font color="#ffffff"> </font>
@@ -656,5 +656,6 @@ <a href="timer/index.html">timer</a> </p><p>jinq0123:<a href="python/doc/index.html">python</a>, <a href="signals/index.html">signals</a> </p> <p>zhaohongchao: <a href="gil/doc/index.html">gil</a> </p><p> luckycat06:<a href="numeric/interval/doc/interval.htm">interval</a>, <a href="math/doc/index.html">math</a>, <a href="math/doc/complex/html/index.html">math/complex -number algorithms</a>, <a href="math/doc/common_factor.html">math/common_factor</a>, <a href="math/doc/octonion/html/index.html">math/octonion</a>, <a href="math/doc/quaternion/html/index.html">math/quaternion</a> </p><p>lixin: <a href="regex/index.html">regex</a>, <a href="test/doc/html/index.html">test</a>, <a href="units/index.html">units</a> </p><p>felurkinda: <a href="graph/doc/table_of_contents.html">graph</a>(部分 )</p><p>hzjboost: <a href="spirit/index.html">spirit</a>(部分 )</p><p>evy.wang:<a href="thread/doc/index.html">thread</a> </p> +number algorithms</a>, <a href="math/doc/common_factor.html">math/common_factor</a>, <a href="math/doc/octonion/html/index.html">math/octonion</a>, <a href="math/doc/quaternion/html/index.html">math/quaternion</a>, <a href="math/doc/sf_and_dist/html/index.html">math/special_functions</a>, <a href="math/doc/sf_and_dist/html/index.html">math/statistical +distributions</a>, <a href="numeric/ublas/doc/index.htm">uBLAS</a> </p><p>lixin: <a href="regex/index.html">regex</a>, <a href="test/doc/html/index.html">test</a>, <a href="units/index.html">units</a> </p><p>felurkinda: <a href="graph/doc/table_of_contents.html">graph</a>(部分 )</p><p>hzjboost: <a href="spirit/index.html">spirit</a>(部分 )</p><p>evy.wang:<a href="thread/doc/index.html">thread</a> </p>
</body></html> Modified: trunk/libs/numeric/ublas/doc/banded.htm ============================================================================== --- trunk/libs/numeric/ublas/doc/banded.htm (original) +++ trunk/libs/numeric/ublas/doc/banded.htm Wed Jan 7 23:44:16 2009 @@ -1,572 +1,506 @@ -<!DOCTYPE html PUBLIC "-//W3C/utf-8XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> -<html xmlns="http://www.w3.org/1999/xhtml";> -<head> -<meta name="generator" content= -"HTML Tidy for Linux/x86 (vers 1st March 2004), see www.w3.org" /> -<meta http-equiv="Content-Type" content= -"text/html; charset=us-ascii" /> -<link href="ublas.css" type="text/css" /> -<title>Banded Matrix</title> -</head> -<body> -<h1><img src="../../../../boost.png" align="middle" /> -Banded Matrix</h1> -<h2><a name="banded_matrix" id="banded_matrix"></a>Banded Matrix</h2> -<h4>Description</h4> -<p>The templated class <code>banded_matrix<T, F, A></code> is -the base container adaptor for banded matrices. For a <em>(m x -n</em>)-dimensional banded matrix with <em>l</em> lower and -<em>u</em> upper diagonals and <em>0 <= i < m</em>, <em>0 -<= j < n</em> holds <em>b</em><sub><em>i, j</em></sub> <em>= -0</em>, if <em>i > j + l</em> or <em>i < j - u</em>. The -storage of banded matrices is packed.</p> -<h4>Example</h4> -<pre> -#include <boost/numeric/ublas/banded.hpp> -#include <boost/numeric/ublas/io.hpp> - -int main () { - using namespace boost::numeric::ublas; - banded_matrix<double> m (3, 3, 1, 1); - for (signed i = 0; i < signed (m.size1 ()); ++ i)- for (signed j = std::max (i - 1, 0); j < std::min (i + 2, signed (m.size2 ())); ++ j)
- m (i, j) = 3 * i + j; - std::cout << m << std::endl; -} -</pre> -<h4>Definition</h4> -<p>Defined in the header banded.hpp.</p> -<h4>Template parameters</h4> -<table border="1" summary="parameters"> -<tbody> -<tr> -<th>Parameter</th> -<th>Description</th> -<th>Default</th> -</tr> -<tr> -<td><code>T</code></td> -<td>The type of object stored in the matrix.</td> -<td></td> -</tr> -<tr> -<td><code>F</code></td> -<td>Functor describing the storage organization. <a href= -"#banded_matrix_1">[1]</a></td> -<td><code>row_major</code></td> -</tr> -<tr> -<td><code>A</code></td> -<td>The type of the adapted array. <a href= -"#banded_matrix_2">[2]</a></td> -<td><code>unbounded_array<T></code></td> -</tr> -</tbody> -</table> -<h4>Model of</h4> -<p><a href="container_concept.htm#matrix">Matrix</a> .</p> -<h4>Type requirements</h4> -<p>None, except for those imposed by the requirements of <a href= -"container_concept.htm#matrix">Matrix</a> .</p> -<h4>Public base classes</h4> -<p><code>matrix_container<banded_matrix<T, F, A> -></code></p> -<h4>Members</h4> -<table border="1" summary="members"> -<tbody> -<tr> -<th>Member</th> -<th>Description</th> -</tr> -<tr> -<td><code>banded_matrix ()</code></td> -<td>Allocates an uninitialized <code>banded_matrix</code> that -holds zero rows of zero elements.</td> -</tr> -<tr> -<td><code>banded_matrix (size_type size1, size_type size2, -size_type lower = 0, size_type upper = 0)</code></td> -<td>Allocates an uninitialized <code>banded_matrix</code> that -holds <code>(lower + 1 + upper)</code> diagonals around the main -diagonal of a matrix with <code>size1</code> rows of -<code>size2</code> elements.</td> -</tr> -<tr> -<td><code>banded_matrix (const banded_matrix &m)</code></td> -<td>The copy constructor.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_matrix (const matrix_expression<AE> -&ae)</code></td> -<td>The extended copy constructor.</td> -</tr> -<tr> -<td><code>void resize (size_type size1, size_type size2, size_type -lower = 0, size_type upper = 0, bool preserve = true)</code></td> -<td>Reallocates a <code>banded_matrix</code> to hold <code>(lower + -1 + upper)</code> diagonals around the main diagonal of a matrix -with <code>size1</code> rows of <code>size2</code> elements. The -existing elements of the <code>banded_matrix</code> are preseved -when specified.</td> -</tr> -<tr> -<td><code>size_type size1 () const</code></td> -<td>Returns the number of rows.</td> -</tr> -<tr> -<td><code>size_type size2 () const</code></td> -<td>Returns the number of columns.</td> -</tr> -<tr> -<td><code>size_type lower () const</code></td> -<td>Returns the number of diagonals below the main diagonal.</td> -</tr> -<tr> -<td><code>size_type upper () const</code></td> -<td>Returns the number of diagonals above the main diagonal.</td> -</tr> -<tr> -<td><code>const_reference operator () (size_type i, size_type j) -const</code></td> -<td>Returns a <code>const</code> reference of the <code>j</code> --th element in the <code>i</code>-th row.</td> -</tr> -<tr> -<td><code>reference operator () (size_type i, size_type -j)</code></td> -<td>Returns a reference of the <code>j</code>-th element in the -<code>i</code>-th row.</td> -</tr> -<tr> -<td><code>banded_matrix &operator = (const banded_matrix -&m)</code></td> -<td>The assignment operator.</td> -</tr> -<tr> -<td><code>banded_matrix &assign_temporary (banded_matrix -&m)</code></td> -<td>Assigns a temporary. May change the banded matrix -<code>m</code> .</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_matrix &operator = (const matrix_expression<AE> -&ae)</code></td> -<td>The extended assignment operator.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_matrix &assign (const matrix_expression<AE> -&ae)</code></td> -<td>Assigns a matrix expression to the banded matrix. Left and -right hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_matrix &operator += (const matrix_expression<AE> -&ae)</code></td> -<td>A computed assignment operator. Adds the matrix expression to -the banded matrix.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_matrix &plus_assign (const matrix_expression<AE> -&ae)</code></td> -<td>Adds a matrix expression to the banded matrix. Left and right -hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_matrix &operator -= (const matrix_expression<AE> -&ae)</code></td> -<td>A computed assignment operator. Subtracts the matrix expression -from the banded matrix.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_matrix &minus_assign (const matrix_expression<AE> -&ae)</code></td> -<td>Subtracts a matrix expression from the banded matrix. Left and -right hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AT><br /> -banded_matrix &operator *= (const AT &at)</code></td> -<td>A computed assignment operator. Multiplies the banded matrix -with a scalar.</td> -</tr> -<tr> -<td><code>template<class AT><br /> -banded_matrix &operator /= (const AT &at)</code></td> -<td>A computed assignment operator. Divides the banded matrix -through a scalar.</td> -</tr> -<tr> -<td><code>void swap (banded_matrix &m)</code></td> -<td>Swaps the contents of the banded matrices.</td> -</tr> -<tr> -<td><code>void insert (size_type i, size_type j, const_reference -t)</code></td> -<td>Inserts the value <code>t</code> at the <code>j</code>-th -element of the <code>i</code>-th row.</td> -</tr> -<tr> -<td><code>void erase (size_type i, size_type j)</code></td> -<td>Erases the value at the <code>j</code>-th elemenst of the -<code>i</code>-th row.</td> -</tr> -<tr> -<td><code>void clear ()</code></td> -<td>Clears the matrix.</td> -</tr> -<tr> -<td><code>const_iterator1 begin1 () const</code></td> -<td>Returns a <code>const_iterator1</code> pointing to the -beginning of the <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>const_iterator1 end1 () const</code></td> -<td>Returns a <code>const_iterator1</code> pointing to the end of -the <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>iterator1 begin1 ()</code></td> -<td>Returns a <code>iterator1</code> pointing to the beginning of -the <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>iterator1 end1 ()</code></td> -<td>Returns a <code>iterator1</code> pointing to the end of the -<code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>const_iterator2 begin2 () const</code></td> -<td>Returns a <code>const_iterator2</code> pointing to the -beginning of the <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>const_iterator2 end2 () const</code></td> -<td>Returns a <code>const_iterator2</code> pointing to the end of -the <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>iterator2 begin2 ()</code></td> -<td>Returns a <code>iterator2</code> pointing to the beginning of -the <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>iterator2 end2 ()</code></td> -<td>Returns a <code>iterator2</code> pointing to the end of the -<code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator1 rbegin1 () const</code></td> -<td>Returns a <code>const_reverse_iterator1</code> pointing to the -beginning of the reversed <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator1 rend1 () const</code></td> -<td>Returns a <code>const_reverse_iterator1</code> pointing to the -end of the reversed <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator1 rbegin1 ()</code></td> -<td>Returns a <code>reverse_iterator1</code> pointing to the -beginning of the reversed <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator1 rend1 ()</code></td> -<td>Returns a <code>reverse_iterator1</code> pointing to the end of -the reversed <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator2 rbegin2 () const</code></td> -<td>Returns a <code>const_reverse_iterator2</code> pointing to the -beginning of the reversed <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator2 rend2 () const</code></td> -<td>Returns a <code>const_reverse_iterator2</code> pointing to the -end of the reversed <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator2 rbegin2 ()</code></td> -<td>Returns a <code>reverse_iterator2</code> pointing to the -beginning of the reversed <code>banded_matrix</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator2 rend2 ()</code></td> -<td>Returns a <code>reverse_iterator2</code> pointing to the end of -the reversed <code>banded_matrix</code>.</td> -</tr> -</tbody> -</table> -<h4>Notes</h4> -<p><a name="banded_matrix_1" id="banded_matrix_1">[1]</a> Supported -parameters for the storage organization are <code>row_major</code> -and <code>column_major</code>.</p> -<p><a name="banded_matrix_2" id="banded_matrix_2">[2]</a> Supported -parameters for the adapted array are -<code>unbounded_array<T></code> , -<code>bounded_array<T></code> and -<code>std::vector<T></code> .</p> -<h2><a name="banded_adaptor" id="banded_adaptor"></a>Banded Adaptor</h2> -<h4>Description</h4> -<p>The templated class <code>banded_adaptor<M></code> is a -banded matrix adaptor for other matrices.</p> -<h4>Example</h4> -<pre> -#include <boost/numeric/ublas/banded.hpp> -#include <boost/numeric/ublas/io.hpp> - -int main () { - using namespace boost::numeric::ublas; - matrix<double> m (3, 3); - banded_adaptor<matrix<double> > ba (m, 1, 1); - for (signed i = 0; i < signed (ba.size1 ()); ++ i)- for (signed j = std::max (i - 1, 0); j < std::min (i + 2, signed (ba.size2 ())); ++ j)
- ba (i, j) = 3 * i + j; - std::cout << ba << std::endl; -} -</pre> -<h4>Definition</h4> -<p>Defined in the header banded.hpp.</p> -<h4>Template parameters</h4> -<table border="1" summary="parameters"> -<tbody> -<tr> -<th>Parameter</th> -<th>Description</th> -<th>Default</th> -</tr> -<tr> -<td><code>M</code></td> -<td>The type of the adapted matrix.</td> -<td></td> -</tr> -</tbody> -</table> -<h4>Model of</h4> -<p><a href="expression_concept.htm#matrix_expression">Matrix Expression</a> -.</p> -<h4>Type requirements</h4> -<p>None, except for those imposed by the requirements of <a href= -"expression_concept.htm#matrix_expression">Matrix Expression</a> .</p> -<h4>Public base classes</h4> -<p><code>matrix_expression<banded_adaptor<M> -></code></p> -<h4>Members</h4> -<table border="1" summary="members"> -<tbody> -<tr> -<th>Member</th> -<th>Description</th> -</tr> -<tr> -<td><code>banded_adaptor (matrix_type &data, size_type lower = -0, size_type upper = 0)</code></td> -<td>Constructs a <code>banded_adaptor</code> that holds -<code>(lower + 1 + upper)</code> diagonals around the main diagonal -of a matrix.</td> -</tr> -<tr> -<td><code>banded_adaptor (const banded_adaptor &m)</code></td> -<td>The copy constructor.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_adaptor (const matrix_expression<AE> -&ae)</code></td> -<td>The extended copy constructor.</td> -</tr> -<tr> -<td><code>size_type size1 () const</code></td> -<td>Returns the number of rows.</td> -</tr> -<tr> -<td><code>size_type size2 () const</code></td> -<td>Returns the number of columns.</td> -</tr> -<tr> -<td><code>size_type lower () const</code></td> -<td>Returns the number of diagonals below the main diagonal.</td> -</tr> -<tr> -<td><code>size_type upper () const</code></td> -<td>Returns the number of diagonals above the main diagonal.</td> -</tr> -<tr> -<td><code>const_reference operator () (size_type i, size_type j) -const</code></td> -<td>Returns a <code>const</code> reference of the <code>j</code> --th element in the <code>i</code>-th row.</td> -</tr> -<tr> -<td><code>reference operator () (size_type i, size_type -j)</code></td> -<td>Returns a reference of the <code>j</code>-th element in the -<code>i</code>-th row.</td> -</tr> -<tr> -<td><code>banded_adaptor &operator = (const banded_adaptor -&m)</code></td> -<td>The assignment operator.</td> -</tr> -<tr> -<td><code>banded_adaptor &assign_temporary (banded_adaptor -&m)</code></td> -<td>Assigns a temporary. May change the banded adaptor -<code>m</code> .</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_adaptor &operator = (const matrix_expression<AE> -&ae)</code></td> -<td>The extended assignment operator.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_adaptor &assign (const matrix_expression<AE> -&ae)</code></td> -<td>Assigns a matrix expression to the banded adaptor. Left and -right hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_adaptor &operator += (const matrix_expression<AE> -&ae)</code></td> -<td>A computed assignment operator. Adds the matrix expression to -the banded adaptor.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_adaptor &plus_assign (const matrix_expression<AE> -&ae)</code></td> -<td>Adds a matrix expression to the banded adaptor. Left and right -hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_adaptor &operator -= (const matrix_expression<AE> -&ae)</code></td> -<td>A computed assignment operator. Subtracts the matrix expression -from the banded adaptor.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -banded_adaptor &minus_assign (const matrix_expression<AE> -&ae)</code></td> -<td>Subtracts a matrix expression from the banded adaptor. Left and -right hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AT><br /> -banded_adaptor &operator *= (const AT &at)</code></td> -<td>A computed assignment operator. Multiplies the banded adaptor -with a scalar.</td> -</tr> -<tr> -<td><code>template<class AT><br /> -banded_adaptor &operator /= (const AT &at)</code></td> -<td>A computed assignment operator. Divides the banded adaptor -through a scalar.</td> -</tr> -<tr> -<td><code>void swap (banded_adaptor &m)</code></td> -<td>Swaps the contents of the banded adaptors.</td> -</tr> -<tr> -<td><code>const_iterator1 begin1 () const</code></td> -<td>Returns a <code>const_iterator1</code> pointing to the -beginning of the <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>const_iterator1 end1 () const</code></td> -<td>Returns a <code>const_iterator1</code> pointing to the end of -the <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>iterator1 begin1 ()</code></td> -<td>Returns a <code>iterator1</code> pointing to the beginning of -the <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>iterator1 end1 ()</code></td> -<td>Returns a <code>iterator1</code> pointing to the end of the -<code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>const_iterator2 begin2 () const</code></td> -<td>Returns a <code>const_iterator2</code> pointing to the -beginning of the <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>const_iterator2 end2 () const</code></td> -<td>Returns a <code>const_iterator2</code> pointing to the end of -the <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>iterator2 begin2 ()</code></td> -<td>Returns a <code>iterator2</code> pointing to the beginning of -the <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>iterator2 end2 ()</code></td> -<td>Returns a <code>iterator2</code> pointing to the end of the -<code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator1 rbegin1 () const</code></td> -<td>Returns a <code>const_reverse_iterator1</code> pointing to the -beginning of the reversed <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator1 rend1 () const</code></td> -<td>Returns a <code>const_reverse_iterator1</code> pointing to the -end of the reversed <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator1 rbegin1 ()</code></td> -<td>Returns a <code>reverse_iterator1</code> pointing to the -beginning of the reversed <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator1 rend1 ()</code></td> -<td>Returns a <code>reverse_iterator1</code> pointing to the end of -the reversed <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator2 rbegin2 () const</code></td> -<td>Returns a <code>const_reverse_iterator2</code> pointing to the -beginning of the reversed <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator2 rend2 () const</code></td> -<td>Returns a <code>const_reverse_iterator2</code> pointing to the -end of the reversed <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator2 rbegin2 ()</code></td> -<td>Returns a <code>reverse_iterator2</code> pointing to the -beginning of the reversed <code>banded_adaptor</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator2 rend2 ()</code></td> -<td>Returns a <code>reverse_iterator2</code> pointing to the end of -the reversed <code>banded_adaptor</code>.</td> -</tr> -</tbody> -</table> -<hr /> -<p>Copyright (©) 2000-2002 Joerg Walter, Mathias Koch<br /> - Use, modification and distribution are subject to the - Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt - or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> - http://www.boost.org/LICENSE_1_0.txt</a>). -</p> -</body> -</html> +<!DOCTYPE html PUBLIC "-//W3C/utf-8XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> +<html xmlns="http://www.w3.org/1999/xhtml";> +<head> +<meta name="generator" content= +"HTML Tidy for Linux/x86 (vers 1st March 2004), see www.w3.org" /> +<meta http-equiv="Content-Type" content= +"text/html; charset=UTF-8" /> +<link href="ublas.css" type="text/css" /> +<title>Banded Matrix</title> +</head> +<body> +<h1><img src="../../../../boost.png" align="middle" /> +带状矩阵(Banded Matrix)</h1>+<h2><a name="banded_matrix" id="banded_matrix"></a>带状矩阵(Banded Matrix)</h2>
+<h4>说明</h4>+<p>模板类<code>banded_matrix<T, F, A></code> 是带状矩阵的基容器适配器 ( base container adaptor )。对于一个<em>(m x +n</em>)-维带状矩阵且有<em>l</em> 条下对角线和<em>u</em> 条上对角线且<em>0 <= i < m</em>, <em>0 +<= j < n</em> ,如果 <em>i > j + l</em> or <em>i < j - u</em>,那么就满足<em>b</em><sub><em>i, j</em></sub> <em>=
+0</em>。带状矩阵的存储是紧密的(packed)。</p> +<h4>例子</h4> +<pre> +#include <boost/numeric/ublas/banded.hpp> +#include <boost/numeric/ublas/io.hpp> + +int main () { + using namespace boost::numeric::ublas; + banded_matrix<double> m (3, 3, 1, 1); + for (signed i = 0; i < signed (m.size1 ()); ++ i)+ for (signed j = std::max (i - 1, 0); j < std::min (i + 2, signed (m.size2 ())); ++ j)
+ m (i, j) = 3 * i + j; + std::cout << m << std::endl; +} +</pre> +<h4>定义</h4> +<p>定义在头文件 banded.hpp 中。</p> +<h4>模板参数</h4> +<table border="1" summary="parameters"> +<tbody> +<tr> +<th>参数</th> +<th>说明</th> +<th>缺省值</th> +</tr> +<tr> +<td><code>T</code></td> +<td>存储在矩阵中的对象的类型。</td> +<td></td> +</tr> +<tr> +<td><code>F</code></td> +<td>描述存储组织的函数对象。 <a href= +"#banded_matrix_1">[1]</a></td> +<td><code>row_major</code></td> +</tr> +<tr> +<td><code>A</code></td> +<td>适配数组(adapted array)的类型。 <a href= +"#banded_matrix_2">[2]</a></td> +<td><code>unbounded_array<T></code></td> +</tr> +</tbody> +</table> +<h4>模型(Model of)</h4> +<p><a href="container_concept.htm#matrix">矩阵(Matrix)</a> 。 </p> +<h4>类型要求(Type requirements)</h4> +<p>没有,除了由<a href= +"container_concept.htm#matrix">矩阵(Matrix)</a> 所施加的类型要求。 </p> +<h4>公有基类(Public base classes)</h4> +<p><code>matrix_container<banded_matrix<T, F, A> +></code></p> +<h4>成员</h4> +<table border="1" summary="members"> +<tbody> +<tr> +<th>成员</th> +<th>说明</th> +</tr> +<tr> +<td><code>banded_matrix ()</code></td> +<td>分配一个包含0行0个元素的未初始化的<code>banded_matrix</code>。</td> +</tr> +<tr> +<td><code>banded_matrix (size_type size1, size_type size2, +size_type lower = 0, size_type upper = 0)</code></td> +<td>分配一个包含未初始化的<code>size1</code>行+<code>size2</code>个元素的<code>banded_matrix</code>。在主对称角周围有 <code>(lower + 1 + upper)</code>条对角线。</td>
+</tr> +<tr> +<td><code>banded_matrix (const banded_matrix &m)</code></td> +<td>拷贝构造函数。</td> +</tr> +<tr> +<td><code>template<class AE><br /> +banded_matrix (const matrix_expression<AE> +&ae)</code></td> +<td>扩展拷贝构造函数。</td> +</tr> +<tr> +<td><code>void resize (size_type size1, size_type size2, size_type +lower = 0, size_type upper = 0, bool preserve = true)</code></td> +<td>重新分配一个未初始化的<code>size1</code>行+<code>size2</code>个元素的<code>banded_matrix</code>。在主对称角周围有 <code>(lower + 1 + upper)</code>条对角线。
+如果指定,<code>banded_matrix</code>中已经存在的元素将会被保留。</td> +</tr> +<tr> +<td><code>size_type size1 () const</code></td> +<td>返回行数。</td> +</tr> +<tr> +<td><code>size_type size2 () const</code></td> +<td>返回列数。</td> +</tr> +<tr> +<td><code>size_type lower () const</code></td> +<td>返回在主对称线之下的对角线数。</td> +</tr> +<tr> +<td><code>size_type upper () const</code></td> +<td>返回在主对角线之上的对角线数。</td> +</tr> +<tr> +<td><code>const_reference operator () (size_type i, size_type j) +const</code></td>+<td>返回第<code>i</code>-th行第<code>i</code>-th的元素的 <code>const</code>引用。</td>
+</tr> +<tr> +<td><code>reference operator () (size_type i, size_type +j)</code></td> +<td>返回第<code>i</code>-th行第<code>i</code>-th的元素的引用。</td> +</tr> +<tr> +<td><code>banded_matrix &operator = (const banded_matrix +&m)</code></td> +<td>赋值运算符。</td> +</tr> +<tr> +<td><code>banded_matrix &assign_temporary (banded_matrix +&m)</code></td> +<td>赋值给一个临时变量。可能会改变带状矩阵<code>m</code>。</td> +</tr> +<tr> +<td><code>template<class AE><br /> +banded_matrix &operator = (const matrix_expression<AE> +&ae)</code></td> +<td>扩展的赋值运算符。</td> +</tr> +<tr> +<td><code>template<class AE><br /> +banded_matrix &assign (const matrix_expression<AE> +&ae)</code></td>+<td>将一个矩阵表达式赋给一个带状矩阵。赋值的左边和右边应当是相互独立的。 </td>
+</tr> +<tr> +<td><code>template<class AE><br /> +banded_matrix &operator += (const matrix_expression<AE> +&ae)</code></td>+<td>一个运算赋值运算符(computed assignment operator)。将一个矩阵表达式加到 一个带状矩阵。</td>
+</tr> +<tr> +<td><code>template<class AE><br /> +banded_matrix &plus_assign (const matrix_expression<AE> +&ae)</code></td>+<td>将一个矩阵表达式加到一个带状矩阵。赋值的左边和右边应当是相互独立的。 </td>
+</tr> +<tr> +<td><code>template<class AE><br /> +banded_matrix &operator -= (const matrix_expression<AE> +&ae)</code></td>+<td>一个运算赋值运算符(computed assignment operator)。从一个带状矩阵中减去 一个矩阵表达式。</td>
+</tr> +<tr> +<td><code>template<class AE><br /> +banded_matrix &minus_assign (const matrix_expression<AE> +&ae)</code></td>+<td>从一个带状矩阵中减去一个矩阵表达式。赋值的左边和右边应当是相互独立的。 </td>
+</tr> +<tr> +<td><code>template<class AT><br /> +banded_matrix &operator *= (const AT &at)</code></td>+<td>一个运算赋值运算符(computed assignment operator)。将一个带状矩阵乘以一 个标量。</td>
+</tr> +<tr> +<td><code>template<class AT><br /> +banded_matrix &operator /= (const AT &at)</code></td>+<td>一个运算赋值运算符(computed assignment operator)。将一个带状矩阵除以一 个标量。</td>
+</tr> +<tr> +<td><code>void swap (banded_matrix &m)</code></td> +<td>交换带状矩阵的内容。</td> +</tr> +<tr> +<td><code>void insert (size_type i, size_type j, const_reference +t)</code></td> +<td>将<code>t</code>插入到第<code>i</code>-th行 +第<code>j</code>-th列。</td> +</tr> +<tr> +<td><code>void erase (size_type i, size_type j)</code></td> +<td>删除第<code>i</code>-th行第<code>j</code>-th列的元素。</td> +</tr> +<tr> +<td><code>void clear ()</code></td> +<td>清除矩阵。</td> +</tr> +<tr> +<td><code>const_iterator1 begin1 () const</code></td>+<td>返回指向<code>banded_matrix</code>开始处的 <code>const_iterator1</code>。</td>
+</tr> +<tr> +<td><code>const_iterator1 end1 () const</code></td>+<td>返回指向<code>banded_matrix</code>终止处的 <code>const_iterator1</code>。</td>
+</tr> +<tr> +<td><code>iterator1 begin1 ()</code></td> +<td>返回指向<code>banded_matrix</code>开始处的<code>iterator1</code>。</td> +</tr> +<tr> +<td><code>iterator1 end1 ()</code></td> +<td>返回指向<code>banded_matrix</code>终止处的<code>iterator1</code>。</td> +</tr> +<tr> +<td><code>const_iterator2 begin2 () const</code></td>+<td>返回指向<code>banded_matrix</code>开始处的 <code>const_iterator2</code>。</td>
+</tr> +<tr> +<td><code>const_iterator2 end2 () const</code></td>+<td>返回指向<code>banded_matrix</code>终止处的 <code>const_iterator2</code>。</td>
+</tr> +<tr> +<td><code>iterator2 begin2 ()</code></td> +<td>返回指向<code>banded_matrix</code>开始处的<code>iterator2</code>。</td> +</tr> +<tr> +<td><code>iterator2 end2 ()</code></td> +<td>返回指向<code>banded_matrix</code>终止处的<code>iterator2</code>。</td> +</tr> +<tr> +<td><code>const_reverse_iterator1 rbegin1 () const</code></td>+<td>返回指向反转的(reversed)<code>banded_matrix</code>开始处的 <code>const_reverse_iterator1</code>。</td>
+</tr> +<tr> +<td><code>const_reverse_iterator1 rend1 () const</code></td>+<td>返回指向反转的(reversed)<code>banded_matrix</code>终止处的 <code>const_reverse_iterator1</code>。</td>
+</tr> +<tr> +<td><code>reverse_iterator1 rbegin1 ()</code></td>+<td>返回指向反转的(reversed)<code>banded_matrix</code>开始处的 <code>reverse_iterator1</code>。</td>
+</tr> +<tr> +<td><code>reverse_iterator1 rend1 ()</code></td>+<td>返回指向反转的(reversed)<code>banded_matrix</code>终止处的 <code>reverse_iterator1</code>。</td>
+</tr> +<tr> +<td><code>const_reverse_iterator2 rbegin2 () const</code></td>+<td>返回指向反转的(reversed)<code>banded_matrix</code>开始处的 <code>const_reverse_iterator2</code>。</td>
+</tr> +<tr> +<td><code>const_reverse_iterator2 rend2 () const</code></td>+<td>返回指向反转的(reversed)<code>banded_matrix</code>终止处的 <code>const_reverse_iterator2</code>。</td>
+</tr> +<tr> +<td><code>reverse_iterator2 rbegin2 ()</code></td>+<td>返回指向反转的(reversed)<code>banded_matrix</code>开始处的 <code>reverse_iterator2</code>。</td>
+</tr> +<tr> +<td><code>reverse_iterator2 rend2 ()</code></td>+<td>返回指向反转的(reversed)<code>banded_matrix</code>终止处的 <code>reverse_iterator2</code>。</td>
+</tr> +</tbody> +</table> +<h4>注意</h4>+<p><a name="banded_matrix_1" id="banded_matrix_1">[1]</a> 对于存储组织所支 持的参数是<code>row_major</code> 和
+<code>column_major</code>。</p>+<p><a name="banded_matrix_2" id="banded_matrix_2">[2]</a> 对于适配数组 (adapted array)所支持的参数是<code>unbounded_array<T></code> , +<code>bounded_array<T></code> 和 <code>std::vector<T></code> 。 </p> +<h2><a name="banded_adaptor" id="banded_adaptor"></a>带状适配器(Banded Adaptor)</h2>
+<h4>说明</h4>+<p>模板类<code>banded_adaptor<M></code> 是一个其它的矩阵的带状矩阵适 配器(
+banded matrix adaptor )。</p> +<h4>例子</h4> +<pre> +#include <boost/numeric/ublas/banded.hpp> +#include <boost/numeric/ublas/io.hpp> + +int main () { + using namespace boost::numeric::ublas; + matrix<double> m (3, 3); + banded_adaptor<matrix<double> > ba (m, 1, 1); + for (signed i = 0; i < signed (ba.size1 ()); ++ i)+ for (signed j = std::max (i - 1, 0); j < std::min (i + 2, signed (ba.size2 ())); ++ j)
+ ba (i, j) = 3 * i + j; + std::cout << ba << std::endl; +} +</pre> +<h4>定义</h4> +<p>定义在头文件 banded.hpp 中。 </p> +<h4>模板参数</h4> +<table border="1" summary="parameters"> +<tbody> +<tr> +<th>参数</th> +<th>说明</th> +<th>缺省值</th> +</tr> +<tr> +<td><code>M</code></td> +<td>适配矩阵(adapted matrix)的类型。</td> +<td></td> +</tr> +</tbody> +</table> +<h4>模型(Model of)</h4>+<p><a href="expression_concept.htm#matrix_expression">矩阵表达式(Matrix Expression)</a> 。
+</p> +<h4>类型要求(Type requirements)</h4> +<p>没有,除了由<a href=+"expression_concept.htm#matrix_expression">矩阵表达式(Matrix Expression)</a> 所施加的类型要求。 </p>
+<h4>公有基类(Public base classes)</h4> +<p><code>matrix_expression<banded_adaptor<M> +></code></p> +<h4>成员</h4> +<table border="1" summary="members"> +<tbody> +<tr> +<th>成员</th> +<th>说明</th> +</tr> +<tr> +<td><code>banded_adaptor (matrix_type &data, size_type lower = +0, size_type upper = 0)</code></td>+<td>分配一个在主对角线周围有<code>(lower + 1 + upper)</code>条对角线的 <code>banded_adaptor</code>。</td>
+</tr> +<tr> +<td><code>banded_adaptor (const banded_adaptor &m)</code></td> +<td>拷贝构造函数。</td> +</tr> +<tr> +<td><code>template<class AE><br /> +banded_adaptor (const matrix_expression<AE> +&ae)</code></td> +<td>扩展拷贝构造函数。</td> +</tr> +<tr> +<td><code>size_type size1 () const</code></td> +<td>返回行数。</td> +</tr> +<tr> +<td><code>size_type size2 () const</code></td> +<td>返回列数。</td> +</tr> +<tr> +<td><code>size_type lower () const</code></td> +<td>返回在主对角线之下的对角线数。</td> +</tr> +<tr> +<td><code>size_type upper () const</code></td> +<td>返回在主对角线之上的对角线数。</td> +</tr> +<tr> +<td><code>const_reference operator () (size_type i, size_type j) +const</code></td>+<td>返回指向第<code>i</code>行第<code>j</code>列的元素的 <code>const</code>引用。</td>
+</tr> +<tr> +<td><code>reference operator () (size_type i, size_type +j)</code></td> +<td>返回指向第<code>i</code>行第<code>j</code>列的元素的引用。</td> +</tr> +<tr> +<td><code>banded_adaptor &operator = (const banded_adaptor +&m)</code></td> +<td>赋值运算符。</td> +</tr> +<tr> +<td><code>banded_adaptor &assign_temporary (banded_adaptor +&m)</code></td> +<td>赋值给一个临时变量。可能会改变带状矩阵 +<code>m</code>。</td> +</tr> +<tr> +<td><code>template<class AE><br /> +banded_adaptor &operator = (const matrix_expression<AE> +&ae)</code></td> +<td>扩展赋值运算符。</td> +</tr> +<tr> +<td><code>template<class AE><br /> +banded_adaptor &assign (const matrix_expression<AE> +&ae)</code></td>+<td>将一个矩阵表达式赋给一个带状适配器(banded adaptor)。赋值的左边和右边应 当是相互独立的。</td>
+</tr> +<tr> +<td><code>template<class AE><br /> +banded_adaptor &operator += (const matrix_expression<AE> +&ae)</code></td>+<td>一个运算赋值运算符(computed assignment operator)。将一个矩阵表达式加到 一个带状矩阵中。</td>
+</tr> +<tr> +<td><code>template<class AE><br /> +banded_adaptor &plus_assign (const matrix_expression<AE> +&ae)</code></td>+<td>将一个矩阵表达式加到一个带状矩阵中。赋值的左边和右边应当是相互独立的。 </td>
+</tr> +<tr> +<td><code>template<class AE><br /> +banded_adaptor &operator -= (const matrix_expression<AE> +&ae)</code></td>+<td>一个运算赋值运算符(computed assignment operator)。从带状矩阵中减去一个 矩阵表达式。</td>
+</tr> +<tr> +<td><code>template<class AE><br /> +banded_adaptor &minus_assign (const matrix_expression<AE> +&ae)</code></td>+<td>从带状适配器(banded adaptor)中减去一个矩阵表达式。赋值的左边和右边应当 是相互独立的。</td>
+</tr> +<tr> +<td><code>template<class AT><br /> +banded_adaptor &operator *= (const AT &at)</code></td>+<td>一个运算赋值运算符(computed assignment operator)。 将一个带状适配器 (banded adaptor)乘以一个标量。</td>
+</tr> +<tr> +<td><code>template<class AT><br /> +banded_adaptor &operator /= (const AT &at)</code></td>+<td>一个运算赋值运算符(computed assignment operator)。 将一个带状适配器 (banded adaptor)除以一个标量。</td>
+</tr> +<tr> +<td><code>void swap (banded_adaptor &m)</code></td> +<td>交换带状适配器的内容。</td> +</tr> +<tr> +<td><code>const_iterator1 begin1 () const</code></td>+<td>返回指向<code>banded_adaptor</code>开始处的 <code>const_iterator1</code>。</td>
+</tr> +<tr> +<td><code>const_iterator1 end1 () const</code></td>+<td>返回指向<code>banded_adaptor</code>终止处的 <code>const_iterator1</code>。</td>
+</tr> +<tr> +<td><code>iterator1 begin1 ()</code></td>+<td>返回指向<code>banded_adaptor</code>开始处的<code>iterator1</code>。 </td>
+</tr> +<tr> +<td><code>iterator1 end1 ()</code></td>+<td>返回指向<code>banded_adaptor</code>终止处的<code>iterator1</code>。 </td>
+</tr> +<tr> +<td><code>const_iterator2 begin2 () const</code></td>+<td>返回指向<code>banded_adaptor</code>开始处的 <code>const_iterator2</code>。</td>
+</tr> +<tr> +<td><code>const_iterator2 end2 () const</code></td>+<td>返回指向<code>banded_adaptor</code>终止处的 <code>const_iterator2</code>。</td>
+</tr> +<tr> +<td><code>iterator2 begin2 ()</code></td>+<td>返回指向<code>banded_adaptor</code>开始处的<code>iterator2</code>。 </td>
+</tr> +<tr> +<td><code>iterator2 end2 ()</code></td>+<td>返回指向<code>banded_adaptor</code>终止处的<code>iterator2</code>。 </td>
+</tr> +<tr> +<td><code>const_reverse_iterator1 rbegin1 () const</code></td>+<td>返回指向反转的(reversed)<code>banded_adaptor</code>开始处的 <code>const_reverse_iterator1</code>。</td>
+</tr> +<tr> +<td><code>const_reverse_iterator1 rend1 () const</code></td>+<td>返回指向反转的(reversed)<code>banded_adaptor</code>终止处的 <code>const_reverse_iterator1</code>。</td>
+</tr> +<tr> +<td><code>reverse_iterator1 rbegin1 ()</code></td>+<td>返回指向反转的(reversed)<code>banded_adaptor</code>开始处的 <code>reverse_iterator1</code>。</td>
+</tr> +<tr> +<td><code>reverse_iterator1 rend1 ()</code></td>+<td>返回指向反转的(reversed)<code>banded_adaptor</code>终止处的 <code>reverse_iterator1</code>。</td>
+</tr> +<tr> +<td><code>const_reverse_iterator2 rbegin2 () const</code></td>+<td>返回指向反转的(reversed)<code>banded_adaptor</code>开始处的 <code>const_reverse_iterator2</code>。</td>
+</tr> +<tr> +<td><code>const_reverse_iterator2 rend2 () const</code></td>+<td>返回指向反转的(reversed)<code>banded_adaptor</code>终止处的 <code>const_reverse_iterator2</code>。</td>
+</tr> +<tr> +<td><code>reverse_iterator2 rbegin2 ()</code></td>+<td>返回指向反转的(reversed)<code>banded_adaptor</code>开始处的 <code>reverse_iterator2</code>。</td>
+</tr> +<tr> +<td><code>reverse_iterator2 rend2 ()</code></td>+<td>返回指向反转的(reversed)<code>banded_adaptor</code>终止处的 <code>reverse_iterator2</code>。</td>
+</tr> +</tbody> +</table> +<hr /> +<p>Copyright (©) 2000-2002 Joerg Walter, Mathias Koch<br /> + Use, modification and distribution are subject to the + Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt + or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> + http://www.boost.org/LICENSE_1_0.txt</a>). +</p> +</body> +</html> Modified: trunk/libs/numeric/ublas/doc/blas.htm ============================================================================== --- trunk/libs/numeric/ublas/doc/blas.htm (original) +++ trunk/libs/numeric/ublas/doc/blas.htm Wed Jan 7 23:44:16 2009 @@ -1,444 +1,443 @@ -<?xml version="1.0" encoding="UTF-8"?>-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
-<html xmlns="http://www.w3.org/1999/xhtml";> -<head> - <title>BLAS</title> - <meta name="GENERATOR" content="Quanta Plus" /> - <meta name="AUTHOR" content="Gunter Winkler" /> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" type="text/css" href="ublas.css" /> - <link rel="stylesheet" type="text/css" href="doxygen.css" /> -</head> -<body> - - -<h1>Level 3 BLAS</h1> -<hr /> -<a name="_details"></a> - -<table summary="" border=0 cellpadding=0 cellspacing=0> -<tr><td></td></tr> -<tr><td colspan=2><br /><h2>Functions</h2></td></tr>-<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T, class M2, class M3> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga0">boost::numeric::ublas::blas_3::tmm</a> (M1 &m1, const T &t, const M2 &m2, const M3 &m3)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">triangular matrix multiplication <a href="#ga0"></a><br /><br /></td></tr> -<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T, class M2, class C> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga1">boost::numeric::ublas::blas_3::tsm</a> (M1 &m1, const T &t, const M2 &m2, C)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">triangular solve <em>m2</em> * <em>x</em> = <em>t</em> * <em>m1</em> in place, <em>m2</em> is a triangular matrix <a href="#ga1"></a><br /><br /></td></tr> -<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2, class M3> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga2">boost::numeric::ublas::blas_3::gmm</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">general matrix multiplication <a href="#ga2"></a><br /><br /></td></tr> -<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga3">boost::numeric::ublas::blas_3::srk</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">symmetric rank k update: <em>m1</em> = <em>t</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m2<sup>T</sup></em>) <a href="#ga3"></a><br /><br /></td></tr> -<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga4">boost::numeric::ublas::blas_3::hrk</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">hermitian rank k update: <em>m1</em> = <em>t</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m2<sup>H</sup></em>) <a href="#ga4"></a><br /><br /></td></tr> -<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2, class M3> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga5">boost::numeric::ublas::blas_3::sr2k</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">generalized symmetric rank k update: <em>m1</em> = <em>t1</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m3<sup>T</sup></em>) + <em>t2</em> * (<em>m3</em> * <em>m2<sup>T</sup></em>) <a href="#ga5"></a><br /><br /></td></tr> -<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2, class M3> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga6">boost::numeric::ublas::blas_3::hr2k</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">generalized hermitian rank k update: <em>m1</em> = <em>t1</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m3<sup>H</sup></em>) + (<em>m3</em> * (<em>t2</em> * <em>m2</em>)<sup>H</sup>) <a href="#ga6"></a><br /><br /></td></tr> -<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M, class E1, class E2> BOOST_UBLAS_INLINE M & </td><td class="memItemRight" valign=bottom><a class="el" href="products.htm#ga7">boost::numeric::ublas::axpy_prod</a> (const matrix_expression< E1 > &e1, const matrix_expression< E2 > &e2, M &m, bool init=true)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">computes <code>M += A X</code> or <code>M = A X</code> in an optimized fashion. <a href="products.htm#ga7"></a><br /><br /></td></tr> -<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M, class E1, class E2> BOOST_UBLAS_INLINE M & </td><td class="memItemRight" valign=bottom><a class="el" href="products.htm#ga8">boost::numeric::ublas::opb_prod</a> (const matrix_expression< E1 > &e1, const matrix_expression< E2 > &e2, M &m, bool init=true)</td></tr>
--<tr><td class="mdescLeft"> </td><td class="mdescRight">computes <code>M += A X</code> or <code>M = A X</code> in an optimized fashion. <a href="products.htm#ga8"></a><br /><br /></td></tr>
-</table> - -<hr /> - -<h2>Function Documentation</h2> --<a class="anchor" name="ga0" doxytag="boost::numeric::ublas::blas_3::tmm"
-<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
- <tr> - <td class="mdRow"> - <table summary="" cellpadding="0" cellspacing="0" border="0"> - <tr> - <td class="md" nowrap valign="top"> M1& tmm </td> - <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top">M1 & </td> - <td class="mdname" nowrap> <em>m1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T & </td> - <td class="mdname" nowrap> <em>t</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M2 & </td> - <td class="mdname" nowrap> <em>m2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M3 & </td> - <td class="mdname" nowrap> <em>m3</em></td> - </tr> - <tr> - <td></td> - <td class="md">) </td> - <td class="md" colspan="2"></td> - </tr> - </table> - </td> - </tr> -</table> -<table summary="" cellspacing=5 cellpadding=0 border=0> - <tr> - <td> - - </td> - <td> -<p>triangular matrix multiplication </p> - </td> - </tr> -</table>-<a class="anchor" name="ga1" doxytag="boost::numeric::ublas::blas_3::tsm"
-<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
- <tr> - <td class="mdRow"> - <table summary="" cellpadding="0" cellspacing="0" border="0"> - <tr> - <td class="md" nowrap valign="top"> M1& tsm </td> - <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top">M1 & </td> - <td class="mdname" nowrap> <em>m1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T & </td> - <td class="mdname" nowrap> <em>t</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M2 & </td> - <td class="mdname" nowrap> <em>m2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>C </td> - <td class="mdname" nowrap></td> - </tr> - <tr> - <td></td> - <td class="md">) </td> - <td class="md" colspan="2"></td> - </tr> - </table> - </td> - </tr> -</table> -<table summary="" cellspacing=5 cellpadding=0 border=0> - <tr> - <td> - - </td> - <td> - -<p>-triangular solve <em>m2</em> * <em>x</em> = <em>t</em> * <em>m1</em> in place, <em>m2</em> is a triangular matrix
-</p> - </td> - </tr> -</table>-<a class="anchor" name="ga2" doxytag="boost::numeric::ublas::blas_3::gmm"
-<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
- <tr> - <td class="mdRow"> - <table summary="" cellpadding="0" cellspacing="0" border="0"> - <tr> - <td class="md" nowrap valign="top"> M1& gmm </td> - <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top">M1 & </td> - <td class="mdname" nowrap> <em>m1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T1 & </td> - <td class="mdname" nowrap> <em>t1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T2 & </td> - <td class="mdname" nowrap> <em>t2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M2 & </td> - <td class="mdname" nowrap> <em>m2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M3 & </td> - <td class="mdname" nowrap> <em>m3</em></td> - </tr> - <tr> - <td></td> - <td class="md">) </td> - <td class="md" colspan="2"></td> - </tr> - </table> - </td> - </tr> -</table> -<table summary="" cellspacing=5 cellpadding=0 border=0> - <tr> - <td> - - </td> - <td> - -<p> -general matrix multiplication -</p> - </td> - </tr> -</table>-<a class="anchor" name="ga3" doxytag="boost::numeric::ublas::blas_3::srk"
-<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
- <tr> - <td class="mdRow"> - <table summary="" cellpadding="0" cellspacing="0" border="0"> - <tr> - <td class="md" nowrap valign="top"> M1& srk </td> - <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top">M1 & </td> - <td class="mdname" nowrap> <em>m1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T1 & </td> - <td class="mdname" nowrap> <em>t1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T2 & </td> - <td class="mdname" nowrap> <em>t2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M2 & </td> - <td class="mdname" nowrap> <em>m2</em></td> - </tr> - <tr> - <td></td> - <td class="md">) </td> - <td class="md" colspan="2"></td> - </tr> - </table> - </td> - </tr> -</table> -<table summary="" cellspacing=5 cellpadding=0 border=0> - <tr> - <td> - - </td> - <td> - -<p>-symmetric rank k update: <em>m1</em> = <em>t</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m2<sup>T</sup></em>)
-</p> -<dl compact><dt><b>Todo:</b></dt><dd>use opb_prod() </dd></dl> - </td> - </tr> -</table>-<a class="anchor" name="ga4" doxytag="boost::numeric::ublas::blas_3::hrk"
-<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
- <tr> - <td class="mdRow"> - <table summary="" cellpadding="0" cellspacing="0" border="0"> - <tr> - <td class="md" nowrap valign="top"> M1& hrk </td> - <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top">M1 & </td> - <td class="mdname" nowrap> <em>m1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T1 & </td> - <td class="mdname" nowrap> <em>t1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T2 & </td> - <td class="mdname" nowrap> <em>t2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M2 & </td> - <td class="mdname" nowrap> <em>m2</em></td> - </tr> - <tr> - <td></td> - <td class="md">) </td> - <td class="md" colspan="2"></td> - </tr> - </table> - </td> - </tr> -</table> -<table summary="" cellspacing=5 cellpadding=0 border=0> - <tr> - <td> - - </td> - <td> - -<p>-hermitian rank k update: <em>m1</em> = <em>t</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m2<sup>H</sup></em>)
-</p> -<dl compact><dt><b>Todo:</b></dt><dd>use opb_prod()</dd></dl> - </td> - </tr> -</table>-<a class="anchor" name="ga5" doxytag="boost::numeric::ublas::blas_3::sr2k"
-<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
- <tr> - <td class="mdRow"> - <table summary="" cellpadding="0" cellspacing="0" border="0"> - <tr> - <td class="md" nowrap valign="top"> M1& sr2k </td> - <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top">M1 & </td> - <td class="mdname" nowrap> <em>m1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T1 & </td> - <td class="mdname" nowrap> <em>t1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T2 & </td> - <td class="mdname" nowrap> <em>t2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M2 & </td> - <td class="mdname" nowrap> <em>m2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M3 & </td> - <td class="mdname" nowrap> <em>m3</em></td> - </tr> - <tr> - <td></td> - <td class="md">) </td> - <td class="md" colspan="2"></td> - </tr> - </table> - </td> - </tr> -</table> -<table summary="" cellspacing=5 cellpadding=0 border=0> - <tr> - <td> - - </td> - <td> - -<p>-generalized symmetric rank k update: <em>m1</em> = <em>t1</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m3<sup>T</sup></em>) + <em>t2</em> * (<em>m3</em> * <em>m2<sup>T</sup></em>)
-</p> -<dl compact><dt><b>Todo:</b></dt><dd>use opb_prod()</dd></dl> - </td> - </tr> -</table>-<a class="anchor" name="ga6" doxytag="boost::numeric::ublas::blas_3::hr2k"
-<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
- <tr> - <td class="mdRow"> - <table summary="" cellpadding="0" cellspacing="0" border="0"> - <tr> - <td class="md" nowrap valign="top"> M1& hr2k </td> - <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top">M1 & </td> - <td class="mdname" nowrap> <em>m1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T1 & </td> - <td class="mdname" nowrap> <em>t1</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const T2 & </td> - <td class="mdname" nowrap> <em>t2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M2 & </td> - <td class="mdname" nowrap> <em>m2</em>, </td> - </tr> - <tr> - <td class="md" nowrap align="right"></td> - <td></td> - <td class="md" nowrap>const M3 & </td> - <td class="mdname" nowrap> <em>m3</em></td> - </tr> - <tr> - <td></td> - <td class="md">) </td> - <td class="md" colspan="2"></td> - </tr> - </table> - </td> - </tr> -</table> -<table summary="" cellspacing=5 cellpadding=0 border=0> - <tr> - <td> - - </td> - <td> - -<p>-generalized hermitian rank k update: <em>m1</em> = <em>t1</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m3<sup>H</sup></em>) + (<em>m3</em> * (<em>t2</em> * <em>m2</em>)<sup>H</sup>)
-</p> -<dl compact><dt><b>Todo:</b></dt><dd>use opb_prod()</dd></dl> - </td> - </tr> -</table> - - - -<hr /> -<p>Copyright (©) 2000-2004 Michael Stevens, Mathias Koch, -Joerg Walter, Gunter Winkler<br /> -Use, modification and distribution are subject to the -Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt -or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> -http://www.boost.org/LICENSE_1_0.txt</a>). -</p> -</body> -</html> +<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";> +<head> + <title>BLAS</title> + <meta name="GENERATOR" content="Quanta Plus" /> + <meta name="AUTHOR" content="Gunter Winkler" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <link rel="stylesheet" type="text/css" href="ublas.css" /> + <link rel="stylesheet" type="text/css" href="doxygen.css" /> +</head> +<body> + + +<h1>Level 3 BLAS</h1> +<hr /> +<a name="_details"></a> + +<table summary="" border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br /> +<h2>函数</h2></td></tr>+<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T, class M2, class M3> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga0">boost::numeric::ublas::blas_3::tmm</a> (M1 &m1, const T &t, const M2 &m2, const M3 &m3)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">triangular matrix multiplication <a href="#ga0"></a><br /><br /></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T, class M2, class C> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga1">boost::numeric::ublas::blas_3::tsm</a> (M1 &m1, const T &t, const M2 &m2, C)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">triangular solve <em>m2</em> * <em>x</em> = <em>t</em> * <em>m1</em> in place, <em>m2</em> is a triangular matrix <a href="#ga1"></a><br /><br /></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2, class M3> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga2">boost::numeric::ublas::blas_3::gmm</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">general matrix multiplication <a href="#ga2"></a><br /><br /></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga3">boost::numeric::ublas::blas_3::srk</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">symmetric rank k update: <em>m1</em> = <em>t</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m2<sup>T</sup></em>) <a href="#ga3"></a><br /><br /></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga4">boost::numeric::ublas::blas_3::hrk</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">hermitian rank k update: <em>m1</em> = <em>t</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m2<sup>H</sup></em>) <a href="#ga4"></a><br /><br /></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2, class M3> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga5">boost::numeric::ublas::blas_3::sr2k</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">generalized symmetric rank k update: <em>m1</em> = <em>t1</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m3<sup>T</sup></em>) + <em>t2</em> * (<em>m3</em> * <em>m2<sup>T</sup></em>) <a href="#ga5"></a><br /><br /></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M1, class T1, class T2, class M2, class M3> M1 & </td><td class="memItemRight" valign=bottom><a class="el" href="#ga6">boost::numeric::ublas::blas_3::hr2k</a> (M1 &m1, const T1 &t1, const T2 &t2, const M2 &m2, const M3 &m3)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">generalized hermitian rank k update: <em>m1</em> = <em>t1</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m3<sup>H</sup></em>) + (<em>m3</em> * (<em>t2</em> * <em>m2</em>)<sup>H</sup>) <a href="#ga6"></a><br /><br /></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M, class E1, class E2> BOOST_UBLAS_INLINE M & </td><td class="memItemRight" valign=bottom><a class="el" href="products.htm#ga7">boost::numeric::ublas::axpy_prod</a> (const matrix_expression< E1 > &e1, const matrix_expression< E2 > &e2, M &m, bool init=true)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">computes <code>M += A X</code> or <code>M = A X</code> in an optimized fashion. <a href="products.htm#ga7"></a><br /><br /></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>template<class M, class E1, class E2> BOOST_UBLAS_INLINE M & </td><td class="memItemRight" valign=bottom><a class="el" href="products.htm#ga8">boost::numeric::ublas::opb_prod</a> (const matrix_expression< E1 > &e1, const matrix_expression< E2 > &e2, M &m, bool init=true)</td></tr>
++<tr><td class="mdescLeft"> </td><td class="mdescRight">computes <code>M += A X</code> or <code>M = A X</code> in an optimized fashion. <a href="products.htm#ga8"></a><br /><br /></td></tr>
+</table> + +<hr /> + +<h2>函数文档</h2> ++<a class="anchor" name="ga0" doxytag="boost::numeric::ublas::blas_3::tmm"
+<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
+ <tr> + <td class="mdRow"> + <table summary="" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> M1& tmm </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">M1 & </td> + <td class="mdname" nowrap> <em>m1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T & </td> + <td class="mdname" nowrap> <em>t</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M2 & </td> + <td class="mdname" nowrap> <em>m2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M3 & </td> + <td class="mdname" nowrap> <em>m3</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table summary="" cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> +<p>三角矩阵乘法</p> + </td> + </tr> +</table>+<a class="anchor" name="ga1" doxytag="boost::numeric::ublas::blas_3::tsm"
+<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
+ <tr> + <td class="mdRow"> + <table summary="" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> M1& tsm </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">M1 & </td> + <td class="mdname" nowrap> <em>m1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T & </td> + <td class="mdname" nowrap> <em>t</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M2 & </td> + <td class="mdname" nowrap> <em>m2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>C </td> + <td class="mdname" nowrap></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table summary="" cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p>+triangular solve <em>m2</em> * <em>x</em> = <em>t</em> * <em>m1</em> in place, <em>m2</em> 是一个三角矩阵 </p>
+ </td> + </tr> +</table>+<a class="anchor" name="ga2" doxytag="boost::numeric::ublas::blas_3::gmm"
+<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
+ <tr> + <td class="mdRow"> + <table summary="" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> M1& gmm </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">M1 & </td> + <td class="mdname" nowrap> <em>m1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T1 & </td> + <td class="mdname" nowrap> <em>t1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T2 & </td> + <td class="mdname" nowrap> <em>t2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M2 & </td> + <td class="mdname" nowrap> <em>m2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M3 & </td> + <td class="mdname" nowrap> <em>m3</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table summary="" cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +一般矩阵乘法</p> + </td> + </tr> +</table>+<a class="anchor" name="ga3" doxytag="boost::numeric::ublas::blas_3::srk"
+<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
+ <tr> + <td class="mdRow"> + <table summary="" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> M1& srk </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">M1 & </td> + <td class="mdname" nowrap> <em>m1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T1 & </td> + <td class="mdname" nowrap> <em>t1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T2 & </td> + <td class="mdname" nowrap> <em>t2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M2 & </td> + <td class="mdname" nowrap> <em>m2</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table summary="" cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p>+symmetric rank k update: <em>m1</em> = <em>t</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m2<sup>T</sup></em>)
+</p> +<dl compact><dt><b>Todo:</b></dt><dd>use opb_prod() </dd></dl> + </td> + </tr> +</table>+<a class="anchor" name="ga4" doxytag="boost::numeric::ublas::blas_3::hrk"
+<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
+ <tr> + <td class="mdRow"> + <table summary="" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> M1& hrk </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">M1 & </td> + <td class="mdname" nowrap> <em>m1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T1 & </td> + <td class="mdname" nowrap> <em>t1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T2 & </td> + <td class="mdname" nowrap> <em>t2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M2 & </td> + <td class="mdname" nowrap> <em>m2</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table summary="" cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p>+hermitian rank k update: <em>m1</em> = <em>t</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m2<sup>H</sup></em>)
+</p> +<dl compact><dt><b>Todo:</b></dt><dd>use opb_prod()</dd></dl> + </td> + </tr> +</table>+<a class="anchor" name="ga5" doxytag="boost::numeric::ublas::blas_3::sr2k"
+<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
+ <tr> + <td class="mdRow"> + <table summary="" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> M1& sr2k </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">M1 & </td> + <td class="mdname" nowrap> <em>m1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T1 & </td> + <td class="mdname" nowrap> <em>t1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T2 & </td> + <td class="mdname" nowrap> <em>t2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M2 & </td> + <td class="mdname" nowrap> <em>m2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M3 & </td> + <td class="mdname" nowrap> <em>m3</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table summary="" cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p>+generalized symmetric rank k update: <em>m1</em> = <em>t1</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m3<sup>T</sup></em>) + <em>t2</em> * (<em>m3</em> * <em>m2<sup>T</sup></em>)
+</p> +<dl compact><dt><b>Todo:</b></dt><dd>use opb_prod()</dd></dl> + </td> + </tr> +</table>+<a class="anchor" name="ga6" doxytag="boost::numeric::ublas::blas_3::hr2k"
+<table summary="" class="mdTable" width="100%" cellpadding="2" cellspacing="0"></a>
+ <tr> + <td class="mdRow"> + <table summary="" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> M1& hr2k </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">M1 & </td> + <td class="mdname" nowrap> <em>m1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T1 & </td> + <td class="mdname" nowrap> <em>t1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const T2 & </td> + <td class="mdname" nowrap> <em>t2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M2 & </td> + <td class="mdname" nowrap> <em>m2</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const M3 & </td> + <td class="mdname" nowrap> <em>m3</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table summary="" cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p>+generalized hermitian rank k update: <em>m1</em> = <em>t1</em> * <em>m1</em> + <em>t2</em> * (<em>m2</em> * <em>m3<sup>H</sup></em>) + (<em>m3</em> * (<em>t2</em> * <em>m2</em>)<sup>H</sup>)
+</p> +<dl compact><dt><b>Todo:</b></dt><dd>use opb_prod()</dd></dl> + </td> + </tr> +</table> + + + +<hr /> +<p>Copyright (©) 2000-2004 Michael Stevens, Mathias Koch, +Joerg Walter, Gunter Winkler<br /> +Use, modification and distribution are subject to the +Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt +or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> +http://www.boost.org/LICENSE_1_0.txt</a>). +</p> +</body> +</html> Modified: trunk/libs/numeric/ublas/doc/bounded_array.htm ============================================================================== --- trunk/libs/numeric/ublas/doc/bounded_array.htm (original) +++ trunk/libs/numeric/ublas/doc/bounded_array.htm Wed Jan 7 23:44:16 2009 @@ -1,211 +1,209 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> -<html xmlns="http://www.w3.org/1999/xhtml";> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> -<link href="ublas.css" type="text/css" /> -<title>Bounded Array;</title> -</head> -<body> -<h1><img src="../../../../boost.png" align="middle" /> -Bounded Array Storage</h1> -<h2><a name="bounded_array" id="bounded_array"></a>Bounded Array</h2> -<h4>Description</h4>-<p>The templated class <code>bounded_array<T, N, ALLOC></code> implements a bounded storage array. The bounded array is similar to a C++ array type in that its maximum size is bounded by N and is allocated on the stack instead of the heap. Similarly a <code>bounded_array</code> requires no secondary storage and ALLOC is only used to specify <code>size_type</code> and <code>difference_type</code>.
-</p>-<p>When resized <code>bounded_array</code> never reallocated the storage. It is therefore always efficient to resize a <code>bounded_array</code> but the size bound N must not be exceeded.</p>
-<h4>Example</h4> -<pre> -#include <boost/numeric/ublas/storage.hpp> - -int main () { - using namespace boost::numeric::ublas; - bounded_array<double, 3> a (3); - for (unsigned i = 0; i < a.size (); ++ i) { - a [i] = i; - std::cout << a [i] << std::endl; - } -} -</pre> -<h4>Definition</h4> -<p>Defined in the header storage.hpp.</p> -<h4>Template parameters</h4> -<table border="1" summary="parameters"> -<tbody> -<tr> -<th>Parameter</th> -<th>Description</th> -<th>Default</th> -</tr> -<tr> -<td><code>T</code></td> -<td>The type of object stored in the array.</td> -<td></td> -</tr> -<tr> -<td><code>N</code></td> -<td>The allocation size of the array.</td> -<td></td> -</tr> -<tr> -<td><code>ALLOC</code></td> -<td>An STL Allocator</td> -<td>std::allocator</td> -</tr> -</tbody> -</table> -<h4>Model of</h4> -<p><a href="storage_concept.htm">Storage</a></p> -<h4>Type requirements</h4> -<p>None, except for those imposed by the requirements of Storage.</p> -<h4>Public base classes</h4> -<p>None.</p> -<h4>Members</h4> -<ul>-<li>The description does not describe what the member actually does, this can be looked up -in the corresponding concept documentation, but instead contains a remark on the implementation of the
-member inside this model of the concept.</li> -<li>Typography: -<ul>-<li>Members that are not part of the implemented concepts are <font color="blue">in blue</font>.</li>
-</ul> -</li> -</ul> -<table border="1" summary="members"> -<tbody> -<tr> -<th>Member</th> -<th>Where defined</th> -<th>Description</th> -</tr>-<tr><td><code>value_type</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td></tr> -<tr><td><code>pointer</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>value_type*</code></td></tr> -<tr><td><code>const_pointer</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>const value_type*</code></td></tr> -<tr><td><code>reference</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>value_type&</code></td></tr> -<tr><td><code>const_reference</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>const value_type&</code></td></tr> -<tr><td><code>size_type</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>Alloc::size_type</code></td></tr> -<tr><td><code>difference_type</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>Alloc::difference_type</code></td></tr> -<tr><td><code>iterator</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>pointer</code></td></tr> -<tr><td><code>const_iterator</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>const_pointer</code></td></tr> -<tr><td><code>revere_iterator</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>std::reverse_iterator<iterator></code></td></tr> -<tr><td><code>const_revere_iterator</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>Defined as <code>std::reverse_iterator<const_iterator></code></td></tr>
-<tr> -<td><code>bounded_array ()</code></td> -<td><a href="storage_concept.htm">Storage</a></td>-<td>Creates an <code>unbounded_array</code> that holds <strong>zero</strong> elements.</td>
-</tr> -<tr> -<td><code>bounded_array (size_type size)</code></td> -<td><a href="storage_concept.htm">Storage</a></td>-<td>Creates a uninitialized <code>bounded_array</code> that holds <code>size</code> elements. All the elements are default constructed.</td>
-</tr> -<tr> -<td><code>bounded_array (size_type size, const T& init)</code></td> -<td><a href="storage_concept.htm">Storage</a></td>-<td>Creates an initialized <code>bounded_array</code> that holds <code>size</code> elements. All the elements are constructed from the <code>init</code> value.</td>
-</tr> -<tr> -<td><code>bounded_array (const bounded_array &c)</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> -<td>The copy constructor.</td> -</tr> -<tr> -<td><code>~bounded_array ()</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> -<td>Deallocates the <code>bounded_array</code> itself.</td> -</tr> -<tr> -<td><code>void resize (size_type size)</code></td> -<td><a href="storage_concept.htm">Storage</a>-<td>Reallocates a <code>bounded_array</code> to hold <code>size</code> elements.</td>
-</tr> -<tr> -<td><code>void resize (size_type size, const T& t)</code></td> -<td><a href="storage_concept.htm">Storage</a>-<td>Reallocates a <code>bounded_array</code> to hold <code>size</code> elements.</td>
-</tr> -<tr> -<td><code>size_type size () const</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> -<td>Returns the size of the <code>bounded_array</code>.</td> -</tr> -<tr> -<td><code>const_reference operator [] (size_type i) const</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>-<td>Returns a <code>const</code> reference of the <code>i</code> -th element.</td>
-</tr> -<tr> -<td><code>reference operator [] (size_type i)</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> -<td>Returns a reference of the <code>i</code>-th element.</td> -</tr> -<tr>-<td><code>bounded_array &operator = (const bounded_array &a)</code></td>
-<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> -<td>The assignment operator.</td> -</tr> -<tr>-<td><font color="blue"><code>bounded_array &assign_temporary (bounded_array &a)</code></font></td>
-<td></td> -<td>Assigns a temporary. May change the array <code>a</code>.</td> -</tr> -<tr> -<td><code>void swap (bounded_array &a)</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> -<td>Swaps the contents of the arrays.</td> -</tr> -<tr> -<td><code>const_iterator begin () const</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>-<td>Returns a <code>const_iterator</code> pointing to the beginning of the <code>bounded_array</code>.</td>
-</tr> -<tr> -<td><code>const_iterator end () const</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>-<td>Returns a <code>const_iterator</code> pointing to the end of the <code>bounded_array</code>.</td>
-</tr> -<tr> -<td><code>iterator begin ()</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>-<td>Returns a <code>iterator</code> pointing to the beginning of the <code>bounded_array</code>.</td>
-</tr> -<tr> -<td><code>iterator end ()</code></td> -<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>-<td>Returns a <code>iterator</code> pointing to the end of the <code>bounded_array</code>.</td>
-</tr> -<tr> -<td><code>const_reverse_iterator rbegin () const</code></td>-<td><a href="http://www.sgi.com/tech/stl/ReversibleContainer.html";>Reversible Container</a></td> -<td>Returns a <code>const_reverse_iterator</code> pointing to the beginning of the reversed <code>bounded_array</code>.</td>
-</tr> -<tr> -<td><code>const_reverse_iterator rend () const</code></td>-<td><a href="http://www.sgi.com/tech/stl/ReversibleContainer.html";>Reversible Container</a></td> -<td>Returns a <code>const_reverse_iterator</code> pointing to the end of the reversed <code>bounded_array</code>.</td>
-</tr> -<tr> -<td><code>reverse_iterator rbegin ()</code></td>-<td><a href="http://www.sgi.com/tech/stl/ReversibleContainer.html";>Reversible Container</a></td> -<td>Returns a <code>reverse_iterator</code> pointing to the beginning of the reversed <code>bounded_array</code>.</td>
-</tr> -<tr> -<td><code>reverse_iterator rend ()</code></td>-<td><a href="http://www.sgi.com/tech/stl/ReversibleContainer.html";>Reversible Container</a></td> -<td>Returns a <code>reverse_iterator</code> pointing to the end of the reversed <code>bounded_array</code>.</td>
-</tr> -</tbody> -</table> - <hr /> - <p> - Copyright (©) 2000-2004 Michael Stevens, Mathias Koch, - Joerg Walter, Gunter Winkler<br /> - Use, modification and distribution are subject to the - Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt - or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> - http://www.boost.org/LICENSE_1_0.txt - </a>). - </p> -</body> -</html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> +<html xmlns="http://www.w3.org/1999/xhtml";> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link href="ublas.css" type="text/css" /> +<title>Bounded Array;</title> +</head> +<body> +<h1><img src="../../../../boost.png" align="middle" /> +有限数组存储(Bounded Array Storage)</h1>+<h2><a name="bounded_array" id="bounded_array"></a>有限数组(Bounded Array)</h2>
+<h4>说明</h4>+<p>模板类<code>bounded_array<T, N, ALLOC></code> 实现一个有限数组( bounded storage array )。有限数组( bounded array )类似于一个 C++ 数组类 型,因为数组的最大大小被限制为 N 并在栈上分配而不是在堆上分配。类似的 <code>bounded_array</code> 不需要二级存储( secondary storage )且 ALLOC 仅被 用于指定<code>size_type</code> 和 <code>difference_type</code>。</p> +<p>当改变<code>bounded_array</code> 数组时永远都不会重新分配内存。因此改变 数组<code>bounded_array</code>的大小永远都是高效的,但是改变的大小不能够超 过 N 。 </p>
+<h4>例子</h4> +<pre> +#include <boost/numeric/ublas/storage.hpp> + +int main () { + using namespace boost::numeric::ublas; + bounded_array<double, 3> a (3); + for (unsigned i = 0; i < a.size (); ++ i) { + a [i] = i; + std::cout << a [i] << std::endl; + } +} +</pre> +<h4>定义</h4> +<p>定义在头文件 storage.hpp 中。 </p> +<h4>模板参数</h4> +<table border="1" summary="parameters"> +<tbody> +<tr> +<th>参数</th> +<th>说明</th> +<th>缺省值</th> +</tr> +<tr> +<td><code>T</code></td> +<td>存储在数组中的对象的类型。</td> +<td></td> +</tr> +<tr> +<td><code>N</code></td> +<td>分配的数组的大小。</td> +<td></td> +</tr> +<tr> +<td><code>ALLOC</code></td> +<td>一个STL分配器(Allocator)。</td> +<td>std::allocator</td> +</tr> +</tbody> +</table> +<h4>模型(Model of)</h4> +<p><a href="storage_concept.htm">存储(Storage)</a></p> +<h4>类型要求(Type requirements)</h4> +<p>没有,除了由存储(storage)所施加的类型要求。</p> +<h4>公有基类(Public base classes)</h4> +<p>没有。</p> +<h4>成员</h4> +<ul>+<li>这里的说明并没有描述类的成员的实际功能,这可以在对应的概念文档中找 到,但是包含在概念模型内的成员函数的实现细节。</li>
+<li>印刷(Typography): + <ul> +<li>不是所实现的概念的成员用<font color="blue">蓝色标记</font>。</li> +</ul> +</li> +</ul> +<table border="1" summary="members"> +<tbody> +<tr> +<th>成员</th> +<th>定义位置</th> +<th>说明</th> +</tr>+<tr><td><code>value_type</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td></tr> +<tr><td><code>pointer</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>value_type*</code></td></tr> +<tr><td><code>const_pointer</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>const value_type*</code></td></tr> +<tr><td><code>reference</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>value_type&</code></td></tr> +<tr><td><code>const_reference</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>const value_type&</code></td></tr> +<tr><td><code>size_type</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>Alloc::size_type</code></td></tr> +<tr><td><code>difference_type</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>Alloc::difference_type</code></td></tr> +<tr><td><code>iterator</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>pointer</code></td></tr> +<tr><td><code>const_iterator</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>const_pointer</code></td></tr> +<tr><td><code>revere_iterator</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>std::reverse_iterator<iterator></code></td></tr> +<tr><td><code>const_revere_iterator</code></td><td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td><td>定义 为 <code>std::reverse_iterator<const_iterator></code></td></tr>
+<tr> +<td><code>bounded_array ()</code></td> +<td><a href="storage_concept.htm">Storage</a></td>+<td>生成一个包含<strong>0</strong>个元素的 <code>unbounded_array</code> 。 </td>
+</tr> +<tr> +<td><code>bounded_array (size_type size)</code></td> +<td><a href="storage_concept.htm">存储(Storage)</a></td>+<td>生成一个包含<code>size</code>个元素的未初始化的 <code>bounded_array</code> 。
+所有的元素都是缺省构造。</td> +</tr> +<tr> +<td><code>bounded_array (size_type size, const T& init)</code></td> +<td><a href="storage_concept.htm">存储(Storage)</a></td>+<td>生成一个包含<code>size</code>个元素的且被初始化的 <code>bounded_array</code> 。所有的元素都由 <code>init</code> 值来构造。 </td>
+</tr> +<tr> +<td><code>bounded_array (const bounded_array &c)</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> +<td>拷贝构造函数。</td> +</tr> +<tr> +<td><code>~bounded_array ()</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> +<td>析构 <code>bounded_array</code> 本身。</td> +</tr> +<tr> +<td><code>void resize (size_type size)</code></td> +<td><a href="storage_concept.htm">Storage</a>+<td>重新分配一个包含<code>size</code>个元素的 <code>bounded_array</code> 。 </td>
+</tr> +<tr> +<td><code>void resize (size_type size, const T& t)</code></td> +<td><a href="storage_concept.htm">Storage</a>+<td>重新分配一个包含<code>size</code>个元素的 <code>bounded_array</code> 。 </td>
+</tr> +<tr> +<td><code>size_type size () const</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> +<td>返回 <code>bounded_array</code> 的大小。</td> +</tr> +<tr> +<td><code>const_reference operator [] (size_type i) const</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> +<td>返回第<code>i</code>个元素的 <code>const</code> 引用。</td> +</tr> +<tr> +<td><code>reference operator [] (size_type i)</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> +<td>返回第<code>i</code>个元素的引用。</td> +</tr> +<tr>+<td><code>bounded_array &operator = (const bounded_array &a)</code></td>
+<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> +<td>赋值运算符。</td> +</tr> +<tr>+<td><font color="blue"><code>bounded_array &assign_temporary (bounded_array &a)</code></font></td>
+<td></td> +<td>赋值给一个临时变量。可能会改变数组 <code>a</code>。</td> +</tr> +<tr> +<td><code>void swap (bounded_array &a)</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td> +<td>交换数组的内容。</td> +</tr> +<tr> +<td><code>const_iterator begin () const</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>+<td>返回一个指向<code>bounded_array</code>开始处的 <code>const_iterator</code> 。</td>
+</tr> +<tr> +<td><code>const_iterator end () const</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>+<td>返回一个指向<code>bounded_array</code>终止处的 <code>const_iterator</code> 。</td>
+</tr> +<tr> +<td><code>iterator begin ()</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>+<td>返回一个指向<code>bounded_array</code>开始处的 <code>const_iterator</code> 。</td>
+</tr> +<tr> +<td><code>iterator end ()</code></td> +<td><a href="http://www.sgi.com/tech/stl/Container.html";>Container</a></td>+<td>返回一个指向<code>bounded_array</code>终止处的 <code>const_iterator</code> 。</td>
+</tr> +<tr> +<td><code>const_reverse_iterator rbegin () const</code></td>+<td><a href="http://www.sgi.com/tech/stl/ReversibleContainer.html";>Reversible Container</a></td> +<td>返回指向反转的(reversed)<code>bounded_array</code>开始处的 <code>const_reverse_iterator</code> 。</td>
+</tr> +<tr> +<td><code>const_reverse_iterator rend () const</code></td>+<td><a href="http://www.sgi.com/tech/stl/ReversibleContainer.html";>Reversible Container</a></td> +<td>返回指向反转的(reversed)<code>bounded_array</code>终止处的 <code>const_reverse_iterator</code> 。</td>
+</tr> +<tr> +<td><code>reverse_iterator rbegin ()</code></td>+<td><a href="http://www.sgi.com/tech/stl/ReversibleContainer.html";>Reversible Container</a></td> +<td>返回指向反转的(reversed)<code>bounded_array</code>开始处的 <code>reverse_iterator</code> 。</td>
+</tr> +<tr> +<td><code>reverse_iterator rend ()</code></td>+<td><a href="http://www.sgi.com/tech/stl/ReversibleContainer.html";>Reversible Container</a></td> +<td>返回指向反转的(reversed)<code>bounded_array</code>终止处的 <code>reverse_iterator</code> 。</td>
+</tr> +</tbody> +</table> + <hr /> + <p> + Copyright (©) 2000-2004 Michael Stevens, Mathias Koch, + Joerg Walter, Gunter Winkler<br /> + Use, modification and distribution are subject to the + Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt + or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> + http://www.boost.org/LICENSE_1_0.txt + </a>). + </p> +</body> +</html> Modified: trunk/libs/numeric/ublas/doc/container_concept.htm ============================================================================== --- trunk/libs/numeric/ublas/doc/container_concept.htm (original)+++ trunk/libs/numeric/ublas/doc/container_concept.htm Wed Jan 7 23:44:16 2009
@@ -1,416 +1,404 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> -<html xmlns="http://www.w3.org/1999/xhtml";> -<head> -<meta name="generator" content= -"HTML Tidy for Linux/x86 (vers 1st March 2004), see www.w3.org" /> -<meta http-equiv="Content-Type" content= -"text/html; charset=us-ascii" /> -<link href="ublas.css" type="text/css" /> -<title>Container Concepts</title> -</head> -<body> -<h1><img src="../../../../boost.png" align="middle" /> -Container Concepts</h1> -<h2><a name="vector" id="vector"></a>Vector</h2> -<h4>Description</h4> -<p>A Vector describes common aspects of dense, packed and sparse -vectors.</p> -<h4>Refinement of</h4>-<p><a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";>DefaultConstructible</a>,
-<a href="expression_concept.htm#vector_expression">Vector Expression</a> -<a href="#vector_expression_note">[1]</a>.</p> -<h4>Associated types</h4>-<p>In addition to the types defined by <a href="expression_concept.htm#vector_expression">Vector Expression</a></p>
-<table border="1" summary="types"> -<tbody> -<tr> -<td>Public base</td> -<td>vector_container<V></td> -<td>V must be derived from this public base type.</td> -</tr> -<tr> -<td>Storage array</td> -<td>V::array_type</td> -<td>-Dense Vector ONLY. The type of underlying storage array used to store the elements. The array_type must model the
-<a href="storage_concept.htm"><b>Storage</b></a> concept.</td> -</tr> -</tbody> -</table> -<h4>Notation</h4> -<table border="0" summary="notation"> -<tbody> -<tr> -<td><code>V</code></td> -<td>A type that is a model of Vector</td> -</tr> -<tr> -<td><code>v</code></td> -<td>Objects of type <code>V</code></td> -</tr> -<tr> -<td><code>n, i</code></td> -<td>Objects of a type convertible to <code>size_type</code></td> -</tr> -<tr> -<td><code>t</code></td> -<td>Object of a type convertible to <code>value_type</code></td> -</tr> -<tr> -<td><code>p</code></td> -<td>Object of a type convertible to <code>bool</code></td> -</tr> -</tbody> -</table> -<h4>Definitions</h4> -<h4>Valid expressions</h4>-<p>In addition to the expressions defined in <a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";>DefaultConstructible</a>, -<a href="expression_concept.htm#vector_expression">Vector Expression</a> the following expressions must be valid.</p>
-<table border="1" summary="expressions"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Type requirements</th> -<th>Return type</th> -</tr> -<tr> -<td>Sizing constructor</td> -<td><code>V v (n)</code></td> -<td> </td> -<td><code>V</code></td> -</tr> -<tr> -<td>Insert</td> -<td><code>v.insert_element (i, t)</code></td> -<td><code>v</code> is mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td>Erase</td> -<td><code>v.erase_element (i)</code></td> -<td><code>v</code> is mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td>Clear</td> -<td><code>v.clear ()</code></td> -<td><code>v</code> is mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td>Resize</td> -<td><code>v.resize (n)</code><br /> -<code>v.resize (n, p)</code></td> -<td><code>v</code> is mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td>Storage</td> -<td><code>v.data()</code></td> -<td><code>v</code> is mutable and Dense.</td>-<td><code>array_type&</code> if a is mutable, <code>const array_type&</code> otherwise</td>
-</tr> -</tbody> -</table> -<h4>Expression semantics</h4> -<p>Semantics of an expression is defined only where it differs -from, or is not defined in <a href= -"expression_concept.htm#vector_expression">Vector Expression</a> .</p> -<table border="1" summary="semantics"> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Precondition</th> -<th>Semantics</th> -<th>Postcondition</th> -</tr> -<tr> -<td>Sizing constructor</td> -<td><code>V v (n)</code></td> -<td><code>n >= 0</code></td> -<td>Allocates a vector of<code>n</code> elements.</td> -<td><code>v.size () == n</code>.</td> -</tr> -<tr> -<td>Element access <a href="#element_access_note">[2]</a></td> -<td><code>v[n]</code></td> -<td><code>0<n>v.size()</code></td> -<td>returns the n-th element in v</td> -<td> </td> -</tr> -<tr> -<td>Insert</td> -<td><code>v.insert_element (i, 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 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> -<td><code>v.clear ()</code></td> -<td> </td> -<td>Equivalent to<br /> -<code>for (i = 0; i < v.size (); ++ i)</code><br /> - <code>v.erase_element (i);</code></td> -<td> </td> -</tr> -<tr> -<td>Resize</td> -<td><code>v.resize (n) -<br />v.resize (n, p)</code></td> -<td> </td> -<td>Reallocates the vector so that it can hold <code>n</code> -elements.<br />-Erases or appends elements in order to bring the vector to the prescribed size. Appended elements copies of <code>value_type()</code>.
-<br />-When <code>p == false</code> 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.</td>
-<td><code>v.size () == n</code>.</td> -</tr> -<tr> -<td>Storage</td> -<td><code>v.data()</code></td> -<td></td> -<td>Returns a reference to the underlying dense storage.</td> -<td> </td> -</tr> -</table> -<h4>Complexity guarantees</h4> -<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 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</code>, <code>bounded_vector</code>, <code>c_vector</code></li> -<li><code>unit_vector</code>, <code>zero_vector</code>, <code>scalar_vector</code></li> -<li><code>mapped_vector;</code>, <code>compressed_vector</code>, <code>coordinate_vector</code></li>
-</ul> -<h4>Notes</h4> -<p><a name="vector_expression_note">[1]</a>-As a user you need not care about <tt>Vector</tt> being a refinement of the VectorExpression. Being a refinement of the VectorExpression is only important for the template-expression engine but not the user.</p>
-<p><a name="element_access_note">[2]</a> -The <code>operator[]</code> is added purely for convenience -and compatibility with the <code>std::vector</code>. In uBLAS however, -generally <code>operator()</code> is used for indexing because this can be -used for both vectors and matrices.</p> -<h2><a name="matrix" id="matrix"></a>Matrix</h2> -<h4>Description</h4> -<p>A Matrix describes common aspects of dense, packed and sparse -matrices.</p> -<h4>Refinement of</h4>-<p><a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";>DefaultConstructible</a>,
-<a href="expression_concept.htm#matrix_expression">Matrix Expression</a> -<a href="#matrix_expression_note">[1]</a> -.</p> -<h4>Associated types</h4>-<p>In addition to the types defined by <a href="expression_concept.htm#matrix_expression">Matrix Expression</a></p>
-<table border="1" summary="types"> -<tbody> -<tr> -<td>Public base</td> -<td>matrix_container<M></td> -<td>M must be derived from this public base type.</td> -</tr> -<tr> -<td>Storage array</td> -<td>M::array_type</td>-<td>Dense Matrix ONLY. The type of underlying storage array used to store the elements. The array_type must model
-the <a href="storage_concept.htm"><b>Storage</b></a> concept.</td> -</tr> -</tbody> -</table> -<h4>Notation</h4> -<table border="0" summary="notation"> -<tbody> -<tr> -<td><code>M</code></td> -<td>A type that is a model of Matrix</td> -</tr> -<tr> -<td><code>m</code></td> -<td>Objects of type <code>M</code></td> -</tr> -<tr> -<td><code>n1, n2, i, j</code></td> -<td>Objects of a type convertible to <code>size_type</code></td> -</tr> -<tr> -<td><code>t</code></td> -<td>Object of a type convertible to <code>value_type</code></td> -</tr> -<tr> -<td><code>p</code></td> -<td>Object of a type convertible to <code>bool</code></td> -</tr> -</tbody> -</table> -<h4>Definitions</h4> -<h4>Valid expressions</h4> -<p>In addition to the expressions defined in <a href= -"expression_concept.htm#matrix_expression">Matrix Expression</a> the -following expressions must be valid.</p> -<table border="1" summary="expressions"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Type requirements</th> -<th>Return type</th> -</tr> -<tr> -<td>Sizing constructor</td> -<td><code>M m (n1, n2)</code></td> -<td> </td> -<td><code>M</code></td> -</tr> -<tr> -<td>Insert</td> -<td><code>m.insert_element (i, j, t)</code></td> -<td><code>m</code> is mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td>Erase</td> -<td><code>m.erase_element (i, j)</code></td> -<td><code>m</code> is mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td>Clear</td> -<td><code>m.clear ()</code></td> -<td><code>m</code> is mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td>Resize</td> -<td><code>m.resize (n1, n2)</code><br /> -<code>m.resize (n1, n2, p)</code></td> -<td><code>m</code> is mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td>Storage</td> -<td><code>m.data()</code></td> -<td><code>m</code> is mutable and Dense.</td>-<td><code>array_type&</code> if a is mutable, <code>const array_type&</code> otherwise</td>
-</tr> -</tbody> -</table> -<h4>Expression semantics</h4> -<p>Semantics of an expression is defined only where it differs -from, or is not defined in <a href= -"expression_concept.htm#matrix_expression">Matrix Expression</a> .</p> -<table border="1" summary="semantics"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Precondition</th> -<th>Semantics</th> -<th>Postcondition</th> -</tr> -<tr> -<td>Sizing constructor</td> -<td><code>M m (n1, n2)</code></td> -<td><code>n1 >= 0</code> and <code>n2 >= 0</code></td> -<td>Allocates a matrix of <code>n1</code> rows and <code>n2</code> -columns.</td> -<td><code>m.size1 () == n1</code> and <code>m.size2 () == -n2</code>.</td> -</tr> -<tr> -<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>.</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_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 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> -<td><code>m.clear ()</code></td> -<td> </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_element (i, j);</code></td> -<td> </td> -</tr> -<tr> -<td>Resize</td> -<td><code>m.resize (n1, n2) -<br /> -m.resize (n1, n2, p) -</code></td> -<td> </td> -<td>Reallocate the matrix so that it can hold <code>n1</code> rows -and <code>n2</code> columns.<br /> -Erases or appends elements in order to bring the matrix to the -prescribed size. Appended elements are <code>value_type()</code> -copies.<br />-When <code>p == false</code> then existing elements are not preserved and elements will not appended as normal. Instead the matrix is in the same state as that after an equivalent sizing constructor.</td>
-<td><code>m.size1 () == n1</code> and <code>m.size2 () == n2</code>.</td> -</tr> -<tr> -<td>Storage</td> -<td><code>m.data()</code></td> -<td></td> -<td>Returns a reference to the underlying dense storage.</td> -<td> </td> -</tbody> -</table> -<h4>Complexity guarantees</h4> -<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 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</code>, <code>bounded_matrix</code>, <code>c_matrix</code></li> -<li><code>identity_matrix</code> , <code>zero_matrix</code> , <code>scalar_matrix</code></li> -<li><code>triangular_matrix</code> , <code>symmetric_matrix</code> , <code>banded_matrix</code></li> -<li><code>mapped_matrix</code> , <code>compressed_matrix</code> , <code>coordinate_matrix</code></li>
-</ul> -<h4>Notes</h4> -<p><a name="matrix_expression_note">[1]</a>-As a user you need not care about <tt>Matrix</tt> being a refinement of the MatrixExpression. Being a refinement of the MatrixExpression is only important for the template-expression engine but not the user.</p>
-<hr /> -<p>Copyright (©) 2000-2002 Joerg Walter, Mathias Koch<br /> - Use, modification and distribution are subject to the - Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt - or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> - http://www.boost.org/LICENSE_1_0.txt - </a>). -</p> -</body> -</html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> +<html xmlns="http://www.w3.org/1999/xhtml";> +<head> +<meta name="generator" content= +"HTML Tidy for Linux/x86 (vers 1st March 2004), see www.w3.org" /> +<meta http-equiv="Content-Type" content= +"text/html; charset=UTF-8" /> +<link href="ublas.css" type="text/css" /> +<title>Container Concepts</title> +</head> +<body> +<h1><img src="../../../../boost.png" align="middle" /> +容器概念(Container Concepts)</h1> +<h2><a name="vector" id="vector"></a>向量(Vector)</h2> +<h4>说明</h4>+<p>一个向量(Vector)描述密集向量(dense),压缩向量( packed)和稀疏向量 (sparse)的共通方面(common aspects)。</p>
+<h4>优化(Refinement of)</h4>+<p><a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";>缺省构造 (DefaultConstructible)</a>, +<a href="expression_concept.htm#vector_expression">向量表达式(Vector Expression)</a>
+<a href="#vector_expression_note">[1]</a>。</p> +<h4>相关类型</h4>+<p>作为对于<a href="expression_concept.htm#vector_expression">向量表达式 (Vector Expression)</a>所定义类型的补充。</p>
+<table border="1" summary="types"> +<tbody> +<tr> +<td>公有(Public base)</td> +<td>vector_container<V></td> +<td>V 必须派生自这个公有基类。</td> +</tr> +<tr> +<td>Storage array</td> +<td>V::array_type</td> +<td>+仅针对于密集向量(Dense Vector)。内部的存储数组(storage array)类型用于存储元 素。array_type必须是 +<a href="storage_concept.htm"><b>存储(Storage)</b></a> 概念模型(concept model)。</td>
+</tr> +</tbody> +</table> +<h4>记法(Notation)</h4> +<table border="0" summary="notation"> +<tbody> +<tr> +<td><code>V</code></td> +<td>一个向量模型的类型。</td> +</tr> +<tr> +<td><code>v</code></td> +<td><code>V</code>类型的对象。</td> +</tr> +<tr> +<td><code>n, i</code></td> +<td>可以转化为<code>size_type</code>类型的对象。</td> +</tr> +<tr> +<td><code>t</code></td> +<td>可以转化为<code>value_type</code>类型的对象。</td> +</tr> +<tr> +<td><code>p</code></td> +<td>可以转化为<code>bool</code>类型的对象。</td> +</tr> +</tbody> +</table> +<h4>定义</h4> +<h4>合法表达式</h4>+<p>除了在<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";>缺 省构造(DefaultConstructible)</a>, +<a href="expression_concept.htm#vector_expression">向量表达式(Vector Expression)</a> 中定义的表达式,下面的表达式应当是合法的。</p>
+<table border="1" summary="expressions"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>类型要求</th> +<th>返回值类型</th> +</tr> +<tr> +<td>带有向量大小参数的构造函数(Sizing constructor)</td> +<td><code>V v (n)</code></td> +<td> </td> +<td><code>V</code></td> +</tr> +<tr> +<td>插入</td> +<td><code>v.insert_element (i, t)</code></td> +<td><code>v</code> 是可变化的(mutable)。</td> +<td><code>void</code></td> +</tr> +<tr> +<td>删除</td> +<td><code>v.erase_element (i)</code></td> +<td><code>v</code> 是可变化的(mutable)。</td> +<td><code>void</code></td> +</tr> +<tr> +<td>清除</td> +<td><code>v.clear ()</code></td> +<td><code>v</code> 是可变化的(mutable)。</td> +<td><code>void</code></td> +</tr> +<tr> +<td>改变大小</td> +<td><code>v.resize (n)</code><br /> +<code>v.resize (n, p)</code></td> +<td><code>v</code> is mutable.</td> +<td><code>void</code></td> +</tr> +<tr> +<td>存储(Storage)</td> +<td><code>v.data()</code></td> +<td><code>v</code> is mutable and Dense.</td>+<td><code>array_type&</code> if a is mutable, <code>const array_type&</code> otherwise</td>
+</tr> +</tbody> +</table> +<h4>表达式语义(Expression semantics)</h4> +<p>仅当一个表达式的语义不同于或没有在<a href=+"expression_concept.htm#vector_expression">向量表达式(Vector Expression)</a> 中定义时才得以定义。 </p>
+<table border="1" summary="semantics"> +<tr> +<th>名称</th> +<th>表达式</th> +<th>先决条件(Precondition)</th> +<th>语义</th> +<th>后置条件(Postcondition)</th> +</tr> +<tr> +<td>带有向量大小参数的构造函数(Sizing constructor)</td> +<td><code>V v (n)</code></td> +<td><code>n >= 0</code></td> +<td>构造一个<code>n</code>个元素的向量。</td> +<td><code>v.size () == n</code>.</td> +</tr> +<tr> +<td>元素访问 <a href="#element_access_note">[2]</a></td> +<td><code>v[n]</code></td> +<td><code>0<n>v.size()</code></td> +<td>返回 v 中的第 n 个元素</td> +<td> </td> +</tr> +<tr> +<td>插入</td> +<td><code>v.insert_element (i, t)</code></td> +<td><code>0 <= i < v.size ()</code>.</td> +<td>将<code>t</code>插入到<code>v (i)</code>。 +向量的存储空间可能需要增加。</td> +<td><code>v (i)</code> 等于 <code>t</code>。</td> +</tr> +<tr> +<td>删除</td> +<td><code>v.erase_element (i)</code></td> +<td><code>0 <= i < v.size ()</code></td> +<td>销毁(Destroys)元素<code>v (i)</code> 并使用缺省值 +<code>value_type ()</code>代替。 +向量的存储空间可能会减少。</td> +<td><code>v (i)</code> 等于 <code>value_type ()</code>。</td> +</tr> +<tr> +<td>清除</td> +<td><code>v.clear ()</code></td> +<td> </td> +<td>等价于<br /> +<code>for (i = 0; i < v.size (); ++ i)</code><br /> + <code>v.erase_element (i);</code></td> +<td> </td> +</tr> +<tr> +<td>改变大小</td> +<td><code>v.resize (n) +<br />v.resize (n, p)</code></td> +<td> </td> +<td>重新分配一个包含<code>n</code> +个元素的向量。<br />+删除或附加元素,使得向量的大小为要求的大小。附加的元素为 <code>value_type()</code>的拷贝。
+<br />+当 <code>p == false</code> 时,那么,已经存在的元素将不会保留并且元素不会像 通常情况那样被附加(appended)。 +反之,向量的状态与使用等价的带有向量大小的参数的构造函数之后的状态一样。 </td>
+<td><code>v.size () == n</code>.</td> +</tr> +<tr> +<td>Storage</td> +<td><code>v.data()</code></td> +<td></td> +<td>返回内部的密集存储(dense storage)的引用。</td> +<td> </td> +</tr> +</table> +<h4>复杂度保证(Complexity guarantees)</h4>+<p> 带有向量大小参数的构造函数的运行时复杂度(run-time complexity)是依赖于 向量大小的线性复杂度。</p>
+<p> insert_element 和 erase_element 对于特定于向量模型(+Vector model )且运行时复杂度(run-time complexity)依赖于存储空间的增加/减 少。</p> +<p>改变大小( resize )的运行时复杂度(run-time complexity)是依赖于向量大小的 线性复杂度。</p>
+<h4>不变量(Invariants)</h4> +<h4>模型(Models)</h4> +<ul>+<li><code>vector</code>, <code>bounded_vector</code>, <code>c_vector</code></li> +<li><code>unit_vector</code>, <code>zero_vector</code>, <code>scalar_vector</code></li> +<li><code>mapped_vector;</code>, <code>compressed_vector</code>, <code>coordinate_vector</code></li>
+</ul> +<h4>注意</h4> +<p><a name="vector_expression_note">[1]</a>+作为一个用户,你不需要关心<tt>Vector</tt> 是VectorExpression的一个优化。 <tt>Vector</tt>是VectorExpression 的优化只是对于模板表达式引擎 (template-expression engine)而不是对用户很重要。</p>
+<p><a name="element_access_note">[2]</a>+添加运算<code>operator[]</code> 纯粹是为了方便和与 <code>std::vector</code>的兼容。在 uBLAS 库中,通常使用 <code>operator()</code> ,因为这个运算符可以用于向量和矩阵。</p>
+<h2><a name="matrix" id="matrix"></a>矩阵(Matrix)</h2> +<h4>说明</h4>+<p>一个矩阵定义了密集矩阵(dense),压缩矩阵(packed),和稀疏矩阵(sparse)的共 通方面( common aspects )。</p>
+<h4>优化(Refinement of)</h4>+<p><a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";>缺省构造 (DefaultConstructible)</a>, +<a href="expression_concept.htm#matrix_expression">矩阵表达式(Matrix Expression)</a>
+<a href="#matrix_expression_note">[1]</a> 。 +</p> +<h4>相关类型</h4>+<p>作为对<a href="expression_concept.htm#matrix_expression">矩阵表达式 (Matrix Expression)</a>所定义类型的补充。</p>
+<table border="1" summary="types"> +<tbody> +<tr> +<td>公有基类</td> +<td>matrix_container<M></td> +<td>M 必须从这个公有基类派生。</td> +</tr> +<tr> +<td>存储数组(Storage array)</td> +<td>M::array_type</td>+<td>仅针对于密集矩阵(Dense Matrix)。内部的存储数组用于存储元素。 array_type必须是 +<a href="storage_concept.htm"><b>存储(Storage)</b></a>概念模型(concept model)。</td>
+</tr> +</tbody> +</table> +<h4>记法(Notation)</h4> +<table border="0" summary="notation"> +<tbody> +<tr> +<td><code>M</code></td> +<td>矩阵模型的类型。</td> +</tr> +<tr> +<td><code>m</code></td> +<td><code>M</code>类型的对象。</td> +</tr> +<tr> +<td><code>n1, n2, i, j</code></td> +<td>可以转化为<code>size_type</code>类型的对象。</td> +</tr> +<tr> +<td><code>t</code></td> +<td>可以转化为<code>value_type</code>类型的对象。</td> +</tr> +<tr> +<td><code>p</code></td> +<td>可以转化为<code>bool</code>类型的对象。</td> +</tr> +</tbody> +</table> +<h4>定义</h4> +<h4>合法表达式</h4> +<p>除了在<a href=+"expression_concept.htm#matrix_expression">矩阵表达式(Matrix Expression)</a> 中定义的表达式,下面的表达式应当是合法的。</p>
+<table border="1" summary="expressions"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>类型要求</th> +<th>返回值类型</th> +</tr> +<tr> +<td>带有矩阵大小参数的构造函数(Sizing constructor)</td> +<td><code>M m (n1, n2)</code></td> +<td> </td> +<td><code>M</code></td> +</tr> +<tr> +<td>插入</td> +<td><code>m.insert_element (i, j, t)</code></td> +<td><code>m</code> 是可变的(mutable)。</td> +<td><code>void</code></td> +</tr> +<tr> +<td>删除</td> +<td><code>m.erase_element (i, j)</code></td> +<td><code>m</code> 是可变的(mutable)。</td> +<td><code>void</code></td> +</tr> +<tr> +<td>清除</td> +<td><code>m.clear ()</code></td> +<td><code>m</code> 是可变的(mutable)。</td> +<td><code>void</code></td> +</tr> +<tr> +<td>改变大小</td> +<td><code>m.resize (n1, n2)</code><br /> +<code>m.resize (n1, n2, p)</code></td> +<td><code>m</code> 是可变的(mutable)。</td> +<td><code>void</code></td> +</tr> +<tr> +<td>存储(Storage)</td> +<td><code>m.data()</code></td> +<td><code>m</code> 是可变的(mutable)且是密集的(Dense)。</td>+<td>如果是可变的,就是<code>array_type&</code>, 否则是<code>const array_type&</code>。</td>
+</tr> +</tbody> +</table> +<h4>表达式语义(Expression semantics)</h4> +<p>仅当一个表达式的语义不同于或没有在 <a href=+"expression_concept.htm#matrix_expression">矩阵表达式(Matrix Expression)</a> 中定义时才得以定义。</p>
+<table border="1" summary="semantics"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>先决条件(Precondition)</th> +<th>语义</th> +<th>后置条件(Postcondition)</th> +</tr> +<tr> +<td>带有矩阵大小参数的构造函数(Sizing constructor)</td> +<td><code>M m (n1, n2)</code></td> +<td><code>n1 >= 0</code> and <code>n2 >= 0</code></td> +<td>构造一个<code>n1</code>行<code>n2</code>列的矩阵。 +</td> +<td><code>m.size1 () == n1</code> and <code>m.size2 () == +n2</code>。</td> +</tr> +<tr> +<td>插入</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>.</td> +<td>将一个元素<code>t</code>插入到<code>m (i, j)</code>。 +矩阵的存储空间可能会增长。</td> +<td><code>m (i, j)</code> 等于 <code>t</code>。</td> +</tr> +<tr> +<td>删除</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>销毁元素<code>m (i, j)</code>并使用缺省值 +<code>value_type ()</code>取代。 +矩阵的存储空间可能会减少。</td> +<td><code>m (i, j)</code> 等于 <code>value_type ()</code>。</td> +</tr> +<tr> +<td>清除</td> +<td><code>m.clear ()</code></td> +<td> </td> +<td>等价于<br /> +<code>for (i = 0; i < m.size1 (); ++ i)</code><br /> + <code>for (j = 0; j < m.size2 (); ++ j)</code><br /> + <code>m.erase_element (i, j);</code></td> +<td> </td> +</tr> +<tr> +<td>改变大小</td> +<td><code>m.resize (n1, n2) +<br /> +m.resize (n1, n2, p) +</code></td> +<td> </td> +<td>重新分配一个<code>n1</code> 行 +<code>n2</code>列的矩阵。<br />+删除或附加元素,使得矩阵的大小为要求的大小。附加的元素是 <code>value_type()</code>
+的拷贝。<br /> +当<code>p == false</code>时,那么已经存在的元素将不被保留且元素不会被附加。 +反之,这个矩阵的状态与使用一个相同的大小参数来构造的矩阵状态是一样的。</td> +<td><code>m.size1 () == n1</code> and <code>m.size2 () == n2</code>。</td> +</tr> +<tr> +<td>存储(Storage)</td> +<td><code>m.data()</code></td> +<td></td> +<td>返回内部的密集存储(dense storage)的引用。</td> +<td> </td> +</tbody> +</table> +<h4>复杂度保证(Complexity guarantees)</h4>+<p>带有向量大小参数的构造函数的运行时复杂度(run-time complexity)是依赖于矩 阵大小的二次方复杂度。</p> +<p>insert_element 和 erase_element 对于特定于矩阵模型( Matrix model )且运行 时复杂度(run-time complexity)依赖于存储空间的增加/减少。</p> +<p>改变大小( resize )的运行时复杂度(run-time complexity)是依赖于矩阵大小的 二次方复杂度。</p>
+<h4>不变量(Invariants)</h4> +<h4>模型(Models)</h4> +<ul>+<li><code>matrix</code>, <code>bounded_matrix</code>, <code>c_matrix</code></li> +<li><code>identity_matrix</code> , <code>zero_matrix</code> , <code>scalar_matrix</code></li> +<li><code>triangular_matrix</code> , <code>symmetric_matrix</code> , <code>banded_matrix</code></li> +<li><code>mapped_matrix</code> , <code>compressed_matrix</code> , <code>coordinate_matrix</code></li>
+</ul> +<h4>注意</h4> +<p><a name="matrix_expression_note">[1]</a>+作为一个用户,你不需要关心<tt>Matrix</tt> 是MatrixExpression的一个优化。 <tt>Matrix</tt>是MatrixExpression 的优化只是对于模板表达式引擎 (template-expression engine)而不是对用户很重要。</p>
+<hr /> +<p>Copyright (©) 2000-2002 Joerg Walter, Mathias Koch<br /> + Use, modification and distribution are subject to the + Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt + or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> + http://www.boost.org/LICENSE_1_0.txt + </a>). +</p> +</body> +</html> Modified: trunk/libs/numeric/ublas/doc/expression_concept.htm ============================================================================== --- trunk/libs/numeric/ublas/doc/expression_concept.htm (original)+++ trunk/libs/numeric/ublas/doc/expression_concept.htm Wed Jan 7 23:44:16 2009
@@ -1,1040 +1,1003 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> -<html xmlns="http://www.w3.org/1999/xhtml";> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> -<link href="ublas.css" type="text/css" /> -<title>Expression Concepts</title> -</head> -<body> -<h1><img src="../../../../boost.png" align="middle" /> -Expression Concepts</h1>-<h2><a name="scalar_expression" id="scalar_expression"></a>Scalar Expression</h2>
-<h4>Description</h4> -<p>A Scalar Expression is an expression convertible to a scalar -type.</p> -<h4>Refinement of</h4> -<p>Default Constructible.</p> -<h4>Associated types</h4> -<table border="1" summary="associated types"> -<tbody> -<tr> -<td>Public base</td> -<td>scaler_expression<S></td> -<td>S must be derived from this public base type.</td> -</tr> -<tr> -<td>Value type</td> -<td><code>value_type</code></td> -<td>The type of the scalar expression.</td> -</tr> -</tbody> -</table> -<h4>Notation</h4> -<table border="0" summary="notation"> -<tbody> -<tr> -<td><code>S</code></td> -<td>A type that is a model of Scalar Expression</td> -</tr> -</tbody> -</table> -<h4>Definitions</h4> -<h4>Valid expressions</h4> -<p>In addition to the expressions defined in Default Constructible -the following expressions must be valid.</p> -<table border="1" summary="expressions"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Type requirements</th> -<th>Return type</th> -</tr> -<tr> -<td>Evaluation</td> -<td><code>operator value_type () const</code></td> -<td> </td> -<td><code>value_type</code></td> -</tr> -</tbody> -</table> -<h4>Expression semantics</h4> -<p>Semantics of an expression is defined only where it differs -from, or is not defined in Default Constructible.</p> -<table border="1" summary="semantics"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Precondition</th> -<th>Semantics</th> -<th>Postcondition</th> -</tr> -<tr> -<td>Evaluation</td> -<td><code>operator value_type () const</code></td> -<td> </td> -<td> Evaluates the scalar expression.</td> -<td> </td> -</tr> -</tbody> -</table> -<h4>Complexity guarantees</h4> -<p>The run-time complexity of the evaluation is specific for the -evaluated scalar expression.</p> -<h4>Invariants</h4> -<h4>Models</h4> -<ul> -<li><code>vector_scalar_unary</code></li> -<li><code>vector_scalar_binary</code></li> -</ul>-<h2><a name="vector_expression" id="vector_expression"></a>Vector Expression</h2>
-<h4>Description</h4> -<p>A Vector Expression is an expression evaluatable to a vector. -Vector Expression provides an <a href= -"iterator_concept.htm#indexed_bidirectional_iterator">Indexed Bidirectional -Iterator</a> or an <a href= -"iterator_concept.htm#indexed_random_access_iterator">Indexed Random Access -Iterator</a> .</p> -<h4>Refinement of</h4> -<p>Default Constructible.</p> -<h4>Associated types</h4> -<table border="1" summary="associated types"> -<tbody> -<tr> -<td>Public base</td> -<td>vector_expression<V></td> -<td>V must be derived from this public base type.</td> -</tr> -<tr> -<td>Value type</td> -<td><code>value_type</code></td> -<td> -The element type of the vector expression. -</td> -</tr> -<tr> -<td>Reference type</td> -<td><code>reference</code></td> -<td> -The return type when accessing an element of a vector expression. -<br /> -Convertable to a<code>value_type</code>. -</td> -</tr> -<tr> -<td>Const reference type</td> -<td><code>const_reference</code></td> -<td> -The return type when accessing an element of a constant vector expression. -<br /> -Convertable to a<code>value_type</code>. -</td> -</tr> -<tr> -<td>Size type</td> -<td><code>size_type</code></td> -<td>-The index type of the vector expression. Am unsigned integral type used to represent size and index values.
-<br /> -Can represent any nonnegative value of <code>difference_type</code>. -</td> -</tr> -<tr> -<td>Distance type</td> -<td><code>difference_type</code></td> -<td>-A signed integral type used to represent the distance between two of the vector expression's iterators.
-</td> -</tr> -<tr> -<td>Const iterator type</td> -<td><code>const_iterator</code></td> -<td>A type of iterator that may be used to examine a vector -expression's elements.</td> -</tr> -<tr> -<td>Iterator type</td> -<td><code>iterator</code></td> -<td>A type of iterator that may be used to modify a vector -expression's elements.</td> -</tr> -<tr> -<td>Const reverse iterator type</td> -<td><code>const_reverse_iterator</code></td> -<td>A Reverse Iterator adaptor whose base iterator type is the -vector expression's const iterator type.</td> -</tr> -<tr> -<td>Reverse iterator type</td> -<td><code>reverse_iterator</code></td> -<td>A Reverse Iterator adaptor whose base iterator type is the -vector expression's iterator type.</td> -</tr> -</tbody> -</table> -<h4>Notation</h4> -<table border="0" summary="notation"> -<tbody> -<tr> -<td><code>V</code></td> -<td>A type that is a model of Vector Expression</td> -</tr> -<tr> -<td><code>v, v1, v2</code></td> -<td>Object of type <code>V</code></td> -</tr> -<tr> -<td><code>i</code></td> -<td>Object of a type convertible to <code>size_type</code></td> -</tr> -<tr> -<td><code>t</code></td> -<td>Object of a type convertible to <code>value_type</code></td> -</tr> -</tbody> -</table> -<h4>Definitions</h4> -<h4>Valid expressions</h4> -<p>In addition to the expressions defined in Default Constructible -the following expressions must be valid.</p> -<table border="1" summary="expressions"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Type requirements</th> -<th>Return type</th> -</tr> -<tr> -<td rowspan="2">Beginning of range</td> -<td><code>v.begin ()</code></td> -<td> </td> -<td><code>const_iterator</code></td> -</tr> -<tr> -<td><code>v.begin ()</code></td> -<td><code>v</code> is mutable.</td> -<td><code>iterator</code></td> -</tr> -<tr> -<td rowspan="2">End of range</td> -<td><code>v.end ()</code></td> -<td> </td> -<td><code>const_iterator</code></td> -</tr> -<tr> -<td><code>v.end ()</code></td> -<td><code>v</code> is mutable.</td> -<td><code>iterator</code></td> -</tr> -<tr> -<td>Size</td> -<td><code>v.size ()</code></td> -<td> </td> -<td><code>size_type</code></td> -</tr> -<tr> -<td>Swap</td> -<td><code>v1.swap (v2)</code></td> -<td><code>v1</code> and <code>v2</code> are mutable.</td> -<td><code>void</code></td> -</tr> -<tr> -<td rowspan="2">Beginning of reverse range</td> -<td><code>v.rbegin ()</code></td> -<td> </td> -<td><code>const_reverse_iterator</code></td> -</tr> -<tr> -<td><code>v.rbegin ()</code></td> -<td><code>v</code> is mutable.</td> -<td><code>reverse_iterator</code></td> -</tr> -<tr> -<td rowspan="2">End of reverse range</td> -<td><code>v.rend ()</code></td> -<td> </td> -<td><code>const_reverse_iterator</code></td> -</tr> -<tr> -<td><code>v.rend ()</code></td> -<td><code>v</code> is mutable.</td> -<td><code>reverse_iterator</code></td> -</tr> -<tr> -<td>Element access</td> -<td><code>v (i)</code></td> -<td><code>i</code> is convertible to <code>size_type</code>.</td> -<td>Convertible to <code>value_type</code>.</td> -</tr> -<tr> -<td rowspan="2">Assignment</td> -<td><code>v2 = v1</code></td> -<td><code>v2</code> is mutable and <code>v1</code> is convertible -to <code>V</code>.</td> -<td><code>V &</code></td> -</tr> -<tr> -<td><code>v2.assign (v1)</code></td> -<td><code>v2</code> is mutable and <code>v1</code> is convertible -to <code>V</code>.</td> -<td><code>V &</code></td> -</tr> -<tr> -<td rowspan="5">Computed assignment</td> -<td><code>v2 += v1</code></td> -<td><code>v2</code> is mutable and <code>v1</code> is convertible -to <code>V</code>.</td> -<td><code>V &</code></td> -</tr> -<tr> -<td><code>v2.plus_assign (v1)</code></td> -<td><code>v2</code> is mutable and <code>v1</code> is convertible -to <code>V</code>.</td> -<td><code>V &</code></td> -</tr> -<tr> -<td><code>v2 -= v1</code></td> -<td><code>v2</code> is mutable and <code>v1</code> is convertible -to <code>V</code>.</td> -<td><code>V &</code></td> -</tr> -<tr> -<td><code>v2.minus_assign (v1)</code></td> -<td><code>v2</code> is mutable and <code>v1</code> is convertible -to <code>V</code>.</td> -<td><code>V &</code></td> -</tr> -<tr> -<td><code>v *= t</code></td> -<td><code>v</code> is mutable and <code>t</code> is convertible to -<code>value_type</code>.</td> -<td><code>V &</code></td> -</tr> -</tbody> -</table> -<h4>Expression semantics</h4> -<p>Semantics of an expression is defined only where it differs -from, or is not defined in Default Constructible.</p> -<table border="1" summary="semantics"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Precondition</th> -<th>Semantics</th> -<th>Postcondition</th> -</tr> -<tr> -<td>Beginning of range</td> -<td><code>v.begin ()</code></td> -<td> </td> -<td>Returns an iterator pointing to the first element in the vector -expression.</td> -<td><code>v.begin ()</code> is either dereferenceable or -past-the-end. It is past-the-end if and only if <code>v.size () == -0</code>.</td> -</tr> -<tr> -<td>End of range</td> -<td><code>v.end ()</code></td> -<td> </td> -<td>Returns an iterator pointing one past the last element in the -vector expression.</td> -<td><code>v.end ()</code> is past-the-end.</td> -</tr> -<tr> -<td>Size</td> -<td><code>v.size ()</code></td> -<td> </td> -<td>Returns the size of the vector expression, that is, its number -of elements.</td> -<td><code>v.size () >= 0</code></td> -</tr> -<tr> -<td>Swap</td> -<td><code>v1.swap (v2)</code></td> -<td> </td> -<td>Equivalent to <code>swap (v1, v2)</code>.</td> -<td> </td> -</tr> -<tr> -<td>Beginning of reverse range</td> -<td><code>v.rbegin ()</code></td> -<td> </td> -<td>Equivalent to <code>reverse_iterator (v.end ())</code>.</td> -<td><code>v.rbegin ()</code> is either dereferenceable or -past-the-end. It is past-the-end if and only if <code>v.size () == -0</code>.</td> -</tr> -<tr> -<td>End of reverse range</td> -<td><code>v.rend ()</code></td> -<td> </td> -<td>Equivalent to <code>reverse_iterator (v.begin ())</code>.</td> -<td><code>v.rend ()</code> is past-the-end.</td> -</tr> -<tr> -<td>Element access</td> -<td><code>v (i)</code></td> -<td><code>0 <= i < v.size ()</code></td> -<td>Returns the <code>i</code>-th element of the vector -expression.</td> -<td> </td> -</tr> -<tr> -<td rowspan="2">Assignment</td> -<td><code>v2 = v1</code></td> -<td><code>v1.size () == v2.size ()</code></td> -<td>Assigns every element of the evaluated vector expression -<code>v1</code> to the corresponding element of <code>v2</code> -.</td> -<td> </td> -</tr> -<tr> -<td><code>v2.assign (v1)</code></td> -<td><code>v1.size () == v2.size ()</code></td> -<td>Assigns every element of <code>v1</code> to the corresponding -element of <code>v2</code>.</td> -<td> </td> -</tr> -<tr> -<td rowspan="5">Computed assignment</td> -<td><code>v2 += v1</code></td> -<td><code>v1.size () == v2.size ()</code></td> -<td>Adds every element of the evaluated vector expression -<code>v1</code> to the corresponding element of -<code>v2</code>.</td> -<td> </td> -</tr> -<tr> -<td><code>v2.plus_assign (v1)</code></td> -<td><code>v1.size () == v2.size ()</code></td> -<td>Adds every element of <code>v1</code> to the corresponding -element of <code>v2</code>.</td> -<td> </td> -</tr> -<tr> -<td><code>v2 -= v1</code></td> -<td><code>v1.size () == v2.size ()</code></td> -<td>Subtracts every element of the evaluated vector expression -<code>v1</code> from the corresponding element of <code>v2</code> -.</td> -<td> </td> -</tr> -<tr> -<td><code>v2.minus_assign (v1)</code></td> -<td><code>v1.size () == v2.size ()</code></td> -<td>Subtracts every element of <code>v1</code> from the -corresponding element of <code>v2</code>.</td> -<td> </td> -</tr> -<tr> -<td><code>v *= t</code></td> -<td> </td> -<td>Multiplies every element of <code>v</code> with <code>t</code> -.</td> -<td> </td> -</tr> -</tbody> -</table> -<h4>Complexity guarantees</h4> -<p>The run-time complexity of <code>begin ()</code> and <code>end -()</code> is specific for the evaluated vector expression, -typically amortized constant time.</p> -<p>The run-time complexity of <code>size ()</code> is constant -time.</p> -<p>The run-time complexity of <code>swap ()</code> is specific for -the evaluated vector expression, typically constant time.</p> -<p>The run-time complexity of <code>rbegin ()</code> and <code>rend -()</code> is specific for the evaluated vector expression, -typically amortized constant time.</p> -<p>The run-time complexity of the element access is specific for -the evaluated vector expression, typically amortized constant time -for the dense and logarithmic for the sparse case.</p> -<p>The run-time complexity of the arithmetic operations is specific -for the evaluated vector expressions, typically linear in the size -of the expressions.</p> -<h4>Invariants</h4> -<table border="1" summary="invariants"> -<tbody> -<tr> -<td>Valid range</td> -<td>For any vector expression <code>v</code>, <code>[v.begin (), -v.end ())</code> is a valid range.</td> -</tr> -<tr> -<td>Completeness</td> -<td>An algorithm that iterates through the range <code>[v.begin (), -v.end ())</code> will pass through every element of <code>v</code> -.</td> -</tr> -<tr> -<td>Valid reverse range</td> -<td><code>[v.rbegin (), v.rend ())</code> is a valid range.</td> -</tr> -<tr> -<td>Equivalence of ranges</td> -<td>The distance from <code>v.begin ()</code> to <code>v.end -()</code> is the same as the distance from <code>v.rbegin ()</code> -to <code>v.rend ()</code>.</td> -</tr> -</tbody> -</table> -<h4>Models</h4> -<ul> -<li><code>vector_range;</code></li> -<li><code>vector_slice</code></li> -<li><code>matrix_row</code></li> -<li><code>matrix_column</code></li> -<li><code>matrix_vector_range</code></li> -<li><code>matrix_vector_slice</code></li> -<li><code>vector_unary</code></li> -<li><code>vector_binary</code></li> -<li><code>vector_binary_scalar1</code></li> -<li><code>vector_binary_scalar2</code></li> -<li><code>matrix_vector_unary1</code></li> -<li><code>matrix_vector_unary2</code></li> -<li><code>matrix_vector_binary1</code></li> -<li><code>matrix_vector_binary2</code></li> -</ul> --<h2><a name="matrix_expression" id="matrix_expression"></a>Matrix Expression</h2>
-<h4>Description</h4> -<p>A Matrix Expression is an expression evaluatable to a matrix. -Matrix Expression provides an <a href= -"iterator_concept.htm#indexed_bidirectional_cr_iterator">Indexed -Bidirectional Column/Row Iterator</a> or an <a href= -"iterator_concept.htm#indexed_random_access_cr_iterator">Indexed Random -Access Column/Row Iterator</a> .</p> -<h4>Refinement of</h4> -<p>Default Constructible.</p> -<h4>Associated types</h4> -<table border="1" summary="associated types"> -<tbody> -<tr> -<td>Public base</td> -<td>matrix_expression<M></td> -<td>M must be derived from this public base type.</td> -</tr> -<tr> -<td>Value type</td> -<td><code>value_type</code></td> -<td> -The element type of the matrix expression. -</td> -</tr> -<tr> -<td>Reference type</td> -<td><code>reference</code></td> -<td> -The return type when accessing an element of a matrix expression. -<br /> -Convertable to a<code>value_type</code>. -</td> -</tr> -<tr> -<td>Const reference type</td> -<td><code>const_reference</code></td> -<td> -The return type when accessing an element of a constant matrix expression. -<br /> -Convertable to a<code>value_type</code>. -</td> -</tr> -<tr> -<td>Size type</td> -<td><code>size_type</code></td> -<td>-The index type of the matrix expression. Am unsigned integral type used to represent size and index values.
-<br /> -Can represent any nonnegative value of <code>difference_type</code>. -</td> -</tr> -<tr> -<td>Distance type</td> -<td><code>difference_type</code></td> -<td>-A signed integral type used to represent the distance between two of the matrix expression's iterators.
-</td> -</tr> -<tr> -<td rowspan="2">Const iterator types</td> -<td><code>const_iterator1</code></td> -<td>A type of column iterator that may be used to examine a matrix -expression's elements.</td> -</tr> -<tr> -<td><code>const_iterator2</code></td> -<td>A type of row iterator that may be used to examine a matrix -expression's elements.</td> -</tr> -<tr> -<td rowspan="2">Iterator types</td> -<td><code>iterator1</code></td> -<td>A type of column iterator that may be used to modify a matrix -expression's elements.</td> -</tr> -<tr> -<td><code>iterator2</code></td> -<td>A type of row iterator that may be used to modify a matrix -expression's elements.</td> -</tr> -<tr> -<td rowspan="2">Const reverse iterator types</td> -<td><code>const_reverse_iterator1</code></td> -<td>A Reverse Iterator adaptor whose base iterator type is the -matrix expression's const column iterator type.</td> -</tr> -<tr> -<td><code>const_reverse_iterator2</code></td> -<td>A Reverse Iterator adaptor whose base iterator type is the -matrix expression's const row iterator type.</td> -</tr> -<tr> -<td rowspan="2">Reverse iterator types</td> -<td><code>reverse_iterator1</code></td> -<td>A Reverse Iterator adaptor whose base iterator type is the -matrix expression's column iterator type.</td> -</tr> -<tr> -<td><code>reverse_iterator2</code></td> -<td>A Reverse Iterator adaptor whose base iterator type is the -matrix expression's row iterator type.</td> -</tr> -</tbody> -</table> -<h4>Notation</h4> -<table border="0" summary="notation"> -<tbody> -<tr> -<td><code>M</code></td> -<td>A type that is a model of Matrix Expression</td> -</tr> -<tr> -<td><code>m, m1, m2</code></td> -<td>Object of type <code>M</code></td> -</tr> -<tr> -<td><code>i, j</code></td> -<td>Objects of a type convertible to <code>size_type</code></td> -</tr> -<tr> -<td><code>t</code></td> -<td>Object of a type convertible to <code>value_type</code></td> -</tr> -</tbody> -</table> -<h4>Definitions</h4> -<h4>Valid expressions</h4> -<p>In addition to the expressions defined in Default Constructible -the following expressions must be valid.</p> -<table border="1" summary="expressions"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Type requirements</th> -<th>Return type</th> -</tr> -<tr> -<td rowspan="4">Beginning of range</td> -<td><code>m.begin1 ()</code></td> -<td> </td> -<td><code>const_iterator1</code></td> -</tr> -<tr> -<td><code>m.begin2 ()</code></td> -<td> </td> -<td><code>const_iterator2</code></td> -</tr> -<tr> -<td><code>m.begin1 ()</code></td> -<td><code>m</code> is mutable. </td> -<td><code>iterator1</code></td> -</tr> -<tr> -<td><code>m.begin2 ()</code></td> -<td><code>m</code> is mutable.</td> -<td><code>iterator2</code></td> -</tr> -<tr> -<td rowspan="4">End of range</td> -<td><code>m.end1 ()</code></td> -<td> </td> -<td><code>const_iterator1</code></td> -</tr> -<tr> -<td><code>m.end2 ()</code></td> -<td> </td> -<td><code>const_iterator2</code></td> -</tr> -<tr> -<td><code>m.end1 ()</code></td> -<td><code>m</code> is mutable. </td> -<td><code>iterator1</code></td> -</tr> -<tr> -<td><code>m.end2 ()</code></td> -<td><code>m</code> is mutable.</td> -<td><code>iterator2</code></td> -</tr> -<tr> -<td rowspan="2">Size</td> -<td><code>m.size1 ()</code></td> -<td> </td> -<td><code>size_type</code></td> -</tr> -<tr> -<td><code>m.size2 ()</code></td> -<td> </td> -<td><code>size_type</code></td> -</tr> -<tr> -<td>Swap</td> -<td><code>m1.swap (m2)</code></td> -<td><code>m1</code> and <code>m2</code> are mutable. </td> -<td><code>void</code></td> -</tr> -<tr> -<td rowspan="4">Beginning of reverse range</td> -<td><code>m.rbegin1 ()</code></td> -<td> </td> -<td><code>const_reverse_iterator1</code></td> -</tr> -<tr> -<td><code>m.rbegin2 ()</code></td> -<td> </td> -<td><code>const_reverse_iterator2</code></td> -</tr> -<tr> -<td><code>m.rbegin1 ()</code></td> -<td><code>m</code> is mutable. </td> -<td><code>reverse_iterator1</code></td> -</tr> -<tr> -<td><code>m.rbegin2 ()</code></td> -<td><code>m</code> is mutable.</td> -<td><code>reverse_iterator2</code></td> -</tr> -<tr> -<td rowspan="4">End of reverse range</td> -<td><code>m.rend1 ()</code></td> -<td> </td> -<td><code>const_reverse_iterator1</code></td> -</tr> -<tr> -<td><code>m.rend2 ()</code></td> -<td> </td> -<td><code>const_reverse_iterator2</code></td> -</tr> -<tr> -<td><code>m.rend1 ()</code></td> -<td><code>m</code> is mutable.</td> -<td><code>reverse_iterator1</code></td> -</tr> -<tr> -<td><code>m.rend2 ()</code></td> -<td><code>m</code> is mutable.</td> -<td><code>reverse_iterator2</code></td> -</tr> -<tr> -<td>Element access</td> -<td><code>m (i, j)</code></td> -<td><code>i</code> and <code>j</code> are convertible to -<code>size_type</code> .</td> -<td>Convertible to <code>value_type</code>.</td> -</tr> -<tr> -<td rowspan="2">Assignment</td> -<td><code>m2 = m1</code></td> -<td><code>m2</code> is mutable and <code>m1</code> is convertible -to <code>M</code>.</td> -<td><code>M &</code></td> -</tr> -<tr> -<td><code>m2.assign (m1)</code></td> -<td><code>m2</code> is mutable and <code>m1</code> is convertible -to <code>M</code>.</td> -<td><code>M &</code></td> -</tr> -<tr> -<td rowspan="5">Computed assignment</td> -<td><code>m2 += m1</code></td> -<td><code>m2</code> is mutable and <code>m1</code> is convertible -to <code>M</code>.</td> -<td><code>M &</code></td> -</tr> -<tr> -<td><code>m2.plus_assign (m1)</code></td> -<td><code>m2</code> is mutable and <code>m1</code> is convertible -to <code>M</code>.</td> -<td><code>M &</code></td> -</tr> -<tr> -<td><code>m2 -= m1</code></td> -<td><code>m2</code> is mutable and <code>m1</code> is convertible -to <code>M</code>.</td> -<td><code>M &</code></td> -</tr> -<tr> -<td><code>m2.minus_assign (m1)</code></td> -<td><code>m2</code> is mutable and <code>m1</code> is convertible -to <code>M</code>.</td> -<td><code>M &</code></td> -</tr> -<tr> -<td><code>m *= t</code></td> -<td><code>m</code> is mutable and <code>t</code> is convertible to -<code>value_type</code>.</td> -<td><code>M &</code></td> -</tr> -</tbody> -</table> -<h4>Expression semantics</h4> -<p>Semantics of an expression is defined only where it differs -from, or is not defined in Default Constructible.</p> -<table border="1" summary="semantics"> -<tbody> -<tr> -<th>Name</th> -<th>Expression</th> -<th>Precondition</th> -<th>Semantics</th> -<th>Postcondition</th> -</tr> -<tr> -<td rowspan="2">Beginning of range</td> -<td><code>m.begin1 ()</code></td> -<td> </td> -<td>Returns an iterator pointing to the first element in the first -column of a matrix expression.</td> -<td><code>m.begin1 ()</code> is either dereferenceable or -past-the-end. It is past-the-end if and only if <code>m.size1 () == -0</code>.</td> -</tr> -<tr> -<td><code>m.begin2 ()</code></td> -<td> </td> -<td>Returns an iterator pointing to the first element in the first -row of a matrix expression.</td> -<td><code>m.begin2 ()</code> is either dereferenceable or -past-the-end. It is past-the-end if and only if <code>m.size2 () == -0</code>.</td> -</tr> -<tr> -<td rowspan="2">End of range</td> -<td><code>m.end1 ()</code></td> -<td> </td> -<td>Returns an iterator pointing one past the last element in the -matrix expression.</td> -<td><code>m.end1 ()</code> is past-the-end.</td> -</tr> -<tr> -<td><code>m.end2 ()</code></td> -<td> </td> -<td>Returns an iterator pointing one past the last element in the -matrix expression.</td> -<td><code>m.end2 ()</code> is past-the-end.</td> -</tr> -<tr> -<td rowspan="2">Size</td> -<td><code>m.size1 ()</code></td> -<td> </td> -<td>Returns the number of rows of the matrix expression.</td> -<td><code>m.size1 () >= 0</code></td> -</tr> -<tr> -<td><code>m.size2 ()</code></td> -<td> </td> -<td>Returns the number of columns of the matrix expression.</td> -<td><code>m.size2 () >= 0</code></td> -</tr> -<tr> -<td>Swap</td> -<td><code>m1.swap (m2)</code></td> -<td> </td> -<td>Equivalent to <code>swap (m1, m2)</code>.</td> -<td> </td> -</tr> -<tr> -<td rowspan="2">Beginning of reverse range</td> -<td><code>m.rbegin1 ()</code></td> -<td> </td> -<td>Equivalent to <code>reverse_iterator1 (m.end1 ())</code>.</td> -<td><code>m.rbegin1 ()</code> is either dereferenceable or -past-the-end. It is past-the-end if and only if <code>m.size1 () == -0</code>.</td> -</tr> -<tr> -<td><code>m.rbegin2 ()</code></td> -<td> </td> -<td>Equivalent to <code>reverse_iterator2 (m.end2 ())</code>.</td> -<td><code>m.rbegin2 ()</code> is either dereferenceable or -past-the-end. It is past-the-end if and only if <code>m.size2 () == -0</code>.</td> -</tr> -<tr> -<td rowspan="2">End of reverse range</td> -<td><code>m.rend1 ()</code></td> -<td> </td> -<td>Equivalent to <code>reverse_iterator1 (m.begin1 -())</code>.</td> -<td><code>m.rend1 ()</code> is past-the-end.</td> -</tr> -<tr> -<td><code>m.rend2 ()</code></td> -<td> </td> -<td>Equivalent to <code>reverse_iterator2 (m.begin2 -())</code>.</td> -<td><code>m.rend2 ()</code> is past-the-end.</td> -</tr> -<tr> -<td>Element access</td> -<td><code>m (i, j)</code></td> -<td><code>0 <= i < m.size1 ()</code> and <code>0 <= j < -m.size2 ()</code></td> -<td>Returns the <code>j</code>-th element of the <code>i</code>-th -row of the matrix expression.</td> -<td> </td> -</tr> -<tr> -<td rowspan="2">Assignment</td> -<td><code>m2 = m1</code></td> -<td><code>m1.size1 () == m2.size1 ()</code> and <code><br /> -m1.size2 () == m2.size2 ()</code></td> -<td>Assigns every element of the evaluated matrix expression -<code>m1</code> to the corresponding element of <code>m2</code> -.</td> -<td> </td> -</tr> -<tr> -<td><code>m2.assign (m1)</code></td> -<td><code>m1.size1 () == m2.size1 ()</code> and <code><br /> -m1.size2 () == m2.size2 ()</code></td> -<td>Assigns every element of <code>m1</code> to the corresponding -element of <code>m2</code>.</td> -<td> </td> -</tr> -<tr> -<td rowspan="5">Computed assignment</td> -<td><code>m2 += m1</code></td> -<td><code>m1.size1 () == m2.size1 ()</code> and <code><br /> -m1.size2 () == m2.size2 ()</code></td> -<td>Adds every element of the evaluated matrix expression -<code>m1</code> to the corresponding element of -<code>m2</code>.</td> -<td> </td> -</tr> -<tr> -<td><code>m2.plus_assign (m1)</code></td> -<td><code>m1.size1 () == m2.size1 ()</code> and <code><br /> -m1.size2 () == m2.size2 ()</code></td> -<td>Adds every element of <code>m1</code> to the corresponding -element of <code>m2</code>.</td> -<td> </td> -</tr> -<tr> -<td><code>m2 -= m1</code></td> -<td><code>m1.size1 () == m2.size1 ()</code> and <code><br /> -m1.size2 () == m2.size2 ()</code></td> -<td>Subtracts every element of the evaluated matrix expression -<code>m1</code> from the corresponding element of <code>m2</code> -.</td> -<td> </td> -</tr> -<tr> -<td><code>m2.minus_assign (m1)</code></td> -<td><code>m1.size1 () == m2.size1 ()</code> and <code><br /> -m1.size2 () == m2.size2 ()</code></td> -<td>Subtracts every element of <code>m1</code> from the -corresponding element of <code>m2</code>.</td> -<td> </td> -</tr> -<tr> -<td><code>m *= t</code></td> -<td> </td> -<td>Multiplies every element of <code>m</code> with <code>t</code> -.</td> -<td> </td> -</tr> -</tbody> -</table> -<h4>Complexity guarantees</h4> -<p>The run-time complexity of <code>begin1 ()</code>, <code>begin2 -()</code> , <code>end1 ()</code> and <code>end2 ()</code> is -specific for the evaluated matrix expression.</p> -<p>The run-time complexity of <code>size1 ()</code> and <code>size2 -()</code> is constant time.</p> -<p>The run-time complexity of <code>swap ()</code> is specific for -the evaluated matrix expression, typically constant time.</p> -<p>The run-time complexity of <code>rbegin1 ()</code>, -<code>rbegin2 ()</code> , <code>rend1 ()</code> and <code>rend2 -()</code> is specific for the evaluated matrix expression.</p> -<p>The run-time complexity of the element access is specific for -the evaluated matrix expression, typically amortized constant time -for the dense and logarithmic for the sparse case.</p> -<p>The run-time complexity of the arithmetic operations is specific -for the evaluated matrix expressions, typically quadratic in the -size of the proxies.</p> -<h4>Invariants</h4> -<table border="1" summary="invariants"> -<tbody> -<tr> -<td>Valid range</td> -<td>For any matrix expression <code>m</code>, <code>[m.begin1 (), -m.end1 ())</code> and <code>[m.begin2 (), m.end2 ())</code> are -valid ranges.</td> -</tr> -<tr> -<td>Completeness</td> -<td>An algorithm that iterates through the range <code>[m.begin1 -(), m.end1 ())</code> will pass through every row of <code>m</code> -, an algorithm that iterates through the range <code>[m.begin2 (), -m.end2 ())</code> will pass through every column of <code>m</code> -.</td> -</tr> -<tr> -<td>Valid reverse range</td> -<td><code>[m.rbegin1 (), m.rend1 ())</code> and <code>[m.rbegin2 -(), m.rend2 ())</code> are valid ranges.</td> -</tr> -<tr> -<td>Equivalence of ranges</td> -<td>The distance from <code>m.begin1 ()</code> to <code>m.end1 -()</code> is the same as the distance from <code>m.rbegin1 -()</code> to <code>m.rend1 ()</code> and the distance from -<code>m.begin2 ()</code> to <code>m.end2 ()</code> is the same as -the distance from <code>m.rbegin2 ()</code> to <code>m.rend2 -()</code>.</td> -</tr> -</tbody> -</table> -<h4>Models</h4> -<ul> -<li><code>matrix_range</code></li> -<li><code>matrix_slice;</code></li> -<li><code>triangular_adaptor</code></li> -<li><code>symmetric_adaptor</code></li> -<li><code>banded_adaptor</code></li> -<li><code>vector_matrix_binary</code></li> -<li><code>matrix_unary1</code></li> -<li><code>matrix_unary2</code></li> -<li><code>matrix_binary</code></li> -<li><code>matrix_binary_scalar1</code></li> -<li><code>matrix_binary_scalar2</code></li> -<li><code>matrix_matrix_binary</code></li> -</ul> -<hr /> -<p>Copyright (©) 2000-2002 Joerg Walter, Mathias Koch<br /> - Use, modification and distribution are subject to the - Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt - or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> - http://www.boost.org/LICENSE_1_0.txt - </a>). -</p> -</body> -</html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> +<html xmlns="http://www.w3.org/1999/xhtml";> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link href="ublas.css" type="text/css" /> +<title>Expression Concepts</title> +</head> +<body> +<h1><img src="../../../../boost.png" align="middle" /> +表达式概念(表达式 Concepts)</h1>+<h2><a name="scalar_expression" id="scalar_expression"></a>标量表达式 (Scalar 表达式)</h2>
+<h4>说明</h4> +<p>一个标量表达式是一个可以转换为标量的表达式。</p> +<h4>优化(Refinement of)</h4> +<p>缺省构造。</p> +<h4>相关类型</h4> +<table border="1" summary="associated types"> +<tbody> +<tr> +<td>公有基类</td> +<td>scaler_expression<S></td> +<td>S 必须继承自这个公有基类。</td> +</tr> +<tr> +<td>值类型</td> +<td><code>value_type</code></td> +<td>标量表达式的类型。</td> +</tr> +</tbody> +</table> +<h4>记法(Notation)</h4> +<table border="0" summary="notation"> +<tbody> +<tr> +<td><code>S</code></td> +<td>标量表达式模型的类型</td> +</tr> +</tbody> +</table> +<h4>定义</h4> +<h4>合法表达式(Valid expressions)</h4> +<p>除了在缺省构造中定义的表达式之外,下面的表达式必须是合法的。</p> +<table border="1" summary="expressions"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>类型要求</th> +<th>返回值类型</th> +</tr> +<tr> +<td>运算</td> +<td><code>operator value_type () const</code></td> +<td> </td> +<td><code>value_type</code></td> +</tr> +</tbody> +</table> +<h4>表达式语义(表达式 semantics)</h4> +<p>一个表达式的语义仅当没有在缺省构造中定义的时候才得以定义。</p> +<table border="1" summary="semantics"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>先决条件</th> +<th>语义</th> +<th>后置条件</th> +</tr> +<tr> +<td>运算</td> +<td><code>operator value_type () const</code></td> +<td> </td> +<td> 计算标量表达式</td> +<td> </td> +</tr> +</tbody> +</table> +<h4>复杂度保证(Complexity guarantees)</h4> +<p>求值的运行时复杂度对于所计算的标量表达式是特定的(specific)。</p> +<h4>不变量(Invariants)</h4> +<h4>模型(Models)</h4> +<ul> +<li><code>vector_scalar_unary</code></li> +<li><code>vector_scalar_binary</code></li> +</ul>+<h2><a name="vector_expression" id="vector_expression"></a>向量表达式 (Vector 表达式)</h2>
+<h4>描述</h4> +<p>一个向量表达式是一个可以作为向量来计算的表达式。提供一个<a href=+"iterator_concept.htm#indexed_bidirectional_iterator">索引双向迭代器 (Indexed Bidirectional
+Iterator)</a> 或一个 <a href=+"iterator_concept.htm#indexed_random_access_iterator">索引随机访问迭代器 (Indexed Random Access
+Iterator)</a> 。</p> +<h4>优化(Refinement of)</h4> +<p>缺省构造</p> +<h4>相关类型</h4> +<table border="1" summary="associated types"> +<tbody> +<tr> +<td>公有基类</td> +<td>vector_expression<V></td> +<td>V 必须从这个公有基类型继承。</td> +</tr> +<tr> +<td>值类型</td> +<td><code>value_type</code></td> +<td> +向量表达式的元素类型。 +</td> +</tr> +<tr> +<td>引用类型</td> +<td><code>reference</code></td> +<td> +当访问一个向量表达式的元素时返回值的类型。 +<br /> +可以转化为<code>value_type</code>类型。 +</td> +</tr> +<tr> +<td>常引用类型</td> +<td><code>const_reference</code></td> +<td> +当访问一个常向量表达式(const vector expression)的元素时的返回值类型。 +<br /> +可以转化为<code>value_type</code>类型。 +</td> +</tr> +<tr> +<td>大小类型</td> +<td><code>size_type</code></td> +<td> +向量表达式的索引类型。一个无符号整型用于表示大小和索引值。 +<br /> +可以表达任何的<code>difference_type</code>类型的非负值。 +</td> +</tr> +<tr> +<td>距离类型</td> +<td><code>difference_type</code></td> +<td> +一个有符号整型用于表示两个向量表达式迭代器之间的距离。 +</td> +</tr> +<tr> +<td>常迭代器类型</td> +<td><code>const_iterator</code></td> +<td>一种用于检查向量表达式元素的类型。</td> +</tr> +<tr> +<td>迭代器类型</td> +<td><code>iterator</code></td> +<td>一种可以用于修改向量表达式元素的类型。</td> +</tr> +<tr> +<td>常量反向迭代器类型 </td> +<td><code>const_reverse_iterator</code></td>+<td>一个反向迭代器适配器(Reverse Iterator adaptor),它的基迭代器类型(base iterator type)是向量表达式的常量迭代器类型。
+</td> +</tr> +<tr> +<td>反向迭代器类型</td> +<td><code>reverse_iterator</code></td>+<td>一个反向迭代器适配器(Reverse Iterator adaptor),它的基迭代器类型(base iterator type)是向量表达式的迭代器类型。</td>
+</tr> +</tbody> +</table> +<h4>记法(Notation)</h4> +<table border="0" summary="notation"> +<tbody> +<tr> +<td><code>V</code></td> +<td>向量表达式模型的类型</td> +</tr> +<tr> +<td><code>v, v1, v2</code></td> +<td><code>V</code>类型的对象</td> +</tr> +<tr> +<td><code>i</code></td> +<td>可以转化为<code>size_type</code>类型的对象</td> +</tr> +<tr> +<td><code>t</code></td> +<td>可以转化为<code>value_type</code>类型的对象</td> +</tr> +</tbody> +</table> +<h4>定义</h4> +<h4>合法表达式(Valid expressions)</h4> +<p>除了在缺省构造中定义的表达式之外,下面的表达式必须是合法的。</p> +<table border="1" summary="expressions"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>类型要求</th> +<th>返回值类型</th> +</tr> +<tr> +<td rowspan="2">范围开始</td> +<td><code>v.begin ()</code></td> +<td> </td> +<td><code>const_iterator</code></td> +</tr> +<tr> +<td><code>v.begin ()</code></td> +<td><code>v</code>是可改变的(mutable)。</td> +<td><code>iterator</code></td> +</tr> +<tr> +<td rowspan="2">范围终止</td> +<td><code>v.end ()</code></td> +<td> </td> +<td><code>const_iterator</code></td> +</tr> +<tr> +<td><code>v.end ()</code></td> +<td><code>v</code>是可改变的(mutable)。</td> +<td><code>iterator</code></td> +</tr> +<tr> +<td>大小</td> +<td><code>v.size ()</code></td> +<td> </td> +<td><code>size_type</code></td> +</tr> +<tr> +<td>交换</td> +<td><code>v1.swap (v2)</code></td> +<td><code>v1</code> 和 <code>v2</code> 是可改变的(mutable)。</td> +<td><code>void</code></td> +</tr> +<tr> +<td rowspan="2">反向范围(reverse range)开始</td> +<td><code>v.rbegin ()</code></td> +<td> </td> +<td><code>const_reverse_iterator</code></td> +</tr> +<tr> +<td><code>v.rbegin ()</code></td> +<td><code>v</code>是可改变的(mutable)。</td> +<td><code>reverse_iterator</code></td> +</tr> +<tr> +<td rowspan="2">反向范围(reverse range)终止</td> +<td><code>v.rend ()</code></td> +<td> </td> +<td><code>const_reverse_iterator</code></td> +</tr> +<tr> +<td><code>v.rend ()</code></td> +<td><code>v</code>是可改变的(mutable)。</td> +<td><code>reverse_iterator</code></td> +</tr> +<tr> +<td>元素访问</td> +<td><code>v (i)</code></td> +<td><code>i</code> 可以转化为<code>size_type</code>类型。</td> +<td>可以转化为<code>value_type</code>类型。</td> +</tr> +<tr> +<td rowspan="2">赋值</td> +<td><code>v2 = v1</code></td> +<td><code>v2</code>是可改变的(mutable)且<code>v1</code>可以转化为 +<code>V</code>类型。</td> +<td><code>V &</code></td> +</tr> +<tr> +<td><code>v2.assign (v1)</code></td> +<td><code>v2</code>是可改变的(mutable)且<code>v1</code>可以转化为 +<code>V</code>类型。</td> +<td><code>V &</code></td> +</tr> +<tr> +<td rowspan="5">运算赋值(Computed assignment)</td> +<td><code>v2 += v1</code></td> +<td><code>v2</code>是可改变的(mutable)且<code>v1</code>可以转化为 +<code>V</code>类型。</td> +<td><code>V &</code></td> +</tr> +<tr> +<td><code>v2.plus_assign (v1)</code></td> +<td><code>v2</code>是可改变的(mutable)且<code>v1</code>可以转化为 +<code>V</code>类型。</td> +<td><code>V &</code></td> +</tr> +<tr> +<td><code>v2 -= v1</code></td> +<td><code>v2</code>>是可改变的(mutable)且<code>v1</code>可以转化为 +<code>V</code>类型。</td> +<td><code>V &</code></td> +</tr> +<tr> +<td><code>v2.minus_assign (v1)</code></td> +<td><code>v2</code>>是可改变的(mutable)且<code>v1</code>可以转化为 +<code>V</code>类型。</td> +<td><code>V &</code></td> +</tr> +<tr> +<td><code>v *= t</code></td> +<td><code>v</code>>是可改变的(mutable)且<code>t</code>可以转化为 +<code>value_type</code>类型。</td> +<td><code>V &</code></td> +</tr> +</tbody> +</table> +<h4>表达式语义</h4> +<p>一个表达式的语义仅当没有在缺省构造中定义的时候才得以定义。</p> +<table border="1" summary="semantics"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>先决条件</th> +<th>语义</th> +<th>后置条件</th> +</tr> +<tr> +<td>范围开始</td> +<td><code>v.begin ()</code></td> +<td> </td> +<td>返回指向向量表达式中的第一个元素的迭代器</td> +<td><code>v.begin ()</code>是可解引用的(dereferenceable)或 +past-the-end。 当且公当 <code>v.size () == +0</code> 时,<code>v.begin()</code>是past-the-end。</td> +</tr> +<tr> +<td>范围终止</td> +<td><code>v.end ()</code></td> +<td> </td>+<td>返回指向向量表达式最后一个元素的下一个位置(one past the last element)的 迭代器</td>
+<td><code>v.end ()</code> is past-the-end.</td> +</tr> +<tr> +<td>大小</td> +<td><code>v.size ()</code></td> +<td> </td> +<td>返回向量表达式的大小,也就是,它的元素的个数。</td> +<td><code>v.size () >= 0</code></td> +</tr> +<tr> +<td>交换</td> +<td><code>v1.swap (v2)</code></td> +<td> </td> +<td>等价于<code>swap (v1, v2)</code>。</td> +<td> </td> +</tr> +<tr> +<td>反向范围(reverse range)开始</td> +<td><code>v.rbegin ()</code></td> +<td> </td> +<td>等价于 <code>reverse_iterator (v.end ())</code>。</td> +<td><code>v.rbegin ()</code> 是可解引用的,或是+past-the-end。当且仅当<code>v.size () ==0</code>时,<code>v.rbegin ()</code>是past-the-end
+。</td> +</tr> +<tr> +<td>反向范围(reverse range)终止</td> +<td><code>v.rend ()</code></td> +<td> </td> +<td>等价于<code>reverse_iterator (v.begin ())</code>。</td> +<td><code>v.rend ()</code>是 past-the-end。</td> +</tr> +<tr> +<td>元素访问</td> +<td><code>v (i)</code></td> +<td><code>0 <= i < v.size ()</code></td> +<td>返回向量表达式的第<code>i</code>-th 个元素。 +</td> +<td> </td> +</tr> +<tr> +<td rowspan="2">赋值</td> +<td><code>v2 = v1</code></td> +<td><code>v1.size () == v2.size ()</code></td> +<td>将向量表达式 +<code>v1</code>的每个元素赋给向量表达式<code>v2</code> +的对应元素。</td> +<td> </td> +</tr> +<tr> +<td><code>v2.assign (v1)</code></td> +<td><code>v1.size () == v2.size ()</code></td> +<td>将向量表达式<code>v1</code>的每个元素赋给向量表达式 +<code>v2</code>的对应元素。</td> +<td> </td> +</tr> +<tr> +<td rowspan="5">运算赋值(Computed assignment)</td> +<td><code>v2 += v1</code></td> +<td><code>v1.size () == v2.size ()</code></td> +<td>将被求值的向量表达式<code>v1</code>的每一个元素加到向量表达式 +<code>v2</code>的对应的元素。</td> +<td> </td> +</tr> +<tr> +<td><code>v2.plus_assign (v1)</code></td> +<td><code>v1.size () == v2.size ()</code></td> +<td>将被求值的向量表达式<code>v1</code>的每一个元素加到向量表达式 +<code>v2</code>的对应的元素。</td> +<td> </td> +</tr> +<tr> +<td><code>v2 -= v1</code></td> +<td><code>v1.size () == v2.size ()</code></td>+<td>从向量表达式<code>v2</code>的每个元素中减去被求值的向量表达式 <code>v1</code>的对应的元素。
+</td> +<td> </td> +</tr> +<tr> +<td><code>v2.minus_assign (v1)</code></td> +<td><code>v1.size () == v2.size ()</code></td>+<td>从向量表达式<code>v2</code>的每个元素中减去被求值的向量表达式 <code>v1</code>的对应的元素。</td>
+<td> </td> +</tr> +<tr> +<td><code>v *= t</code></td> +<td> </td> +<td>将向量表达式<code>v</code>中的每个元素乘以<code>t</code> +。</td> +<td> </td> +</tr> +</tbody> +</table> +<h4>复杂度保证(Complexity guarantees)</h4> +<p>对于被计算的向量表达式,函数<code>begin ()</code> 和 <code>end+()</code> 的运行时复杂度( run-time complexity)是特定的,典型情况是摊还常量 时间。</p> +<p>函数<code>size ()</code> 的运行时复杂度(run-time complexity)是常量时间 (constant
+time)。</p>+<p>对于被计算的向量表达式,函数<code>swap ()</code>的运行时复杂度( run-time complexity)是特定的,典型情况是常量时间。</p>
+<p>对于被计算的向量表达式,函数<code>rbegin ()</code> and <code>rend+()</code>的运行时复杂度( run-time complexity)是特定的,典型情况是摊还常量时 间。</p> +<p>对于被计算的向量表达式,元素访问的运行时复杂度(run-time complexity)是特 定的,典型情况下,对于密集(dense)向量是摊还常量时间(amortized constant time),对于稀疏(sparse)向量是对数时间(logarithmic)。</p> +<p>对于被计算的向量表达式,算术运算的运行时复杂度(run-time complexity)是特 定的,典型情况下, 是关于表达式大小的线性时间。</p>
+<h4>不变量(Invariants)</h4> +<table border="1" summary="invariants"> +<tbody> +<tr> +<td>合法范围</td> +<td>对于任何的向量表达式<code>v</code>, <code>[v.begin (), +v.end ())</code> 都是合法的范围。</td> +</tr> +<tr> +<td>完整性(Computed assignment)</td> +<td>迭代整个<code>[v.begin (), +v.end ())</code>的算法将会遍历<code>v</code>的每个元素。 +</td> +</tr> +<tr> +<td>合法反向范围(valid reverse range)</td> +<td><code>[v.rbegin (), v.rend ())</code>是一个合法的范围。</td> +</tr> +<tr> +<td>等价范围(Equivalence of ranges)</td> +<td>从<code>v.begin ()</code> 到 <code>v.end +()</code>的距离与从<code>v.rbegin ()</code> +到 <code>v.rend ()</code>的距离是一样的。</td> +</tr> +</tbody> +</table> +<h4>模型(Models)</h4> +<ul> +<li><code>vector_range;</code></li> +<li><code>vector_slice</code></li> +<li><code>matrix_row</code></li> +<li><code>matrix_column</code></li> +<li><code>matrix_vector_range</code></li> +<li><code>matrix_vector_slice</code></li> +<li><code>vector_unary</code></li> +<li><code>vector_binary</code></li> +<li><code>vector_binary_scalar1</code></li> +<li><code>vector_binary_scalar2</code></li> +<li><code>matrix_vector_unary1</code></li> +<li><code>matrix_vector_unary2</code></li> +<li><code>matrix_vector_binary1</code></li> +<li><code>matrix_vector_binary2</code></li> +</ul> + +<h2><a name="matrix_expression" id="matrix_expression"></a>矩阵表达式</h2> +<h4>描述</h4> +<p> 一个矩阵表达式是一个可以作为矩阵计算的表达式。 +矩阵表达式提供一个<a href=+"iterator_concept.htm#indexed_bidirectional_cr_iterator">索引双向列/行迭代 器(Indexed
+Bidirectional Column/Row Iterator)</a> 或一个<a href=+"iterator_concept.htm#indexed_random_access_cr_iterator">索引随机访问列/行 迭代器(Indexed Random
+Access Column/Row Iterator)</a> 。 </p> +<h4>优化(Refinement of)</h4> +<p>缺省构造。</p> +<h4>相关类型</h4> +<table border="1" summary="associated types"> +<tbody> +<tr> +<td>公有基类</td> +<td>matrix_expression<M></td> +<td>M 必须从这个公有基类型派生。</td> +</tr> +<tr> +<td>值类型</td> +<td><code>value_type</code></td> +<td> +矩阵表达式的元素类型。 +</td> +</tr> +<tr> +<td>引用类型</td> +<td><code>reference</code></td> +<td> +访问矩阵表达式的元素时的返回值的类型。 +<br /> +可以转化为<code>value_type</code>类型。 +</td> +</tr> +<tr> +<td>常引用类型</td> +<td><code>const_reference</code></td> +<td> +访问一个常量矩阵表达式(constant matrix expression)时的返回值类型。 +<br /> +可以转化为<code>value_type</code>类型。 +</td> +</tr> +<tr> +<td>大小类型</td> +<td><code>size_type</code></td> +<td> +向量表达式的索引类型。一个无符号整型用于大小和索引类型。 +<br /> +可以转化为任何的<code>difference_type</code>类型的非负值。 +</td> +</tr> +<tr> +<td>距离类型</td> +<td><code>difference_type</code></td> +<td> +一个有符号的整型用于表示两个矩阵表达式迭代器之间的距离。 +</td> +</tr> +<tr> +<td rowspan="2">常量迭代器类型</td> +<td><code>const_iterator1</code></td> +<td>用于检查一个矩阵表达式元素的列向量的类型。</td> +</tr> +<tr> +<td><code>const_iterator2</code></td> +<td>用于检查一个矩阵表达式元素的行向量的类型。</td> +</tr> +<tr> +<td rowspan="2">迭代器类型</td> +<td><code>iterator1</code></td> +<td>可以用于修改一个矩阵表达式元素的列向量的类型。</td> +</tr> +<tr> +<td><code>iterator2</code></td> +<td>可以用于修改一个矩阵表达式元素的行向量的类型。</td> +</tr> +<tr> +<td rowspan="2">常量反向迭代器类型</td> +<td><code>const_reverse_iterator1</code></td>+<td>一个反向迭代器适配器(Reverse Iterator adaptor),它的基迭代器类型(base iterator type)是矩阵表达式的
+常量列向量迭代器类型(const column iterator type)。</td> +</tr> +<tr> +<td><code>const_reverse_iterator2</code></td>+<td>一个反向迭代器适配器(Reverse Iterator adaptor),它的基迭代器类型(base iterator type)是矩阵表达式的
+常量行向量迭代器类型(const column iterator type)。</td> +</tr> +<tr> +<td rowspan="2">反向迭代器类型</td> +<td><code>reverse_iterator1</code></td>+<td>一个反向迭代器适配器(Reverse Iterator adaptor),它的基迭代器类型(base iterator type)是矩阵表达式的
+列向量迭代器类型(const column iterator type)。</td> +</tr> +<tr> +<td><code>reverse_iterator2</code></td>+<td>一个反向迭代器适配器(Reverse Iterator adaptor),它的基迭代器类型(base iterator type)是矩阵表达式的
+行向量迭代器类型(const column iterator type)。</td> +</tr> +</tbody> +</table> +<h4>记法(Notation)</h4> +<table border="0" summary="notation"> +<tbody> +<tr> +<td><code>M</code></td> +<td>矩阵表达式模型的类型</td> +</tr> +<tr> +<td><code>m, m1, m2</code></td> +<td><code>M</code>类型的对象</td> +</tr> +<tr> +<td><code>i, j</code></td> +<td>可以转化为<code>size_type</code>类型的对象</td> +</tr> +<tr> +<td><code>t</code></td> +<td>可以转化为<code>value_type</code>类型的对象</td> +</tr> +</tbody> +</table> +<h4>定义</h4> +<h4>合法表达式(Valid expressions)</h4> +<p>除了在缺省构造中定义的表达式之外,下面的表达式必须是合法的。</p> +<table border="1" summary="expressions"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>类型要求</th> +<th>返回值类型</th> +</tr> +<tr> +<td rowspan="4">范围开始</td> +<td><code>m.begin1 ()</code></td> +<td> </td> +<td><code>const_iterator1</code></td> +</tr> +<tr> +<td><code>m.begin2 ()</code></td> +<td> </td> +<td><code>const_iterator2</code></td> +</tr> +<tr> +<td><code>m.begin1 ()</code></td> +<td><code>m</code>是可改变的。 </td> +<td><code>iterator1</code></td> +</tr> +<tr> +<td><code>m.begin2 ()</code></td> +<td><code>m</code>是可改变的。</td> +<td><code>iterator2</code></td> +</tr> +<tr> +<td rowspan="4">范围终止</td> +<td><code>m.end1 ()</code></td> +<td> </td> +<td><code>const_iterator1</code></td> +</tr> +<tr> +<td><code>m.end2 ()</code></td> +<td> </td> +<td><code>const_iterator2</code></td> +</tr> +<tr> +<td><code>m.end1 ()</code></td> +<td><code>m</code>是可改变的。 </td> +<td><code>iterator1</code></td> +</tr> +<tr> +<td><code>m.end2 ()</code></td> +<td><code>m</code>是可改变的。</td> +<td><code>iterator2</code></td> +</tr> +<tr> +<td rowspan="2">大小</td> +<td><code>m.size1 ()</code></td> +<td> </td> +<td><code>size_type</code></td> +</tr> +<tr> +<td><code>m.size2 ()</code></td> +<td> </td> +<td><code>size_type</code></td> +</tr> +<tr> +<td>交换</td> +<td><code>m1.swap (m2)</code></td> +<td><code>m1</code> and <code>m2</code> are mutable. </td> +<td><code>void</code></td> +</tr> +<tr> +<td rowspan="4">反向范围(reverse range)开始</td> +<td><code>m.rbegin1 ()</code></td> +<td> </td> +<td><code>const_reverse_iterator1</code></td> +</tr> +<tr> +<td><code>m.rbegin2 ()</code></td> +<td> </td> +<td><code>const_reverse_iterator2</code></td> +</tr> +<tr> +<td><code>m.rbegin1 ()</code></td> +<td><code>m</code>是可改变的。 </td> +<td><code>reverse_iterator1</code></td> +</tr> +<tr> +<td><code>m.rbegin2 ()</code></td> +<td><code>m</code>是可改变的。</td> +<td><code>reverse_iterator2</code></td> +</tr> +<tr> +<td rowspan="4">反向范围(reverse range)终止</td> +<td><code>m.rend1 ()</code></td> +<td> </td> +<td><code>const_reverse_iterator1</code></td> +</tr> +<tr> +<td><code>m.rend2 ()</code></td> +<td> </td> +<td><code>const_reverse_iterator2</code></td> +</tr> +<tr> +<td><code>m.rend1 ()</code></td> +<td><code>m</code>是可改变的。</td> +<td><code>reverse_iterator1</code></td> +</tr> +<tr> +<td><code>m.rend2 ()</code></td> +<td><code>m</code>是可改变的。</td> +<td><code>reverse_iterator2</code></td> +</tr> +<tr> +<td>元素访问</td> +<td><code>m (i, j)</code></td> +<td><code>i</code>且<code>j</code>可以转化为 +<code>size_type</code>类型。</td> +<td>可以转化为<code>value_type</code>类型。</td> +</tr> +<tr> +<td rowspan="2">赋值</td> +<td><code>m2 = m1</code></td> +<td><code>m2</code>是可改变的(mutable)且<code>m1</code>可以转化为 +<code>M</code>类型。</td> +<td><code>M &</code></td> +</tr> +<tr> +<td><code>m2.assign (m1)</code></td> +<td><code>m2</code>是可改变的(mutable)且<code>m1</code>可以转化为 +<code>M</code>类型。</td> +<td><code>M &</code></td> +</tr> +<tr> +<td rowspan="5">运算赋值(Computed assignment)</td> +<td><code>m2 += m1</code></td> +<td><code>m2</code>是可改变的(mutable)且<code>m1</code>可以转化为 +<code>M</code>类型。</td> +<td><code>M &</code></td> +</tr> +<tr> +<td><code>m2.plus_assign (m1)</code></td> +<td><code>m2</code>是可改变的(mutable)且<code>m1</code>可以转化为 +<code>M</code>类型。</td> +<td><code>M &</code></td> +</tr> +<tr> +<td><code>m2 -= m1</code></td> +<td><code>m2</code> is mutable and <code>m1</code>可以转化为 +<code>M</code>类型。</td> +<td><code>M &</code></td> +</tr> +<tr> +<td><code>m2.minus_assign (m1)</code></td> +<td><code>m2</code>是可改变的(mutable)且<code>m1</code>可以转化为 +<code>M</code>类型。</td> +<td><code>M &</code></td> +</tr> +<tr> +<td><code>m *= t</code></td> +<td><code>m</code>是可改变的(mutable)且<code>t</code>可以转化为 +<code>value_type</code>类型。</td> +<td><code>M &</code></td> +</tr> +</tbody> +</table> +<h4>表达式语义(表达式 semantics)</h4> +<p>一个表达式的语义仅当没有在缺省构造中定义的时候才得以定义。</p> +<table border="1" summary="semantics"> +<tbody> +<tr> +<th>名称</th> +<th>表达式</th> +<th>先决条件</th> +<th>语义</th> +<th>后置条件</th> +</tr> +<tr> +<td rowspan="2">范围开始</td> +<td><code>m.begin1 ()</code></td> +<td> </td> +<td>返回指向矩阵表达式的第一列的第一个元素的迭代器 +。</td> +<td><code>m.begin1 ()</code>是可解引用的(dereferenceable)或+past-the-end。当且仅当 <code>m.size1 () ==past-the-end if and only if <code>m.size1 () == 0</code>时,
+<code>m.begin1 ()</code>是past-the-end。</td> +</tr> +<tr> +<td><code>m.begin2 ()</code></td> +<td> </td> +<td>返回指向矩阵表达式的第一列的第一个元素的迭代器 +。</td> +<td><code>m.begin2 ()</code>是可解引用的(dereferenceable)或 +past-the-end。当且仅当 <code>m.size2 () == 0</code>时, +<code>m.begin2 ()</code>是past-the-end。</td> +</tr> +<tr> +<td rowspan="2">范围终止</td> +<td><code>m.end1 ()</code></td> +<td> </td>+<td>返回指向矩阵表达式的最后一个元素之外的一个元素(one past the last element)的迭代器。
+</td> +<td><code>m.end1 ()</code>是 past-the-end。</td> +</tr> +<tr> +<td><code>m.end2 ()</code></td> +<td> </td>+<td>返回指向矩阵表达式的最后一个元素之外的一个元素(one past the last element)的迭代器。
+</td> +<td><code>m.end2 ()</code>是 past-the-end。</td> +</tr> +<tr> +<td rowspan="2">大小</td> +<td><code>m.size1 ()</code></td> +<td> </td> +<td>返回向量表达式的行数。</td> +<td><code>m.size1 () >= 0</code></td> +</tr> +<tr> +<td><code>m.size2 ()</code></td> +<td> </td> +<td>返回矩阵表达式的列数。</td> +<td><code>m.size2 () >= 0</code></td> +</tr> +<tr> +<td>交换</td> +<td><code>m1.swap (m2)</code></td> +<td> </td> +<td>等价于<code>swap (m1, m2)</code>。</td> +<td> </td> +</tr> +<tr> +<td rowspan="2">反向范围(reverse range)开始</td> +<td><code>m.rbegin1 ()</code></td> +<td> </td> +<td>等价于<code>reverse_iterator1 (m.end1 ())</code>。</td> +<td><code>m.rbegin1 ()</code>是可解引用的(dereferenceable)或+past-the-end。当且仅当<code>m.size1 () == 0</code>时,<code>m.rbegin1 ()</code>是past-the-end。
+</td> +</tr> +<tr> +<td><code>m.rbegin2 ()</code></td> +<td> </td> +<td>等价于<code>reverse_iterator2 (m.end2 ())</code>。</td> +<td><code>m.rbegin2 ()</code>是可解引用的(dereferenceable)或+past-the-end。当且仅当<code>m.size2 () == 0</code>时,<code>m.rbegin2 ()</code>是past-the-end。</td>
+</tr> +<tr> +<td rowspan="2">反向范围(reverse range)终止</td> +<td><code>m.rend1 ()</code></td> +<td> </td> +<td>等价于<code>reverse_iterator1 (m.begin1 +())</code>。</td> +<td><code>m.rend1 ()</code>是 past-the-end。</td> +</tr> +<tr> +<td><code>m.rend2 ()</code></td> +<td> </td> +<td>等价于<code>reverse_iterator2 (m.begin2 +())</code>。</td> +<td><code>m.rend2 ()</code>是 past-the-end。</td> +</tr> +<tr> +<td>元素访问</td> +<td><code>m (i, j)</code></td> +<td><code>0 <= i < m.size1 ()</code> 且 <code>0 <= j < +m.size2 ()</code></td> +<td>返回矩阵表达式中第 <code>i</code>-th行第<code>j</code>-th +个元素。</td> +<td> </td> +</tr> +<tr> +<td rowspan="2">赋值</td> +<td><code>m2 = m1</code></td> +<td><code>m1.size1 () == m2.size1 ()</code> 且 <code><br /> +m1.size2 () == m2.size2 ()</code></td> +<td>将被求值的矩阵表达式<code>m1</code>中的每一个元素赋给 +矩阵表达式 <code>m2</code>中的对应的元素。 +</td> +<td> </td> +</tr> +<tr> +<td><code>m2.assign (m1)</code></td> +<td><code>m1.size1 () == m2.size1 ()</code> 且 <code><br /> +m1.size2 () == m2.size2 ()</code></td> +<td>被求值的矩阵表达式<code>m1</code>中的每一个元素赋给 +矩阵表达式 <code>m2</code>中的对应的元素。</td> +<td> </td> +</tr> +<tr> +<td rowspan="5">运算赋值(Computed assignment)</td> +<td><code>m2 += m1</code></td> +<td><code>m1.size1 () == m2.size1 ()</code> 且 <code><br /> +m1.size2 () == m2.size2 ()</code></td> +<td>被求值的矩阵表达式<code>m1</code>中的每一个元素加到 +矩阵表达式 <code>m2</code>中的对应的元素。</td> +<td> </td> +</tr> +<tr> +<td><code>m2.plus_assign (m1)</code></td> +<td><code>m1.size1 () == m2.size1 ()</code> 且 <code><br /> +m1.size2 () == m2.size2 ()</code></td> +<td>被求值的矩阵表达式<code>m1</code>中的每一个元素加到 +矩阵表达式 <code>m2</code>中的对应的元素。</td> +<td> </td> +</tr> +<tr> +<td><code>m2 -= m1</code></td> +<td><code>m1.size1 () == m2.size1 ()</code> 且 <code><br /> +m1.size2 () == m2.size2 ()</code></td> +<td>从矩阵表达式 +<code>m2</code>中的每个元素中减去矩阵表达式<code>m1</code> +中的对应元素。</td> +<td> </td> +</tr> +<tr> +<td><code>m2.minus_assign (m1)</code></td> +<td><code>m1.size1 () == m2.size1 ()</code> 且 <code><br /> +m1.size2 () == m2.size2 ()</code></td> +<td>从矩阵表达式 +<code>m2</code>中的每个元素中减去矩阵表达式<code>m1</code> +中的对应元素。</td> +<td> </td> +</tr> +<tr> +<td><code>m *= t</code></td> +<td> </td> +<td>将矩阵表达式<code>m</code>中的每个元素乘以<code>t</code> +。</td> +<td> </td> +</tr> +</tbody> +</table> +<h4>复杂度保证(Complexity guarantees)</h4> +<p>对于被计算的矩阵表达式,函数<code>begin1 ()</code>, <code>begin2+()</code> , <code>end1 ()</code> 和 <code>end2 ()</code> 的运行时复杂度( run-time complexity)是特定的。</p>
+<p>对于被计算的矩阵表达式,函数<code>size1 ()</code> and <code>size2 +()</code> 的运行时复杂度( run-time complexity)是常量。</p>+<p>对于被计算的矩阵表达式,函数<code>swap ()</code> 的运行时复杂度( run-time complexity)是特定的,典型情况是常量时间。</p>
+<p>对于被计算的矩阵表达式,函数<code>rbegin1 ()</code>, +<code>rbegin2 ()</code> , <code>rend1 ()</code> 和 <code>rend2 +()</code> 的运行时复杂度( run-time complexity)是特定的。</p>+<p>对于被计算的矩阵表达式,元素访问的运行时复杂度(run-time complexity)是特 定的,典型情况下,对于密集(dense)矩阵是摊还常量时间(amortized constant time),对于稀疏(sparse)矩阵是对数时间(logarithmic)。</p> +<p>对于被计算的向量表达式,算术运算的运行时复杂度(run-time complexity)是特 定的,典型情况下, 是关于代理(proxies)大小的平方时间。</p>
+<h4>不变量(Invariants)</h4> +<table border="1" summary="invariants"> +<tbody> +<tr> +<td>合法范围</td> +<td>对于任何的矩阵类型<code>m</code>, <code>[m.begin1 (),+m.end1 ())</code> 和 <code>[m.begin2 (), m.end2 ())</code> 都是合法的区间。 </td>
+</tr> +<tr> +<td>完整性(Computed assignment)</td> +<td>一个迭代整个<code>[m.begin1 +(), m.end1 ())</code>区间的算法将会遍历<code>m</code>的每一行 +, 一个迭代整个<code>[m.begin2 (), +m.end2 ())</code>区间的元将会遍历整个<code>m</code>的每一行。 +</td> +</tr> +<tr> +<td>合法反向范围(valid reverse range)</td> +<td><code>[m.rbegin1 (), m.rend1 ())</code> 和 <code>[m.rbegin2 +(), m.rend2 ())</code> 都是合法范围。</td> +</tr> +<tr> +<td>等价范围(Equivalence of ranges)</td> +<td>从<code>m.begin1 ()</code> 到 <code>m.end1 +()</code> 的距离与从<code>m.rbegin1 +()</code> 到 <code>m.rend1 ()</code>的距离是一样的,且从 +<code>m.begin2 ()</code> 到 <code>m.end2 ()</code>的距离与 +从<code>m.rbegin2 ()</code> 到 <code>m.rend2 +()</code>的距离是一样的。</td> +</tr> +</tbody> +</table> +<h4>模型(Models)</h4> +<ul> +<li><code>matrix_range</code></li> +<li><code>matrix_slice;</code></li> +<li><code>triangular_adaptor</code></li> +<li><code>symmetric_adaptor</code></li> +<li><code>banded_adaptor</code></li> +<li><code>vector_matrix_binary</code></li> +<li><code>matrix_unary1</code></li> +<li><code>matrix_unary2</code></li> +<li><code>matrix_binary</code></li> +<li><code>matrix_binary_scalar1</code></li> +<li><code>matrix_binary_scalar2</code></li> +<li><code>matrix_matrix_binary</code></li> +</ul> +<hr /> +<p>Copyright (©) 2000-2002 Joerg Walter, Mathias Koch<br /> + Use, modification and distribution are subject to the + Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt + or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";> + http://www.boost.org/LICENSE_1_0.txt + </a>). +</p> +</body> +</html> Modified: trunk/libs/numeric/ublas/doc/hermitian.htm ============================================================================== --- trunk/libs/numeric/ublas/doc/hermitian.htm (original) +++ trunk/libs/numeric/ublas/doc/hermitian.htm Wed Jan 7 23:44:16 2009 @@ -1,589 +1,528 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> -<html xmlns="http://www.w3.org/1999/xhtml";> -<head> -<meta name="generator" content= -"HTML Tidy for Linux/x86 (vers 1st March 2004), see www.w3.org" /> -<meta http-equiv="Content-Type" content= -"text/html; charset=us-ascii" /> -<link href="ublas.css" type="text/css" /> -<title>Hermitian Matrix</title> -</head> -<body> -<h1><img src="../../../../boost.png" align="middle" /> -Hermitian Matrix</h1>-<h2><a name="hermitian_matrix" id="hermitian_matrix"></a>Hermitian Matrix</h2>
-<h4>Description</h4> -<p>The templated class <code>hermitian_matrix<T, F1, F2, -A></code> is the base container adaptor for hermitian matrices. -For a <em>(n x n</em> )-dimensional hermitian matrix and <em>0 -<= i < n</em>, <em>0 <= j < n</em> holds -<em>h</em><sub><em>i, j</em></sub> <em>= h</em><sub><em>j, -i</em></sub><sup><em>-</em></sup>. The storage of hermitian -matrices is packed.</p> -<h4>Example</h4> -<pre> -#include <boost/numeric/ublas/hermitian.hpp> -#include <boost/numeric/ublas/io.hpp> - -int main () { - using namespace boost::numeric::ublas; - hermitian_matrix<std::complex<double>, lower> ml (3, 3); - for (unsigned i = 0; i < ml.size1 (); ++ i) { - for (unsigned j = 0; j < i; ++ j) - ml (i, j) = std::complex<double> (3 * i + j, 3 * i + j); - ml (i, i) = std::complex<double> (4 * i, 0); - } - std::cout << ml << std::endl; - hermitian_matrix<std::complex<double>, upper> mu (3, 3); - for (unsigned i = 0; i < mu.size1 (); ++ i) { - mu (i, i) = std::complex<double> (4 * i, 0); - for (unsigned j = i + 1; j < mu.size2 (); ++ j) - mu (i, j) = std::complex<double> (3 * i + j, 3 * i + j); - } - std::cout << mu << std::endl; -} -</pre> -<h4>Definition</h4> -<p>Defined in the header hermitian.hpp.</p> -<h4>Template parameters</h4> -<table border="1" summary="parameters"> -<tbody> -<tr> -<th>Parameter</th> -<th>Description</th> -<th>Default</th> -</tr> -<tr> -<td><code>T</code></td> -<td>The type of object stored in the matrix.</td> -<td></td> -</tr> -<tr> -<td><code>F1</code></td> -<td>Functor describing the type of the hermitian matrix. <a href= -"#hermitian_matrix_1">[1]</a></td> -<td><code>lower</code></td> -</tr> -<tr> -<td><code>F2</code></td> -<td>Functor describing the storage organization. <a href= -"#hermitian_matrix_2">[2]</a></td> -<td><code>row_major</code></td> -</tr> -<tr> -<td><code>A</code></td> -<td>The type of the adapted array. <a href= -"#hermitian_matrix_3">[3]</a></td> -<td><code>unbounded_array<T></code></td> -</tr> -</tbody> -</table> -<h4>Model of</h4> -<p><a href="container_concept.htm#matrix">Matrix</a> .</p> -<h4>Type requirements</h4> -<p>None, except for those imposed by the requirements of <a href= -"container_concept.htm#matrix">Matrix</a> .</p> -<h4>Public base classes</h4> -<p><code>matrix_container<hermitian_matrix<T, F1, F2, A> -></code></p> -<h4>Members</h4> -<table border="1" summary="members"> -<tbody> -<tr> -<th>Member</th> -<th>Description</th> -</tr> -<tr> -<td><code>hermitian_matrix ()</code></td> -<td>Allocates an uninitialized <code>hermitian_matrix</code> that -holds zero rows of zero elements.</td> -</tr> -<tr> -<td><code>hermitian_matrix (size_type size)</code></td> -<td>Allocates an uninitialized <code>hermitian_matrix</code> that -holds <code>size</code> rows of <code>size</code> elements.</td> -</tr> -<tr> -<td><code>hermitian_matrix (const hermitian_matrix -&m)</code></td> -<td>The copy constructor.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -hermitian_matrix (const matrix_expression<AE> -&ae)</code></td> -<td>The extended copy constructor.</td> -</tr> -<tr> -<td><code>void resize (size_type size, bool preserve = -true)</code></td> -<td>Reallocates a <code>hermitian_matrix</code> to hold -<code>size</code> rows of <code>size</code> elements. The existing -elements of the <code>hermitian_matrix</code> are preseved when -specified.</td> -</tr> -<tr> -<td><code>size_type size1 () const</code></td> -<td>Returns the number of rows.</td> -</tr> -<tr> -<td><code>size_type size2 () const</code></td> -<td>Returns the number of columns.</td> -</tr> -<tr> -<td><code>const_reference operator () (size_type i, size_type j) -const</code></td> -<td>Returns a <code>const</code> reference of the <code>j</code> --th element in the <code>i</code>-th row.</td> -</tr> -<tr> -<td><code>reference operator () (size_type i, size_type -j)</code></td> -<td>Returns a reference of the <code>j</code>-th element in the -<code>i</code>-th row.</td> -</tr> -<tr> -<td><code>hermitian_matrix &operator = (const hermitian_matrix -&m)</code></td> -<td>The assignment operator.</td> -</tr> -<tr> -<td><code>hermitian_matrix &assign_temporary (hermitian_matrix -&m)</code></td> -<td>Assigns a temporary. May change the hermitian matrix -<code>m</code> .</td> -</tr> -<tr> -<td><code>template<class AE><br /> -hermitian_matrix &operator = (const matrix_expression<AE> -&ae)</code></td> -<td>The extended assignment operator.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -hermitian_matrix &assign (const matrix_expression<AE> -&ae)</code></td> -<td>Assigns a matrix expression to the hermitian matrix. Left and -right hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -hermitian_matrix &operator += (const -matrix_expression<AE> &ae)</code></td> -<td>A computed assignment operator. Adds the matrix expression to -the hermitian matrix.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -hermitian_matrix &plus_assign (const -matrix_expression<AE> &ae)</code></td> -<td>Adds a matrix expression to the hermitian matrix. Left and -right hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -hermitian_matrix &operator -= (const -matrix_expression<AE> &ae)</code></td> -<td>A computed assignment operator. Subtracts the matrix expression -from the hermitian matrix.</td> -</tr> -<tr> -<td><code>template<class AE><br /> -hermitian_matrix &minus_assign (const -matrix_expression<AE> &ae)</code></td> -<td>Subtracts a matrix expression from the hermitian matrix. Left -and right hand side of the assignment should be independent.</td> -</tr> -<tr> -<td><code>template<class AT><br /> -hermitian_matrix &operator *= (const AT &at)</code></td> -<td>A computed assignment operator. Multiplies the hermitian matrix -with a scalar.</td> -</tr> -<tr> -<td><code>template<class AT><br /> -hermitian_matrix &operator /= (const AT &at)</code></td> -<td>A computed assignment operator. Divides the hermitian matrix -through a scalar.</td> -</tr> -<tr> -<td><code>void swap (hermitian_matrix &m)</code></td> -<td>Swaps the contents of the hermitian matrices.</td> -</tr> -<tr> -<td><code>void insert (size_type i, size_type j, const_reference -t)</code></td> -<td>Inserts the value <code>t</code> at the <code>j</code>-th -element of the <code>i</code>-th row.</td> -</tr> -<tr> -<td><code>void erase (size_type i, size_type j)</code></td> -<td>Erases the value at the <code>j</code>-th elemenst of the -<code>i</code>-th row.</td> -</tr> -<tr> -<td><code>void clear ()</code></td> -<td>Clears the matrix.</td> -</tr> -<tr> -<td><code>const_iterator1 begin1 () const</code></td> -<td>Returns a <code>const_iterator1</code> pointing to the -beginning of the <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>const_iterator1 end1 () const</code></td> -<td>Returns a <code>const_iterator1</code> pointing to the end of -the <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>iterator1 begin1 ()</code></td> -<td>Returns a <code>iterator1</code> pointing to the beginning of -the <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>iterator1 end1 ()</code></td> -<td>Returns a <code>iterator1</code> pointing to the end of the -<code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>const_iterator2 begin2 () const</code></td> -<td>Returns a <code>const_iterator2</code> pointing to the -beginning of the <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>const_iterator2 end2 () const</code></td> -<td>Returns a <code>const_iterator2</code> pointing to the end of -the <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>iterator2 begin2 ()</code></td> -<td>Returns a <code>iterator2</code> pointing to the beginning of -the <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>iterator2 end2 ()</code></td> -<td>Returns a <code>iterator2</code> pointing to the end of the -<code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator1 rbegin1 () const</code></td> -<td>Returns a <code>const_reverse_iterator1</code> pointing to the -beginning of the reversed <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator1 rend1 () const</code></td> -<td>Returns a <code>const_reverse_iterator1</code> pointing to the -end of the reversed <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator1 rbegin1 ()</code></td> -<td>Returns a <code>reverse_iterator1</code> pointing to the -beginning of the reversed <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>reverse_iterator1 rend1 ()</code></td> -<td>Returns a <code>reverse_iterator1</code> pointing to the end of -the reversed <code>hermitian_matrix</code>.</td> -</tr> -<tr> -<td><code>const_reverse_iterator2 rbegin2 () const</code></td> -<td>Returns a <code>const_reverse_iterator2</code> pointing to the -beginning of the reversed <code>hermitian_matrix</code>.</td> -</tr> -<tr> ============================================================================== Diff truncated at 200k characters