Type Definition nalgebra::base::UninitMatrix

source ·
pub type UninitMatrix<T, R, C> = Matrix<MaybeUninit<T>, R, C, OwnedUninit<T, R, C>>;
Expand description

An owned matrix with uninitialized data.

Implementations§

source§

impl<T: Scalar, R: Dim, C: Dim> UninitMatrix<T, R, C>where DefaultAllocator: Allocator<T, R, C>,

source

pub fn uninit(nrows: R, ncols: C) -> Self

Builds a matrix with uninitialized elements of type MaybeUninit<T>.

source§

impl<T, R: Dim, C: Dim> UninitMatrix<T, R, C>where DefaultAllocator: Allocator<T, R, C>,

source

pub unsafe fn assume_init(self) -> OMatrix<T, R, C>

Assumes a matrix’s entries to be initialized. This operation should be near zero-cost.

Safety

The user must make sure that every single entry of the buffer has been initialized, or Undefined Behavior will immediately occur.