Trait bevy_rapier3d::prelude::nalgebra::base::allocator::Reallocator[][src]

pub trait Reallocator<T, RFrom, CFrom, RTo, CTo>: Allocator<T, RFrom, CFrom> + Allocator<T, RTo, CTo> where
    T: Scalar,
    RTo: Dim,
    CTo: Dim,
    RFrom: Dim,
    CFrom: Dim
{ unsafe fn reallocate_copy(
        nrows: RTo,
        ncols: CTo,
        buf: Self::Buffer
    ) -> Self::Buffer; }
Expand description

A matrix reallocator. Changes the size of the memory buffer that initially contains (RFrom × CFrom) elements to a smaller or larger size (RTo, CTo).

Required methods

Reallocates a buffer of shape (RTo, CTo), possibly reusing a previously allocated buffer buf. Data stored by buf are linearly copied to the output:

  • The copy is performed as if both were just arrays (without a matrix structure).
  • If buf is larger than the output size, then extra elements of buf are truncated.
  • If buf is smaller than the output size, then extra elements of the output are left uninitialized.

Implementors