Type Alias extendr_api::wrapper::matrix::RMatrix3D

source ·
pub type RMatrix3D<T> = RArray<T, [usize; 3]>;

Aliased Type§

struct RMatrix3D<T> {
    robj: Robj,
    dim: [usize; 3],
    _data: PhantomData<T>,
}

Fields§

§robj: Robj

Owning Robj (probably should be a Pin).

§dim: [usize; 3]

Dimensions of the array.

§_data: PhantomData<T>

Implementations§

source§

impl<'a, T: ToVectorValue + 'a> RMatrix3D<T>
where Robj: AsTypedSlice<'a, T>,

source

pub fn new_matrix3d<F: Clone + FnMut(usize, usize, usize) -> T>( nrows: usize, ncols: usize, nmatrix: usize, f: F ) -> Self

source

pub fn nrows(&self) -> usize

Get the number of rows.

source

pub fn ncols(&self) -> usize

Get the number of columns.

source

pub fn nsub(&self) -> usize

Get the number of submatrices.

Trait Implementations§

source§

impl<'a, T: 'a> FromRobj<'a> for RMatrix3D<T>
where Robj: AsTypedSlice<'a, T>,

source§

fn from_robj(robj: &'a Robj) -> Result<Self, &'static str>

source§

impl<'a, T: 'a> TryFrom<Robj> for RMatrix3D<T>
where Robj: AsTypedSlice<'a, T>,

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(robj: Robj) -> Result<Self>

Performs the conversion.