chillerlan-QRCode-Common-GF256.html 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199
  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"><a href="namespaces/chillerlan.html">chillerlan</a></h4>
  56. <ul class="phpdocumentor-list">
  57. <li>
  58. <a href="namespaces/chillerlan-qrcode.html">QRCode</a>
  59. </li>
  60. <li>
  61. <a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a>
  62. </li>
  63. </ul>
  64. </section>
  65. <section class="phpdocumentor-sidebar__category">
  66. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  67. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
  68. </section>
  69. <section class="phpdocumentor-sidebar__category">
  70. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  71. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  72. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  73. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  74. </section>
  75. <section class="phpdocumentor-sidebar__category">
  76. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  78. </section>
  79. </aside>
  80. <div class="phpdocumentor-column -eight phpdocumentor-content">
  81. <ul class="phpdocumentor-breadcrumbs">
  82. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  83. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  84. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-common.html">Common</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. GF256
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. </h2>
  96. <aside class="phpdocumentor-element-found-in">
  97. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  98. :
  99. <span class="phpdocumentor-element-found-in__line">29</span>
  100. </aside>
  101. <p class="phpdocumentor-summary">&lt;p&gt;This class contains utility methods for performing mathematical operations over
  102. the Galois Fields. Operations use a given primitive polynomial in calculations.&lt;/p&gt;</p>
  103. <section class="phpdocumentor-description"><p>Throughout this package, elements of the GF are represented as an int
  104. for convenience and speed (but at the cost of memory).
  105. </p>
  106. </section>
  107. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  108. Tags
  109. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  110. </h5>
  111. <dl class="phpdocumentor-tag-list">
  112. <dt class="phpdocumentor-tag-list__entry">
  113. <span class="phpdocumentor-tag__name">author</span>
  114. </dt>
  115. <dd class="phpdocumentor-tag-list__definition">
  116. <section class="phpdocumentor-description"><p>Sean Owen</p>
  117. </section>
  118. </dd>
  119. <dt class="phpdocumentor-tag-list__entry">
  120. <span class="phpdocumentor-tag__name">author</span>
  121. </dt>
  122. <dd class="phpdocumentor-tag-list__definition">
  123. <section class="phpdocumentor-description"><p>David Olivier</p>
  124. </section>
  125. </dd>
  126. </dl>
  127. <h3 id="toc">
  128. Table of Contents
  129. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  130. </h3>
  131. <dl class="phpdocumentor-table-of-contents">
  132. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  133. <a href="classes/chillerlan-QRCode-Common-GF256.html#constant_expTable">expTable</a>
  134. <span>
  135. &nbsp;= [1, 2, 4, 8, 16, 32, 64, 128, 29, 58, 116, 232, 205, 135, 19, 38, 76, 152, 45, 90, 180, 117, 234, 201, 143, 3, 6, 12, 24, 48, 96, 192, 157, 39, 78, 156, 37, 74, 148, 53, 106, 212, 181, 119, 238, 193, 159, 35, 70, 140, 5, 10, 20, 40, 80, 160, 93, 186, 105, 210, 185, 111, 222, 161, 95, 190, 97, 194, 153, 47, 94, 188, 101, 202, 137, 15, 30, 60, 120, 240, 253, 231, 211, 187, 107, 214, 177, 127, 254, 225, 223, 163, 91, 182, 113, 226, 217, 175, 67, 134, 17, 34, 68, 136, 13, 26, 52, 104, 208, 189, 103, 206, 129, 31, 62, 124, 248, 237, 199, 147, 59, 118, 236, 197, 151, 51, 102, 204, 133, 23, 46, 92, 184, 109, 218, 169, 79, 158, 33, 66, 132, 21, 42, 84, 168, 77, 154, 41, 82, 164, 85, 170, 73, 146, 57, 114, 228, 213, 183, 115, 230, 209, 191, 99, 198, 145, 63, 126, 252, 229, 215, 179, 123, 246, 241, 255, 227, 219, 171, 75, 150, 49, 98, 196, 149, 55, 110, 220, 165, 87, 174, 65, 130, 25, 50, 100, 200, 141, 7, 14, 28, 56, 112, 224, 221, 167, 83, 166, 81, 162, 89, 178, 121, 242, 249, 239, 195, 155, 43, 86, 172, 69, 138, 9, 18, 36, 72, 144, 61, 122, 244, 245, 247, 243, 251, 235, 203, 139, 11, 22, 44, 88, 176, 125, 250, 233, 207, 131, 27, 54, 108, 216, 173, 71, 142, 1] </span>
  136. </dt>
  137. <dd></dd>
  138. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  139. <a href="classes/chillerlan-QRCode-Common-GF256.html#constant_logTable">logTable</a>
  140. <span>
  141. &nbsp;= [
  142. 0,
  143. // the first value is never returned, index starts at 1
  144. 0,
  145. 1,
  146. 25,
  147. 2,
  148. 50,
  149. 26,
  150. 198,
  151. 3,
  152. 223,
  153. 51,
  154. 238,
  155. 27,
  156. 104,
  157. 199,
  158. 75,
  159. 4,
  160. 100,
  161. 224,
  162. 14,
  163. 52,
  164. 141,
  165. 239,
  166. 129,
  167. 28,
  168. 193,
  169. 105,
  170. 248,
  171. 200,
  172. 8,
  173. 76,
  174. 113,
  175. 5,
  176. 138,
  177. 101,
  178. 47,
  179. 225,
  180. 36,
  181. 15,
  182. 33,
  183. 53,
  184. 147,
  185. 142,
  186. 218,
  187. 240,
  188. 18,
  189. 130,
  190. 69,
  191. 29,
  192. 181,
  193. 194,
  194. 125,
  195. 106,
  196. 39,
  197. 249,
  198. 185,
  199. 201,
  200. 154,
  201. 9,
  202. 120,
  203. 77,
  204. 228,
  205. 114,
  206. 166,
  207. 6,
  208. 191,
  209. 139,
  210. 98,
  211. 102,
  212. 221,
  213. 48,
  214. 253,
  215. 226,
  216. 152,
  217. 37,
  218. 179,
  219. 16,
  220. 145,
  221. 34,
  222. 136,
  223. 54,
  224. 208,
  225. 148,
  226. 206,
  227. 143,
  228. 150,
  229. 219,
  230. 189,
  231. 241,
  232. 210,
  233. 19,
  234. 92,
  235. 131,
  236. 56,
  237. 70,
  238. 64,
  239. 30,
  240. 66,
  241. 182,
  242. 163,
  243. 195,
  244. 72,
  245. 126,
  246. 110,
  247. 107,
  248. 58,
  249. 40,
  250. 84,
  251. 250,
  252. 133,
  253. 186,
  254. 61,
  255. 202,
  256. 94,
  257. 155,
  258. 159,
  259. 10,
  260. 21,
  261. 121,
  262. 43,
  263. 78,
  264. 212,
  265. 229,
  266. 172,
  267. 115,
  268. 243,
  269. 167,
  270. 87,
  271. 7,
  272. 112,
  273. 192,
  274. 247,
  275. 140,
  276. 128,
  277. 99,
  278. 13,
  279. 103,
  280. 74,
  281. 222,
  282. 237,
  283. 49,
  284. 197,
  285. 254,
  286. 24,
  287. 227,
  288. 165,
  289. 153,
  290. 119,
  291. 38,
  292. 184,
  293. 180,
  294. 124,
  295. 17,
  296. 68,
  297. 146,
  298. 217,
  299. 35,
  300. 32,
  301. 137,
  302. 46,
  303. 55,
  304. 63,
  305. 209,
  306. 91,
  307. 149,
  308. 188,
  309. 207,
  310. 205,
  311. 144,
  312. 135,
  313. 151,
  314. 178,
  315. 220,
  316. 252,
  317. 190,
  318. 97,
  319. 242,
  320. 86,
  321. 211,
  322. 171,
  323. 20,
  324. 42,
  325. 93,
  326. 158,
  327. 132,
  328. 60,
  329. 57,
  330. 83,
  331. 71,
  332. 109,
  333. 65,
  334. 162,
  335. 31,
  336. 45,
  337. 67,
  338. 216,
  339. 183,
  340. 123,
  341. 164,
  342. 118,
  343. 196,
  344. 23,
  345. 73,
  346. 236,
  347. 127,
  348. 12,
  349. 111,
  350. 246,
  351. 108,
  352. 161,
  353. 59,
  354. 82,
  355. 41,
  356. 157,
  357. 85,
  358. 170,
  359. 251,
  360. 96,
  361. 134,
  362. 177,
  363. 187,
  364. 204,
  365. 62,
  366. 90,
  367. 203,
  368. 89,
  369. 95,
  370. 176,
  371. 156,
  372. 169,
  373. 160,
  374. 81,
  375. 11,
  376. 245,
  377. 22,
  378. 235,
  379. 122,
  380. 117,
  381. 44,
  382. 215,
  383. 79,
  384. 174,
  385. 213,
  386. 233,
  387. 230,
  388. 231,
  389. 173,
  390. 232,
  391. 116,
  392. 214,
  393. 244,
  394. 234,
  395. 168,
  396. 80,
  397. 88,
  398. 175,
  399. ] </span>
  400. </dt>
  401. <dd>irreducible polynomial whose coefficients are represented by the bits of an int,
  402. where the least-significant bit represents the constant coefficient</dd>
  403. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  404. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_addOrSubtract">addOrSubtract()</a>
  405. <span>
  406. &nbsp;: int </span>
  407. </dt>
  408. <dd>Implements both addition and subtraction -- they are the same in GF(size).</dd>
  409. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  410. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_buildMonomial">buildMonomial()</a>
  411. <span>
  412. &nbsp;: <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a> </span>
  413. </dt>
  414. <dd></dd>
  415. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  416. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_exp">exp()</a>
  417. <span>
  418. &nbsp;: int </span>
  419. </dt>
  420. <dd></dd>
  421. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  422. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_inverse">inverse()</a>
  423. <span>
  424. &nbsp;: int </span>
  425. </dt>
  426. <dd></dd>
  427. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  428. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_log">log()</a>
  429. <span>
  430. &nbsp;: int </span>
  431. </dt>
  432. <dd></dd>
  433. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  434. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_multiply">multiply()</a>
  435. <span>
  436. &nbsp;: int </span>
  437. </dt>
  438. <dd></dd>
  439. </dl>
  440. <section class="phpdocumentor-constants">
  441. <h3 class="phpdocumentor-elements__header" id="constants">
  442. Constants
  443. <a href="classes/chillerlan-QRCode-Common-GF256.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  444. </h3>
  445. <article class="phpdocumentor-element -constant -private ">
  446. <h4 class="phpdocumentor-element__name" id="constant_expTable">
  447. expTable
  448. <a href="classes/chillerlan-QRCode-Common-GF256.html#constant_expTable" class="headerlink"><i class="fas fa-link"></i></a>
  449. </h4>
  450. <aside class="phpdocumentor-element-found-in">
  451. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  452. :
  453. <span class="phpdocumentor-element-found-in__line">57</span>
  454. </aside>
  455. <code class="phpdocumentor-signature phpdocumentor-code ">
  456. <span class="phpdocumentor-signature__visibility">private</span>
  457. <span class="phpdocumentor-signature__type">mixed</span>
  458. <span class="phpdocumentor-signature__name">expTable</span>
  459. = <span class="phpdocumentor-signature__default-value">[1, 2, 4, 8, 16, 32, 64, 128, 29, 58, 116, 232, 205, 135, 19, 38, 76, 152, 45, 90, 180, 117, 234, 201, 143, 3, 6, 12, 24, 48, 96, 192, 157, 39, 78, 156, 37, 74, 148, 53, 106, 212, 181, 119, 238, 193, 159, 35, 70, 140, 5, 10, 20, 40, 80, 160, 93, 186, 105, 210, 185, 111, 222, 161, 95, 190, 97, 194, 153, 47, 94, 188, 101, 202, 137, 15, 30, 60, 120, 240, 253, 231, 211, 187, 107, 214, 177, 127, 254, 225, 223, 163, 91, 182, 113, 226, 217, 175, 67, 134, 17, 34, 68, 136, 13, 26, 52, 104, 208, 189, 103, 206, 129, 31, 62, 124, 248, 237, 199, 147, 59, 118, 236, 197, 151, 51, 102, 204, 133, 23, 46, 92, 184, 109, 218, 169, 79, 158, 33, 66, 132, 21, 42, 84, 168, 77, 154, 41, 82, 164, 85, 170, 73, 146, 57, 114, 228, 213, 183, 115, 230, 209, 191, 99, 198, 145, 63, 126, 252, 229, 215, 179, 123, 246, 241, 255, 227, 219, 171, 75, 150, 49, 98, 196, 149, 55, 110, 220, 165, 87, 174, 65, 130, 25, 50, 100, 200, 141, 7, 14, 28, 56, 112, 224, 221, 167, 83, 166, 81, 162, 89, 178, 121, 242, 249, 239, 195, 155, 43, 86, 172, 69, 138, 9, 18, 36, 72, 144, 61, 122, 244, 245, 247, 243, 251, 235, 203, 139, 11, 22, 44, 88, 176, 125, 250, 233, 207, 131, 27, 54, 108, 216, 173, 71, 142, 1]</span>
  460. </code>
  461. <section class="phpdocumentor-description"></section>
  462. <section class="phpdocumentor-description"></section>
  463. </article>
  464. <article class="phpdocumentor-element -constant -private ">
  465. <h4 class="phpdocumentor-element__name" id="constant_logTable">
  466. logTable
  467. <a href="classes/chillerlan-QRCode-Common-GF256.html#constant_logTable" class="headerlink"><i class="fas fa-link"></i></a>
  468. </h4>
  469. <aside class="phpdocumentor-element-found-in">
  470. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  471. :
  472. <span class="phpdocumentor-element-found-in__line">37</span>
  473. </aside>
  474. <p class="phpdocumentor-summary">irreducible polynomial whose coefficients are represented by the bits of an int,
  475. where the least-significant bit represents the constant coefficient</p>
  476. <code class="phpdocumentor-signature phpdocumentor-code ">
  477. <span class="phpdocumentor-signature__visibility">private</span>
  478. <span class="phpdocumentor-signature__type">mixed</span>
  479. <span class="phpdocumentor-signature__name">logTable</span>
  480. = <span class="phpdocumentor-signature__default-value">[
  481. 0,
  482. // the first value is never returned, index starts at 1
  483. 0,
  484. 1,
  485. 25,
  486. 2,
  487. 50,
  488. 26,
  489. 198,
  490. 3,
  491. 223,
  492. 51,
  493. 238,
  494. 27,
  495. 104,
  496. 199,
  497. 75,
  498. 4,
  499. 100,
  500. 224,
  501. 14,
  502. 52,
  503. 141,
  504. 239,
  505. 129,
  506. 28,
  507. 193,
  508. 105,
  509. 248,
  510. 200,
  511. 8,
  512. 76,
  513. 113,
  514. 5,
  515. 138,
  516. 101,
  517. 47,
  518. 225,
  519. 36,
  520. 15,
  521. 33,
  522. 53,
  523. 147,
  524. 142,
  525. 218,
  526. 240,
  527. 18,
  528. 130,
  529. 69,
  530. 29,
  531. 181,
  532. 194,
  533. 125,
  534. 106,
  535. 39,
  536. 249,
  537. 185,
  538. 201,
  539. 154,
  540. 9,
  541. 120,
  542. 77,
  543. 228,
  544. 114,
  545. 166,
  546. 6,
  547. 191,
  548. 139,
  549. 98,
  550. 102,
  551. 221,
  552. 48,
  553. 253,
  554. 226,
  555. 152,
  556. 37,
  557. 179,
  558. 16,
  559. 145,
  560. 34,
  561. 136,
  562. 54,
  563. 208,
  564. 148,
  565. 206,
  566. 143,
  567. 150,
  568. 219,
  569. 189,
  570. 241,
  571. 210,
  572. 19,
  573. 92,
  574. 131,
  575. 56,
  576. 70,
  577. 64,
  578. 30,
  579. 66,
  580. 182,
  581. 163,
  582. 195,
  583. 72,
  584. 126,
  585. 110,
  586. 107,
  587. 58,
  588. 40,
  589. 84,
  590. 250,
  591. 133,
  592. 186,
  593. 61,
  594. 202,
  595. 94,
  596. 155,
  597. 159,
  598. 10,
  599. 21,
  600. 121,
  601. 43,
  602. 78,
  603. 212,
  604. 229,
  605. 172,
  606. 115,
  607. 243,
  608. 167,
  609. 87,
  610. 7,
  611. 112,
  612. 192,
  613. 247,
  614. 140,
  615. 128,
  616. 99,
  617. 13,
  618. 103,
  619. 74,
  620. 222,
  621. 237,
  622. 49,
  623. 197,
  624. 254,
  625. 24,
  626. 227,
  627. 165,
  628. 153,
  629. 119,
  630. 38,
  631. 184,
  632. 180,
  633. 124,
  634. 17,
  635. 68,
  636. 146,
  637. 217,
  638. 35,
  639. 32,
  640. 137,
  641. 46,
  642. 55,
  643. 63,
  644. 209,
  645. 91,
  646. 149,
  647. 188,
  648. 207,
  649. 205,
  650. 144,
  651. 135,
  652. 151,
  653. 178,
  654. 220,
  655. 252,
  656. 190,
  657. 97,
  658. 242,
  659. 86,
  660. 211,
  661. 171,
  662. 20,
  663. 42,
  664. 93,
  665. 158,
  666. 132,
  667. 60,
  668. 57,
  669. 83,
  670. 71,
  671. 109,
  672. 65,
  673. 162,
  674. 31,
  675. 45,
  676. 67,
  677. 216,
  678. 183,
  679. 123,
  680. 164,
  681. 118,
  682. 196,
  683. 23,
  684. 73,
  685. 236,
  686. 127,
  687. 12,
  688. 111,
  689. 246,
  690. 108,
  691. 161,
  692. 59,
  693. 82,
  694. 41,
  695. 157,
  696. 85,
  697. 170,
  698. 251,
  699. 96,
  700. 134,
  701. 177,
  702. 187,
  703. 204,
  704. 62,
  705. 90,
  706. 203,
  707. 89,
  708. 95,
  709. 176,
  710. 156,
  711. 169,
  712. 160,
  713. 81,
  714. 11,
  715. 245,
  716. 22,
  717. 235,
  718. 122,
  719. 117,
  720. 44,
  721. 215,
  722. 79,
  723. 174,
  724. 213,
  725. 233,
  726. 230,
  727. 231,
  728. 173,
  729. 232,
  730. 116,
  731. 214,
  732. 244,
  733. 234,
  734. 168,
  735. 80,
  736. 88,
  737. 175,
  738. ]</span>
  739. </code>
  740. <section class="phpdocumentor-description"></section>
  741. </article>
  742. </section>
  743. <section class="phpdocumentor-methods">
  744. <h3 class="phpdocumentor-elements__header" id="methods">
  745. Methods
  746. <a href="classes/chillerlan-QRCode-Common-GF256.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  747. </h3>
  748. <article
  749. class="phpdocumentor-element
  750. -method
  751. -public
  752. -static "
  753. >
  754. <h4 class="phpdocumentor-element__name" id="method_addOrSubtract">
  755. addOrSubtract()
  756. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_addOrSubtract" class="headerlink"><i class="fas fa-link"></i></a>
  757. </h4>
  758. <aside class="phpdocumentor-element-found-in">
  759. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  760. :
  761. <span class="phpdocumentor-element-found-in__line">81</span>
  762. </aside>
  763. <p class="phpdocumentor-summary">Implements both addition and subtraction -- they are the same in GF(size).</p>
  764. <code class="phpdocumentor-code phpdocumentor-signature ">
  765. <span class="phpdocumentor-signature__visibility">public</span>
  766. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">addOrSubtract</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&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">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  767. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  768. <dl class="phpdocumentor-argument-list">
  769. <dt class="phpdocumentor-argument-list__entry">
  770. <span class="phpdocumentor-signature__argument__name">$a</span>
  771. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  772. </dt>
  773. <dd class="phpdocumentor-argument-list__definition">
  774. <section class="phpdocumentor-description"></section>
  775. </dd>
  776. <dt class="phpdocumentor-argument-list__entry">
  777. <span class="phpdocumentor-signature__argument__name">$b</span>
  778. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  779. </dt>
  780. <dd class="phpdocumentor-argument-list__definition">
  781. <section class="phpdocumentor-description"></section>
  782. </dd>
  783. </dl>
  784. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  785. <span class="phpdocumentor-signature__response_type">int</span>
  786. &mdash;
  787. <section class="phpdocumentor-description"><p>sum/difference of a and b</p>
  788. </section>
  789. </article>
  790. <article
  791. class="phpdocumentor-element
  792. -method
  793. -public
  794. -static "
  795. >
  796. <h4 class="phpdocumentor-element__name" id="method_buildMonomial">
  797. buildMonomial()
  798. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_buildMonomial" class="headerlink"><i class="fas fa-link"></i></a>
  799. </h4>
  800. <aside class="phpdocumentor-element-found-in">
  801. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  802. :
  803. <span class="phpdocumentor-element-found-in__line">88</span>
  804. </aside>
  805. <code class="phpdocumentor-code phpdocumentor-signature ">
  806. <span class="phpdocumentor-signature__visibility">public</span>
  807. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">buildMonomial</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$degree</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">$coefficient</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span></code>
  808. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  809. <dl class="phpdocumentor-argument-list">
  810. <dt class="phpdocumentor-argument-list__entry">
  811. <span class="phpdocumentor-signature__argument__name">$degree</span>
  812. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  813. </dt>
  814. <dd class="phpdocumentor-argument-list__definition">
  815. <section class="phpdocumentor-description"></section>
  816. </dd>
  817. <dt class="phpdocumentor-argument-list__entry">
  818. <span class="phpdocumentor-signature__argument__name">$coefficient</span>
  819. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  820. </dt>
  821. <dd class="phpdocumentor-argument-list__definition">
  822. <section class="phpdocumentor-description"></section>
  823. </dd>
  824. </dl>
  825. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  826. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  827. &mdash;
  828. <section class="phpdocumentor-description"><p>the monomial representing coefficient * x^degree</p>
  829. </section>
  830. </article>
  831. <article
  832. class="phpdocumentor-element
  833. -method
  834. -public
  835. -static "
  836. >
  837. <h4 class="phpdocumentor-element__name" id="method_exp">
  838. exp()
  839. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_exp" class="headerlink"><i class="fas fa-link"></i></a>
  840. </h4>
  841. <aside class="phpdocumentor-element-found-in">
  842. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  843. :
  844. <span class="phpdocumentor-element-found-in__line">103</span>
  845. </aside>
  846. <code class="phpdocumentor-code phpdocumentor-signature ">
  847. <span class="phpdocumentor-signature__visibility">public</span>
  848. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">exp</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  849. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  850. <dl class="phpdocumentor-argument-list">
  851. <dt class="phpdocumentor-argument-list__entry">
  852. <span class="phpdocumentor-signature__argument__name">$a</span>
  853. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  854. </dt>
  855. <dd class="phpdocumentor-argument-list__definition">
  856. <section class="phpdocumentor-description"></section>
  857. </dd>
  858. </dl>
  859. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  860. <span class="phpdocumentor-signature__response_type">int</span>
  861. &mdash;
  862. <section class="phpdocumentor-description"><p>2 to the power of a in GF(size)</p>
  863. </section>
  864. </article>
  865. <article
  866. class="phpdocumentor-element
  867. -method
  868. -public
  869. -static "
  870. >
  871. <h4 class="phpdocumentor-element__name" id="method_inverse">
  872. inverse()
  873. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_inverse" class="headerlink"><i class="fas fa-link"></i></a>
  874. </h4>
  875. <aside class="phpdocumentor-element-found-in">
  876. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  877. :
  878. <span class="phpdocumentor-element-found-in__line">130</span>
  879. </aside>
  880. <code class="phpdocumentor-code phpdocumentor-signature ">
  881. <span class="phpdocumentor-signature__visibility">public</span>
  882. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">inverse</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  883. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  884. <dl class="phpdocumentor-argument-list">
  885. <dt class="phpdocumentor-argument-list__entry">
  886. <span class="phpdocumentor-signature__argument__name">$a</span>
  887. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  888. </dt>
  889. <dd class="phpdocumentor-argument-list__definition">
  890. <section class="phpdocumentor-description"></section>
  891. </dd>
  892. </dl>
  893. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  894. <span class="phpdocumentor-signature__response_type">int</span>
  895. &mdash;
  896. <section class="phpdocumentor-description"><p>multiplicative inverse of a</p>
  897. </section>
  898. </article>
  899. <article
  900. class="phpdocumentor-element
  901. -method
  902. -public
  903. -static "
  904. >
  905. <h4 class="phpdocumentor-element__name" id="method_log">
  906. log()
  907. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_log" class="headerlink"><i class="fas fa-link"></i></a>
  908. </h4>
  909. <aside class="phpdocumentor-element-found-in">
  910. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  911. :
  912. <span class="phpdocumentor-element-found-in__line">118</span>
  913. </aside>
  914. <code class="phpdocumentor-code phpdocumentor-signature ">
  915. <span class="phpdocumentor-signature__visibility">public</span>
  916. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">log</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  917. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  918. <dl class="phpdocumentor-argument-list">
  919. <dt class="phpdocumentor-argument-list__entry">
  920. <span class="phpdocumentor-signature__argument__name">$a</span>
  921. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  922. </dt>
  923. <dd class="phpdocumentor-argument-list__definition">
  924. <section class="phpdocumentor-description"></section>
  925. </dd>
  926. </dl>
  927. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  928. <span class="phpdocumentor-signature__response_type">int</span>
  929. &mdash;
  930. <section class="phpdocumentor-description"><p>base 2 log of a in GF(size)</p>
  931. </section>
  932. </article>
  933. <article
  934. class="phpdocumentor-element
  935. -method
  936. -public
  937. -static "
  938. >
  939. <h4 class="phpdocumentor-element__name" id="method_multiply">
  940. multiply()
  941. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_multiply" class="headerlink"><i class="fas fa-link"></i></a>
  942. </h4>
  943. <aside class="phpdocumentor-element-found-in">
  944. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  945. :
  946. <span class="phpdocumentor-element-found-in__line">142</span>
  947. </aside>
  948. <code class="phpdocumentor-code phpdocumentor-signature ">
  949. <span class="phpdocumentor-signature__visibility">public</span>
  950. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">multiply</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&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">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  951. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  952. <dl class="phpdocumentor-argument-list">
  953. <dt class="phpdocumentor-argument-list__entry">
  954. <span class="phpdocumentor-signature__argument__name">$a</span>
  955. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  956. </dt>
  957. <dd class="phpdocumentor-argument-list__definition">
  958. <section class="phpdocumentor-description"></section>
  959. </dd>
  960. <dt class="phpdocumentor-argument-list__entry">
  961. <span class="phpdocumentor-signature__argument__name">$b</span>
  962. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  963. </dt>
  964. <dd class="phpdocumentor-argument-list__definition">
  965. <section class="phpdocumentor-description"></section>
  966. </dd>
  967. </dl>
  968. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  969. <span class="phpdocumentor-signature__response_type">int</span>
  970. &mdash;
  971. <section class="phpdocumentor-description"><p>product of a and b in GF(size)</p>
  972. </section>
  973. </article>
  974. </section>
  975. <script type="text/javascript">
  976. function loadExternalCodeSnippets(line) {
  977. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  978. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  979. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  980. var language = 'php';
  981. var code = document.createElement('code');
  982. code.className = 'language-' + language;
  983. pre.textContent = '';
  984. pre.setAttribute('data-line', line)
  985. code.textContent = 'Loading…';
  986. pre.appendChild(code);
  987. var xhr = new XMLHttpRequest();
  988. xhr.open('GET', src, true);
  989. xhr.onreadystatechange = function () {
  990. if (xhr.readyState == 4) {
  991. if (xhr.status < 400 && xhr.responseText) {
  992. code.textContent = xhr.responseText;
  993. Prism.highlightElement(code);
  994. }
  995. else if (xhr.status >= 400) {
  996. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  997. }
  998. else {
  999. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  1000. }
  1001. }
  1002. };
  1003. xhr.send(null);
  1004. });
  1005. }
  1006. var modals = document.querySelectorAll("[data-modal]");
  1007. modals.forEach(function (trigger) {
  1008. trigger.addEventListener("click", function (event) {
  1009. //event.preventDefault();
  1010. const modal = document.getElementById(trigger.dataset.modal);
  1011. modal.classList.add("phpdocumentor-modal__open");
  1012. loadExternalCodeSnippets(trigger.dataset.line)
  1013. const exits = modal.querySelectorAll("[data-exit-button]");
  1014. exits.forEach(function (exit) {
  1015. exit.addEventListener("click", function (event) {
  1016. event.preventDefault();
  1017. modal.classList.remove("phpdocumentor-modal__open");
  1018. });
  1019. });
  1020. });
  1021. });
  1022. </script>
  1023. </article>
  1024. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1025. <section class="phpdocumentor-search-results__dialog">
  1026. <header class="phpdocumentor-search-results__header">
  1027. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1028. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1029. </header>
  1030. <section class="phpdocumentor-search-results__body">
  1031. <ul class="phpdocumentor-search-results__entries"></ul>
  1032. </section>
  1033. </section>
  1034. </section>
  1035. </div>
  1036. </div>
  1037. <a href="classes/chillerlan-QRCode-Common-GF256.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1038. </main>
  1039. <script>
  1040. cssVars({});
  1041. </script>
  1042. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1043. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1044. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1045. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1046. </body>
  1047. </html>