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

poly2int {lhs} | R Documentation

## 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)

### Arguments

`p` | modulus
`n` | the length of poly
`poly` | the polynomial vector

### Value

an integer

### Examples

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

[Package lhs version 1.1.4 Index]