chillerlan-QRCode-Common-ReedSolomonDecoder.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  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, int&gt; </span>
  153. </dt>
  154. <dd>Decodes given set of received codewords, which include both data and error-correction
  155. codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place,
  156. in the input.</dd>
  157. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  158. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_findErrorLocations">findErrorLocations()</a>
  159. <span>
  160. &nbsp;: array&lt;string|int, mixed&gt; </span>
  161. </dt>
  162. <dd></dd>
  163. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  164. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_findErrorMagnitudes">findErrorMagnitudes()</a>
  165. <span>
  166. &nbsp;: array&lt;string|int, mixed&gt; </span>
  167. </dt>
  168. <dd></dd>
  169. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  170. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_runEuclideanAlgorithm">runEuclideanAlgorithm()</a>
  171. <span>
  172. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&gt; </span>
  173. </dt>
  174. <dd></dd>
  175. </dl>
  176. <section class="phpdocumentor-methods">
  177. <h3 class="phpdocumentor-elements__header" id="methods">
  178. Methods
  179. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  180. </h3>
  181. <article
  182. class="phpdocumentor-element
  183. -method
  184. -public
  185. "
  186. >
  187. <h4 class="phpdocumentor-element__name" id="method_decode">
  188. decode()
  189. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_decode" class="headerlink"><i class="fas fa-link"></i></a>
  190. </h4>
  191. <aside class="phpdocumentor-element-found-in">
  192. <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>
  193. :
  194. <span class="phpdocumentor-element-found-in__line">48</span>
  195. </aside>
  196. <p class="phpdocumentor-summary">Decodes given set of received codewords, which include both data and error-correction
  197. codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place,
  198. in the input.</p>
  199. <code class="phpdocumentor-code phpdocumentor-signature ">
  200. <span class="phpdocumentor-signature__visibility">public</span>
  201. <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">$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>
  202. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  203. <dl class="phpdocumentor-argument-list">
  204. <dt class="phpdocumentor-argument-list__entry">
  205. <span class="phpdocumentor-signature__argument__name">$received</span>
  206. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  207. </dt>
  208. <dd class="phpdocumentor-argument-list__definition">
  209. <section class="phpdocumentor-description"><p>data and error-correction codewords</p>
  210. </section>
  211. </dd>
  212. <dt class="phpdocumentor-argument-list__entry">
  213. <span class="phpdocumentor-signature__argument__name">$numEccCodewords</span>
  214. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  215. </dt>
  216. <dd class="phpdocumentor-argument-list__definition">
  217. <section class="phpdocumentor-description"><p>number of error-correction codewords available</p>
  218. </section>
  219. </dd>
  220. </dl>
  221. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  222. Tags
  223. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  224. </h5>
  225. <dl class="phpdocumentor-tag-list">
  226. <dt class="phpdocumentor-tag-list__entry">
  227. <span class="phpdocumentor-tag__name">throws</span>
  228. </dt>
  229. <dd class="phpdocumentor-tag-list__definition">
  230. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  231. <section class="phpdocumentor-description"><p>if decoding fails for any reason</p>
  232. </section>
  233. </dd>
  234. </dl>
  235. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  236. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  237. &mdash;
  238. </article>
  239. <article
  240. class="phpdocumentor-element
  241. -method
  242. -private
  243. "
  244. >
  245. <h4 class="phpdocumentor-element__name" id="method_findErrorLocations">
  246. findErrorLocations()
  247. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_findErrorLocations" class="headerlink"><i class="fas fa-link"></i></a>
  248. </h4>
  249. <aside class="phpdocumentor-element-found-in">
  250. <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>
  251. :
  252. <span class="phpdocumentor-element-found-in__line">138</span>
  253. </aside>
  254. <code class="phpdocumentor-code phpdocumentor-signature ">
  255. <span class="phpdocumentor-signature__visibility">private</span>
  256. <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>
  257. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  258. <dl class="phpdocumentor-argument-list">
  259. <dt class="phpdocumentor-argument-list__entry">
  260. <span class="phpdocumentor-signature__argument__name">$errorLocator</span>
  261. : <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>
  262. </dt>
  263. <dd class="phpdocumentor-argument-list__definition">
  264. <section class="phpdocumentor-description"></section>
  265. </dd>
  266. </dl>
  267. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  268. Tags
  269. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  270. </h5>
  271. <dl class="phpdocumentor-tag-list">
  272. <dt class="phpdocumentor-tag-list__entry">
  273. <span class="phpdocumentor-tag__name">throws</span>
  274. </dt>
  275. <dd class="phpdocumentor-tag-list__definition">
  276. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  277. </dd>
  278. </dl>
  279. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  280. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  281. &mdash;
  282. </article>
  283. <article
  284. class="phpdocumentor-element
  285. -method
  286. -private
  287. "
  288. >
  289. <h4 class="phpdocumentor-element__name" id="method_findErrorMagnitudes">
  290. findErrorMagnitudes()
  291. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_findErrorMagnitudes" class="headerlink"><i class="fas fa-link"></i></a>
  292. </h4>
  293. <aside class="phpdocumentor-element-found-in">
  294. <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>
  295. :
  296. <span class="phpdocumentor-element-found-in__line">166</span>
  297. </aside>
  298. <code class="phpdocumentor-code phpdocumentor-signature ">
  299. <span class="phpdocumentor-signature__visibility">private</span>
  300. <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>
  301. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  302. <dl class="phpdocumentor-argument-list">
  303. <dt class="phpdocumentor-argument-list__entry">
  304. <span class="phpdocumentor-signature__argument__name">$errorEvaluator</span>
  305. : <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>
  306. </dt>
  307. <dd class="phpdocumentor-argument-list__definition">
  308. <section class="phpdocumentor-description"></section>
  309. </dd>
  310. <dt class="phpdocumentor-argument-list__entry">
  311. <span class="phpdocumentor-signature__argument__name">$errorLocations</span>
  312. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  313. </dt>
  314. <dd class="phpdocumentor-argument-list__definition">
  315. <section class="phpdocumentor-description"></section>
  316. </dd>
  317. </dl>
  318. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  319. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  320. &mdash;
  321. </article>
  322. <article
  323. class="phpdocumentor-element
  324. -method
  325. -private
  326. "
  327. >
  328. <h4 class="phpdocumentor-element__name" id="method_runEuclideanAlgorithm">
  329. runEuclideanAlgorithm()
  330. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#method_runEuclideanAlgorithm" class="headerlink"><i class="fas fa-link"></i></a>
  331. </h4>
  332. <aside class="phpdocumentor-element-found-in">
  333. <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>
  334. :
  335. <span class="phpdocumentor-element-found-in__line">94</span>
  336. </aside>
  337. <code class="phpdocumentor-code phpdocumentor-signature ">
  338. <span class="phpdocumentor-signature__visibility">private</span>
  339. <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>
  340. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  341. <dl class="phpdocumentor-argument-list">
  342. <dt class="phpdocumentor-argument-list__entry">
  343. <span class="phpdocumentor-signature__argument__name">$a</span>
  344. : <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>
  345. </dt>
  346. <dd class="phpdocumentor-argument-list__definition">
  347. <section class="phpdocumentor-description"></section>
  348. </dd>
  349. <dt class="phpdocumentor-argument-list__entry">
  350. <span class="phpdocumentor-signature__argument__name">$b</span>
  351. : <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>
  352. </dt>
  353. <dd class="phpdocumentor-argument-list__definition">
  354. <section class="phpdocumentor-description"></section>
  355. </dd>
  356. <dt class="phpdocumentor-argument-list__entry">
  357. <span class="phpdocumentor-signature__argument__name">$R</span>
  358. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  359. </dt>
  360. <dd class="phpdocumentor-argument-list__definition">
  361. <section class="phpdocumentor-description"></section>
  362. </dd>
  363. </dl>
  364. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  365. Tags
  366. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  367. </h5>
  368. <dl class="phpdocumentor-tag-list">
  369. <dt class="phpdocumentor-tag-list__entry">
  370. <span class="phpdocumentor-tag__name">throws</span>
  371. </dt>
  372. <dd class="phpdocumentor-tag-list__definition">
  373. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  374. </dd>
  375. </dl>
  376. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  377. <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>
  378. &mdash;
  379. <section class="phpdocumentor-description"><p>[sigma, omega]</p>
  380. </section>
  381. </article>
  382. </section>
  383. <script type="text/javascript">
  384. function loadExternalCodeSnippets(line) {
  385. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  386. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  387. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  388. var language = 'php';
  389. var code = document.createElement('code');
  390. code.className = 'language-' + language;
  391. pre.textContent = '';
  392. pre.setAttribute('data-line', line)
  393. code.textContent = 'Loading…';
  394. pre.appendChild(code);
  395. var xhr = new XMLHttpRequest();
  396. xhr.open('GET', src, true);
  397. xhr.onreadystatechange = function () {
  398. if (xhr.readyState == 4) {
  399. if (xhr.status < 400 && xhr.responseText) {
  400. code.textContent = xhr.responseText;
  401. Prism.highlightElement(code);
  402. }
  403. else if (xhr.status >= 400) {
  404. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  405. }
  406. else {
  407. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  408. }
  409. }
  410. };
  411. xhr.send(null);
  412. });
  413. }
  414. var modals = document.querySelectorAll("[data-modal]");
  415. modals.forEach(function (trigger) {
  416. trigger.addEventListener("click", function (event) {
  417. //event.preventDefault();
  418. const modal = document.getElementById(trigger.dataset.modal);
  419. modal.classList.add("phpdocumentor-modal__open");
  420. loadExternalCodeSnippets(trigger.dataset.line)
  421. const exits = modal.querySelectorAll("[data-exit-button]");
  422. exits.forEach(function (exit) {
  423. exit.addEventListener("click", function (event) {
  424. event.preventDefault();
  425. modal.classList.remove("phpdocumentor-modal__open");
  426. });
  427. });
  428. });
  429. });
  430. </script>
  431. </article>
  432. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  433. <section class="phpdocumentor-search-results__dialog">
  434. <header class="phpdocumentor-search-results__header">
  435. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  436. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  437. </header>
  438. <section class="phpdocumentor-search-results__body">
  439. <ul class="phpdocumentor-search-results__entries"></ul>
  440. </section>
  441. </section>
  442. </section>
  443. </div>
  444. </div>
  445. <a href="classes/chillerlan-QRCode-Common-ReedSolomonDecoder.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  446. </main>
  447. <script>
  448. cssVars({});
  449. </script>
  450. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  451. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  452. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  453. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  454. </body>
  455. </html>