Struct icu_segmenter::complex::lstm::matrix::MatrixZero

source ·
pub(super) struct MatrixZero<'a, const D: usize> {
    data: &'a ZeroSlice<f32>,
    dims: [usize; D],
}
Expand description

A D-dimensional matrix borrowed from a ZeroSlice.

Fields§

§data: &'a ZeroSlice<f32>§dims: [usize; D]

Implementations§

source§

impl<'a> MatrixZero<'a, 1>

source

pub(super) fn dim(&self) -> usize

source§

impl<'a> MatrixZero<'a, 2>

source

pub(super) fn dim(&self) -> (usize, usize)

source§

impl<'a> MatrixZero<'a, 3>

source

pub(super) fn dim(&self) -> (usize, usize, usize)

source§

impl<'a, const D: usize> MatrixZero<'a, D>

source

pub(super) fn to_owned(&self) -> MatrixOwned<D>

source

pub(super) fn as_slice(&self) -> &ZeroSlice<f32>

source

pub(super) fn debug_assert_dims(&self, dims: [usize; D])

source

pub(super) fn submatrix<const M: usize>( &self, index: usize, ) -> Option<MatrixZero<'a, M>>

source

fn submatrix_range<const M: usize>( &self, index: usize, ) -> (Range<usize>, [usize; M])

Trait Implementations§

source§

impl<'a, const D: usize> Clone for MatrixZero<'a, D>

source§

fn clone(&self) -> MatrixZero<'a, D>

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<'a, const D: usize> Debug for MatrixZero<'a, D>

source§

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

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

impl<'a> From<&'a LstmMatrix1<'a>> for MatrixZero<'a, 1>

source§

fn from(other: &'a LstmMatrix1<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a LstmMatrix2<'a>> for MatrixZero<'a, 2>

source§

fn from(other: &'a LstmMatrix2<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a LstmMatrix3<'a>> for MatrixZero<'a, 3>

source§

fn from(other: &'a LstmMatrix3<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a, const D: usize> Copy for MatrixZero<'a, D>

Auto Trait Implementations§

§

impl<'a, const D: usize> Freeze for MatrixZero<'a, D>

§

impl<'a, const D: usize> RefUnwindSafe for MatrixZero<'a, D>

§

impl<'a, const D: usize> Send for MatrixZero<'a, D>

§

impl<'a, const D: usize> Sync for MatrixZero<'a, D>

§

impl<'a, const D: usize> Unpin for MatrixZero<'a, D>

§

impl<'a, const D: usize> UnwindSafe for MatrixZero<'a, D>

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T