Page MenuHomec4science

matrix_8hh_source.html
No OneTemporary

File Metadata

Created
Sat, Nov 23, 18:51

matrix_8hh_source.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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>particles: matrix.hh Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">particles
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">matrix.hh</div> </div>
</div><!--header-->
<div class="contents">
<a href="matrix_8hh.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef MATRIX_HH</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define MATRIX_HH</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">/* ------------------------------------------------------ */</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="my__types_8hh.html">my_types.hh</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;tuple&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">/* ------------------------------------------------------ */</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="struct_matrix_iterator.html"> 12</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_matrix_iterator.html">MatrixIterator</a> {</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="struct_matrix_iterator.html#a2c21325462bc99e038117555a696ac37"> 13</a></span>&#160; <a class="code" href="struct_matrix_iterator.html#a2c21325462bc99e038117555a696ac37">MatrixIterator</a>(<a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a>, <a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>, T* <a class="code" href="struct_matrix_iterator.html#a487f190bb66ba306f485c51ac9eb3f43">ptr</a>)</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; : index(index), size(size), ptr(ptr){};</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="struct_matrix_iterator.html#a36bf4f39cbdc1fa83798eb357a9cf217"> 16</a></span>&#160; T&amp; <a class="code" href="struct_matrix_iterator.html#a36bf4f39cbdc1fa83798eb357a9cf217">operator*</a>() { <span class="keywordflow">return</span> <a class="code" href="struct_matrix_iterator.html#a487f190bb66ba306f485c51ac9eb3f43">ptr</a>[<a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a>]; };</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="struct_matrix_iterator.html#aa616dd1b1a74b818381c8ca61faea872"> 18</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_matrix_iterator.html#aa616dd1b1a74b818381c8ca61faea872">operator++</a>() { <a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a>++; };</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c"> 20</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="struct_matrix_iterator.html#ad9e145693ace472fe85e0e5d4b79b980">operator!=</a>(<a class="code" href="struct_matrix_iterator.html">MatrixIterator</a>&amp; other) { <span class="keywordflow">return</span> this-&gt;<a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a> != other.<a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a>; };</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; <span class="keywordtype">int</span> <a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a>, <a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="struct_matrix_iterator.html#a487f190bb66ba306f485c51ac9eb3f43"> 23</a></span>&#160; T* <a class="code" href="struct_matrix_iterator.html#a487f190bb66ba306f485c51ac9eb3f43">ptr</a>;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;};</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment">/* ------------------------------------------------------ */</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="struct_matrix.html"> 28</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_matrix.html">Matrix</a> {</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="struct_matrix.html#a9d567e3a121b1be0c3f9c461cab524fe"> 30</a></span>&#160; <a class="code" href="struct_matrix.html#a9d567e3a121b1be0c3f9c461cab524fe">Matrix</a>(){};</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="struct_matrix.html#a431fc0f6dbd08cf1dcfab1892e00c419"> 31</a></span>&#160; <a class="code" href="struct_matrix.html#a431fc0f6dbd08cf1dcfab1892e00c419">Matrix</a>(<a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>) { resize(size); };</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="struct_matrix.html#a7e8c7a0dfb87597abeb675d36650b792"> 33</a></span>&#160; <a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix.html#a7e8c7a0dfb87597abeb675d36650b792">rows</a>() { <span class="keywordflow">return</span> this-&gt;<a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>(); };</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="struct_matrix.html#a767c20d071234a39f7c0a25f072110a5"> 34</a></span>&#160; <a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix.html#a767c20d071234a39f7c0a25f072110a5">cols</a>() { <span class="keywordflow">return</span> this-&gt;<a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>(); };</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="struct_matrix.html#a6e758c8d238419e9e35e2a565f0e2c58"> 35</a></span>&#160; <a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix.html#a6e758c8d238419e9e35e2a565f0e2c58">size</a>() { <span class="keywordflow">return</span> std::sqrt(storage.size()); };</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="struct_matrix.html#a9f9183cb0a7638ada0e66275ee79940a"> 37</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_matrix.html#a9f9183cb0a7638ada0e66275ee79940a">resize</a>(<a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>) { storage.resize(size * size); }</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="struct_matrix.html#a00376cb5c0c609b03bc73bec2e3e2001"> 38</a></span>&#160; T&amp; <a class="code" href="struct_matrix.html#a00376cb5c0c609b03bc73bec2e3e2001">operator()</a>(<a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> i, <a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> j) { <span class="keywordflow">return</span> storage[j * this-&gt;<a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>() + i]; }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="struct_matrix.html#aadb97aad615311cc3321d2ff640c328c"> 40</a></span>&#160; <a class="code" href="struct_matrix.html">Matrix</a>&amp; <a class="code" href="struct_matrix.html#aadb97aad615311cc3321d2ff640c328c">operator/=</a>(<span class="keyword">const</span> T&amp; c) {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; std::for_each(storage.begin(), storage.end(), [&amp;c](<span class="keyword">auto</span>&amp; v) { v /= c; });</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; };</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="struct_matrix.html#ae3352518edf3d0baaf3cf86013a04ebb"> 45</a></span>&#160; T* data() { <span class="keywordflow">return</span> &amp;storage[0]; };</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; std::vector&lt;T&gt; <a class="code" href="struct_matrix.html#ae3352518edf3d0baaf3cf86013a04ebb">storage</a>;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="struct_matrix.html#af13b1393e62b769f1cea29bdd57fa463"> 49</a></span>&#160; <a class="code" href="struct_matrix_iterator.html">MatrixIterator&lt;T&gt;</a> <a class="code" href="struct_matrix.html#af13b1393e62b769f1cea29bdd57fa463">begin</a>() {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordflow">return</span> <a class="code" href="struct_matrix_iterator.html">MatrixIterator&lt;T&gt;</a>(0, this-&gt;<a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>(), this-&gt;data());</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; };</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="struct_matrix.html#a4195a2cc935195aab31634cb012f4811"> 52</a></span>&#160; <a class="code" href="struct_matrix_iterator.html">MatrixIterator&lt;T&gt;</a> <a class="code" href="struct_matrix.html#a4195a2cc935195aab31634cb012f4811">end</a>() {</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordflow">return</span> <a class="code" href="struct_matrix_iterator.html">MatrixIterator&lt;T&gt;</a>(storage.size(), this-&gt;<a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>(), this-&gt;data());</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; };</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;};</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="comment">/* ------------------------------------------------------ */</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="struct_matrix_index_iterator.html"> 60</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_matrix_index_iterator.html">MatrixIndexIterator</a> : <span class="keyword">public</span> <a class="code" href="struct_matrix_iterator.html">MatrixIterator</a>&lt;T&gt; {</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="struct_matrix_index_iterator.html#a3d1ab83f9bbfbea42c7240ff502f599d"> 61</a></span>&#160; <a class="code" href="struct_matrix_index_iterator.html#a3d1ab83f9bbfbea42c7240ff502f599d">MatrixIndexIterator</a>(<a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a>, <a class="code" href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a> <a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>, T* <a class="code" href="struct_matrix_iterator.html#a487f190bb66ba306f485c51ac9eb3f43">ptr</a>)</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; : <a class="code" href="struct_matrix_iterator.html">MatrixIterator</a>&lt;T&gt;(index, size, ptr){};</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="struct_matrix_index_iterator.html#a5944a26c90a39b3ad41a123d86c666b3"> 64</a></span>&#160; std::tuple&lt;UInt, UInt, T&amp;&gt; <a class="code" href="struct_matrix_index_iterator.html#a5944a26c90a39b3ad41a123d86c666b3">operator*</a>() {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keywordtype">int</span> i = this-&gt;<a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a> % this-&gt;<a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordtype">int</span> j = this-&gt;<a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a> / this-&gt;<a class="code" href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">size</a>;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keywordflow">return</span> std::tuple&lt;UInt, UInt, T&amp;&gt;(i, j, this-&gt;<a class="code" href="struct_matrix_iterator.html#a487f190bb66ba306f485c51ac9eb3f43">ptr</a>[this-&gt;<a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a>]);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; };</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;};</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="comment">/* ------------------------------------------------------ */</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="struct_indexed_matrix.html"> 74</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_indexed_matrix.html">IndexedMatrix</a> {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="struct_indexed_matrix.html#a950333b1ed7a006bf9dbb880ebf2255c"> 76</a></span>&#160; <a class="code" href="struct_indexed_matrix.html#a950333b1ed7a006bf9dbb880ebf2255c">IndexedMatrix</a>(<a class="code" href="struct_matrix.html">Matrix&lt;T&gt;</a>&amp; mat) : mat(mat){};</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="struct_indexed_matrix.html#a99505e41c1a4895058f8b407ed7d4459"> 78</a></span>&#160; <a class="code" href="struct_matrix_index_iterator.html">MatrixIndexIterator&lt;T&gt;</a> <a class="code" href="struct_indexed_matrix.html#a99505e41c1a4895058f8b407ed7d4459">begin</a>() {</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keywordflow">return</span> <a class="code" href="struct_matrix_index_iterator.html">MatrixIndexIterator&lt;T&gt;</a>(0, mat.size(), mat.data());</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; };</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="struct_indexed_matrix.html#ab5a1be7108fb020c928ed66da25f8a21"> 81</a></span>&#160; <a class="code" href="struct_matrix_index_iterator.html">MatrixIndexIterator&lt;T&gt;</a> <a class="code" href="struct_indexed_matrix.html#ab5a1be7108fb020c928ed66da25f8a21">end</a>() {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordflow">return</span> <a class="code" href="struct_matrix_index_iterator.html">MatrixIndexIterator&lt;T&gt;</a>(mat.storage.size(), mat.size(), mat.data());</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; };</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="code" href="struct_matrix.html">Matrix&lt;T&gt;</a>&amp; mat;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;};</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="comment">/* ------------------------------------------------------ */</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="matrix_8hh.html#a9895b97e7178501aa35ba783adfd4e57"> 91</a></span>&#160;<a class="code" href="struct_indexed_matrix.html">IndexedMatrix&lt;T&gt;</a> <a class="code" href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">index</a>(<a class="code" href="struct_matrix.html">Matrix&lt;T&gt;</a>&amp; mat) {</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">return</span> <a class="code" href="struct_indexed_matrix.html">IndexedMatrix&lt;T&gt;</a>(mat);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;}</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;<span class="comment">/* ------------------------------------------------------ */</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="structstd_1_1iterator__traits_3_01_matrix_iterator_3_01_t_01_4_01_4.html"> 97</a></span>&#160;<span class="keyword">struct </span>std::iterator_traits&lt;<a class="code" href="struct_matrix_iterator.html">MatrixIterator</a>&lt;T&gt;&gt; {</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structstd_1_1iterator__traits_3_01_matrix_iterator_3_01_t_01_4_01_4.html#a457b339050b1fa35de2c2ebdbb9f2f18"> 98</a></span>&#160; <span class="keyword">using</span> <a class="code" href="structstd_1_1iterator__traits_3_01_matrix_iterator_3_01_t_01_4_01_4.html#a457b339050b1fa35de2c2ebdbb9f2f18">value_type</a> = T;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;};</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;<span class="comment">/* ------------------------------------------------------ */</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;<span class="preprocessor">#endif //MATRIX</span></div><div class="ttc" id="struct_matrix_html_a9f9183cb0a7638ada0e66275ee79940a"><div class="ttname"><a href="struct_matrix.html#a9f9183cb0a7638ada0e66275ee79940a">Matrix::resize</a></div><div class="ttdeci">void resize(UInt size)</div><div class="ttdef"><b>Definition:</b> matrix.hh:37</div></div>
<div class="ttc" id="struct_matrix_html_a431fc0f6dbd08cf1dcfab1892e00c419"><div class="ttname"><a href="struct_matrix.html#a431fc0f6dbd08cf1dcfab1892e00c419">Matrix::Matrix</a></div><div class="ttdeci">Matrix(UInt size)</div><div class="ttdef"><b>Definition:</b> matrix.hh:31</div></div>
<div class="ttc" id="struct_matrix_iterator_html_aa616dd1b1a74b818381c8ca61faea872"><div class="ttname"><a href="struct_matrix_iterator.html#aa616dd1b1a74b818381c8ca61faea872">MatrixIterator::operator++</a></div><div class="ttdeci">void operator++()</div><div class="ttdef"><b>Definition:</b> matrix.hh:18</div></div>
<div class="ttc" id="struct_matrix_html_af13b1393e62b769f1cea29bdd57fa463"><div class="ttname"><a href="struct_matrix.html#af13b1393e62b769f1cea29bdd57fa463">Matrix::begin</a></div><div class="ttdeci">MatrixIterator&lt; T &gt; begin()</div><div class="ttdef"><b>Definition:</b> matrix.hh:49</div></div>
<div class="ttc" id="struct_matrix_html"><div class="ttname"><a href="struct_matrix.html">Matrix</a></div><div class="ttdef"><b>Definition:</b> matrix.hh:28</div></div>
<div class="ttc" id="struct_matrix_iterator_html"><div class="ttname"><a href="struct_matrix_iterator.html">MatrixIterator</a></div><div class="ttdef"><b>Definition:</b> matrix.hh:12</div></div>
<div class="ttc" id="struct_matrix_iterator_html_ad9e145693ace472fe85e0e5d4b79b980"><div class="ttname"><a href="struct_matrix_iterator.html#ad9e145693ace472fe85e0e5d4b79b980">MatrixIterator::operator!=</a></div><div class="ttdeci">bool operator!=(MatrixIterator &amp;other)</div><div class="ttdef"><b>Definition:</b> matrix.hh:20</div></div>
<div class="ttc" id="struct_matrix_iterator_html_a0b166de0ca9447c1629119b105ace870"><div class="ttname"><a href="struct_matrix_iterator.html#a0b166de0ca9447c1629119b105ace870">MatrixIterator::index</a></div><div class="ttdeci">int index</div><div class="ttdef"><b>Definition:</b> matrix.hh:20</div></div>
<div class="ttc" id="struct_matrix_index_iterator_html"><div class="ttname"><a href="struct_matrix_index_iterator.html">MatrixIndexIterator</a></div><div class="ttdef"><b>Definition:</b> matrix.hh:60</div></div>
<div class="ttc" id="struct_matrix_html_a4195a2cc935195aab31634cb012f4811"><div class="ttname"><a href="struct_matrix.html#a4195a2cc935195aab31634cb012f4811">Matrix::end</a></div><div class="ttdeci">MatrixIterator&lt; T &gt; end()</div><div class="ttdef"><b>Definition:</b> matrix.hh:52</div></div>
<div class="ttc" id="struct_indexed_matrix_html"><div class="ttname"><a href="struct_indexed_matrix.html">IndexedMatrix</a></div><div class="ttdef"><b>Definition:</b> matrix.hh:74</div></div>
<div class="ttc" id="struct_indexed_matrix_html_a950333b1ed7a006bf9dbb880ebf2255c"><div class="ttname"><a href="struct_indexed_matrix.html#a950333b1ed7a006bf9dbb880ebf2255c">IndexedMatrix::IndexedMatrix</a></div><div class="ttdeci">IndexedMatrix(Matrix&lt; T &gt; &amp;mat)</div><div class="ttdef"><b>Definition:</b> matrix.hh:76</div></div>
<div class="ttc" id="struct_matrix_iterator_html_a487f190bb66ba306f485c51ac9eb3f43"><div class="ttname"><a href="struct_matrix_iterator.html#a487f190bb66ba306f485c51ac9eb3f43">MatrixIterator::ptr</a></div><div class="ttdeci">T * ptr</div><div class="ttdef"><b>Definition:</b> matrix.hh:23</div></div>
<div class="ttc" id="struct_matrix_iterator_html_ac56706c4ff47f2bdb78b52b9085e648c"><div class="ttname"><a href="struct_matrix_iterator.html#ac56706c4ff47f2bdb78b52b9085e648c">MatrixIterator::size</a></div><div class="ttdeci">int size</div><div class="ttdef"><b>Definition:</b> matrix.hh:20</div></div>
<div class="ttc" id="struct_matrix_iterator_html_a2c21325462bc99e038117555a696ac37"><div class="ttname"><a href="struct_matrix_iterator.html#a2c21325462bc99e038117555a696ac37">MatrixIterator::MatrixIterator</a></div><div class="ttdeci">MatrixIterator(UInt index, UInt size, T *ptr)</div><div class="ttdef"><b>Definition:</b> matrix.hh:13</div></div>
<div class="ttc" id="struct_matrix_index_iterator_html_a3d1ab83f9bbfbea42c7240ff502f599d"><div class="ttname"><a href="struct_matrix_index_iterator.html#a3d1ab83f9bbfbea42c7240ff502f599d">MatrixIndexIterator::MatrixIndexIterator</a></div><div class="ttdeci">MatrixIndexIterator(UInt index, UInt size, T *ptr)</div><div class="ttdef"><b>Definition:</b> matrix.hh:61</div></div>
<div class="ttc" id="struct_matrix_html_ae3352518edf3d0baaf3cf86013a04ebb"><div class="ttname"><a href="struct_matrix.html#ae3352518edf3d0baaf3cf86013a04ebb">Matrix::storage</a></div><div class="ttdeci">std::vector&lt; T &gt; storage</div><div class="ttdef"><b>Definition:</b> matrix.hh:45</div></div>
<div class="ttc" id="struct_matrix_iterator_html_a36bf4f39cbdc1fa83798eb357a9cf217"><div class="ttname"><a href="struct_matrix_iterator.html#a36bf4f39cbdc1fa83798eb357a9cf217">MatrixIterator::operator*</a></div><div class="ttdeci">T &amp; operator*()</div><div class="ttdef"><b>Definition:</b> matrix.hh:16</div></div>
<div class="ttc" id="struct_matrix_html_a9d567e3a121b1be0c3f9c461cab524fe"><div class="ttname"><a href="struct_matrix.html#a9d567e3a121b1be0c3f9c461cab524fe">Matrix::Matrix</a></div><div class="ttdeci">Matrix()</div><div class="ttdef"><b>Definition:</b> matrix.hh:30</div></div>
<div class="ttc" id="struct_matrix_html_a767c20d071234a39f7c0a25f072110a5"><div class="ttname"><a href="struct_matrix.html#a767c20d071234a39f7c0a25f072110a5">Matrix::cols</a></div><div class="ttdeci">UInt cols()</div><div class="ttdef"><b>Definition:</b> matrix.hh:34</div></div>
<div class="ttc" id="struct_matrix_index_iterator_html_a5944a26c90a39b3ad41a123d86c666b3"><div class="ttname"><a href="struct_matrix_index_iterator.html#a5944a26c90a39b3ad41a123d86c666b3">MatrixIndexIterator::operator*</a></div><div class="ttdeci">std::tuple&lt; UInt, UInt, T &amp; &gt; operator*()</div><div class="ttdef"><b>Definition:</b> matrix.hh:64</div></div>
<div class="ttc" id="my__types_8hh_html"><div class="ttname"><a href="my__types_8hh.html">my_types.hh</a></div></div>
<div class="ttc" id="struct_matrix_html_a00376cb5c0c609b03bc73bec2e3e2001"><div class="ttname"><a href="struct_matrix.html#a00376cb5c0c609b03bc73bec2e3e2001">Matrix::operator()</a></div><div class="ttdeci">T &amp; operator()(UInt i, UInt j)</div><div class="ttdef"><b>Definition:</b> matrix.hh:38</div></div>
<div class="ttc" id="struct_matrix_html_a7e8c7a0dfb87597abeb675d36650b792"><div class="ttname"><a href="struct_matrix.html#a7e8c7a0dfb87597abeb675d36650b792">Matrix::rows</a></div><div class="ttdeci">UInt rows()</div><div class="ttdef"><b>Definition:</b> matrix.hh:33</div></div>
<div class="ttc" id="struct_indexed_matrix_html_ab5a1be7108fb020c928ed66da25f8a21"><div class="ttname"><a href="struct_indexed_matrix.html#ab5a1be7108fb020c928ed66da25f8a21">IndexedMatrix::end</a></div><div class="ttdeci">MatrixIndexIterator&lt; T &gt; end()</div><div class="ttdef"><b>Definition:</b> matrix.hh:81</div></div>
<div class="ttc" id="my__types_8hh_html_a9cc0620fb2e91b51587c6936060d4161"><div class="ttname"><a href="my__types_8hh.html#a9cc0620fb2e91b51587c6936060d4161">UInt</a></div><div class="ttdeci">unsigned int UInt</div><div class="ttdef"><b>Definition:</b> my_types.hh:8</div></div>
<div class="ttc" id="structstd_1_1iterator__traits_3_01_matrix_iterator_3_01_t_01_4_01_4_html_a457b339050b1fa35de2c2ebdbb9f2f18"><div class="ttname"><a href="structstd_1_1iterator__traits_3_01_matrix_iterator_3_01_t_01_4_01_4.html#a457b339050b1fa35de2c2ebdbb9f2f18">std::iterator_traits&lt; MatrixIterator&lt; T &gt; &gt;::value_type</a></div><div class="ttdeci">T value_type</div><div class="ttdef"><b>Definition:</b> matrix.hh:98</div></div>
<div class="ttc" id="struct_matrix_html_aadb97aad615311cc3321d2ff640c328c"><div class="ttname"><a href="struct_matrix.html#aadb97aad615311cc3321d2ff640c328c">Matrix::operator/=</a></div><div class="ttdeci">Matrix &amp; operator/=(const T &amp;c)</div><div class="ttdef"><b>Definition:</b> matrix.hh:40</div></div>
<div class="ttc" id="struct_indexed_matrix_html_a99505e41c1a4895058f8b407ed7d4459"><div class="ttname"><a href="struct_indexed_matrix.html#a99505e41c1a4895058f8b407ed7d4459">IndexedMatrix::begin</a></div><div class="ttdeci">MatrixIndexIterator&lt; T &gt; begin()</div><div class="ttdef"><b>Definition:</b> matrix.hh:78</div></div>
<div class="ttc" id="struct_matrix_html_a6e758c8d238419e9e35e2a565f0e2c58"><div class="ttname"><a href="struct_matrix.html#a6e758c8d238419e9e35e2a565f0e2c58">Matrix::size</a></div><div class="ttdeci">UInt size()</div><div class="ttdef"><b>Definition:</b> matrix.hh:35</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>

Event Timeline