pub struct Matrix<F: Field> { /* private fields */ }
Expand description
A matrix over a field.
Implementations§
source§impl<F: Field> Matrix<F>
impl<F: Field> Matrix<F>
pub fn new(m: usize, n: usize, elements: &[F]) -> Result<Self, Error>
pub fn zeros(m: usize, n: usize) -> Self
pub fn identity(n: usize) -> Self
pub fn elements(&self) -> &[F]
pub fn random(m: usize, n: usize, rng: impl RngCore) -> Self
pub fn dim(&self) -> (usize, usize)
pub fn copy_from(&mut self, other: &Self)
pub fn mul_into(a: &Self, b: &Self, c: &mut Self)
pub fn mul_vec_into<FE: ExtensionField<F>>(&self, x: &[FE], y: &mut [FE])
Trait Implementations§
source§impl<F: Field> AddAssign<&Matrix<F>> for Matrix<F>
impl<F: Field> AddAssign<&Matrix<F>> for Matrix<F>
source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
Performs the
+=
operation. Read moresource§impl<F: Field> SubAssign<&Matrix<F>> for Matrix<F>
impl<F: Field> SubAssign<&Matrix<F>> for Matrix<F>
source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
Performs the
-=
operation. Read moreimpl<F: Eq + Field> Eq for Matrix<F>
impl<F: Field> StructuralPartialEq for Matrix<F>
Auto Trait Implementations§
impl<F> Freeze for Matrix<F>
impl<F> RefUnwindSafe for Matrix<F>
impl<F> Send for Matrix<F>
impl<F> Sync for Matrix<F>
impl<F> Unpin for Matrix<F>
impl<F> UnwindSafe for Matrix<F>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more