pub type RMatrix<T> = RArray<T, [usize; 2]>;
Aliased Type§
struct RMatrix<T> {
robj: Robj,
dim: [usize; 2],
_data: PhantomData<T>,
}
Fields§
§robj: Robj
Owning Robj (probably should be a Pin).
dim: [usize; 2]
Dimensions of the array.
_data: PhantomData<T>
Implementations§
Source§impl<T> RMatrix<T>
impl<T> RMatrix<T>
pub fn get_colnames(&self) -> Option<Strings>
pub fn get_rownames(&self) -> Option<Strings>
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.