pub struct ExConvCode { /* private fields */ }Implementations§
Source§impl ExConvCode
impl ExConvCode
Sourcepub fn new(message_size: usize) -> Self
pub fn new(message_size: usize) -> Self
Create a new code for the given message_size, by default code_size = 2 * message_size.
Sourcepub fn new_with_conf(message_size: usize, conf: ExConvCodeConfig) -> Self
pub fn new_with_conf(message_size: usize, conf: ExConvCodeConfig) -> Self
Create a new code with the provided configuration.
pub fn parity_rows(&self) -> usize
pub fn parity_cols(&self) -> usize
pub fn generator_rows(&self) -> usize
pub fn generator_cols(&self) -> usize
pub fn message_size(&self) -> usize
pub fn code_size(&self) -> usize
pub fn conf(&self) -> &ExConvCodeConfig
Sourcepub fn dual_encode<T: Coeff>(&self, e: &mut [T])
pub fn dual_encode<T: Coeff>(&self, e: &mut [T])
Encode e.
For maximum performance, the crate needs to be compiled with
target_feature = sse4.1 enabled. Otherwise a slower scalar fallback is
used.
§Panics
If e.len() != self.code_size().
Trait Implementations§
Source§impl Clone for ExConvCode
impl Clone for ExConvCode
Source§fn clone(&self) -> ExConvCode
fn clone(&self) -> ExConvCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExConvCode
impl Debug for ExConvCode
impl Copy for ExConvCode
Auto Trait Implementations§
impl Freeze for ExConvCode
impl RefUnwindSafe for ExConvCode
impl Send for ExConvCode
impl Sync for ExConvCode
impl Unpin for ExConvCode
impl UnwindSafe for ExConvCode
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