Learn R Programming

lhs (version 1.2.0)

poly2int: Convert polynomial to integer in <code>0..q-1</code>

Description

Convert polynomial to integer in <code>0..q-1</code>

Usage

poly2int(p, n, poly)

Value

an integer

Arguments

p

modulus

n

the length of poly

poly

the polynomial vector

Examples

Run this code
gf <- create_galois_field(4)
stopifnot(poly2int(gf$p, gf$n, c(0, 0)) == 0)

Run the code above in your browser using DataLab