pub struct ArcMatrix<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize>(pub Matrix<N_ROWS, N_COLS, N_ELEMENTS>);
Expand description
Represents an matrix of round constants.
Arc stands for AddRoundConstant
which is the
step in the permutation where this matrix is used.
Tuple Fields§
§0: Matrix<N_ROWS, N_COLS, N_ELEMENTS>
Implementations§
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
pub fn transpose(&self) -> ArcMatrix<N_COLS, N_ROWS, N_ELEMENTS>
pub fn inner_elements(&self) -> [Fq; 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 ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Clone for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Debug for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Debug for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> MatrixOperations for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> MatrixOperations for ArcMatrix<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 ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> PartialEq for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Eq for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> StructuralPartialEq for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
Auto Trait Implementations§
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Freeze for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> RefUnwindSafe for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Send for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Sync for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Unpin for ArcMatrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> UnwindSafe for ArcMatrix<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