pub struct ReedSolomonCode<P>{ /* private fields */ }
Implementations§
Source§impl<P> ReedSolomonCode<P>
impl<P> ReedSolomonCode<P>
pub fn log_inv_rate(&self) -> usize
Source§impl<P> ReedSolomonCode<P>where
P: PackedField<Scalar: BinaryField>,
impl<P> ReedSolomonCode<P>where
P: PackedField<Scalar: BinaryField>,
pub fn new( log_dimension: usize, log_inv_rate: usize, ntt_options: &NTTOptions, ) -> Result<Self, Error>
pub const fn get_ntt(&self) -> &impl AdditiveNTT<P>
pub const fn log_dim(&self) -> usize
pub const fn log_len(&self) -> usize
Sourcepub fn encode_ext_batch_inplace<PE>(
&self,
code: &mut [PE],
log_batch_size: usize,
) -> Result<(), Error>
pub fn encode_ext_batch_inplace<PE>( &self, code: &mut [PE], log_batch_size: usize, ) -> Result<(), Error>
Encode a batch of interleaved messages of extension field elements in-place in a provided buffer.
A linear code can be naturally extended to a code over extension fields by encoding each dimension of the extension as a vector-space separately.
§Preconditions
PE::Scalar::DEGREE
must be a power of two.
§Throws
- If the
code
buffer does not have capacity forlen() << log_batch_size
field elements.
Trait Implementations§
Source§impl<P> Debug for ReedSolomonCode<P>
impl<P> Debug for ReedSolomonCode<P>
Auto Trait Implementations§
impl<P> Freeze for ReedSolomonCode<P>where
<P as PackedField>::Scalar: Sized,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
impl<P> RefUnwindSafe for ReedSolomonCode<P>where
<P as PackedField>::Scalar: Sized + RefUnwindSafe,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
P: RefUnwindSafe,
impl<P> Send for ReedSolomonCode<P>where
<P as PackedField>::Scalar: Sized,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
impl<P> Sync for ReedSolomonCode<P>where
<P as PackedField>::Scalar: Sized,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
impl<P> Unpin for ReedSolomonCode<P>where
<P as PackedField>::Scalar: Sized + Unpin,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
P: Unpin,
impl<P> UnwindSafe for ReedSolomonCode<P>where
<P as PackedField>::Scalar: Sized + UnwindSafe,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
P: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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