pub enum FpVector {
_2(FqVector<Fp<P2>>),
_3(FqVector<Fp<P3>>),
_5(FqVector<Fp<P5>>),
_7(FqVector<Fp<P7>>),
Big(FqVector<Fp<ValidPrime>>),
}Variants§
_2(FqVector<Fp<P2>>)
_3(FqVector<Fp<P3>>)
_5(FqVector<Fp<P5>>)
_7(FqVector<Fp<P7>>)
Big(FqVector<Fp<ValidPrime>>)
Implementations§
Source§impl FpVector
impl FpVector
pub fn prime(&self) -> ValidPrime
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn scale(&mut self, c: u32)
pub fn set_to_zero(&mut self)
pub fn entry(&self, index: usize) -> u32
pub fn set_entry(&mut self, index: usize, value: u32)
pub fn assign(&mut self, other: &Self)
pub fn assign_partial(&mut self, other: &Self)
pub fn add(&mut self, other: &Self, c: u32)
pub fn add_offset(&mut self, other: &Self, c: u32, offset: usize)
pub fn slice(&self, start: usize, end: usize) -> FpSlice<'_>
pub fn as_slice(&self) -> FpSlice<'_>
pub fn slice_mut(&mut self, start: usize, end: usize) -> FpSliceMut<'_>
pub fn as_slice_mut(&mut self) -> FpSliceMut<'_>
pub fn is_zero(&self) -> bool
pub fn iter(&self) -> FpVectorIterator<'_> ⓘ
pub fn iter_nonzero(&self) -> FpVectorNonZeroIterator<'_> ⓘ
pub fn extend_len(&mut self, dim: usize)
pub fn set_scratch_vector_size(&mut self, dim: usize)
pub fn add_basis_element(&mut self, index: usize, value: u32)
pub fn copy_from_slice(&mut self, slice: &[u32])
pub fn add_truncate(&mut self, other: &Self, c: u32) -> Option<()>
pub fn sign_rule(&self, other: &Self) -> bool
pub fn add_carry(&mut self, other: &Self, c: u32, rest: &mut [Self]) -> bool
pub fn first_nonzero(&self) -> Option<(usize, u32)>
pub fn density(&self) -> f32
pub(crate) fn limbs(&self) -> &[u64]
pub fn new<P: Prime>(p: P, len: usize) -> Self
pub fn new_with_capacity<P: Prime>(p: P, len: usize, capacity: usize) -> Self
pub fn update_from_bytes(&mut self, data: &mut impl Read) -> Result<()>
pub fn from_bytes<P: Prime>( p: P, len: usize, data: &mut impl Read, ) -> Result<Self>
pub fn to_bytes(&self, buffer: &mut impl Write) -> Result<()>
pub fn from_slice<P: Prime>(p: P, slice: &[u32]) -> Self
pub(crate) fn num_limbs(p: ValidPrime, len: usize) -> usize
pub(crate) fn padded_len(p: ValidPrime, len: usize) -> usize
Trait Implementations§
Source§impl AddAssign<&FpVector> for FpVector
impl AddAssign<&FpVector> for FpVector
Source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+= operation. Read moreSource§impl<'de> Deserialize<'de> for FpVector
impl<'de> Deserialize<'de> for FpVector
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a mut FpVector> for FpSliceMut<'a>
impl<'a> From<&'a mut FpVector> for FpSliceMut<'a>
Source§impl<'a> IntoIterator for &'a FpVector
impl<'a> IntoIterator for &'a FpVector
impl Eq for FpVector
impl StructuralPartialEq for FpVector
Auto Trait Implementations§
impl Freeze for FpVector
impl RefUnwindSafe for FpVector
impl Send for FpVector
impl Sync for FpVector
impl Unpin for FpVector
impl UnwindSafe for FpVector
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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