p3_matrix::stack

Struct VerticalPair

Source
pub struct VerticalPair<First, Second> {
    pub first: First,
    pub second: Second,
}
Expand description

A combination of two matrices, stacked together vertically.

Fields§

§first: First§second: Second

Implementations§

Source§

impl<First, Second> VerticalPair<First, Second>

Source

pub fn new<T>(first: First, second: Second) -> Self
where T: Send + Sync, First: Matrix<T>, Second: Matrix<T>,

Trait Implementations§

Source§

impl<First: Clone, Second: Clone> Clone for VerticalPair<First, Second>

Source§

fn clone(&self) -> VerticalPair<First, Second>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<First: Debug, Second: Debug> Debug for VerticalPair<First, Second>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Send + Sync, First: Matrix<T>, Second: Matrix<T>> Matrix<T> for VerticalPair<First, Second>

Source§

type Row<'a> = EitherRow<<First as Matrix<T>>::Row<'a>, <Second as Matrix<T>>::Row<'a>> where Self: 'a

Source§

fn width(&self) -> usize

Source§

fn height(&self) -> usize

Source§

fn get(&self, r: usize, c: usize) -> T

Source§

fn row(&self, r: usize) -> Self::Row<'_>

Source§

fn row_slice(&self, r: usize) -> impl Deref<Target = [T]>

Source§

fn dimensions(&self) -> Dimensions

Source§

fn rows(&self) -> impl Iterator<Item = Self::Row<'_>>

Source§

fn par_rows(&self) -> impl IndexedParallelIterator<Item = Self::Row<'_>>

Source§

fn first_row(&self) -> Self::Row<'_>

Source§

fn last_row(&self) -> Self::Row<'_>

Source§

fn to_row_major_matrix(self) -> RowMajorMatrix<T>
where Self: Sized, T: Clone,

Source§

fn horizontally_packed_row<'a, P>( &'a self, r: usize, ) -> (impl Iterator<Item = P> + Send + Sync, impl Iterator<Item = T> + Send + Sync)
where P: PackedValue<Value = T>, T: Clone + 'a,

Source§

fn padded_horizontally_packed_row<'a, P>( &'a self, r: usize, ) -> impl Iterator<Item = P> + Send + Sync
where P: PackedValue<Value = T>, T: Clone + Default + 'a,

Zero padded.
Source§

fn par_horizontally_packed_rows<'a, P>( &'a self, ) -> impl IndexedParallelIterator<Item = (impl Iterator<Item = P> + Send + Sync, impl Iterator<Item = T> + Send + Sync)>
where P: PackedValue<Value = T>, T: Clone + 'a,

Source§

fn par_padded_horizontally_packed_rows<'a, P>( &'a self, ) -> impl IndexedParallelIterator<Item = impl Iterator<Item = P> + Send + Sync>
where P: PackedValue<Value = T>, T: Clone + Default + 'a,

Source§

fn vertically_packed_row<P>(&self, r: usize) -> impl Iterator<Item = P>
where T: Copy, P: PackedValue<Value = T>,

Pack together a collection of adjacent rows from the matrix. Read more
Source§

fn vertically_packed_row_pair<P>(&self, r: usize, step: usize) -> Vec<P>
where T: Copy, P: PackedValue<Value = T>,

Pack together a collection of rows and “next” rows from the matrix. Read more
Source§

fn vertically_strided( self, stride: usize, offset: usize, ) -> VerticallyStridedMatrixView<Self>
where Self: Sized,

Source§

fn columnwise_dot_product<EF>(&self, v: &[EF]) -> Vec<EF>
where T: Field, EF: ExtensionField<T>,

Compute Mᵀv, aka premultiply this matrix by the given vector, aka scale each row by the corresponding entry in v and take the sum across rows. v can be a vector of extension elements.
Source§

fn dot_ext_powers<EF>( &self, base: EF, ) -> impl IndexedParallelIterator<Item = EF>
where T: Field, EF: ExtensionField<T>,

Multiply this matrix by the vector of powers of base, which is an extension element.
Source§

impl<First: Copy, Second: Copy> Copy for VerticalPair<First, Second>

Auto Trait Implementations§

§

impl<First, Second> Freeze for VerticalPair<First, Second>
where First: Freeze, Second: Freeze,

§

impl<First, Second> RefUnwindSafe for VerticalPair<First, Second>
where First: RefUnwindSafe, Second: RefUnwindSafe,

§

impl<First, Second> Send for VerticalPair<First, Second>
where First: Send, Second: Send,

§

impl<First, Second> Sync for VerticalPair<First, Second>
where First: Sync, Second: Sync,

§

impl<First, Second> Unpin for VerticalPair<First, Second>
where First: Unpin, Second: Unpin,

§

impl<First, Second> UnwindSafe for VerticalPair<First, Second>
where First: UnwindSafe, Second: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more