tensor_expression.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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. <h2><a name="tensor_expression"></a>Tensor Expression</h2>
  19. <h4>Description</h4>
  20. <p>The templated class <code>tensor_expression&lt;T,E&gt;</code>
  21. is required to be a public base of all classes. There is no Tensor Expression concept defined.</p>
  22. <h4>Definition</h4>
  23. <p>Defined in the header tensor/expression.hpp.</p>
  24. <h4>Model of</h4>
  25. <p>None. <u>Not a Tensor Expression</u>!
  26. </p>
  27. <h4>Type requirements</h4>
  28. <p>None.</p>
  29. <h4>Public base classes</h4>
  30. <p><code>ublas_expression&lt;E&gt;</code>.</p>
  31. <h4>Template parameters</h4>
  32. <table border="1" summary="parameters">
  33. <tbody>
  34. <tr>
  35. <th>Parameter</th>
  36. <th>Description</th>
  37. </tr>
  38. <tr>
  39. <td><code>T</code></td>
  40. <td>The type of the tensor.</td>
  41. </tr>
  42. <tr>
  43. <td><code>E</code></td>
  44. <td>The type of the tensor expression.</td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. <h4>Member types</h4>
  49. <table border="1" style="font-size:100%" summary="members">
  50. <tbody style="font-size:100%" >
  51. <tr>
  52. <th>Member type</th>
  53. <th>Description</th>
  54. </tr>
  55. <tr>
  56. <td><code>expression_type</code></td>
  57. <td>Type of the derived expression which is <code>E</code>.</td>
  58. </tr>
  59. <tr>
  60. <td><code>type_category</code></td>
  61. <td>Tag for categorization which is <code>tensor_tag</code>.</td>
  62. </tr>
  63. <tr>
  64. <td><code>tensor_type</code></td>
  65. <td>Reference type which is <code>T</code>.</td>
  66. </tr>
  67. </tbody>
  68. </table>
  69. <h4>Public Member Functions</h4>
  70. <table border="1" summary="members">
  71. <tbody>
  72. <tr>
  73. <th>Member</th>
  74. <th>Description</th>
  75. </tr>
  76. <tr>
  77. <td><code>const expression_type &amp;operator()() const</code></td>
  78. <td>Returns a <code>const</code> reference to the derived expression.</td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. <!--------------------- ---->
  83. <br>
  84. <br>
  85. <h2><a name="entrywise_tensor_operations"></a>Entrywise Tensor Operations</h2>
  86. <h3><a name="binary_tensor_expression"></a>Binary Tensor Expression</h3>
  87. <h4>Description</h4>
  88. <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>
  89. <h4>Definition</h4>
  90. <p>Defined in the header tensor/expression.hpp.</p>
  91. <h4>Model of</h4>
  92. <p>Tensor Expression</p>
  93. <h4>Type requirements</h4>
  94. <p>None.</p>
  95. <h4>Public base classes</h4>
  96. <p><code>tensor_expression&lt;T,binary_tensor_expression&lt;T,EL,ER,OP&gt;&gt;</code></p>
  97. <h4>Template parameters</h4>
  98. <table border="1" summary="parameters">
  99. <tbody>
  100. <tr>
  101. <th>Parameter</th>
  102. <th>Description</th>
  103. </tr>
  104. <tr>
  105. <td><code>T</code></td>
  106. <td>Type of the tensor.</td>
  107. </tr>
  108. <tr>
  109. <td><code>EL</code></td>
  110. <td>Type of the left binary tensor expression.</td>
  111. </tr>
  112. <tr>
  113. <td><code>ER</code></td>
  114. <td>Type of the right binary tensor expression.</td>
  115. </tr>
  116. <tr>
  117. <td><code>OP</code></td>
  118. <td>Type of the binary operation.</td>
  119. </tr>
  120. </tbody>
  121. </table>
  122. <h4>Member types</h4>
  123. <table border="1" style="font-size:100%" summary="members">
  124. <tbody style="font-size:100%" >
  125. <tr>
  126. <th>Member type</th>
  127. <th>Description</th>
  128. </tr>
  129. <tr>
  130. <td><code>expression_type_left</code></td>
  131. <td>Type of the left expression which is <code>EL</code>.</td>
  132. </tr>
  133. <tr>
  134. <td><code>expression_type_right</code></td>
  135. <td>Type of the right expression which is <code>ER</code>.</td>
  136. </tr>
  137. <tr>
  138. <td><code>tensor_type</code></td>
  139. <td>Reference type which is <code>T</code>.</td>
  140. </tr>
  141. <tr>
  142. <td><code>binary_operation</code></td>
  143. <td>Type of the binary operation which is <code>OP</code>.</td>
  144. </tr>
  145. </tbody>
  146. </table>
  147. <h4>Public Member Functions</h4>
  148. <table border="1" summary="members">
  149. <tbody>
  150. <tr>
  151. <th>Member</th>
  152. <th>Description</th>
  153. </tr>
  154. <tr>
  155. <td><code>decltype(auto) operator()(std::size_t i) const </code></td>
  156. <td>Returns a <code>const</code> reference to the i-th element of the expression.</td>
  157. </tr>
  158. </tbody>
  159. </table>
  160. <br>
  161. <!--------------------- ---->
  162. <h3><a name="unary_tensor_expression"></a>Unary Tensor Expression</h3>
  163. <h4>Description</h4>
  164. <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>
  165. <h4>Definition</h4>
  166. <p>Defined in the header tensor/expression.hpp.</p>
  167. <h4>Model of</h4>
  168. <p>Tensor Expression</p>
  169. <h4>Type requirements</h4>
  170. <p>None.</p>
  171. <h4>Public base classes</h4>
  172. <p><code>tensor_expression&lt;T,unary_tensor_expression&lt;T,E,OP&gt;&gt; </code></p>
  173. <h4>Template parameters</h4>
  174. <table border="1" summary="parameters">
  175. <tbody>
  176. <tr>
  177. <th>Parameter</th>
  178. <th>Description</th>
  179. </tr>
  180. <tr>
  181. <td><code>T</code></td>
  182. <td>Type of the tensor.</td>
  183. </tr>
  184. <tr>
  185. <td><code>E</code></td>
  186. <td>Type of the unary tensor expression.</td>
  187. </tr>
  188. <tr>
  189. <td><code>OP</code></td>
  190. <td>Type of the unary operation.</td>
  191. </tr>
  192. </tbody>
  193. </table>
  194. <h4>Member types</h4>
  195. <table border="1" style="font-size:100%" summary="members">
  196. <tbody style="font-size:100%" >
  197. <tr>
  198. <th>Member type</th>
  199. <th>Description</th>
  200. </tr>
  201. <tr>
  202. <td><code>expression_type</code></td>
  203. <td>Type of the expression which is <code>E</code>.</td>
  204. </tr>
  205. <tr>
  206. <td><code>tensor_type</code></td>
  207. <td>Reference type which is <code>T</code>.</td>
  208. </tr>
  209. <tr>
  210. <td><code>unary_operation</code></td>
  211. <td>Type of the unary operation which is <code>OP</code>.</td>
  212. </tr>
  213. </tbody>
  214. </table>
  215. <h4>Public Member Functions</h4>
  216. <table border="1" summary="members">
  217. <tbody>
  218. <tr>
  219. <th>Member</th>
  220. <th>Description</th>
  221. </tr>
  222. <tr>
  223. <td><code>decltype(auto) operator()(std::size_t i) const </code></td>
  224. <td>Returns a <code>const</code> reference to the i-th element of the expression.</td>
  225. </tr>
  226. </tbody>
  227. </table>
  228. <hr />
  229. <p>Copyright (&copy;) 2018 Cem Bassoy <br />
  230. Use, modification and distribution are subject to the
  231. Boost Software License, Version 1.0.
  232. (See accompanying file LICENSE_1_0.txt
  233. or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
  234. http://www.boost.org/LICENSE_1_0.txt
  235. </a>).
  236. </p>
  237. <script type="text/javascript">
  238. (function($) {
  239. $('#toc').toc();
  240. })(jQuery);
  241. </script>
  242. </body>
  243. </html>