FpVector

Enum FpVector 

Source
pub enum FpVector {
    _2(FqVector<Fp<P2>>),
    _3(FqVector<Fp<P3>>),
    _5(FqVector<Fp<P5>>),
    _7(FqVector<Fp<P7>>),
    Big(FqVector<Fp<ValidPrime>>),
}

Variants§

Implementations§

Source§

impl FpVector

Source

pub fn prime(&self) -> ValidPrime

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn scale(&mut self, c: u32)

Source

pub fn set_to_zero(&mut self)

Source

pub fn entry(&self, index: usize) -> u32

Source

pub fn set_entry(&mut self, index: usize, value: u32)

Source

pub fn assign(&mut self, other: &Self)

Source

pub fn assign_partial(&mut self, other: &Self)

Source

pub fn add(&mut self, other: &Self, c: u32)

Source

pub fn add_offset(&mut self, other: &Self, c: u32, offset: usize)

Source

pub fn slice(&self, start: usize, end: usize) -> FpSlice<'_>

Source

pub fn as_slice(&self) -> FpSlice<'_>

Source

pub fn slice_mut(&mut self, start: usize, end: usize) -> FpSliceMut<'_>

Source

pub fn as_slice_mut(&mut self) -> FpSliceMut<'_>

Source

pub fn is_zero(&self) -> bool

Source

pub fn iter(&self) -> FpVectorIterator<'_>

Source

pub fn iter_nonzero(&self) -> FpVectorNonZeroIterator<'_>

Source

pub fn extend_len(&mut self, dim: usize)

Source

pub fn set_scratch_vector_size(&mut self, dim: usize)

Source

pub fn add_basis_element(&mut self, index: usize, value: u32)

Source

pub fn copy_from_slice(&mut self, slice: &[u32])

Source

pub fn add_truncate(&mut self, other: &Self, c: u32) -> Option<()>

Source

pub fn sign_rule(&self, other: &Self) -> bool

Source

pub fn add_carry(&mut self, other: &Self, c: u32, rest: &mut [Self]) -> bool

Source

pub fn first_nonzero(&self) -> Option<(usize, u32)>

Source

pub fn density(&self) -> f32

Source

pub(crate) fn limbs(&self) -> &[u64]

Source

pub fn new<P: Prime>(p: P, len: usize) -> Self

Source

pub fn new_with_capacity<P: Prime>(p: P, len: usize, capacity: usize) -> Self

Source

pub fn update_from_bytes(&mut self, data: &mut impl Read) -> Result<()>

Source

pub fn from_bytes<P: Prime>( p: P, len: usize, data: &mut impl Read, ) -> Result<Self>

Source

pub fn to_bytes(&self, buffer: &mut impl Write) -> Result<()>

Source

pub fn from_slice<P: Prime>(p: P, slice: &[u32]) -> Self

Source

pub(crate) fn num_limbs(p: ValidPrime, len: usize) -> usize

Source

pub(crate) fn padded_len(p: ValidPrime, len: usize) -> usize

Trait Implementations§

Source§

impl AddAssign<&FpVector> for FpVector

Source§

fn add_assign(&mut self, other: &Self)

Performs the += operation. Read more
Source§

impl Clone for FpVector

Source§

fn clone(&self) -> FpVector

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FpVector

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FpVector

Source§

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 Display for FpVector

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a FpVector> for FpSlice<'a>

Source§

fn from(v: &'a FpVector) -> Self

Converts to this type from the input type.
Source§

impl From<&FpVector> for Vec<u32>

Source§

fn from(v: &FpVector) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut FpVector> for FpSliceMut<'a>

Source§

fn from(v: &'a mut FpVector) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FqVector<Fp<P2>>> for FpVector

Source§

fn from(x: FqVector<Fp<P2>>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FqVector<Fp<P3>>> for FpVector

Source§

fn from(x: FqVector<Fp<P3>>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FqVector<Fp<P5>>> for FpVector

Source§

fn from(x: FqVector<Fp<P5>>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FqVector<Fp<P7>>> for FpVector

Source§

fn from(x: FqVector<Fp<P7>>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FqVector<Fp<ValidPrime>>> for FpVector

Source§

fn from(x: FqVector<Fp<ValidPrime>>) -> Self

Converts to this type from the input type.
Source§

impl Hash for FpVector

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a> IntoIterator for &'a FpVector

Source§

type IntoIter = FpVectorIterator<'a>

Which kind of iterator are we turning this into?
Source§

type Item = u32

The type of the elements being iterated over.
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl PartialEq for FpVector

Source§

fn eq(&self, other: &FpVector) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for FpVector

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'a> TryInto<&'a mut FqVector<Fp<P2>>> for &'a mut FpVector

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a mut FqVector<Fp<P2>>, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<&'a mut FqVector<Fp<P3>>> for &'a mut FpVector

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a mut FqVector<Fp<P3>>, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<&'a mut FqVector<Fp<P5>>> for &'a mut FpVector

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a mut FqVector<Fp<P5>>, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<&'a mut FqVector<Fp<P7>>> for &'a mut FpVector

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a mut FqVector<Fp<P7>>, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<&'a mut FqVector<Fp<ValidPrime>>> for &'a mut FpVector

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a mut FqVector<Fp<ValidPrime>>, Self::Error>

Performs the conversion.
Source§

impl Eq for FpVector

Source§

impl StructuralPartialEq for FpVector

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,