pub struct Table<E: ElementExt>(usize, Vec<E>);Available on crate feature
alloc only.Expand description
A table to perform multiplications with.
Tuple Fields§
§0: usize§1: Vec<E>Implementations§
Source§impl<E: ElementExt> Table<E>
impl<E: ElementExt> Table<E>
Sourcepub fn new(bits: u32, identity: E, element: E) -> Self
pub fn new(bits: u32, identity: E, element: E) -> Self
Create a new table.
This function executes in constant-time w.r.t. element if double, add are constant-time.
Sourcepub fn new_for_scalar_bits(scalar_bits: usize, identity: E, element: E) -> Self
pub fn new_for_scalar_bits(scalar_bits: usize, identity: E, element: E) -> Self
Create a new table of size optimal for a scalar-length.
This is usable in ad-hoc multiplications where creating the table, and performing the multiplication with it, should not cost more than performing the multiplication out-right.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Table<E>
impl<E> RefUnwindSafe for Table<E>where
E: RefUnwindSafe,
impl<E> Send for Table<E>
impl<E> Sync for Table<E>
impl<E> Unpin for Table<E>where
E: Unpin,
impl<E> UnsafeUnpin for Table<E>
impl<E> UnwindSafe for Table<E>where
E: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
🔬This is a nightly-only experimental API. (
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read more