• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta name="generator" content=
6"HTML Tidy for Linux/x86 (vers 1st March 2004), see www.w3.org" />
7<meta http-equiv="Content-Type" content=
8"text/html; charset=us-ascii" />
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>
13<title>Tensor Expressions</title>
14</head>
15<body>
16<h1><img src="../../../../boost.png" align="middle" />Tensor Expressions</h1>
17<div class="toc" id="toc"></div>
18
19
20
21
22<h2><a name="tensor_expression"></a>Tensor Expression</h2>
23<h4>Description</h4>
24<p>The templated class <code>tensor_expression&lt;T,E&gt;</code>
25is required to be a public base of all classes. There is no Tensor Expression concept defined.</p>
26<h4>Definition</h4>
27<p>Defined in the header tensor/expression.hpp.</p>
28<h4>Model of</h4>
29<p>None. <u>Not a Tensor Expression</u>!
30</p>
31
32<h4>Type requirements</h4>
33<p>None.</p>
34<h4>Public base classes</h4>
35<p><code>ublas_expression&lt;E&gt;</code>.</p>
36
37<h4>Template parameters</h4>
38<table border="1" summary="parameters">
39<tbody>
40<tr>
41<th>Parameter</th>
42<th>Description</th>
43</tr>
44<tr>
45<td><code>T</code></td>
46<td>The type of the tensor.</td>
47</tr>
48<tr>
49<td><code>E</code></td>
50<td>The type of the tensor expression.</td>
51</tr>
52</tbody>
53</table>
54
55<h4>Member types</h4>
56<table border="1" style="font-size:100%" summary="members">
57<tbody style="font-size:100%" >
58<tr>
59<th>Member type</th>
60<th>Description</th>
61</tr>
62<tr>
63<td><code>expression_type</code></td>
64<td>Type of the derived expression which is <code>E</code>.</td>
65</tr>
66<tr>
67<td><code>type_category</code></td>
68<td>Tag for categorization which is <code>tensor_tag</code>.</td>
69</tr>
70<tr>
71<td><code>tensor_type</code></td>
72<td>Reference type which is <code>T</code>.</td>
73</tr>
74</tbody>
75</table>
76
77<h4>Public Member Functions</h4>
78<table border="1" summary="members">
79<tbody>
80<tr>
81<th>Member</th>
82<th>Description</th>
83</tr>
84<tr>
85<td><code>const expression_type &amp;operator()() const</code></td>
86<td>Returns a <code>const</code> reference to the derived expression.</td>
87</tr>
88</tbody>
89</table>
90
91<!--------------------- ---->
92<br>
93<br>
94
95<h2><a name="entrywise_tensor_operations"></a>Entrywise Tensor Operations</h2>
96
97
98<h3><a name="binary_tensor_expression"></a>Binary Tensor Expression</h3>
99
100<h4>Description</h4>
101<p>The templated class <code>binary_tensor_expression&lt;T,EL,ER,OP&gt;</code> contains a constant reference to a left and right expression that can be evaluated by using the access operator.</p>
102<h4>Definition</h4>
103<p>Defined in the header tensor/expression.hpp.</p>
104<h4>Model of</h4>
105<p>Tensor Expression</p>
106
107
108<h4>Type requirements</h4>
109<p>None.</p>
110
111<h4>Public base classes</h4>
112<p><code>tensor_expression&lt;T,binary_tensor_expression&lt;T,EL,ER,OP&gt;&gt;</code></p>
113
114<h4>Template parameters</h4>
115<table border="1" summary="parameters">
116<tbody>
117<tr>
118<th>Parameter</th>
119<th>Description</th>
120</tr>
121<tr>
122<td><code>T</code></td>
123<td>Type of the tensor.</td>
124</tr>
125<tr>
126<td><code>EL</code></td>
127<td>Type of the left binary tensor expression.</td>
128</tr>
129<tr>
130<td><code>ER</code></td>
131<td>Type of the right binary tensor expression.</td>
132</tr>
133<tr>
134<td><code>OP</code></td>
135<td>Type of the binary operation.</td>
136</tr>
137</tbody>
138</table>
139
140<h4>Member types</h4>
141<table border="1" style="font-size:100%" summary="members">
142<tbody style="font-size:100%" >
143<tr>
144<th>Member type</th>
145<th>Description</th>
146</tr>
147<tr>
148<td><code>expression_type_left</code></td>
149<td>Type of the left expression which is <code>EL</code>.</td>
150</tr>
151<tr>
152<td><code>expression_type_right</code></td>
153<td>Type of the right expression which is <code>ER</code>.</td>
154</tr>
155<tr>
156<td><code>tensor_type</code></td>
157<td>Reference type which is <code>T</code>.</td>
158</tr>
159<tr>
160<td><code>binary_operation</code></td>
161<td>Type of the binary operation which is <code>OP</code>.</td>
162</tr>
163</tbody>
164</table>
165
166<h4>Public Member Functions</h4>
167<table border="1" summary="members">
168<tbody>
169<tr>
170<th>Member</th>
171<th>Description</th>
172</tr>
173<tr>
174<td><code>decltype(auto) operator()(std::size_t i) const </code></td>
175<td>Returns a <code>const</code> reference to the i-th element of the expression.</td>
176</tr>
177</tbody>
178</table>
179<br>
180
181<!--------------------- ---->
182
183<h3><a name="unary_tensor_expression"></a>Unary Tensor Expression</h3>
184
185
186<h4>Description</h4>
187<p>The templated class <code>unary_tensor_expression&lt;T,E,OP&gt;</code> contains a constant reference to an expression that can be evaluated by using the access operator.</p>
188<h4>Definition</h4>
189<p>Defined in the header tensor/expression.hpp.</p>
190<h4>Model of</h4>
191<p>Tensor Expression</p>
192
193<h4>Type requirements</h4>
194<p>None.</p>
195
196<h4>Public base classes</h4>
197<p><code>tensor_expression&lt;T,unary_tensor_expression&lt;T,E,OP&gt;&gt; </code></p>
198
199<h4>Template parameters</h4>
200<table border="1" summary="parameters">
201<tbody>
202<tr>
203<th>Parameter</th>
204<th>Description</th>
205</tr>
206<tr>
207<td><code>T</code></td>
208<td>Type of the tensor.</td>
209</tr>
210<tr>
211<td><code>E</code></td>
212<td>Type of the unary tensor expression.</td>
213</tr>
214<tr>
215<td><code>OP</code></td>
216<td>Type of the unary operation.</td>
217</tr>
218</tbody>
219</table>
220
221<h4>Member types</h4>
222<table border="1" style="font-size:100%" summary="members">
223<tbody style="font-size:100%" >
224<tr>
225<th>Member type</th>
226<th>Description</th>
227</tr>
228<tr>
229<td><code>expression_type</code></td>
230<td>Type of the expression which is <code>E</code>.</td>
231</tr>
232<tr>
233<td><code>tensor_type</code></td>
234<td>Reference type which is <code>T</code>.</td>
235</tr>
236<tr>
237<td><code>unary_operation</code></td>
238<td>Type of the unary operation which is <code>OP</code>.</td>
239</tr>
240</tbody>
241</table>
242
243<h4>Public Member Functions</h4>
244<table border="1" summary="members">
245<tbody>
246<tr>
247<th>Member</th>
248<th>Description</th>
249</tr>
250<tr>
251<td><code>decltype(auto) operator()(std::size_t i) const </code></td>
252<td>Returns a <code>const</code> reference to the i-th element of the expression.</td>
253</tr>
254</tbody>
255</table>
256
257<hr />
258<p>Copyright (&copy;) 2018 Cem Bassoy <br />
259   Use, modification and distribution are subject to the
260   Boost Software License, Version 1.0.
261   (See accompanying file LICENSE_1_0.txt
262   or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
263      http://www.boost.org/LICENSE_1_0.txt
264   </a>).
265</p>
266<script type="text/javascript">
267(function($) {
268    $('#toc').toc();
269})(jQuery);
270</script>
271</body>
272</html>
273