Struct lpn::oracle::Sample[][src]

#[repr(transparent)]pub struct Sample { /* fields omitted */ }

Represents a sample in the oracle

<a, s> + e = c

Implementations

impl Sample[src]

pub fn vector_product(&self, other: &Sample, len: usize) -> bool[src]

pub fn count_ones(&self) -> u32[src]

Get the Hamming weight of the sample

pub fn get_product(&self) -> bool[src]

get the noisy inner product

pub fn xor_into(&mut self, other: &Sample)[src]

absorb another sample

pub fn set_product(&mut self, new_product: bool)[src]

set noise bit

pub fn get_sample(&self) -> &[u64][src]

Obtain the sample

pub fn get_sample_mut(&mut self) -> &mut [u64][src]

Obtain the sample mutably

pub fn into_inner(self) -> [u64; 2][src]

Obtain

pub fn truncate(&mut self, len: usize, truncating_secret: bool)[src]

Truncate

pub fn as_binvector(&self, len: usize) -> BinVector[src]

pub fn from_binvector(vec: &BinVector, product: bool) -> Sample[src]

pub fn set_from_binvec(&mut self, vec: &BinVector)[src]

pub fn get_block(&self, index: usize) -> u64[src]

Trait Implementations

impl Clone for Sample[src]

impl Debug for Sample[src]

impl Eq for Sample[src]

impl Ord for Sample[src]

impl PartialEq<Sample> for Sample[src]

impl PartialOrd<Sample> for Sample[src]

impl StructuralEq for Sample[src]

impl StructuralPartialEq for Sample[src]

Auto Trait Implementations

impl RefUnwindSafe for Sample

impl Send for Sample

impl Sync for Sample

impl Unpin for Sample

impl UnwindSafe for Sample

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromBits<T> for T[src]

impl<T> FromCast<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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