1 ?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <title>Special Products</title>
6 <meta name="GENERATOR" content="Quanta Plus" />
7 <meta name="AUTHOR" content="Gunter Winkler" />
8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
9 <link rel="stylesheet" href="../../../../boost.css" type="text/css"/>
10 <link rel="stylesheet" href="ublas.css" type="text/css" />
11 <script type="text/javascript" src="js/jquery-1.3.2.min.js" async="async" ></script>
12 <script type="text/javascript" src="js/jquery.toc-gw.js" async="async" ></script>
16 <h1><img src="../../../../boost.png" align="middle" />Special Products </h1>
17 <div class="toc" id="toc"></div>
21 <table summary="" border=0 cellpadding=0 cellspacing=0>
23 <td class="memItemLeft" nowrap align=right valign=top>template<class V, class E1, class E2> BOOST_UBLAS_INLINE V & </td>
24 <td class="memItemRight" valign=bottom><a class="el" href="#ga8">axpy_prod</a> (const matrix_expression< E1 > &e1, const vector_expression< E2 > &e2, V &v, bool init=true)</td></tr>
27 <td class="mdescLeft"> </td>
28 <td class="mdescRight">computes <code>v += A x</code> or <code>v = A x</code> in an optimized fashion. <a href="#ga8"></a><br /><br /></td></tr>
30 <td class="memItemLeft" nowrap align=right valign=top>template<class V, class E1, class E2> BOOST_UBLAS_INLINE V & </td>
31 <td class="memItemRight" valign=bottom><a class="el" href="#ga9">axpy_prod</a> (const vector_expression< E1 > &e1, const matrix_expression< E2 > &e2, V &v, bool init=true)</td></tr>
34 <td class="mdescLeft"> </td>
35 <td class="mdescRight">computes <code>v += A<sup>T</sup> x</code> or <code>v = A<sup>T</sup> x</code> in an optimized fashion. <a href="#ga9"></a><br /><br /></td></tr>
37 <td class="memItemLeft" nowrap align=right valign=top>template<class M, class E1, class E2> BOOST_UBLAS_INLINE M & </td>
38 <td class="memItemRight" valign=bottom><a class="el" href="#ga7">axpy_prod</a> (const matrix_expression< E1 > &e1, const matrix_expression< E2 > &e2, M &m, bool init=true)</td></tr>
41 <td class="mdescLeft"> </td>
42 <td class="mdescRight">computes <code>M += A X</code> or <code>M = A X</code> in an optimized fashion. <a href="#ga7"></a><br /><br /></td></tr>
44 <td class="memItemLeft" nowrap align=right valign=top>template<class M, class E1, class E2> BOOST_UBLAS_INLINE M & </td>
45 <td class="memItemRight" valign=bottom><a class="el" href="#ga6">opb_prod</a> (const matrix_expression< E1 > &e1, const matrix_expression< E2 > &e2, M &m, bool init=true)</td></tr>
48 <td class="mdescLeft"> </td>
49 <td class="mdescRight">computes <code>M += A X</code> or <code>M = A X</code> in an optimized fashion. <a href="#ga6"></a><br /><br /></td></tr>
54 <a class="anchor" name="ga8" doxytag="boost::numeric::ublas::axpy_prod" ></a>
55 <table summary="" class="mdTable" width="95%" cellpadding="2" cellspacing="0">
58 <table summary="" cellpadding="0" cellspacing="0" border="0">
60 <td class="md" nowrap valign="top"> BOOST_UBLAS_INLINE V& axpy_prod </td>
61 <td class="md" valign="top">( </td>
62 <td class="md" nowrap valign="top">const matrix_expression< E1 > & </td>
63 <td class="mdname" nowrap> <em>e1</em>, </td>
66 <td class="md" nowrap align="right"></td>
68 <td class="md" nowrap>const vector_expression< E2 > & </td>
69 <td class="mdname" nowrap> <em>e2</em>, </td>
72 <td class="md" nowrap align="right"></td>
74 <td class="md" nowrap>V & </td>
75 <td class="mdname" nowrap> <em>v</em>, </td>
78 <td class="md" nowrap align="right"></td>
80 <td class="md" nowrap>bool </td>
81 <td class="mdname" nowrap> <em>init</em> = <code>true</code></td>
85 <td class="md">) </td>
86 <td class="md" colspan="2"></td>
92 <table summary="" cellspacing=5 cellpadding=0 border=0>
100 computes <code>v += A x</code> or <code>v = A x</code> in an optimized fashion.
102 <dl compact><dt><b>Parameters:</b></dt><dd>
103 <table summary="" border="0" cellspacing="2" cellpadding="0">
104 <tr><td></td><td valign=top><em>e1</em> </td><td>the matrix expression <code>A</code> </td></tr>
105 <tr><td></td><td valign=top><em>e2</em> </td><td>the vector expression <code>x</code> </td></tr>
106 <tr><td></td><td valign=top><em>v</em> </td><td>the result vector <code>v</code> </td></tr>
107 <tr><td></td><td valign=top><em>init</em> </td><td>a boolean parameter</td></tr>
110 <code>axpy_prod(A, x, v, init)</code> implements the well known axpy-product. Setting <em>init</em> to <code>true</code> is equivalent to call <code>v.clear()</code> before <code>axpy_prod</code>. Currently <em>init</em> defaults to <code>true</code>, but this may change in the future.<p>
111 Up to now there are some specialisation for compressed matrices that give a large speed up compared to prod. </td>
116 <a class="anchor" name="ga9" doxytag="boost::numeric::ublas::axpy_prod" ></a>
117 <table summary="" class="mdTable" width="95%" cellpadding="2" cellspacing="0">
120 <table summary="" cellpadding="0" cellspacing="0" border="0">
122 <td class="md" nowrap valign="top"> BOOST_UBLAS_INLINE V& axpy_prod </td>
123 <td class="md" valign="top">( </td>
124 <td class="md" nowrap valign="top">const vector_expression< E1 > & </td>
125 <td class="mdname" nowrap> <em>e1</em>, </td>
128 <td class="md" nowrap align="right"></td>
130 <td class="md" nowrap>const matrix_expression< E2 > & </td>
131 <td class="mdname" nowrap> <em>e2</em>, </td>
134 <td class="md" nowrap align="right"></td>
136 <td class="md" nowrap>V & </td>
137 <td class="mdname" nowrap> <em>v</em>, </td>
140 <td class="md" nowrap align="right"></td>
142 <td class="md" nowrap>bool </td>
143 <td class="mdname" nowrap> <em>init</em> = <code>true</code></td>
147 <td class="md">) </td>
148 <td class="md" colspan="2"></td>
154 <table summary="" cellspacing=5 cellpadding=0 border=0>
162 computes <code>v += A<sup>T</sup> x</code> or <code>v = A<sup>T</sup> x</code> in an optimized fashion.
164 <dl compact><dt><b>Parameters:</b></dt><dd>
165 <table summary="" border="0" cellspacing="2" cellpadding="0">
166 <tr><td></td><td valign=top><em>e1</em> </td><td>the vector expression <code>x</code> </td></tr>
167 <tr><td></td><td valign=top><em>e2</em> </td><td>the matrix expression <code>A</code> </td></tr>
168 <tr><td></td><td valign=top><em>v</em> </td><td>the result vector <code>v</code> </td></tr>
169 <tr><td></td><td valign=top><em>init</em> </td><td>a boolean parameter</td></tr>
172 <code>axpy_prod(x, A, v, init)</code> implements the well known axpy-product. Setting <em>init</em> to <code>true</code> is equivalent to call <code>v.clear()</code> before <code>axpy_prod</code>. Currently <em>init</em> defaults to <code>true</code>, but this may change in the future.<p>
173 Up to now there are some specialisation for compressed matrices that give a large speed up compared to prod. </td>
177 <a class="anchor" name="ga7" doxytag="boost::numeric::ublas::axpy_prod" ></a>
178 <table summary="" class="mdTable" width="95%" cellpadding="2" cellspacing="0">
181 <table summary="" cellpadding="0" cellspacing="0" border="0">
183 <td class="md" nowrap valign="top"> BOOST_UBLAS_INLINE M& axpy_prod </td>
184 <td class="md" valign="top">( </td>
185 <td class="md" nowrap valign="top">const matrix_expression< E1 > & </td>
186 <td class="mdname" nowrap> <em>e1</em>, </td>
189 <td class="md" nowrap align="right"></td>
191 <td class="md" nowrap>const matrix_expression< E2 > & </td>
192 <td class="mdname" nowrap> <em>e2</em>, </td>
195 <td class="md" nowrap align="right"></td>
197 <td class="md" nowrap>M & </td>
198 <td class="mdname" nowrap> <em>m</em>, </td>
201 <td class="md" nowrap align="right"></td>
203 <td class="md" nowrap>bool </td>
204 <td class="mdname" nowrap> <em>init</em> = <code>true</code></td>
208 <td class="md">) </td>
209 <td class="md" colspan="2"></td>
215 <table summary="" cellspacing=5 cellpadding=0 border=0>
223 computes <code>M += A X</code> or <code>M = A X</code> in an optimized fashion.
225 <dl compact><dt><b>Parameters:</b></dt><dd>
226 <table summary="" border="0" cellspacing="2" cellpadding="0">
227 <tr><td></td><td valign=top><em>e1</em> </td><td>the matrix expression <code>A</code> </td></tr>
228 <tr><td></td><td valign=top><em>e2</em> </td><td>the matrix expression <code>X</code> </td></tr>
229 <tr><td></td><td valign=top><em>m</em> </td><td>the result matrix <code>M</code> </td></tr>
230 <tr><td></td><td valign=top><em>init</em> </td><td>a boolean parameter</td></tr>
233 <code>axpy_prod(A, X, M, init)</code> implements the well known axpy-product. Setting <em>init</em> to <code>true</code> is equivalent to call <code>M.clear()</code> before <code>axpy_prod</code>. Currently <em>init</em> defaults to <code>true</code>, but this may change in the future.<p>
234 Up to now there are no specialisations. </td>
238 <a class="anchor" name="ga6" doxytag="boost::numeric::ublas::opb_prod" ></a>
240 <table summary="" class="mdTable" width="95%" cellpadding="2" cellspacing="0">
243 <table summary="" cellpadding="0" cellspacing="0" border="0">
245 <td class="md" nowrap valign="top"> BOOST_UBLAS_INLINE M& opb_prod </td>
246 <td class="md" valign="top">( </td>
247 <td class="md" nowrap valign="top">const matrix_expression< E1 > & </td>
248 <td class="mdname" nowrap> <em>e1</em>, </td>
251 <td class="md" nowrap align="right"></td>
253 <td class="md" nowrap>const matrix_expression< E2 > & </td>
254 <td class="mdname" nowrap> <em>e2</em>, </td>
257 <td class="md" nowrap align="right"></td>
259 <td class="md" nowrap>M & </td>
260 <td class="mdname" nowrap> <em>m</em>, </td>
263 <td class="md" nowrap align="right"></td>
265 <td class="md" nowrap>bool </td>
266 <td class="mdname" nowrap> <em>init</em> = <code>true</code></td>
270 <td class="md">) </td>
271 <td class="md" colspan="2"></td>
277 <table summary="" cellspacing=5 cellpadding=0 border=0>
285 computes <code>M += A X</code> or <code>M = A X</code> in an optimized fashion.
287 <dl compact><dt><b>Parameters:</b></dt><dd>
288 <table summary="" border="0" cellspacing="2" cellpadding="0">
289 <tr><td></td><td valign=top><em>e1</em> </td><td>the matrix expression <code>A</code> </td></tr>
290 <tr><td></td><td valign=top><em>e2</em> </td><td>the matrix expression <code>X</code> </td></tr>
291 <tr><td></td><td valign=top><em>m</em> </td><td>the result matrix <code>M</code> </td></tr>
292 <tr><td></td><td valign=top><em>init</em> </td><td>a boolean parameter</td></tr>
295 <code>opb_prod(A, X, M, init)</code> implements the well known axpy-product. Setting <em>init</em> to <code>true</code> is equivalent to call <code>M.clear()</code> before <code>opb_prod</code>. Currently <em>init</em> defaults to <code>true</code>, but this may change in the future.<p>
296 This function may give a speedup if <code>A</code> has less columns than rows, because the product is computed as a sum of outer products. </td>
303 <p>Copyright (©) 2000-2004 Michael Stevens, Mathias Koch,
304 Joerg Walter, Gunter Winkler<br />
305 Use, modification and distribution are subject to the
306 Boost Software License, Version 1.0.
307 (See accompanying file LICENSE_1_0.txt
308 or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
309 http://www.boost.org/LICENSE_1_0.txt
312 <script type="text/javascript">