pub struct Matrix<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> {
pub elements: [Fq; N_ELEMENTS],
}
Expand description
Represents a matrix over PrimeField
elements.
This matrix can be used to represent row or column vectors.
Fields§
§elements: [Fq; N_ELEMENTS]
Elements of the matrix, stored in a fixed-size array.
Implementations§
Trait Implementations§
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Clone for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Clone for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Debug for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Debug for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> MatrixOperations for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> MatrixOperations for Matrix<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> Mul<Fq> for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
Multiply scalar by Matrix
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Mul<Fq> for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
Multiply scalar by Matrix
Source§impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> PartialEq for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> PartialEq for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Eq for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> StructuralPartialEq for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
Auto Trait Implementations§
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Freeze for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> RefUnwindSafe for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Send for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Sync for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> Unpin for Matrix<N_ROWS, N_COLS, N_ELEMENTS>
impl<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> UnwindSafe for Matrix<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