Refactor algebra API, split into algebra and algebra-core. (#100)

This commit is contained in:
Pratyush Mishra
2020-02-26 21:42:04 -08:00
committed by GitHub
parent d4896ade47
commit 8bf042a029
68 changed files with 417 additions and 572 deletions

View File

@@ -834,7 +834,7 @@ impl<ConstraintF: PrimeField> CondSelectGadget<ConstraintF> for Boolean {
mod test {
use super::{AllocatedBit, Boolean};
use crate::{prelude::*, test_constraint_system::TestConstraintSystem};
use algebra::{fields::bls12_381::Fr, BitIterator, Field, One, PrimeField, UniformRand, Zero};
use algebra::{bls12_381::Fr, BitIterator, Field, One, PrimeField, UniformRand, Zero};
use core::str::FromStr;
use r1cs_core::ConstraintSystem;
use rand::SeedableRng;

View File

@@ -344,7 +344,7 @@ impl<ConstraintF: Field> ConditionalEqGadget<ConstraintF> for UInt32 {
mod test {
use super::UInt32;
use crate::{bits::boolean::Boolean, test_constraint_system::TestConstraintSystem, Vec};
use algebra::{fields::bls12_381::Fr, One, Zero};
use algebra::{bls12_381::Fr, One, Zero};
use r1cs_core::ConstraintSystem;
use rand::{Rng, SeedableRng};
use rand_xorshift::XorShiftRng;

View File

@@ -298,7 +298,7 @@ impl<ConstraintF: Field> AllocGadget<u8, ConstraintF> for UInt8 {
mod test {
use super::UInt8;
use crate::{prelude::*, test_constraint_system::TestConstraintSystem, Vec};
use algebra::fields::bls12_381::Fr;
use algebra::bls12_381::Fr;
use r1cs_core::ConstraintSystem;
use rand::{Rng, SeedableRng};
use rand_xorshift::XorShiftRng;