Lines Matching refs:nroots
2657 * @param $nroots (int) RS code generator polynomial degree (number of roots)
2659 * @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
2661 protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
2663 if (($rs['pad'] != $pad) OR ($rs['nroots'] != $nroots) OR ($rs['mm'] != $symsize)
2669 $rs = $this->init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad);
2698 * @param $nroots (int) RS code generator polynomial degree (number of roots)
2700 * @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
2702 protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
2715 if (($nroots < 0) OR ($nroots >= (1<<$symsize))) {
2718 if (($pad < 0) OR ($pad >= ((1<<$symsize) -1 - $nroots))) {
2748 $rs['genpoly'] = array_fill(0, ($nroots + 1), 0);
2751 $rs['nroots'] = $nroots;
2759 for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) {
2773 for ($i = 0; $i <= $nroots; ++$i) {
2792 $NROOTS =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block