chillerlan-QRCode-Common-ReedSolomonDecoder.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace">
  56. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  57. </h4>
  58. <ul class="phpdocumentor-list">
  59. <li>
  60. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  61. </li>
  62. <li>
  63. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  64. </li>
  65. </ul>
  66. </section>
  67. <section class="phpdocumentor-sidebar__category">
  68. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  69. <h4 class="phpdocumentor-sidebar__root-namespace">
  70. <a href="packages/Application.html" class="">Application</a>
  71. </h4>
  72. </section>
  73. <section class="phpdocumentor-sidebar__category">
  74. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  75. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  76. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  78. </section>
  79. <section class="phpdocumentor-sidebar__category">
  80. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  81. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  82. </section>
  83. </aside>
  84. <div class="phpdocumentor-column -eight phpdocumentor-content">
  85. <ul class="phpdocumentor-breadcrumbs">
  86. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  87. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  88. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-common.html">Common</a></li>
  89. </ul>
  90. <article class="phpdocumentor-element -class">
  91. <h2 class="phpdocumentor-content__title">
  92. ReedSolomonDecoder
  93. <div class="phpdocumentor-element__package">
  94. in package
  95. <ul class="phpdocumentor-breadcrumbs">
  96. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  97. </ul>
  98. </div>
  99. </h2>
  100. <aside class="phpdocumentor-element-found-in">
  101. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/ReedSolomonDecoder.php"><a href="files/src-common-reedsolomondecoder.html"><abbr title="src/Common/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  102. :
  103. <span class="phpdocumentor-element-found-in__line">35</span>
  104. </aside>
  105. <p class="phpdocumentor-summary">Implements Reed-Solomon decoding, as the name implies.</p>
  106. <section class="phpdocumentor-description"><p>The algorithm will not be explained here, but the following references were helpful
  107. in creating this implementation:</p>
  108. <ul>
  109. <li>Bruce Maggs &quot;Decoding Reed-Solomon Codes&quot; (see discussion of Forney's Formula)
  110. http://www.cs.cmu.edu/afs/cs.cmu.edu/project/pscico-guyb/realworld/www/rs_decode.ps</li>
  111. <li>J.I. Hall. &quot;Chapter 5. Generalized Reed-Solomon Codes&quot; (see discussion of Euclidean algorithm)
  112. https://users.math.msu.edu/users/halljo/classes/codenotes/GRS.pdf</li>
  113. </ul>
  114. <p>Much credit is due to William Rucklidge since portions of this code are an indirect
  115. port of his C++ Reed-Solomon implementation.</p>
  116. </section>
  117. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  118. Tags
  119. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  120. </h5>
  121. <dl class="phpdocumentor-tag-list">
  122. <dt class="phpdocumentor-tag-list__entry">
  123. <span class="phpdocumentor-tag__name">author</span>
  124. </dt>
  125. <dd class="phpdocumentor-tag-list__definition">
  126. <section class="phpdocumentor-description"><p>Sean Owen</p>
  127. </section>
  128. </dd>
  129. <dt class="phpdocumentor-tag-list__entry">
  130. <span class="phpdocumentor-tag__name">author</span>
  131. </dt>
  132. <dd class="phpdocumentor-tag-list__definition">
  133. <section class="phpdocumentor-description"><p>William Rucklidge</p>
  134. </section>
  135. </dd>
  136. <dt class="phpdocumentor-tag-list__entry">
  137. <span class="phpdocumentor-tag__name">author</span>
  138. </dt>
  139. <dd class="phpdocumentor-tag-list__definition">
  140. <section class="phpdocumentor-description"><p>sanfordsquires</p>
  141. </section>
  142. </dd>
  143. </dl>
  144. <h3 id="toc">
  145. Table of Contents
  146. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  147. </h3>
  148. <dl class="phpdocumentor-table-of-contents">
  149. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  150. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_decode">decode()</a>
  151. <span>
  152. &nbsp;: array&lt;string|int, mixed&gt; </span>
  153. </dt>
  154. <dd>Error-correct and copy data blocks together into a stream of bytes</dd>
  155. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  156. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_correctErrors">correctErrors()</a>
  157. <span>
  158. &nbsp;: array&lt;string|int, mixed&gt; </span>
  159. </dt>
  160. <dd>Given data and error-correction codewords received, possibly corrupted by errors, attempts to
  161. correct the errors in-place using Reed-Solomon error correction.</dd>
  162. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  163. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_decodeWords">decodeWords()</a>
  164. <span>
  165. &nbsp;: array&lt;string|int, int&gt; </span>
  166. </dt>
  167. <dd>Decodes given set of received codewords, which include both data and error-correction
  168. codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place,
  169. in the input.</dd>
  170. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  171. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_findErrorLocations">findErrorLocations()</a>
  172. <span>
  173. &nbsp;: array&lt;string|int, mixed&gt; </span>
  174. </dt>
  175. <dd></dd>
  176. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  177. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_findErrorMagnitudes">findErrorMagnitudes()</a>
  178. <span>
  179. &nbsp;: array&lt;string|int, mixed&gt; </span>
  180. </dt>
  181. <dd></dd>
  182. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  183. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_runEuclideanAlgorithm">runEuclideanAlgorithm()</a>
  184. <span>
  185. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&gt; </span>
  186. </dt>
  187. <dd></dd>
  188. </dl>
  189. <section class="phpdocumentor-methods">
  190. <h3 class="phpdocumentor-elements__header" id="methods">
  191. Methods
  192. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  193. </h3>
  194. <article
  195. class="phpdocumentor-element
  196. -method
  197. -public
  198. "
  199. >
  200. <h4 class="phpdocumentor-element__name" id="method_decode">
  201. decode()
  202. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_decode" class="headerlink"><i class="fas fa-link"></i></a>
  203. </h4>
  204. <aside class="phpdocumentor-element-found-in">
  205. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/ReedSolomonDecoder.php"><a href="files/src-common-reedsolomondecoder.html"><abbr title="src/Common/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  206. :
  207. <span class="phpdocumentor-element-found-in__line">40</span>
  208. </aside>
  209. <p class="phpdocumentor-summary">Error-correct and copy data blocks together into a stream of bytes</p>
  210. <code class="phpdocumentor-code phpdocumentor-signature ">
  211. <span class="phpdocumentor-signature__visibility">public</span>
  212. <span class="phpdocumentor-signature__name">decode</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$dataBlocks</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  213. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  214. <dl class="phpdocumentor-argument-list">
  215. <dt class="phpdocumentor-argument-list__entry">
  216. <span class="phpdocumentor-signature__argument__name">$dataBlocks</span>
  217. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  218. </dt>
  219. <dd class="phpdocumentor-argument-list__definition">
  220. <section class="phpdocumentor-description"></section>
  221. </dd>
  222. </dl>
  223. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  224. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  225. &mdash;
  226. </article>
  227. <article
  228. class="phpdocumentor-element
  229. -method
  230. -private
  231. "
  232. >
  233. <h4 class="phpdocumentor-element__name" id="method_correctErrors">
  234. correctErrors()
  235. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_correctErrors" class="headerlink"><i class="fas fa-link"></i></a>
  236. </h4>
  237. <aside class="phpdocumentor-element-found-in">
  238. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/ReedSolomonDecoder.php"><a href="files/src-common-reedsolomondecoder.html"><abbr title="src/Common/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  239. :
  240. <span class="phpdocumentor-element-found-in__line">60</span>
  241. </aside>
  242. <p class="phpdocumentor-summary">Given data and error-correction codewords received, possibly corrupted by errors, attempts to
  243. correct the errors in-place using Reed-Solomon error correction.</p>
  244. <code class="phpdocumentor-code phpdocumentor-signature ">
  245. <span class="phpdocumentor-signature__visibility">private</span>
  246. <span class="phpdocumentor-signature__name">correctErrors</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$codewordBytes</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$numDataCodewords</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  247. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  248. <dl class="phpdocumentor-argument-list">
  249. <dt class="phpdocumentor-argument-list__entry">
  250. <span class="phpdocumentor-signature__argument__name">$codewordBytes</span>
  251. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  252. </dt>
  253. <dd class="phpdocumentor-argument-list__definition">
  254. <section class="phpdocumentor-description"></section>
  255. </dd>
  256. <dt class="phpdocumentor-argument-list__entry">
  257. <span class="phpdocumentor-signature__argument__name">$numDataCodewords</span>
  258. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  259. </dt>
  260. <dd class="phpdocumentor-argument-list__definition">
  261. <section class="phpdocumentor-description"></section>
  262. </dd>
  263. </dl>
  264. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  265. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  266. &mdash;
  267. </article>
  268. <article
  269. class="phpdocumentor-element
  270. -method
  271. -private
  272. "
  273. >
  274. <h4 class="phpdocumentor-element__name" id="method_decodeWords">
  275. decodeWords()
  276. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_decodeWords" class="headerlink"><i class="fas fa-link"></i></a>
  277. </h4>
  278. <aside class="phpdocumentor-element-found-in">
  279. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/ReedSolomonDecoder.php"><a href="files/src-common-reedsolomondecoder.html"><abbr title="src/Common/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  280. :
  281. <span class="phpdocumentor-element-found-in__line">90</span>
  282. </aside>
  283. <p class="phpdocumentor-summary">Decodes given set of received codewords, which include both data and error-correction
  284. codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place,
  285. in the input.</p>
  286. <code class="phpdocumentor-code phpdocumentor-signature ">
  287. <span class="phpdocumentor-signature__visibility">private</span>
  288. <span class="phpdocumentor-signature__name">decodeWords</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$received</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$numEccCodewords</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span></code>
  289. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  290. <dl class="phpdocumentor-argument-list">
  291. <dt class="phpdocumentor-argument-list__entry">
  292. <span class="phpdocumentor-signature__argument__name">$received</span>
  293. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  294. </dt>
  295. <dd class="phpdocumentor-argument-list__definition">
  296. <section class="phpdocumentor-description"><p>data and error-correction codewords</p>
  297. </section>
  298. </dd>
  299. <dt class="phpdocumentor-argument-list__entry">
  300. <span class="phpdocumentor-signature__argument__name">$numEccCodewords</span>
  301. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  302. </dt>
  303. <dd class="phpdocumentor-argument-list__definition">
  304. <section class="phpdocumentor-description"><p>number of error-correction codewords available</p>
  305. </section>
  306. </dd>
  307. </dl>
  308. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  309. Tags
  310. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  311. </h5>
  312. <dl class="phpdocumentor-tag-list">
  313. <dt class="phpdocumentor-tag-list__entry">
  314. <span class="phpdocumentor-tag__name">throws</span>
  315. </dt>
  316. <dd class="phpdocumentor-tag-list__definition">
  317. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  318. <section class="phpdocumentor-description"><p>if decoding fails for any reason</p>
  319. </section>
  320. </dd>
  321. </dl>
  322. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  323. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  324. &mdash;
  325. </article>
  326. <article
  327. class="phpdocumentor-element
  328. -method
  329. -private
  330. "
  331. >
  332. <h4 class="phpdocumentor-element__name" id="method_findErrorLocations">
  333. findErrorLocations()
  334. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_findErrorLocations" class="headerlink"><i class="fas fa-link"></i></a>
  335. </h4>
  336. <aside class="phpdocumentor-element-found-in">
  337. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/ReedSolomonDecoder.php"><a href="files/src-common-reedsolomondecoder.html"><abbr title="src/Common/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  338. :
  339. <span class="phpdocumentor-element-found-in__line">179</span>
  340. </aside>
  341. <code class="phpdocumentor-code phpdocumentor-signature ">
  342. <span class="phpdocumentor-signature__visibility">private</span>
  343. <span class="phpdocumentor-signature__name">findErrorLocations</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errorLocator</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  344. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  345. <dl class="phpdocumentor-argument-list">
  346. <dt class="phpdocumentor-argument-list__entry">
  347. <span class="phpdocumentor-signature__argument__name">$errorLocator</span>
  348. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  349. </dt>
  350. <dd class="phpdocumentor-argument-list__definition">
  351. <section class="phpdocumentor-description"></section>
  352. </dd>
  353. </dl>
  354. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  355. Tags
  356. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  357. </h5>
  358. <dl class="phpdocumentor-tag-list">
  359. <dt class="phpdocumentor-tag-list__entry">
  360. <span class="phpdocumentor-tag__name">throws</span>
  361. </dt>
  362. <dd class="phpdocumentor-tag-list__definition">
  363. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  364. </dd>
  365. </dl>
  366. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  367. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  368. &mdash;
  369. </article>
  370. <article
  371. class="phpdocumentor-element
  372. -method
  373. -private
  374. "
  375. >
  376. <h4 class="phpdocumentor-element__name" id="method_findErrorMagnitudes">
  377. findErrorMagnitudes()
  378. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_findErrorMagnitudes" class="headerlink"><i class="fas fa-link"></i></a>
  379. </h4>
  380. <aside class="phpdocumentor-element-found-in">
  381. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/ReedSolomonDecoder.php"><a href="files/src-common-reedsolomondecoder.html"><abbr title="src/Common/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  382. :
  383. <span class="phpdocumentor-element-found-in__line">207</span>
  384. </aside>
  385. <code class="phpdocumentor-code phpdocumentor-signature ">
  386. <span class="phpdocumentor-signature__visibility">private</span>
  387. <span class="phpdocumentor-signature__name">findErrorMagnitudes</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errorEvaluator</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errorLocations</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  388. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  389. <dl class="phpdocumentor-argument-list">
  390. <dt class="phpdocumentor-argument-list__entry">
  391. <span class="phpdocumentor-signature__argument__name">$errorEvaluator</span>
  392. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  393. </dt>
  394. <dd class="phpdocumentor-argument-list__definition">
  395. <section class="phpdocumentor-description"></section>
  396. </dd>
  397. <dt class="phpdocumentor-argument-list__entry">
  398. <span class="phpdocumentor-signature__argument__name">$errorLocations</span>
  399. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  400. </dt>
  401. <dd class="phpdocumentor-argument-list__definition">
  402. <section class="phpdocumentor-description"></section>
  403. </dd>
  404. </dl>
  405. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  406. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  407. &mdash;
  408. </article>
  409. <article
  410. class="phpdocumentor-element
  411. -method
  412. -private
  413. "
  414. >
  415. <h4 class="phpdocumentor-element__name" id="method_runEuclideanAlgorithm">
  416. runEuclideanAlgorithm()
  417. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_runEuclideanAlgorithm" class="headerlink"><i class="fas fa-link"></i></a>
  418. </h4>
  419. <aside class="phpdocumentor-element-found-in">
  420. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/ReedSolomonDecoder.php"><a href="files/src-common-reedsolomondecoder.html"><abbr title="src/Common/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  421. :
  422. <span class="phpdocumentor-element-found-in__line">135</span>
  423. </aside>
  424. <code class="phpdocumentor-code phpdocumentor-signature ">
  425. <span class="phpdocumentor-signature__visibility">private</span>
  426. <span class="phpdocumentor-signature__name">runEuclideanAlgorithm</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$R</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&gt;</span></code>
  427. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  428. <dl class="phpdocumentor-argument-list">
  429. <dt class="phpdocumentor-argument-list__entry">
  430. <span class="phpdocumentor-signature__argument__name">$a</span>
  431. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  432. </dt>
  433. <dd class="phpdocumentor-argument-list__definition">
  434. <section class="phpdocumentor-description"></section>
  435. </dd>
  436. <dt class="phpdocumentor-argument-list__entry">
  437. <span class="phpdocumentor-signature__argument__name">$b</span>
  438. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  439. </dt>
  440. <dd class="phpdocumentor-argument-list__definition">
  441. <section class="phpdocumentor-description"></section>
  442. </dd>
  443. <dt class="phpdocumentor-argument-list__entry">
  444. <span class="phpdocumentor-signature__argument__name">$R</span>
  445. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  446. </dt>
  447. <dd class="phpdocumentor-argument-list__definition">
  448. <section class="phpdocumentor-description"></section>
  449. </dd>
  450. </dl>
  451. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  452. Tags
  453. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  454. </h5>
  455. <dl class="phpdocumentor-tag-list">
  456. <dt class="phpdocumentor-tag-list__entry">
  457. <span class="phpdocumentor-tag__name">throws</span>
  458. </dt>
  459. <dd class="phpdocumentor-tag-list__definition">
  460. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  461. </dd>
  462. </dl>
  463. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  464. <span class="phpdocumentor-signature__response_type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&gt;</span>
  465. &mdash;
  466. <section class="phpdocumentor-description"><p>[sigma, omega]</p>
  467. </section>
  468. </article>
  469. </section>
  470. <script type="text/javascript">
  471. function loadExternalCodeSnippets(line) {
  472. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  473. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  474. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  475. var language = 'php';
  476. var code = document.createElement('code');
  477. code.className = 'language-' + language;
  478. pre.textContent = '';
  479. pre.setAttribute('data-line', line)
  480. code.textContent = 'Loading…';
  481. pre.appendChild(code);
  482. var xhr = new XMLHttpRequest();
  483. xhr.open('GET', src, true);
  484. xhr.onreadystatechange = function () {
  485. if (xhr.readyState == 4) {
  486. if (xhr.status < 400 && xhr.responseText) {
  487. code.textContent = xhr.responseText;
  488. Prism.highlightElement(code);
  489. }
  490. else if (xhr.status >= 400) {
  491. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  492. }
  493. else {
  494. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  495. }
  496. }
  497. };
  498. xhr.send(null);
  499. });
  500. }
  501. var modals = document.querySelectorAll("[data-modal]");
  502. modals.forEach(function (trigger) {
  503. trigger.addEventListener("click", function (event) {
  504. //event.preventDefault();
  505. const modal = document.getElementById(trigger.dataset.modal);
  506. modal.classList.add("phpdocumentor-modal__open");
  507. loadExternalCodeSnippets(trigger.dataset.line)
  508. const exits = modal.querySelectorAll("[data-exit-button]");
  509. exits.forEach(function (exit) {
  510. exit.addEventListener("click", function (event) {
  511. event.preventDefault();
  512. modal.classList.remove("phpdocumentor-modal__open");
  513. });
  514. });
  515. });
  516. });
  517. </script>
  518. </article>
  519. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  520. <section class="phpdocumentor-search-results__dialog">
  521. <header class="phpdocumentor-search-results__header">
  522. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  523. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  524. </header>
  525. <section class="phpdocumentor-search-results__body">
  526. <ul class="phpdocumentor-search-results__entries"></ul>
  527. </section>
  528. </section>
  529. </section>
  530. </div>
  531. </div>
  532. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  533. </main>
  534. <script>
  535. cssVars({});
  536. </script>
  537. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  538. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  539. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  540. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  541. </body>
  542. </html>