Trait MatIndex

Source
pub trait MatIndex<RowRange, ColRange>: Seal + Sized {
    type Target;

    // Required method
    fn get(this: Self, row: RowRange, col: ColRange) -> Self::Target;

    // Provided method
    unsafe fn get_unchecked(
        this: Self,
        row: RowRange,
        col: ColRange,
    ) -> Self::Target { ... }
}
Expand description

Represents a type that can be used to slice a matrix, such as an index or a range of indices.

Required Associated Types§

Source

type Target

Resulting type of the indexing operation.

Required Methods§

Source

fn get(this: Self, row: RowRange, col: ColRange) -> Self::Target

Index the matrix at (row, col).

Provided Methods§

Source

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange, ) -> Self::Target

Index the matrix at (row, col), without bound checks.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, E: Entity> MatIndex<usize, usize> for MatMut<'a, E>

Source§

type Target = <<E as Entity>::Group as ForType>::FaerOf<&'a mut <E as Entity>::Unit>

Source§

impl<'a, E: Entity> MatIndex<usize, usize> for MatRef<'a, E>

Source§

type Target = <<E as Entity>::Group as ForType>::FaerOf<&'a <E as Entity>::Unit>

Source§

impl<'a, E: Entity> MatIndex<RangeFull, usize> for MatMut<'a, E>

Source§

impl<'a, E: Entity> MatIndex<RangeFull, usize> for MatRef<'a, E>

Source§

impl<E: Entity> MatIndex<usize, Range<usize>> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<usize, Range<usize>> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<Range<usize>, usize> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<Range<usize>, usize> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<Range<usize>, Range<usize>> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<Range<usize>, Range<usize>> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeFrom<usize>, usize> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeFrom<usize>, usize> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeFrom<usize>, Range<usize>> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeFrom<usize>, Range<usize>> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeFull, Range<usize>> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeFull, Range<usize>> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeInclusive<usize>, usize> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeInclusive<usize>, usize> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeInclusive<usize>, Range<usize>> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeInclusive<usize>, Range<usize>> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeTo<usize>, usize> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeTo<usize>, usize> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeTo<usize>, Range<usize>> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeTo<usize>, Range<usize>> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeToInclusive<usize>, usize> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeToInclusive<usize>, usize> for MatRef<'_, E>

Source§

impl<E: Entity> MatIndex<RangeToInclusive<usize>, Range<usize>> for MatMut<'_, E>

Source§

impl<E: Entity> MatIndex<RangeToInclusive<usize>, Range<usize>> for MatRef<'_, E>

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeFrom<usize>> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseMut<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeFrom<usize>> for MatRef<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeFull> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseMut<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeFull> for MatRef<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeInclusive<usize>> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseMut<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeInclusive<usize>> for MatRef<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeTo<usize>> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseMut<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeTo<usize>> for MatRef<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeToInclusive<usize>> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseMut<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target

Source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeToInclusive<usize>> for MatRef<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

Source§

type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target