Created
April 27, 2025 17:36
-
-
Save wangshouh/1c1596ad61f6fee21e58b21882844f74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use ark_ff::{Fp64, MontBackend, fields::MontConfig}; | |
use ark_poly::{DenseUVPolynomial, Polynomial, univariate::DensePolynomial}; | |
#[derive(MontConfig)] | |
#[modulus = "11"] | |
#[generator = "1"] | |
pub struct FqConfig; | |
pub type Fq = Fp64<MontBackend<FqConfig, 1>>; | |
fn main() { | |
let poly: DensePolynomial<Fq> = | |
DenseUVPolynomial::from_coefficients_vec(vec![Fq::from(2), Fq::from(1), Fq::from(0)]); | |
let v: Vec<Fq> = (0..11).map(|i| poly.evaluate(&Fq::from(i))).collect(); | |
println!("{:?}", v) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment