extendr_api::prelude::mat

Trait As2D

pub trait As2D<E>
where E: Entity,
{ // Required method fn as_2d_ref(&self) -> MatRef<'_, E>; }
Expand description

Trait for types that can be converted to a 2D matrix view.

This trait is implemented for any type that can be represented as a 2D matrix view, like Mat, Row, Col, and their respective references and mutable references. For a trait specific to the matrix family, see AsMatRef or AsMatMut.

Required Methods§

fn as_2d_ref(&self) -> MatRef<'_, E>

Convert to a 2D matrix view.

Implementations on Foreign Types§

§

impl<E, T> As2D<E> for &T
where E: Entity, T: As2D<E>,

§

fn as_2d_ref(&self) -> MatRef<'_, E>

§

impl<E, T> As2D<E> for &mut T
where E: Entity, T: As2D<E>,

§

fn as_2d_ref(&self) -> MatRef<'_, E>

Implementors§

§

impl<E> As2D<E> for Col<E>
where E: Entity,

§

impl<E> As2D<E> for ColMut<'_, E>
where E: Entity,

§

impl<E> As2D<E> for ColRef<'_, E>
where E: Entity,

§

impl<E> As2D<E> for Mat<E>
where E: Entity,

§

impl<E> As2D<E> for MatMut<'_, E>
where E: Entity,

§

impl<E> As2D<E> for MatRef<'_, E>
where E: Entity,

§

impl<E> As2D<E> for Row<E>
where E: Entity,

§

impl<E> As2D<E> for RowMut<'_, E>
where E: Entity,

§

impl<E> As2D<E> for RowRef<'_, E>
where E: Entity,