pub struct MultiVec<T, const D: usize> { /* private fields */ }
Expand description
A multi-dimensional vector. This is faster and simpler than using Vec<Vec<…>>
Implementations§
Source§impl<T, const D: usize> MultiVec<T, D>
impl<T, const D: usize> MultiVec<T, D>
Sourcepub fn fill_fn(axes: [usize; D], f: impl Fn(usize) -> T) -> Self
pub fn fill_fn(axes: [usize; D], f: impl Fn(usize) -> T) -> Self
Constructs a MultiVec
with the specified axes and fills it with the result of the function.
Sourcepub fn iso(&mut self, new_axes: [usize; D])
pub fn iso(&mut self, new_axes: [usize; D])
Performs an isomorphism on the axes. The new axes must have the same number of elements.
Sourcepub fn iter(&self) -> impl Iterator<Item = &T>
pub fn iter(&self) -> impl Iterator<Item = &T>
Returns an iterator over references to the elements.
Trait Implementations§
Source§impl<T: Ord, const D: usize> Ord for MultiVec<T, D>
impl<T: Ord, const D: usize> Ord for MultiVec<T, D>
Source§impl<T: PartialOrd, const D: usize> PartialOrd for MultiVec<T, D>
impl<T: PartialOrd, const D: usize> PartialOrd for MultiVec<T, D>
impl<T: Eq, const D: usize> Eq for MultiVec<T, D>
Auto Trait Implementations§
impl<T, const D: usize> Freeze for MultiVec<T, D>
impl<T, const D: usize> RefUnwindSafe for MultiVec<T, D>where
T: RefUnwindSafe,
impl<T, const D: usize> Send for MultiVec<T, D>where
T: Send,
impl<T, const D: usize> Sync for MultiVec<T, D>where
T: Sync,
impl<T, const D: usize> Unpin for MultiVec<T, D>where
T: Unpin,
impl<T, const D: usize> UnwindSafe for MultiVec<T, D>where
T: 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§fn combine_to_field_element<F, C>(&self) -> Result<F, Error>where
F: PrimeField,
C: ShareSetCombiner<I, S, F, F>,
fn combine_to_field_element<F, C>(&self) -> Result<F, Error>where
F: PrimeField,
C: ShareSetCombiner<I, S, F, F>,
Convert the given shares into a field element
Source§fn combine_to_group_element<G, C>(&self) -> Result<G, Error>
fn combine_to_group_element<G, C>(&self) -> Result<G, Error>
Convert the given shares into a group element
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)