-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_array2_d_8h_source.html
115 lines (115 loc) · 71.9 KB
/
_array2_d_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!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>Gamedev Framework (gf): Array2D.h 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="custom.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="projectlogo"><img alt="Logo" src="gf_logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Gamedev Framework (gf)
 <span id="projectnumber">0.14.0</span>
</div>
<div id="projectbrief">A C++14 framework for 2D games</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_6d069d519ae9d12fa11dd8e685586b60.html">gf</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Array2D.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Gamedev Framework (gf)</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright (C) 2016-2019 Julien Bernard</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * This software is provided 'as-is', without any express or implied</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * warranty. In no event will the authors be held liable for any damages</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * arising from the use of this software.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * Permission is granted to anyone to use this software for any purpose,</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * including commercial applications, and to alter it and redistribute it</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * freely, subject to the following restrictions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * 1. The origin of this software must not be misrepresented; you must not</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * claim that you wrote the original software. If you use this software</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * in a product, an acknowledgment in the product documentation would be</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * appreciated but is not required.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * 2. Altered source versions must be plainly marked as such, and must not be</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * misrepresented as being the original software.</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * 3. This notice may not be removed or altered from any source distribution.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> */</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#ifndef ARRAY2D_H</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#define ARRAY2D_H</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <cassert></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <algorithm></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <type_traits></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <utility></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "Log.h"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "Math.h"</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "Portability.h"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "Range.h"</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "SerializationFwd.h"</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include "Vector.h"</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">namespace </span><a class="code" href="namespacegf.html">gf</a> {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#ifndef DOXYGEN_SHOULD_SKIP_THIS</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">inline</span> <span class="keyword">namespace </span>v1 {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">template</span><<span class="keyword">typename</span> I></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html"> 52</a></span>  <span class="keyword">class </span><a class="code" href="classgf_1_1_index2_d.html">Index2D</a> {</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#ab5d6853a28794751ec428220c07da8f3"> 59</a></span>  <a class="code" href="classgf_1_1_index2_d.html#ab5d6853a28794751ec428220c07da8f3">Index2D</a>()</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  : m_size(0, 0)</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  }</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a6da435d64c599e2f77121872517b2cd2"> 69</a></span>  <a class="code" href="classgf_1_1_index2_d.html#a6da435d64c599e2f77121872517b2cd2">Index2D</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> size)</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  : m_size(size)</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  {</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  }</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <a class="code" href="classgf_1_1_index2_d.html">Index2D</a>(<span class="keyword">const</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D</a>&) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="classgf_1_1_index2_d.html">Index2D</a>& operator=(<span class="keyword">const</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D</a>&) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <a class="code" href="classgf_1_1_index2_d.html">Index2D</a>(<a class="code" href="classgf_1_1_index2_d.html">Index2D</a>&&) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <a class="code" href="classgf_1_1_index2_d.html">Index2D</a>& operator=(<a class="code" href="classgf_1_1_index2_d.html">Index2D</a>&&) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a234dc2dd1f110572dfe38c430a708049"> 99</a></span>  <span class="keywordtype">void</span> <a class="code" href="classgf_1_1_index2_d.html#a234dc2dd1f110572dfe38c430a708049">swap</a>(<a class="code" href="classgf_1_1_index2_d.html">Index2D</a>& other) {</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  std::swap(m_size, other.m_size);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  }</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a17a607fbb2e285d9f0b910659f85a6d0"> 113</a></span>  constexpr <a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> <a class="code" href="classgf_1_1_index2_d.html#a17a607fbb2e285d9f0b910659f85a6d0">getSize</a>() const noexcept {</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">return</span> m_size;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  }</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a8de99adeca127d38d0671cb49e17c481"> 122</a></span>  constexpr <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">I</a> <a class="code" href="classgf_1_1_index2_d.html#a8de99adeca127d38d0671cb49e17c481">getCols</a>() const noexcept {</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordflow">return</span> m_size.col;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a7efa5ce23bd075dab837b1d84ce7be76"> 131</a></span>  constexpr <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">I</a> <a class="code" href="classgf_1_1_index2_d.html#a7efa5ce23bd075dab837b1d84ce7be76">getRows</a>() const noexcept {</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">return</span> m_size.row;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a7b39aac69f0bb6bdcae46d9c732ce81e"> 142</a></span>  constexpr <span class="keywordtype">bool</span> <a class="code" href="classgf_1_1_index2_d.html#a7b39aac69f0bb6bdcae46d9c732ce81e">isValid</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">return</span> pos.col < m_size.col && pos.row < m_size.row && (std::is_unsigned<I>::value || (0 <= pos.col && 0 <= pos.row));</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  }</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a78f74bf3b81ff26fb114b4fa9eecd905"> 152</a></span>  constexpr <a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> <a class="code" href="classgf_1_1_index2_d.html#a78f74bf3b81ff26fb114b4fa9eecd905">toPosition</a>(std::size_t index) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keywordflow">return</span> { <span class="keyword">static_cast<</span><a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">I</a><span class="keyword">></span>(index % m_size.col), static_cast<I>(index / m_size.col) };</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  }</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#af020db61f6801e592fa42a3dba5203ca"> 162</a></span>  constexpr std::size_t <a class="code" href="classgf_1_1_index2_d.html#af020db61f6801e592fa42a3dba5203ca">toIndex</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordflow">return</span> pos.row * m_size.col + pos.col;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  }</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span> </div><div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a2d46808f00e7d3d2f7d6c321a5fc1d2e"> 178</a></span>  constexpr <a class="code" href="structgf_1_1_range.html">RangeZ</a> <a class="code" href="classgf_1_1_index2_d.html#a2d46808f00e7d3d2f7d6c321a5fc1d2e">getIndexRange</a>() const noexcept {</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">return</span> { 0, <span class="keyword">static_cast<</span>std::size_t<span class="keyword">></span>(m_size.col) * static_cast<std::size_t>(m_size.row) };</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  }</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span> </div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#ac8106916812a295469a94bf748c9712f"> 187</a></span>  constexpr <a class="code" href="structgf_1_1_range.html">Range<I></a> <a class="code" href="classgf_1_1_index2_d.html#ac8106916812a295469a94bf748c9712f">getRowRange</a>() const noexcept {</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">return</span> { 0, m_size.row };</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  }</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span> </div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a38581174ccb64a389b14e02c0310533a"> 196</a></span>  constexpr <a class="code" href="structgf_1_1_range.html">Range<I></a> <a class="code" href="classgf_1_1_index2_d.html#a38581174ccb64a389b14e02c0310533a">getColRange</a>() const noexcept {</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">return</span> { 0, m_size.col };</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  }</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span> </div><div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#abd25f5670f1fc9e7fb084d98a08ab28a"> 205</a></span>  constexpr <a class="code" href="structgf_1_1_position_range.html">PositionRange<I></a> <a class="code" href="classgf_1_1_index2_d.html#abd25f5670f1fc9e7fb084d98a08ab28a">getPositionRange</a>() const noexcept {</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">return</span> { getColRange(), getRowRange() };</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  }</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> </div><div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#aed3842822167b351053fccb554661dcd"> 215</a></span>  <a class="code" href="structgf_1_1_neighbor_square_range.html">NeighborSquareRange<I></a> <a class="code" href="classgf_1_1_index2_d.html#aed3842822167b351053fccb554661dcd">get8NeighborsRange</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">return</span> getNeighborSquareRange(pos, 1);</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  }</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> </div><div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a6f6d3023d4df13118bf863cff5a33103"> 225</a></span>  <a class="code" href="structgf_1_1_neighbor_square_range.html">NeighborSquareRange<I></a> <a class="code" href="classgf_1_1_index2_d.html#a6f6d3023d4df13118bf863cff5a33103">get24NeighborsRange</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">return</span> getNeighborSquareRange(pos, 2);</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  }</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div><div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#ac6ff030905069579c44263fb31e0fe0d"> 235</a></span>  <a class="code" href="structgf_1_1_neighbor_diamond_range.html">NeighborDiamondRange<I></a> <a class="code" href="classgf_1_1_index2_d.html#ac6ff030905069579c44263fb31e0fe0d">get4NeighborsRange</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">return</span> getNeighborDiamondRange(pos, 1);</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  }</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span> </div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="classgf_1_1_index2_d.html#a99afa7736652b228cc9e72636ab2d027"> 245</a></span>  <a class="code" href="structgf_1_1_neighbor_diamond_range.html">NeighborDiamondRange<I></a> <a class="code" href="classgf_1_1_index2_d.html#a99afa7736652b228cc9e72636ab2d027">get12NeighborsRange</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keywordflow">return</span> getNeighborDiamondRange(pos, 2);</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  }</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <a class="code" href="structgf_1_1_neighbor_square_range.html">NeighborSquareRange<I></a> getNeighborSquareRange(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos, <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">I</a> n) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  assert(isValid(pos));</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span> </div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keyword">auto</span> colMin = pos.col - std::min(pos.col, n);</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keyword">auto</span> colMax = pos.col + std::min(m_size.col - pos.col - 1, n);</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keyword">auto</span> rowMin = pos.row - std::min(pos.row, n);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keyword">auto</span> rowMax = pos.row + std::min(m_size.row - pos.row - 1, n);</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span> </div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordflow">return</span> <a class="code" href="structgf_1_1_neighbor_square_range.html">NeighborSquareRange<I></a>{ <a class="code" href="structgf_1_1_range.html">Range<I></a>{ colMin, colMax + 1 }, <a class="code" href="structgf_1_1_range.html">Range<I></a>{ rowMin, rowMax + 1 }, pos };</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  }</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> </div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <a class="code" href="structgf_1_1_neighbor_diamond_range.html">NeighborDiamondRange<I></a> getNeighborDiamondRange(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos, <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">I</a> n) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  assert(isValid(pos));</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span> </div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="keyword">auto</span> colMin = pos.col - std::min(pos.col, n);</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keyword">auto</span> colMax = pos.col + std::min(m_size.col - pos.col - 1, n);</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keyword">auto</span> rowMin = pos.row - std::min(pos.row, n);</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keyword">auto</span> rowMax = pos.row + std::min(m_size.row - pos.row - 1, n);</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> </div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="keywordflow">return</span> <a class="code" href="structgf_1_1_neighbor_diamond_range.html">NeighborDiamondRange<I></a>{ <a class="code" href="structgf_1_1_range.html">Range<I></a>{ colMin, colMax + 1 }, <a class="code" href="structgf_1_1_range.html">Range<I></a>{ rowMin, rowMax + 1 }, pos, n };</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  }</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span> </div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> m_size;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  };</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> </div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span> <span class="comment">// MSVC does not like extern template</span></div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span> <span class="preprocessor">#ifndef _MSC_VER</span></div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span>GF_API <a class="code" href="classgf_1_1_index2_d.html">Index2D<unsigned></a>;</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span>GF_API <a class="code" href="classgf_1_1_index2_d.html">Index2D<int></a>;</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> </div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> I = <span class="keywordtype">unsigned</span>></div><div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html"> 306</a></span>  <span class="keyword">class </span><a class="code" href="classgf_1_1_array2_d.html">Array2D</a> : <span class="keyword">public</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I></a> {</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a0ec41dd614366590913b0148ec48c040"> 313</a></span>  <a class="code" href="classgf_1_1_array2_d.html#a0ec41dd614366590913b0148ec48c040">Array2D</a>()</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  : <a class="code" href="classgf_1_1_index2_d.html">Index2D</a><<a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">I</a>>()</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  {</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  }</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span> </div><div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a280284a67ba004b12a0a9b6eaa4680fa"> 323</a></span>  <a class="code" href="classgf_1_1_array2_d.html#a280284a67ba004b12a0a9b6eaa4680fa">Array2D</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> size)</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  : <a class="code" href="classgf_1_1_index2_d.html">Index2D</a><<a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">I</a>>(size)</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  , m_data(static_cast<<a class="code" href="namespacestd.html">std</a>::size_t>(size.width) * static_cast<<a class="code" href="namespacestd.html">std</a>::size_t>(size.height))</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  {</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  }</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span> </div><div class="line"><a name="l00335"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#adb700b94e1de611c0127972ad533b65b"> 335</a></span>  <a class="code" href="classgf_1_1_array2_d.html#adb700b94e1de611c0127972ad533b65b">Array2D</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> size, <span class="keyword">const</span> <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a>& value)</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  : <a class="code" href="classgf_1_1_index2_d.html">Index2D</a><<a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">I</a>>(size)</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  , m_data(static_cast<<a class="code" href="namespacestd.html">std</a>::size_t>(size.width) * static_cast<<a class="code" href="namespacestd.html">std</a>::size_t>(size.height), value)</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  {</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  }</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> </div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <a class="code" href="classgf_1_1_array2_d.html">Array2D</a>(<span class="keyword">const</span> <a class="code" href="classgf_1_1_array2_d.html">Array2D</a>&) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span> </div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <a class="code" href="classgf_1_1_array2_d.html">Array2D</a>& operator=(<span class="keyword">const</span> <a class="code" href="classgf_1_1_array2_d.html">Array2D</a>&) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span> </div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <a class="code" href="classgf_1_1_array2_d.html">Array2D</a>(<a class="code" href="classgf_1_1_array2_d.html">Array2D</a>&&) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span> </div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <a class="code" href="classgf_1_1_array2_d.html">Array2D</a>& operator=(<a class="code" href="classgf_1_1_array2_d.html">Array2D</a>&&) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span> </div><div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#aa5a1495f3d6ffc5fad5d1fe0bac3443a"> 366</a></span>  <span class="keywordtype">void</span> <a class="code" href="classgf_1_1_array2_d.html#aa5a1495f3d6ffc5fad5d1fe0bac3443a">swap</a>(<a class="code" href="classgf_1_1_array2_d.html">Array2D</a>& other) {</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <a class="code" href="classgf_1_1_index2_d.html#a234dc2dd1f110572dfe38c430a708049">Index2D<I>::swap</a>(other);</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  std::swap(m_data, other.m_data);</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  }</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span> </div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::getSize</a>;</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::getCols</a>;</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::getRows</a>;</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::isValid</a>;</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::toPosition</a>;</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::toIndex</a>;</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::getIndexRange</a>;</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::getRowRange</a>;</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::getColRange</a>;</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::getPositionRange</a>;</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::get8NeighborsRange</a>;</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <span class="keyword">using</span> <a class="code" href="classgf_1_1_index2_d.html">Index2D<I>::get24NeighborsRange</a>;</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span> </div><div class="line"><a name="l00397"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a4b79fa8c752fd9f2ed5c639523490a74"> 397</a></span>  <span class="keyword">const</span> <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a> *<a class="code" href="classgf_1_1_array2_d.html#a4b79fa8c752fd9f2ed5c639523490a74">getDataPtr</a>() const noexcept {</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="keywordflow">return</span> m_data.data();</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  }</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span> </div><div class="line"><a name="l00406"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a0677c2fcb304ac8751f193b77c513dbe"> 406</a></span>  std::size_t <a class="code" href="classgf_1_1_array2_d.html#a0677c2fcb304ac8751f193b77c513dbe">getDataSize</a>() const noexcept {</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="keywordflow">return</span> m_data.size();</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  }</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span> </div><div class="line"><a name="l00418"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#abcd3af6e1984e0345bb95d6f16f64c9e"> 418</a></span>  constexpr <span class="keywordtype">bool</span> <a class="code" href="classgf_1_1_array2_d.html#abcd3af6e1984e0345bb95d6f16f64c9e">isEmpty</a>() const noexcept {</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <span class="keywordflow">return</span> m_data.empty();</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  }</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span> </div><div class="line"><a name="l00434"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a4ce2f15a2adae812ec3889702b27b660"> 434</a></span>  <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a>& <a class="code" href="classgf_1_1_array2_d.html#a4ce2f15a2adae812ec3889702b27b660">operator()</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) {</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keywordflow">return</span> <span class="keyword">get</span>(pos);</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  }</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span> </div><div class="line"><a name="l00444"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a25e29d5840eba19f24cd72f07874ea7f"> 444</a></span>  <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a>& <a class="code" href="classgf_1_1_array2_d.html#a25e29d5840eba19f24cd72f07874ea7f">operator()</a>(std::size_t index) {</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="keywordflow">return</span> m_data[index];</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  }</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span> </div><div class="line"><a name="l00453"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a6881232f07dad70f955cf77b5f36a108"> 453</a></span>  <span class="keyword">const</span> <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a>& <a class="code" href="classgf_1_1_array2_d.html#a6881232f07dad70f955cf77b5f36a108">operator()</a>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos)<span class="keyword"> const </span>{</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  <span class="keywordflow">return</span> <span class="keyword">get</span>(pos);</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  }</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span> </div><div class="line"><a name="l00463"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#ad4bd487b2ed0031399c5997df59c8de3"> 463</a></span>  <span class="keyword">const</span> <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a>& <a class="code" href="classgf_1_1_array2_d.html#ad4bd487b2ed0031399c5997df59c8de3">operator()</a>(std::size_t index)<span class="keyword"> const </span>{</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <span class="keywordflow">return</span> m_data[index];</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  }</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span> </div><div class="line"><a name="l00481"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#aff17b16f1868abd8bbe6955dafee3aa5"> 481</a></span>  <span class="keyword">const</span> <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a> *<a class="code" href="classgf_1_1_array2_d.html#aff17b16f1868abd8bbe6955dafee3aa5">begin</a>() const noexcept {</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  <span class="keywordflow">return</span> m_data.data();</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  }</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span> </div><div class="line"><a name="l00491"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#aec3d53d1365b9db610a9290b79e6d74f"> 491</a></span>  <span class="keyword">const</span> <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a> *<a class="code" href="classgf_1_1_array2_d.html#aec3d53d1365b9db610a9290b79e6d74f">end</a>() const noexcept {</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <span class="keywordflow">return</span> m_data.data() + m_data.size();</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  }</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span> </div><div class="line"><a name="l00501"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a20500f2da197e54646130cc7cf03e4c0"> 501</a></span>  <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a> *<a class="code" href="classgf_1_1_array2_d.html#a20500f2da197e54646130cc7cf03e4c0">begin</a>() noexcept {</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  <span class="keywordflow">return</span> m_data.data();</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  }</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span> </div><div class="line"><a name="l00511"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#a8d7dd52df003d68330a72ac3bfb092c5"> 511</a></span>  <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a> *<a class="code" href="classgf_1_1_array2_d.html#a8d7dd52df003d68330a72ac3bfb092c5">end</a>() noexcept {</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <span class="keywordflow">return</span> m_data.data() + m_data.size();</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  }</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span> </div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a>& <span class="keyword">get</span>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) {</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  <span class="keywordflow">return</span> m_data[toIndex(pos)];</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  }</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span> </div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <span class="keyword">const</span> <a class="code" href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a>& <span class="keyword">get</span>(<a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> pos) <span class="keyword">const</span> {</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  <span class="keywordflow">return</span> m_data[toIndex(pos)];</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  }</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span> </div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  std::vector<T> m_data;</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  };</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span> </div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> I></div><div class="line"><a name="l00535"></a><span class="lineno"><a class="line" href="classgf_1_1_array2_d.html#ab545693557925e31ebdbdfc0872a759b"> 535</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classgf_1_1_array2_d.html#ab545693557925e31ebdbdfc0872a759b">operator==</a>(<span class="keyword">const</span> <a class="code" href="classgf_1_1_array2_d.html">Array2D<T,I></a>& lhs, <span class="keyword">const</span> <a class="code" href="classgf_1_1_array2_d.html">Array2D<T,I></a>& rhs) {</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="keyword">auto</span> lhsSize = lhs.<a class="code" href="classgf_1_1_index2_d.html#a17a607fbb2e285d9f0b910659f85a6d0">getSize</a>();</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <span class="keyword">auto</span> rhsSize = rhs.<a class="code" href="classgf_1_1_index2_d.html#a17a607fbb2e285d9f0b910659f85a6d0">getSize</a>();</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span> </div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <span class="keywordflow">if</span> (lhsSize.width != rhsSize.width || lhsSize.height != rhsSize.height) {</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  }</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span> </div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  <span class="keywordflow">return</span> std::equal(lhs.<a class="code" href="classgf_1_1_array2_d.html#aff17b16f1868abd8bbe6955dafee3aa5">begin</a>(), lhs.<a class="code" href="classgf_1_1_array2_d.html#aec3d53d1365b9db610a9290b79e6d74f">end</a>(), rhs.<a class="code" href="classgf_1_1_array2_d.html#aff17b16f1868abd8bbe6955dafee3aa5">begin</a>(), rhs.<a class="code" href="classgf_1_1_array2_d.html#aec3d53d1365b9db610a9290b79e6d74f">end</a>());</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  }</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span> </div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> I></div><div class="line"><a name="l00551"></a><span class="lineno"><a class="line" href="classgf_1_1_serializer.html#a9a90b40f474c14ae75477d2ea17d6b44"> 551</a></span>  <a class="code" href="classgf_1_1_serializer.html">Serializer</a>& <a class="code" href="classgf_1_1_serializer.html#a9a90b40f474c14ae75477d2ea17d6b44">operator|</a>(<a class="code" href="classgf_1_1_serializer.html">Serializer</a>& ar, <span class="keyword">const</span> <a class="code" href="classgf_1_1_array2_d.html">Array2D<T,I></a>& <a class="code" href="group__core.html#gaeff488964a3b6ec01b110f42438da086">array</a>) {</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  <span class="keyword">auto</span> size = array.<a class="code" href="classgf_1_1_index2_d.html#a17a607fbb2e285d9f0b910659f85a6d0">getSize</a>();</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  ar | size.width | size.height;</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span> </div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& item : array) {</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  ar | item;</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  }</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span> </div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  <span class="keywordflow">return</span> ar;</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  }</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span> </div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> I></div><div class="line"><a name="l00567"></a><span class="lineno"><a class="line" href="classgf_1_1_deserializer.html#afd59e8c1063f892daaf2c734431f7ef9"> 567</a></span>  <a class="code" href="classgf_1_1_deserializer.html">Deserializer</a>& <a class="code" href="classgf_1_1_deserializer.html#afd59e8c1063f892daaf2c734431f7ef9">operator|</a>(<a class="code" href="classgf_1_1_deserializer.html">Deserializer</a>& ar, <a class="code" href="classgf_1_1_array2_d.html">Array2D<T,I></a>& <a class="code" href="group__core.html#gaeff488964a3b6ec01b110f42438da086">array</a>) {</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  <a class="code" href="structgf_1_1_vector.html">Vector<I, 2></a> size;</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  ar | size.width | size.height;</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span> </div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  <a class="code" href="classgf_1_1_array2_d.html">Array2D<T,I></a> tmp(size);</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span> </div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& item : tmp) {</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  ar | item;</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>  }</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span> </div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  array = std::move(tmp);</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  <span class="keywordflow">return</span> ar;</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  }</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span> </div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span> </div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span> <span class="preprocessor">#ifndef DOXYGEN_SHOULD_SKIP_THIS</span></div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span> }</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span> }</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span> </div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span> <span class="preprocessor">#endif // ARRAY2D_H</span></div><div class="ttc" id="classgf_1_1_deserializer_html"><div class="ttname"><a href="classgf_1_1_deserializer.html">gf::Deserializer</a></div><div class="ttdoc">A deserializer from a binary file. </div><div class="ttdef"><b>Definition:</b> Serialization.h:153</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a7b39aac69f0bb6bdcae46d9c732ce81e"><div class="ttname"><a href="classgf_1_1_index2_d.html#a7b39aac69f0bb6bdcae46d9c732ce81e">gf::Index2D::isValid</a></div><div class="ttdeci">constexpr bool isValid(Vector< I, 2 > pos) const noexcept</div><div class="ttdoc">Check if a position is valid. </div><div class="ttdef"><b>Definition:</b> Array2D.h:142</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a78f74bf3b81ff26fb114b4fa9eecd905"><div class="ttname"><a href="classgf_1_1_index2_d.html#a78f74bf3b81ff26fb114b4fa9eecd905">gf::Index2D::toPosition</a></div><div class="ttdeci">constexpr Vector< I, 2 > toPosition(std::size_t index) const noexcept</div><div class="ttdoc">Transform a 1D position into a 2D position. </div><div class="ttdef"><b>Definition:</b> Array2D.h:152</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html"><div class="ttname"><a href="classgf_1_1_array2_d.html">gf::Array2D</a></div><div class="ttdoc">A two-dimensional array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:306</div></div>
<div class="ttc" id="classgf_1_1_serializer_html_a9a90b40f474c14ae75477d2ea17d6b44"><div class="ttname"><a href="classgf_1_1_serializer.html#a9a90b40f474c14ae75477d2ea17d6b44">gf::Serializer::operator|</a></div><div class="ttdeci">Serializer & operator|(Serializer &ar, const Array2D< T, I > &array)</div><div class="ttdoc">Serialize a 2D array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:551</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_ac8106916812a295469a94bf748c9712f"><div class="ttname"><a href="classgf_1_1_index2_d.html#ac8106916812a295469a94bf748c9712f">gf::Index2D::getRowRange</a></div><div class="ttdeci">constexpr Range< I > getRowRange() const noexcept</div><div class="ttdoc">Get the row range. </div><div class="ttdef"><b>Definition:</b> Array2D.h:187</div></div>
<div class="ttc" id="structgf_1_1_range_html"><div class="ttname"><a href="structgf_1_1_range.html">gf::Range</a></div><div class="ttdoc">A half-open range of values. </div><div class="ttdef"><b>Definition:</b> Range.h:43</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a8d7dd52df003d68330a72ac3bfb092c5"><div class="ttname"><a href="classgf_1_1_array2_d.html#a8d7dd52df003d68330a72ac3bfb092c5">gf::Array2D::end</a></div><div class="ttdeci">T * end() noexcept</div><div class="ttdoc">Get an iterator to the element following the last element of the array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:511</div></div>
<div class="ttc" id="group__window_html_gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3"><div class="ttname"><a href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626ab9ece18c950afbfa6b0fdbfa4ff731d3">gf::Scancode::T</a></div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_ab5d6853a28794751ec428220c07da8f3"><div class="ttname"><a href="classgf_1_1_index2_d.html#ab5d6853a28794751ec428220c07da8f3">gf::Index2D::Index2D</a></div><div class="ttdeci">Index2D()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> Array2D.h:59</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html"><div class="ttname"><a href="classgf_1_1_index2_d.html">gf::Index2D</a></div><div class="ttdoc">A two-dimensional array with no data. </div><div class="ttdef"><b>Definition:</b> Array2D.h:52</div></div>
<div class="ttc" id="classgf_1_1_deserializer_html_afd59e8c1063f892daaf2c734431f7ef9"><div class="ttname"><a href="classgf_1_1_deserializer.html#afd59e8c1063f892daaf2c734431f7ef9">gf::Deserializer::operator|</a></div><div class="ttdeci">Deserializer & operator|(Deserializer &ar, Array2D< T, I > &array)</div><div class="ttdoc">Deserialize a 2D array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:567</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_ac6ff030905069579c44263fb31e0fe0d"><div class="ttname"><a href="classgf_1_1_index2_d.html#ac6ff030905069579c44263fb31e0fe0d">gf::Index2D::get4NeighborsRange</a></div><div class="ttdeci">NeighborDiamondRange< I > get4NeighborsRange(Vector< I, 2 > pos) const noexcept</div><div class="ttdoc">Get a range for 4 neighbors (at most) </div><div class="ttdef"><b>Definition:</b> Array2D.h:235</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_aff17b16f1868abd8bbe6955dafee3aa5"><div class="ttname"><a href="classgf_1_1_array2_d.html#aff17b16f1868abd8bbe6955dafee3aa5">gf::Array2D::begin</a></div><div class="ttdeci">const T * begin() const noexcept</div><div class="ttdoc">Get an iterator to the first element of the array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:481</div></div>
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace. </div></div>
<div class="ttc" id="group__window_html_gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f"><div class="ttname"><a href="group__window.html#gga795d7d5e2f2a4f38b16b95e0e78cb626add7536794b63bf90eccfd37f9b147d7f">gf::Scancode::I</a></div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a4b79fa8c752fd9f2ed5c639523490a74"><div class="ttname"><a href="classgf_1_1_array2_d.html#a4b79fa8c752fd9f2ed5c639523490a74">gf::Array2D::getDataPtr</a></div><div class="ttdeci">const T * getDataPtr() const noexcept</div><div class="ttdoc">Get the pointer to raw data. </div><div class="ttdef"><b>Definition:</b> Array2D.h:397</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a38581174ccb64a389b14e02c0310533a"><div class="ttname"><a href="classgf_1_1_index2_d.html#a38581174ccb64a389b14e02c0310533a">gf::Index2D::getColRange</a></div><div class="ttdeci">constexpr Range< I > getColRange() const noexcept</div><div class="ttdoc">Get the column range. </div><div class="ttdef"><b>Definition:</b> Array2D.h:196</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a0677c2fcb304ac8751f193b77c513dbe"><div class="ttname"><a href="classgf_1_1_array2_d.html#a0677c2fcb304ac8751f193b77c513dbe">gf::Array2D::getDataSize</a></div><div class="ttdeci">std::size_t getDataSize() const noexcept</div><div class="ttdoc">Get the raw data size. </div><div class="ttdef"><b>Definition:</b> Array2D.h:406</div></div>
<div class="ttc" id="structgf_1_1_neighbor_square_range_html"><div class="ttname"><a href="structgf_1_1_neighbor_square_range.html">gf::NeighborSquareRange</a></div><div class="ttdoc">A 2D range. </div><div class="ttdef"><b>Definition:</b> Range.h:424</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_aa5a1495f3d6ffc5fad5d1fe0bac3443a"><div class="ttname"><a href="classgf_1_1_array2_d.html#aa5a1495f3d6ffc5fad5d1fe0bac3443a">gf::Array2D::swap</a></div><div class="ttdeci">void swap(Array2D &other)</div><div class="ttdoc">Swap with another array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:366</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a17a607fbb2e285d9f0b910659f85a6d0"><div class="ttname"><a href="classgf_1_1_index2_d.html#a17a607fbb2e285d9f0b910659f85a6d0">gf::Index2D::getSize</a></div><div class="ttdeci">constexpr Vector< I, 2 > getSize() const noexcept</div><div class="ttdoc">Get the size of the array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:113</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a6f6d3023d4df13118bf863cff5a33103"><div class="ttname"><a href="classgf_1_1_index2_d.html#a6f6d3023d4df13118bf863cff5a33103">gf::Index2D::get24NeighborsRange</a></div><div class="ttdeci">NeighborSquareRange< I > get24NeighborsRange(Vector< I, 2 > pos) const noexcept</div><div class="ttdoc">Get a range for 24 neighbors (at most) </div><div class="ttdef"><b>Definition:</b> Array2D.h:225</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a2d46808f00e7d3d2f7d6c321a5fc1d2e"><div class="ttname"><a href="classgf_1_1_index2_d.html#a2d46808f00e7d3d2f7d6c321a5fc1d2e">gf::Index2D::getIndexRange</a></div><div class="ttdeci">constexpr RangeZ getIndexRange() const noexcept</div><div class="ttdoc">Get the 1D index range of the array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:178</div></div>
<div class="ttc" id="classgf_1_1_serializer_html"><div class="ttname"><a href="classgf_1_1_serializer.html">gf::Serializer</a></div><div class="ttdoc">A serializer to a binary file. </div><div class="ttdef"><b>Definition:</b> Serialization.h:45</div></div>
<div class="ttc" id="namespacegf_html"><div class="ttname"><a href="namespacegf.html">gf</a></div><div class="ttdoc">The namespace for gf classes. </div><div class="ttdef"><b>Definition:</b> Action.h:35</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a0ec41dd614366590913b0148ec48c040"><div class="ttname"><a href="classgf_1_1_array2_d.html#a0ec41dd614366590913b0148ec48c040">gf::Array2D::Array2D</a></div><div class="ttdeci">Array2D()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> Array2D.h:313</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a280284a67ba004b12a0a9b6eaa4680fa"><div class="ttname"><a href="classgf_1_1_array2_d.html#a280284a67ba004b12a0a9b6eaa4680fa">gf::Array2D::Array2D</a></div><div class="ttdeci">Array2D(Vector< I, 2 > size)</div><div class="ttdoc">Constructor with a size. </div><div class="ttdef"><b>Definition:</b> Array2D.h:323</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a4ce2f15a2adae812ec3889702b27b660"><div class="ttname"><a href="classgf_1_1_array2_d.html#a4ce2f15a2adae812ec3889702b27b660">gf::Array2D::operator()</a></div><div class="ttdeci">T & operator()(Vector< I, 2 > pos)</div><div class="ttdoc">Get the element at a given 2D position. </div><div class="ttdef"><b>Definition:</b> Array2D.h:434</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_ad4bd487b2ed0031399c5997df59c8de3"><div class="ttname"><a href="classgf_1_1_array2_d.html#ad4bd487b2ed0031399c5997df59c8de3">gf::Array2D::operator()</a></div><div class="ttdeci">const T & operator()(std::size_t index) const</div><div class="ttdoc">Get the element at a given 1D index. </div><div class="ttdef"><b>Definition:</b> Array2D.h:463</div></div>
<div class="ttc" id="structgf_1_1_neighbor_diamond_range_html"><div class="ttname"><a href="structgf_1_1_neighbor_diamond_range.html">gf::NeighborDiamondRange</a></div><div class="ttdoc">A 2D range. </div><div class="ttdef"><b>Definition:</b> Range.h:592</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_abcd3af6e1984e0345bb95d6f16f64c9e"><div class="ttname"><a href="classgf_1_1_array2_d.html#abcd3af6e1984e0345bb95d6f16f64c9e">gf::Array2D::isEmpty</a></div><div class="ttdeci">constexpr bool isEmpty() const noexcept</div><div class="ttdoc">Check if the array is empty. </div><div class="ttdef"><b>Definition:</b> Array2D.h:418</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_aed3842822167b351053fccb554661dcd"><div class="ttname"><a href="classgf_1_1_index2_d.html#aed3842822167b351053fccb554661dcd">gf::Index2D::get8NeighborsRange</a></div><div class="ttdeci">NeighborSquareRange< I > get8NeighborsRange(Vector< I, 2 > pos) const noexcept</div><div class="ttdoc">Get a range for 8 neighbors (at most) </div><div class="ttdef"><b>Definition:</b> Array2D.h:215</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_af020db61f6801e592fa42a3dba5203ca"><div class="ttname"><a href="classgf_1_1_index2_d.html#af020db61f6801e592fa42a3dba5203ca">gf::Index2D::toIndex</a></div><div class="ttdeci">constexpr std::size_t toIndex(Vector< I, 2 > pos) const noexcept</div><div class="ttdoc">Transform a 2D position into a 1D position. </div><div class="ttdef"><b>Definition:</b> Array2D.h:162</div></div>
<div class="ttc" id="group__core_html_gaeff488964a3b6ec01b110f42438da086"><div class="ttname"><a href="group__core.html#gaeff488964a3b6ec01b110f42438da086">gf::array</a></div><div class="ttdeci">constexpr ArrayRef< T > array(const T *data, std::size_t size)</div><div class="ttdoc">Create a constant reference to an array. </div><div class="ttdef"><b>Definition:</b> ArrayRef.h:203</div></div>
<div class="ttc" id="structgf_1_1_position_range_html"><div class="ttname"><a href="structgf_1_1_position_range.html">gf::PositionRange</a></div><div class="ttdoc">A 2D range. </div><div class="ttdef"><b>Definition:</b> Range.h:277</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a20500f2da197e54646130cc7cf03e4c0"><div class="ttname"><a href="classgf_1_1_array2_d.html#a20500f2da197e54646130cc7cf03e4c0">gf::Array2D::begin</a></div><div class="ttdeci">T * begin() noexcept</div><div class="ttdoc">Get an iterator to the first element of the array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:501</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_adb700b94e1de611c0127972ad533b65b"><div class="ttname"><a href="classgf_1_1_array2_d.html#adb700b94e1de611c0127972ad533b65b">gf::Array2D::Array2D</a></div><div class="ttdeci">Array2D(Vector< I, 2 > size, const T &value)</div><div class="ttdoc">Constructor with a size and a value. </div><div class="ttdef"><b>Definition:</b> Array2D.h:335</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a99afa7736652b228cc9e72636ab2d027"><div class="ttname"><a href="classgf_1_1_index2_d.html#a99afa7736652b228cc9e72636ab2d027">gf::Index2D::get12NeighborsRange</a></div><div class="ttdeci">NeighborDiamondRange< I > get12NeighborsRange(Vector< I, 2 > pos) const noexcept</div><div class="ttdoc">Get a range for 12 neighbors (at most) </div><div class="ttdef"><b>Definition:</b> Array2D.h:245</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_abd25f5670f1fc9e7fb084d98a08ab28a"><div class="ttname"><a href="classgf_1_1_index2_d.html#abd25f5670f1fc9e7fb084d98a08ab28a">gf::Index2D::getPositionRange</a></div><div class="ttdeci">constexpr PositionRange< I > getPositionRange() const noexcept</div><div class="ttdoc">Get the position range. </div><div class="ttdef"><b>Definition:</b> Array2D.h:205</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_ab545693557925e31ebdbdfc0872a759b"><div class="ttname"><a href="classgf_1_1_array2_d.html#ab545693557925e31ebdbdfc0872a759b">gf::Array2D::operator==</a></div><div class="ttdeci">bool operator==(const Array2D< T, I > &lhs, const Array2D< T, I > &rhs)</div><div class="ttdoc">Equality operator for 2D array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:535</div></div>
<div class="ttc" id="structgf_1_1_vector_html"><div class="ttname"><a href="structgf_1_1_vector.html">gf::Vector< I, 2 ></a></div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a7efa5ce23bd075dab837b1d84ce7be76"><div class="ttname"><a href="classgf_1_1_index2_d.html#a7efa5ce23bd075dab837b1d84ce7be76">gf::Index2D::getRows</a></div><div class="ttdeci">constexpr I getRows() const noexcept</div><div class="ttdoc">Get the number of rows. </div><div class="ttdef"><b>Definition:</b> Array2D.h:131</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a25e29d5840eba19f24cd72f07874ea7f"><div class="ttname"><a href="classgf_1_1_array2_d.html#a25e29d5840eba19f24cd72f07874ea7f">gf::Array2D::operator()</a></div><div class="ttdeci">T & operator()(std::size_t index)</div><div class="ttdoc">Get the element at a given 1D index. </div><div class="ttdef"><b>Definition:</b> Array2D.h:444</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_a6881232f07dad70f955cf77b5f36a108"><div class="ttname"><a href="classgf_1_1_array2_d.html#a6881232f07dad70f955cf77b5f36a108">gf::Array2D::operator()</a></div><div class="ttdeci">const T & operator()(Vector< I, 2 > pos) const</div><div class="ttdoc">Get the element at a given 2D position. </div><div class="ttdef"><b>Definition:</b> Array2D.h:453</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a6da435d64c599e2f77121872517b2cd2"><div class="ttname"><a href="classgf_1_1_index2_d.html#a6da435d64c599e2f77121872517b2cd2">gf::Index2D::Index2D</a></div><div class="ttdeci">Index2D(Vector< I, 2 > size)</div><div class="ttdoc">Constructor with a size. </div><div class="ttdef"><b>Definition:</b> Array2D.h:69</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a234dc2dd1f110572dfe38c430a708049"><div class="ttname"><a href="classgf_1_1_index2_d.html#a234dc2dd1f110572dfe38c430a708049">gf::Index2D::swap</a></div><div class="ttdeci">void swap(Index2D &other)</div><div class="ttdoc">Swap with another array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:99</div></div>
<div class="ttc" id="classgf_1_1_index2_d_html_a8de99adeca127d38d0671cb49e17c481"><div class="ttname"><a href="classgf_1_1_index2_d.html#a8de99adeca127d38d0671cb49e17c481">gf::Index2D::getCols</a></div><div class="ttdeci">constexpr I getCols() const noexcept</div><div class="ttdoc">Get the number of columns. </div><div class="ttdef"><b>Definition:</b> Array2D.h:122</div></div>
<div class="ttc" id="classgf_1_1_array2_d_html_aec3d53d1365b9db610a9290b79e6d74f"><div class="ttname"><a href="classgf_1_1_array2_d.html#aec3d53d1365b9db610a9290b79e6d74f">gf::Array2D::end</a></div><div class="ttdeci">const T * end() const noexcept</div><div class="ttdoc">Get an iterator to the element following the last element of the array. </div><div class="ttdef"><b>Definition:</b> Array2D.h:491</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>