chillerlan-QRCode-Common-GF256.html 38 KB

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