pub struct BinaryU64Poly<const DEGREE_PLUS_ONE: usize>(/* private fields */);Implementations§
Source§impl<const DEGREE_PLUS_ONE: usize> BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> BinaryU64Poly<DEGREE_PLUS_ONE>
pub fn new(coeffs: [Boolean; DEGREE_PLUS_ONE]) -> Self
Sourcepub fn new_padded(coeffs: impl AsRef<[Boolean]>) -> Self
pub fn new_padded(coeffs: impl AsRef<[Boolean]>) -> Self
Create a new polynomial with the given coefficients. If the input has fewer than N+1 coefficients, the remaining slots will be filled with zeros. If the input has more than N+1 coefficients, it will panic.
Source§impl<const DEGREE_PLUS_ONE: usize> BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> BinaryU64Poly<DEGREE_PLUS_ONE>
pub fn iter(&self) -> BinaryU64PolyIter<'_, DEGREE_PLUS_ONE> ⓘ
Trait Implementations§
Source§impl<'a, const DEGREE_PLUS_ONE: usize> Add<&'a BinaryU64Poly<DEGREE_PLUS_ONE>> for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<'a, const DEGREE_PLUS_ONE: usize> Add<&'a BinaryU64Poly<DEGREE_PLUS_ONE>> for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> Add for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Add for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> Clone for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Clone for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§fn clone(&self) -> BinaryU64Poly<DEGREE_PLUS_ONE>
fn clone(&self) -> BinaryU64Poly<DEGREE_PLUS_ONE>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const DEGREE_PLUS_ONE: usize> ConstCoeffBitWidth for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> ConstCoeffBitWidth for BinaryU64Poly<DEGREE_PLUS_ONE>
const COEFF_BIT_WIDTH: usize = Boolean::NUM_BITS
Source§impl<const DEGREE_PLUS_ONE: usize> ConstTranscribable for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> ConstTranscribable for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> Debug for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Debug for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> Default for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Default for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§fn default() -> BinaryU64Poly<DEGREE_PLUS_ONE>
fn default() -> BinaryU64Poly<DEGREE_PLUS_ONE>
Returns the “default value” for a type. Read more
Source§impl<const DEGREE_PLUS_ONE: usize> Display for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Display for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> Distribution<BinaryU64Poly<DEGREE_PLUS_ONE>> for StandardUniform
impl<const DEGREE_PLUS_ONE: usize> Distribution<BinaryU64Poly<DEGREE_PLUS_ONE>> for StandardUniform
Source§fn sample<Gen: Rng + ?Sized>(
&self,
rng: &mut Gen,
) -> BinaryU64Poly<DEGREE_PLUS_ONE>
fn sample<Gen: Rng + ?Sized>( &self, rng: &mut Gen, ) -> BinaryU64Poly<DEGREE_PLUS_ONE>
Generate a random value of
T, using rng as the source of randomness.§fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>where
R: Rng,
Self: Sized,
Create an iterator that generates random values of
T, using rng as
the source of randomness. Read moreSource§impl<R: Clone + Zero + One + CheckedAdd + CheckedMul, const DEGREE_PLUS_ONE: usize> EvaluatablePolynomial<Boolean, R> for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<R: Clone + Zero + One + CheckedAdd + CheckedMul, const DEGREE_PLUS_ONE: usize> EvaluatablePolynomial<Boolean, R> for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§type EvaluationPoint = R
type EvaluationPoint = R
The type of points a polynomial can be evaluated on.
For univariate polynomials this typically is
Out,
for multivariate this is [Out].Source§fn evaluate_at_point(&self, point: &R) -> Result<R, EvaluationError>
fn evaluate_at_point(&self, point: &R) -> Result<R, EvaluationError>
Evaluates the polynomial at the given point.
Source§impl<const DEGREE_PLUS_ONE: usize> From<&BinaryU64Poly<DEGREE_PLUS_ONE>> for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> From<&BinaryU64Poly<DEGREE_PLUS_ONE>> for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§fn from(value: &BinaryU64Poly<DEGREE_PLUS_ONE>) -> Self
fn from(value: &BinaryU64Poly<DEGREE_PLUS_ONE>) -> Self
Converts to this type from the input type.
Source§impl<const DEGREE_PLUS_ONE: usize> From<BinaryU64Poly<DEGREE_PLUS_ONE>> for DensePolynomial<Boolean, DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> From<BinaryU64Poly<DEGREE_PLUS_ONE>> for DensePolynomial<Boolean, DEGREE_PLUS_ONE>
Source§fn from(binary_poly: BinaryU64Poly<DEGREE_PLUS_ONE>) -> Self
fn from(binary_poly: BinaryU64Poly<DEGREE_PLUS_ONE>) -> Self
Converts to this type from the input type.
Source§impl<const DEGREE_PLUS_ONE: usize> From<BinaryU64Poly<DEGREE_PLUS_ONE>> for DynamicPolynomial<Boolean>
impl<const DEGREE_PLUS_ONE: usize> From<BinaryU64Poly<DEGREE_PLUS_ONE>> for DynamicPolynomial<Boolean>
Source§fn from(binary_poly: BinaryPoly<DEGREE_PLUS_ONE>) -> Self
fn from(binary_poly: BinaryPoly<DEGREE_PLUS_ONE>) -> Self
Converts to this type from the input type.
Source§impl<const DEGREE_PLUS_ONE: usize> From<BinaryU64Poly<DEGREE_PLUS_ONE>> for u64
impl<const DEGREE_PLUS_ONE: usize> From<BinaryU64Poly<DEGREE_PLUS_ONE>> for u64
Source§fn from(binary_poly: BinaryU64Poly<DEGREE_PLUS_ONE>) -> Self
fn from(binary_poly: BinaryU64Poly<DEGREE_PLUS_ONE>) -> Self
Converts to this type from the input type.
Source§impl<const DEGREE_PLUS_ONE: usize> FromRef<BinaryU64Poly<DEGREE_PLUS_ONE>> for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> FromRef<BinaryU64Poly<DEGREE_PLUS_ONE>> for BinaryU64Poly<DEGREE_PLUS_ONE>
fn from_ref(poly: &BinaryU64Poly<DEGREE_PLUS_ONE>) -> Self
Source§impl<R, const DEGREE_PLUS_ONE: usize> FromRef<BinaryU64Poly<DEGREE_PLUS_ONE>> for DensePolynomial<R, DEGREE_PLUS_ONE>
impl<R, const DEGREE_PLUS_ONE: usize> FromRef<BinaryU64Poly<DEGREE_PLUS_ONE>> for DensePolynomial<R, DEGREE_PLUS_ONE>
fn from_ref(value: &BinaryU64Poly<DEGREE_PLUS_ONE>) -> Self
Source§impl<const DEGREE_PLUS_ONE: usize> GenTranscribable for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> GenTranscribable for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§fn read_transcription_bytes_exact(bytes: &[u8]) -> Self
fn read_transcription_bytes_exact(bytes: &[u8]) -> Self
Creates a new instance from a byte buffer.
The buffer must be exactly the expected length.
Source§fn write_transcription_bytes_exact(&self, buf: &mut [u8])
fn write_transcription_bytes_exact(&self, buf: &mut [u8])
Transcribes the current instance into a byte buffer.
The buffer must be exactly the expected length.
Source§impl<const DEGREE_PLUS_ONE: usize> Hash for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Hash for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<C, Rhs, Out, const DEGREE_PLUS_ONE: usize> InnerProduct<C, BinaryU64Poly<DEGREE_PLUS_ONE>, Rhs, Out> for BinaryU64PolyInnerProduct<Rhs, DEGREE_PLUS_ONE>
impl<C, Rhs, Out, const DEGREE_PLUS_ONE: usize> InnerProduct<C, BinaryU64Poly<DEGREE_PLUS_ONE>, Rhs, Out> for BinaryU64PolyInnerProduct<Rhs, DEGREE_PLUS_ONE>
Source§fn inner_product<const CHECK: bool>(
_cfg: &C,
lhs: &BinaryU64Poly<DEGREE_PLUS_ONE>,
rhs: &[Rhs],
zero: Out,
) -> Result<Out, InnerProductError>
fn inner_product<const CHECK: bool>( _cfg: &C, lhs: &BinaryU64Poly<DEGREE_PLUS_ONE>, rhs: &[Rhs], zero: Out, ) -> Result<Out, InnerProductError>
The main entry point for the inner product.
CHECK determines whether the implementation should check for overflow.Source§impl<const DEGREE_PLUS_ONE: usize> Mul for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Mul for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> MulByScalar<i64, DensePolynomial<i64, DEGREE_PLUS_ONE>> for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> MulByScalar<i64, DensePolynomial<i64, DEGREE_PLUS_ONE>> for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§fn mul_by_scalar<const CHECK: bool>(
self,
rhs: &i64,
) -> Option<DensePolynomial<i64, DEGREE_PLUS_ONE>>
fn mul_by_scalar<const CHECK: bool>( self, rhs: &i64, ) -> Option<DensePolynomial<i64, DEGREE_PLUS_ONE>>
Multiplies
self by a scalar from the right (usually - a coefficient to
obtain a linear combination).
Returns None if the multiplication would overflow.Source§impl<const DEGREE_PLUS_ONE: usize> Named for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Named for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> One for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> One for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§impl<const DEGREE_PLUS_ONE: usize> PartialEq for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> PartialEq for BinaryU64Poly<DEGREE_PLUS_ONE>
Source§fn eq(&self, other: &BinaryU64Poly<DEGREE_PLUS_ONE>) -> bool
fn eq(&self, other: &BinaryU64Poly<DEGREE_PLUS_ONE>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<const DEGREE_PLUS_ONE: usize> Polynomial<Boolean> for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Polynomial<Boolean> for BinaryU64Poly<DEGREE_PLUS_ONE>
const DEGREE_BOUND: usize = DensePolynomial<Boolean, DEGREE_PLUS_ONE>::DEGREE_BOUND
Source§impl<C, const DEGREE_PLUS_ONE: usize> ProjectableToField<C> for BinaryU64Poly<DEGREE_PLUS_ONE>where
C: FieldConfig + 'static,
impl<C, const DEGREE_PLUS_ONE: usize> ProjectableToField<C> for BinaryU64Poly<DEGREE_PLUS_ONE>where
C: FieldConfig + 'static,
Source§fn prepare_projection(
cfg: &C,
sampled_value: &C::Element,
) -> impl Fn(&Self) -> C::Element
fn prepare_projection( cfg: &C, sampled_value: &C::Element, ) -> impl Fn(&Self) -> C::Element
Prepare a projection function that will project the current type
to a prime field using the given config and sampled value.
Source§impl<const DEGREE_PLUS_ONE: usize> Zero for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Zero for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Eq for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> StructuralPartialEq for BinaryU64Poly<DEGREE_PLUS_ONE>
Auto Trait Implementations§
impl<const DEGREE_PLUS_ONE: usize> Freeze for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> RefUnwindSafe for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Send for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Sync for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> Unpin for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> UnsafeUnpin for BinaryU64Poly<DEGREE_PLUS_ONE>
impl<const DEGREE_PLUS_ONE: usize> UnwindSafe for BinaryU64Poly<DEGREE_PLUS_ONE>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Transcribable for Twhere
T: ConstTranscribable,
impl<T> Transcribable for Twhere
T: ConstTranscribable,
§const LENGTH_NUM_BYTES: usize = 0
const LENGTH_NUM_BYTES: usize = 0
Number of bytes required to represent length of this type, could be
zero if known in advance.
§fn read_num_bytes(bytes: &[u8]) -> usize
fn read_num_bytes(bytes: &[u8]) -> usize
Read number of bytes required to represent this type.
The buffer must be exactly
LENGTH_NUM_BYTES long.
The buffer passed to read_transcription_bytes should be exactly the
length returned by this function.§fn get_num_bytes(&self) -> usize
fn get_num_bytes(&self) -> usize
Returns the number of bytes required to represent this type.
The buffer passed to
write_transcription_bytes should be exactly the
length returned by this function.§fn read_transcription_bytes_subset(bytes: &[u8]) -> (T, &[u8])
fn read_transcription_bytes_subset(bytes: &[u8]) -> (T, &[u8])
Reads an instance of this type from the beginning of the byte slice, and
returns the instance along with the remaining byte slice.
§fn write_transcription_bytes_subset<'a>(
&self,
buf: &'a mut [u8],
) -> &'a mut [u8] ⓘ
fn write_transcription_bytes_subset<'a>( &self, buf: &'a mut [u8], ) -> &'a mut [u8] ⓘ
Writes this instance, prefixed by length, into the beginning of the byte
buffer, and returns the remaining byte buffer.