-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasstcod_1_1_matrix.html
247 lines (243 loc) · 19.5 KB
/
classtcod_1_1_matrix.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<!-- HTML header for doxygen 1.9.5-->
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-772NXFFJ4E"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-772NXFFJ4E');
</script>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=11" />
<meta name="generator" content="Doxygen 1.9.5" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>libtcod: tcod::Matrix< T, Dimensions, Container > Class Template Reference</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/javascript" src="doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript" src="doxygen-awesome-fragment-copy-button.js"></script>
<script type="text/javascript" src="doxygen-awesome-paragraph-link.js"></script>
<script type="text/javascript" src="doxygen-awesome-interactive-toc.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
DoxygenAwesomeFragmentCopyButton.init()
DoxygenAwesomeParagraphLink.init()
DoxygenAwesomeInteractiveToc.init()
</script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.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" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.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 id="projectrow">
<td id="projectalign">
<div id="projectname">libtcod
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classtcod_1_1_matrix.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- 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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="classtcod_1_1_matrix-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">tcod::Matrix< T, Dimensions, Container > Class Template Reference</div></div>
</div><!--header-->
<div class="contents">
<p>A template container for holding a multi-dimensional array of items.
<a href="classtcod_1_1_matrix.html#details">More...</a></p>
<p><code>#include <<a class="el" href="matrix_8hpp_source.html">matrix.hpp</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a80db81126270c329e8d1d2b1f833780c"><td class="memItemLeft" align="right" valign="top"><a id="a80db81126270c329e8d1d2b1f833780c" name="a80db81126270c329e8d1d2b1f833780c"></a>
using </td><td class="memItemRight" valign="bottom"><b>size_type</b> = int</td></tr>
<tr class="separator:a80db81126270c329e8d1d2b1f833780c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa3a2b8c7b071350e1dd5f4b1967e5168"><td class="memItemLeft" align="right" valign="top"><a id="aa3a2b8c7b071350e1dd5f4b1967e5168" name="aa3a2b8c7b071350e1dd5f4b1967e5168"></a>
using </td><td class="memItemRight" valign="bottom"><b>shape_type</b> = std::array< size_type, Dimensions ></td></tr>
<tr class="separator:aa3a2b8c7b071350e1dd5f4b1967e5168"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a713eb66cc03b448fa2dffdadf298f6e0"><td class="memItemLeft" align="right" valign="top"><a id="a713eb66cc03b448fa2dffdadf298f6e0" name="a713eb66cc03b448fa2dffdadf298f6e0"></a>
using </td><td class="memItemRight" valign="bottom"><b>index_type</b> = std::array< size_type, Dimensions ></td></tr>
<tr class="separator:a713eb66cc03b448fa2dffdadf298f6e0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a89b8c6118a07fe7902b5175eb4c6ac03"><td class="memItemLeft" align="right" valign="top"><a id="a89b8c6118a07fe7902b5175eb4c6ac03" name="a89b8c6118a07fe7902b5175eb4c6ac03"></a>
using </td><td class="memItemRight" valign="bottom"><b>reference</b> = typename Container::reference</td></tr>
<tr class="separator:a89b8c6118a07fe7902b5175eb4c6ac03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad03a307ad0ea0098b3d16163f7de914d"><td class="memItemLeft" align="right" valign="top"><a id="ad03a307ad0ea0098b3d16163f7de914d" name="ad03a307ad0ea0098b3d16163f7de914d"></a>
using </td><td class="memItemRight" valign="bottom"><b>const_reference</b> = typename Container::const_reference</td></tr>
<tr class="separator:ad03a307ad0ea0098b3d16163f7de914d"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3893d8d503bb5939509761ac19a8a6ff"><td class="memItemLeft" align="right" valign="top"><a id="a3893d8d503bb5939509761ac19a8a6ff" name="a3893d8d503bb5939509761ac19a8a6ff"></a>
constexpr </td><td class="memItemRight" valign="bottom"><b>Matrix</b> ()=default</td></tr>
<tr class="memdesc:a3893d8d503bb5939509761ac19a8a6ff"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:a3893d8d503bb5939509761ac19a8a6ff"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a08d2cc6902b89f5032200f85114661aa"><td class="memItemLeft" align="right" valign="top"><a id="a08d2cc6902b89f5032200f85114661aa" name="a08d2cc6902b89f5032200f85114661aa"></a>
constexpr </td><td class="memItemRight" valign="bottom"><b>Matrix</b> (const shape_type &shape)</td></tr>
<tr class="memdesc:a08d2cc6902b89f5032200f85114661aa"><td class="mdescLeft"> </td><td class="mdescRight">Create a matrix of the given shape. <br /></td></tr>
<tr class="separator:a08d2cc6902b89f5032200f85114661aa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a69f93fb8d9e990954946f98977f5bd51"><td class="memItemLeft" align="right" valign="top"><a id="a69f93fb8d9e990954946f98977f5bd51" name="a69f93fb8d9e990954946f98977f5bd51"></a>
constexpr </td><td class="memItemRight" valign="bottom"><b>Matrix</b> (const shape_type &shape, const T &fill_value)</td></tr>
<tr class="memdesc:a69f93fb8d9e990954946f98977f5bd51"><td class="mdescLeft"> </td><td class="mdescRight">Create a matrix of the given shape filled with a default value. <br /></td></tr>
<tr class="separator:a69f93fb8d9e990954946f98977f5bd51"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aada4c858310424db8ef8bf0eb90dce18"><td class="memItemLeft" align="right" valign="top"><a id="aada4c858310424db8ef8bf0eb90dce18" name="aada4c858310424db8ef8bf0eb90dce18"></a>
constexpr auto </td><td class="memItemRight" valign="bottom"><b>begin</b> () noexcept</td></tr>
<tr class="memdesc:aada4c858310424db8ef8bf0eb90dce18"><td class="mdescLeft"> </td><td class="mdescRight">Return the iterator beginning. <br /></td></tr>
<tr class="separator:aada4c858310424db8ef8bf0eb90dce18"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a99a18d941f24155e8edfb98b8f597ebd"><td class="memItemLeft" align="right" valign="top"><a id="a99a18d941f24155e8edfb98b8f597ebd" name="a99a18d941f24155e8edfb98b8f597ebd"></a>
constexpr auto </td><td class="memItemRight" valign="bottom"><b>begin</b> () const noexcept</td></tr>
<tr class="memdesc:a99a18d941f24155e8edfb98b8f597ebd"><td class="mdescLeft"> </td><td class="mdescRight">Return the iterator beginning. <br /></td></tr>
<tr class="separator:a99a18d941f24155e8edfb98b8f597ebd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac700dc6055e65d4b49650e9a48932368"><td class="memItemLeft" align="right" valign="top"><a id="ac700dc6055e65d4b49650e9a48932368" name="ac700dc6055e65d4b49650e9a48932368"></a>
constexpr auto </td><td class="memItemRight" valign="bottom"><b>end</b> () noexcept</td></tr>
<tr class="memdesc:ac700dc6055e65d4b49650e9a48932368"><td class="mdescLeft"> </td><td class="mdescRight">Return the iterator end. <br /></td></tr>
<tr class="separator:ac700dc6055e65d4b49650e9a48932368"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a336a6c8f2ca7691b33b0ed53463e6284"><td class="memItemLeft" align="right" valign="top"><a id="a336a6c8f2ca7691b33b0ed53463e6284" name="a336a6c8f2ca7691b33b0ed53463e6284"></a>
constexpr auto </td><td class="memItemRight" valign="bottom"><b>end</b> () const noexcept</td></tr>
<tr class="memdesc:a336a6c8f2ca7691b33b0ed53463e6284"><td class="mdescLeft"> </td><td class="mdescRight">Return the iterator end. <br /></td></tr>
<tr class="separator:a336a6c8f2ca7691b33b0ed53463e6284"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a58c578bb9504c72ada5d8654053fa1a5"><td class="memItemLeft" align="right" valign="top"><a id="a58c578bb9504c72ada5d8654053fa1a5" name="a58c578bb9504c72ada5d8654053fa1a5"></a>
constexpr reference </td><td class="memItemRight" valign="bottom"><b>operator[]</b> (const index_type &index) noexcept</td></tr>
<tr class="memdesc:a58c578bb9504c72ada5d8654053fa1a5"><td class="mdescLeft"> </td><td class="mdescRight">Get the item at index. <br /></td></tr>
<tr class="separator:a58c578bb9504c72ada5d8654053fa1a5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abdd0a1a78f6bafff35a1f2b179be3453"><td class="memItemLeft" align="right" valign="top"><a id="abdd0a1a78f6bafff35a1f2b179be3453" name="abdd0a1a78f6bafff35a1f2b179be3453"></a>
constexpr const_reference </td><td class="memItemRight" valign="bottom"><b>operator[]</b> (const index_type &index) const noexcept</td></tr>
<tr class="memdesc:abdd0a1a78f6bafff35a1f2b179be3453"><td class="mdescLeft"> </td><td class="mdescRight">Get the const item at index. <br /></td></tr>
<tr class="separator:abdd0a1a78f6bafff35a1f2b179be3453"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0c58b3c9547dee46ade87757d5518db3"><td class="memItemLeft" align="right" valign="top"><a id="a0c58b3c9547dee46ade87757d5518db3" name="a0c58b3c9547dee46ade87757d5518db3"></a>
constexpr reference </td><td class="memItemRight" valign="bottom"><b>at</b> (const index_type &index)</td></tr>
<tr class="memdesc:a0c58b3c9547dee46ade87757d5518db3"><td class="mdescLeft"> </td><td class="mdescRight">Get the item at index, checking bounds. <br /></td></tr>
<tr class="separator:a0c58b3c9547dee46ade87757d5518db3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a24f8a0d6fa9b25b875ee29cf66e1c0af"><td class="memItemLeft" align="right" valign="top"><a id="a24f8a0d6fa9b25b875ee29cf66e1c0af" name="a24f8a0d6fa9b25b875ee29cf66e1c0af"></a>
constexpr const_reference </td><td class="memItemRight" valign="bottom"><b>at</b> (const index_type &index) const</td></tr>
<tr class="memdesc:a24f8a0d6fa9b25b875ee29cf66e1c0af"><td class="mdescLeft"> </td><td class="mdescRight">Get the const item at index, checking bounds. <br /></td></tr>
<tr class="separator:a24f8a0d6fa9b25b875ee29cf66e1c0af"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a98c185bf6da384a42302d2b3f096e969"><td class="memItemLeft" align="right" valign="top"><a id="a98c185bf6da384a42302d2b3f096e969" name="a98c185bf6da384a42302d2b3f096e969"></a>
constexpr const shape_type & </td><td class="memItemRight" valign="bottom"><b>get_shape</b> () const noexcept</td></tr>
<tr class="memdesc:a98c185bf6da384a42302d2b3f096e969"><td class="mdescLeft"> </td><td class="mdescRight">Return the shape of this matrix. <br /></td></tr>
<tr class="separator:a98c185bf6da384a42302d2b3f096e969"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a20194cf3b6180d0714c4d60c15b6a387"><td class="memItemLeft" align="right" valign="top"><a id="a20194cf3b6180d0714c4d60c15b6a387" name="a20194cf3b6180d0714c4d60c15b6a387"></a>
constexpr bool </td><td class="memItemRight" valign="bottom"><b>in_bounds</b> (const index_type &index) const noexcept</td></tr>
<tr class="memdesc:a20194cf3b6180d0714c4d60c15b6a387"><td class="mdescLeft"> </td><td class="mdescRight">Return true if index is within the bounds of this matrix. <br /></td></tr>
<tr class="separator:a20194cf3b6180d0714c4d60c15b6a387"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0bcc90d113fe64431de4bd736653bc80"><td class="memItemLeft" align="right" valign="top"><a id="a0bcc90d113fe64431de4bd736653bc80" name="a0bcc90d113fe64431de4bd736653bc80"></a>
constexpr </td><td class="memItemRight" valign="bottom"><b>operator MatrixView< T, Dimensions ></b> () noexcept</td></tr>
<tr class="memdesc:a0bcc90d113fe64431de4bd736653bc80"><td class="mdescLeft"> </td><td class="mdescRight">Implicit cast to a view of this matrix. <br /></td></tr>
<tr class="separator:a0bcc90d113fe64431de4bd736653bc80"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e2f9ef1c30633c730332da4dd06699e"><td class="memItemLeft" align="right" valign="top"><a id="a1e2f9ef1c30633c730332da4dd06699e" name="a1e2f9ef1c30633c730332da4dd06699e"></a>
constexpr </td><td class="memItemRight" valign="bottom"><b>operator MatrixView< const T, Dimensions ></b> () const noexcept</td></tr>
<tr class="memdesc:a1e2f9ef1c30633c730332da4dd06699e"><td class="mdescLeft"> </td><td class="mdescRight">Implicit cast to a const view of this matrix. <br /></td></tr>
<tr class="separator:a1e2f9ef1c30633c730332da4dd06699e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3568407d38110aef270a86c561fbc1f9"><td class="memItemLeft" align="right" valign="top"><a id="a3568407d38110aef270a86c561fbc1f9" name="a3568407d38110aef270a86c561fbc1f9"></a>
constexpr Container & </td><td class="memItemRight" valign="bottom"><b>get_container</b> () noexcept</td></tr>
<tr class="memdesc:a3568407d38110aef270a86c561fbc1f9"><td class="mdescLeft"> </td><td class="mdescRight">Get the flat container for this matrix. <br /></td></tr>
<tr class="separator:a3568407d38110aef270a86c561fbc1f9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a28869b02c83e9bc54a2d2b9ed1aa9249"><td class="memItemLeft" align="right" valign="top"><a id="a28869b02c83e9bc54a2d2b9ed1aa9249" name="a28869b02c83e9bc54a2d2b9ed1aa9249"></a>
constexpr const Container & </td><td class="memItemRight" valign="bottom"><b>get_container</b> () const noexcept</td></tr>
<tr class="memdesc:a28869b02c83e9bc54a2d2b9ed1aa9249"><td class="mdescLeft"> </td><td class="mdescRight">Get the const flat container for this matrix. <br /></td></tr>
<tr class="separator:a28869b02c83e9bc54a2d2b9ed1aa9249"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a685257e6051a123b7f2bf088f583bc0c"><td class="memTemplParams" colspan="2"><a id="a685257e6051a123b7f2bf088f583bc0c" name="a685257e6051a123b7f2bf088f583bc0c"></a>
template<class Archive > </td></tr>
<tr class="memitem:a685257e6051a123b7f2bf088f583bc0c"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>serialize</b> (Archive &archive)</td></tr>
<tr class="separator:a685257e6051a123b7f2bf088f583bc0c"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template<typename T, size_t Dimensions, typename Container = std::vector<T>><br />
class tcod::Matrix< T, Dimensions, Container ></div><p >A template container for holding a multi-dimensional array of items. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">T</td><td>The type of value contained by this matrix. </td></tr>
<tr><td class="paramname">Dimensions</td><td>The number of dimensions of this matrix type. </td></tr>
<tr><td class="paramname">Container</td><td>The <code>std::vector</code>-like container used for this matrix.</td></tr>
</table>
</dd>
</dl>
<p>This class is a work-in-progress. </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>C:/Users/4b796/Projects/libtcod/src/libtcod/<a class="el" href="matrix_8hpp_source.html">matrix.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacetcod.html">tcod</a></li><li class="navelem"><a class="el" href="classtcod_1_1_matrix.html">Matrix</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
</ul>
</div>
</body>
</html>