Struct poseidon_parameters::Matrix
source · pub struct Matrix<F: PrimeField> {
pub elements: Vec<F>,
pub n_cols: usize,
pub n_rows: usize,
}
Expand description
Represents a matrix over PrimeField
elements.
This matrix can be used to represent row or column vectors.
Fields§
§elements: Vec<F>
Elements of the matrix.
n_cols: usize
Number of columns.
n_rows: usize
Number of rows.
Implementations§
source§impl<F: PrimeField> Matrix<F>
impl<F: PrimeField> Matrix<F>
sourcepub fn row_vector(&self, i: usize) -> Matrix<F>
pub fn row_vector(&self, i: usize) -> Matrix<F>
Get row vector at a specified row index
Trait Implementations§
source§impl<F: PrimeField> MatrixOperations<F> for Matrix<F>
impl<F: PrimeField> MatrixOperations<F> for Matrix<F>
source§impl<F: PrimeField> Mul<F> for Matrix<F>
impl<F: PrimeField> Mul<F> for Matrix<F>
Multiply scalar by Matrix
source§impl<F: PartialEq + PrimeField> PartialEq<Matrix<F>> for Matrix<F>
impl<F: PartialEq + PrimeField> PartialEq<Matrix<F>> for Matrix<F>
impl<F: Eq + PrimeField> Eq for Matrix<F>
impl<F: PrimeField> StructuralEq for Matrix<F>
impl<F: PrimeField> StructuralPartialEq for Matrix<F>
Auto Trait Implementations§
impl<F> RefUnwindSafe for Matrix<F>where F: RefUnwindSafe,
impl<F> Send for Matrix<F>
impl<F> Sync for Matrix<F>
impl<F> Unpin for Matrix<F>where F: Unpin,
impl<F> UnwindSafe for Matrix<F>where F: 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