pub struct OptimizedArcMatrix<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize>(pub ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>);
Expand description
Represents an optimized matrix of round constants.
This modifies the partial rounds in the middle of the permutation, wherein you add constants first before iterating through the partial rounds.
This method follows calc_equivalent_constants
from Appendix B’s
poseidonperm_x3_64_24_optimized.sage
.
Tuple Fields§
§0: ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Implementations§
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
pub fn transpose(&self) -> OptimizedArcMatrix<N_COLS, N_ROWS, N_ELEMENTS>
Sourcepub const fn new_from_known(elements: [Fq; N_ELEMENTS]) -> Self
pub const fn new_from_known(elements: [Fq; N_ELEMENTS]) -> Self
Create a new matrix from a slice of elements.
Trait Implementations§
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Clone for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Clone for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Source§fn clone(&self) -> OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
fn clone(&self) -> OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
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<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Debug for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Debug for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> MatrixOperations for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> MatrixOperations for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Source§fn hadamard_product(&self, rhs: &Self) -> Result<Self, PoseidonParameterError>where
Self: Sized,
fn hadamard_product(&self, rhs: &Self) -> Result<Self, PoseidonParameterError>where
Self: Sized,
Compute Hadamard (element-wise) product
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> PartialEq for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> PartialEq for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Source§fn eq(&self, other: &OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>) -> bool
fn eq(&self, other: &OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Eq for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> StructuralPartialEq for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Auto Trait Implementations§
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Freeze for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> RefUnwindSafe for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Send for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Sync for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Unpin for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> UnwindSafe for OptimizedArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
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