extendr_api::prelude::modules::core

Trait AsMatRef

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

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

This trait is implemented for types of the matrix family, like Mat, MatRef, and MatMut, but not for types like Col, Row, or their families. For a more general trait, see As2D.

Required Methods§

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

Convert to a matrix view.

Implementations on Foreign Types§

§

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

§

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

§

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

§

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

Implementors§

§

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

§

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

§

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