Type Alias extendr_api::wrapper::matrix::RMatrix
source · pub type RMatrix<T> = RArray<T, [usize; 2]>;Aliased Type§
struct RMatrix<T> { /* private fields */ }Implementations§
source§impl<T> RMatrix<T>
impl<T> RMatrix<T>
pub fn get_colnames(&self) -> Robj
pub fn get_rownames(&self) -> Robj
source§impl<T> RMatrix<T>
impl<T> RMatrix<T>
sourcepub fn new_matrix<F: Clone + FnMut(usize, usize) -> T>(
nrows: usize,
ncols: usize,
f: F,
) -> Self
pub fn new_matrix<F: Clone + FnMut(usize, usize) -> T>( nrows: usize, ncols: usize, f: F, ) -> Self
Create a new matrix wrapper.
§Arguments
nrows- the number of rows the returned matrix will havencols- the number of columns the returned matrix will havef- a function that will be called for each entry of the matrix in order to populate it with values. It must return a scalar value that can be converted to an R scalar, such asi32,u32, orf64, i.e. see ToVectorValue. It accepts two arguments:r- the current row of the entry we are creatingc- the current column of the entry we are creating
Trait Implementations§
source§impl From<Mat<f64>> for RMatrix<f64>
impl From<Mat<f64>> for RMatrix<f64>
Convert a faer::Mat<f64> into an RMatrix<f64> which is not NA aware.
source§impl From<MatRef<'_, f64>> for RMatrix<f64>
impl From<MatRef<'_, f64>> for RMatrix<f64>
Convert a faer::Mat<f64> into an RMatrix<f64> which is not NA aware.