pub struct IprsCode<Zt: ZipTypes, Config: PnttConfig, const REP: usize, const CHECK: bool> { /* private fields */ }Expand description
Pseudo Reed-Solomon encoder over the integers. Internally uses a
radix-8 NTT-style recursion with a base Vandermonde matrix sized
base_len x base_dim (defaults to 64x32).
Implementations§
Source§impl<Zt, Config, const REP: usize, const CHECK: bool> IprsCode<Zt, Config, REP, CHECK>where
Zt: ZipTypes,
Config: PnttConfig,
impl<Zt, Config, const REP: usize, const CHECK: bool> IprsCode<Zt, Config, REP, CHECK>where
Zt: ZipTypes,
Config: PnttConfig,
pub fn new(row_len: usize, depth: usize) -> Result<Self, ZipError>
Sourcepub fn new_with_optimal_depth(row_len: usize) -> Result<Self, ZipError>
pub fn new_with_optimal_depth(row_len: usize) -> Result<Self, ZipError>
Create a new IPRS code with the optimal depth heuristics trying to keep number of columns in the base matrix small. Currently, keeps number of columns <= 2^8 but this might be tweaked in the future.
Trait Implementations§
Source§impl<Zt: Clone + ZipTypes, Config: Clone + PnttConfig, const REP: usize, const CHECK: bool> Clone for IprsCode<Zt, Config, REP, CHECK>
impl<Zt: Clone + ZipTypes, Config: Clone + PnttConfig, const REP: usize, const CHECK: bool> Clone for IprsCode<Zt, Config, REP, CHECK>
Source§impl<Zt, Config, const REP: usize, const CHECK: bool> Debug for IprsCode<Zt, Config, REP, CHECK>where
Zt: ZipTypes,
Config: PnttConfig,
impl<Zt, Config, const REP: usize, const CHECK: bool> Debug for IprsCode<Zt, Config, REP, CHECK>where
Zt: ZipTypes,
Config: PnttConfig,
Source§impl<Zt, Config, const REP: usize, const CHECK: bool> LinearCode<Zt> for IprsCode<Zt, Config, REP, CHECK>where
Zt: ZipTypes,
Config: PnttConfig,
Zt::Eval: for<'a> MulByScalar<&'a PnttInt, Zt::Cw>,
Zt::CombR: for<'a> MulByScalar<&'a PnttInt>,
Zt::Cw: CheckedAdd + for<'a> MulByScalar<&'a PnttInt>,
impl<Zt, Config, const REP: usize, const CHECK: bool> LinearCode<Zt> for IprsCode<Zt, Config, REP, CHECK>where
Zt: ZipTypes,
Config: PnttConfig,
Zt::Eval: for<'a> MulByScalar<&'a PnttInt, Zt::Cw>,
Zt::CombR: for<'a> MulByScalar<&'a PnttInt>,
Zt::Cw: CheckedAdd + for<'a> MulByScalar<&'a PnttInt>,
Source§const REPETITION_FACTOR: usize = REP
const REPETITION_FACTOR: usize = REP
Repetition factor, a.k.a. inverse rate, the ratio of codeword length to
input row length. Has to be at a power of 2. Read more
Source§fn encode(&self, row: &[Zt::Eval]) -> Vec<Zt::Cw>
fn encode(&self, row: &[Zt::Eval]) -> Vec<Zt::Cw>
Encodes a row of cryptographic integers using this linear encoding
scheme. Read more
Source§fn codeword_len(&self) -> usize
fn codeword_len(&self) -> usize
Length of each encoded codeword (output length after encoding)
Source§fn params_string(&self) -> String
fn params_string(&self) -> String
String representation of the parameters of this linear code, used for
benchmarks. Should start with “row_len=X”.
Source§impl<Zt, Config, const REP: usize, const CHECK: bool> PartialEq for IprsCode<Zt, Config, REP, CHECK>where
Config: PnttConfig,
Zt: ZipTypes,
impl<Zt, Config, const REP: usize, const CHECK: bool> PartialEq for IprsCode<Zt, Config, REP, CHECK>where
Config: PnttConfig,
Zt: ZipTypes,
impl<Zt, Config, const REP: usize, const CHECK: bool> Eq for IprsCode<Zt, Config, REP, CHECK>where
Zt: ZipTypes,
Config: PnttConfig,
Auto Trait Implementations§
impl<Zt, Config, const REP: usize, const CHECK: bool> Freeze for IprsCode<Zt, Config, REP, CHECK>
impl<Zt, Config, const REP: usize, const CHECK: bool> RefUnwindSafe for IprsCode<Zt, Config, REP, CHECK>where
Zt: RefUnwindSafe,
Config: RefUnwindSafe,
impl<Zt, Config, const REP: usize, const CHECK: bool> Send for IprsCode<Zt, Config, REP, CHECK>
impl<Zt, Config, const REP: usize, const CHECK: bool> Sync for IprsCode<Zt, Config, REP, CHECK>
impl<Zt, Config, const REP: usize, const CHECK: bool> Unpin for IprsCode<Zt, Config, REP, CHECK>
impl<Zt, Config, const REP: usize, const CHECK: bool> UnsafeUnpin for IprsCode<Zt, Config, REP, CHECK>
impl<Zt, Config, const REP: usize, const CHECK: bool> UnwindSafe for IprsCode<Zt, Config, REP, CHECK>where
Zt: UnwindSafe,
Config: UnwindSafe,
Blanket Implementations§
§impl<T> AsMaybeUninit for T
impl<T> AsMaybeUninit for T
§type Uninit = MaybeUninit<T>
type Uninit = MaybeUninit<T>
This type in its maybe-uninitialized form.
§fn as_ref_uninit(&self) -> &<T as AsMaybeUninit>::Uninit
fn as_ref_uninit(&self) -> &<T as AsMaybeUninit>::Uninit
Converts a
&self to its maybe-initialized equivalent.§unsafe fn as_mut_uninit(&mut self) -> &mut <T as AsMaybeUninit>::Uninit
unsafe fn as_mut_uninit(&mut self) -> &mut <T as AsMaybeUninit>::Uninit
Converts a
&mut T to its maybe-initialized equivalent. Read more§unsafe fn raw_as_uninit<'a>(raw: *const T) -> &'a <T as AsMaybeUninit>::Uninit
unsafe fn raw_as_uninit<'a>(raw: *const T) -> &'a <T as AsMaybeUninit>::Uninit
Converts a raw pointer to a reference to maybe-uninit. Read more
§unsafe fn raw_mut_as_uninit<'a>(
raw: *mut T,
) -> &'a mut <T as AsMaybeUninit>::Uninit
unsafe fn raw_mut_as_uninit<'a>( raw: *mut T, ) -> &'a mut <T as AsMaybeUninit>::Uninit
Converts a raw mutable pointer to a mutable reference to maybe-uninit. Read more
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