Struct lpn::oracle::Sample [−][src]
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]
fn cmp(&self, other: &Sample) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Sample> for Sample
[src]
impl PartialOrd<Sample> for Sample
[src]
fn partial_cmp(&self, other: &Sample) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,
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]
U: From<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
[src]
U: FromBits<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,