Struct icu_segmenter::complex::lstm::matrix::MatrixBorrowed

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

A D-dimensional, borrowed matrix.

Fields§

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

Implementations§

source§

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

source

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

source

pub(super) fn as_slice(&self) -> &'a [f32]

source

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

source

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

source§

impl<'a> MatrixBorrowed<'a, 1>

source

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

source§

impl<'a> MatrixBorrowed<'a, 2>

source

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

source§

impl<'a> MatrixBorrowed<'a, 3>

source

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

source§

impl<'a> MatrixBorrowed<'a, 1>

source

pub(super) fn dot_1d(&self, other: MatrixZero<'_, 1>) -> f32

Trait Implementations§

source§

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

source§

fn clone(&self) -> MatrixBorrowed<'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 MatrixBorrowed<'a, D>

source§

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

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

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<'a, const D: usize> UnwindSafe for MatrixBorrowed<'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