[−][src]Trait nalgebra::base::allocator::Reallocator
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
unsafe fn reallocate_copy(
nrows: RTo,
ncols: CTo,
buf: Self::Buffer
) -> Self::Buffer
nrows: RTo,
ncols: CTo,
buf: Self::Buffer
) -> Self::Buffer
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 ofbuf
are truncated. - If
buf
is smaller than the output size, then extra elements of the output are left uninitialized.
Implementors
impl<N: Scalar, CFrom: Dim, CTo: Dim> Reallocator<N, Dynamic, CFrom, Dynamic, CTo> for DefaultAllocator
[src]
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: VecStorage<N, Dynamic, CFrom>
) -> VecStorage<N, Dynamic, CTo>
[src]
rto: Dynamic,
cto: CTo,
buf: VecStorage<N, Dynamic, CFrom>
) -> VecStorage<N, Dynamic, CTo>
impl<N: Scalar, CFrom: Dim, RTo: DimName> Reallocator<N, Dynamic, CFrom, RTo, Dynamic> for DefaultAllocator
[src]
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: VecStorage<N, Dynamic, CFrom>
) -> VecStorage<N, RTo, Dynamic>
[src]
rto: RTo,
cto: Dynamic,
buf: VecStorage<N, Dynamic, CFrom>
) -> VecStorage<N, RTo, Dynamic>
impl<N: Scalar, RFrom, CFrom, CTo> Reallocator<N, RFrom, CFrom, Dynamic, CTo> for DefaultAllocator where
RFrom: DimName,
CFrom: DimName,
CTo: Dim,
RFrom::Value: Mul<CFrom::Value>,
Prod<RFrom::Value, CFrom::Value>: ArrayLength<N>,
[src]
RFrom: DimName,
CFrom: DimName,
CTo: Dim,
RFrom::Value: Mul<CFrom::Value>,
Prod<RFrom::Value, CFrom::Value>: ArrayLength<N>,
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: ArrayStorage<N, RFrom, CFrom>
) -> VecStorage<N, Dynamic, CTo>
[src]
rto: Dynamic,
cto: CTo,
buf: ArrayStorage<N, RFrom, CFrom>
) -> VecStorage<N, Dynamic, CTo>
impl<N: Scalar, RFrom, CFrom, RTo> Reallocator<N, RFrom, CFrom, RTo, Dynamic> for DefaultAllocator where
RFrom: DimName,
CFrom: DimName,
RTo: DimName,
RFrom::Value: Mul<CFrom::Value>,
Prod<RFrom::Value, CFrom::Value>: ArrayLength<N>,
[src]
RFrom: DimName,
CFrom: DimName,
RTo: DimName,
RFrom::Value: Mul<CFrom::Value>,
Prod<RFrom::Value, CFrom::Value>: ArrayLength<N>,
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: ArrayStorage<N, RFrom, CFrom>
) -> VecStorage<N, RTo, Dynamic>
[src]
rto: RTo,
cto: Dynamic,
buf: ArrayStorage<N, RFrom, CFrom>
) -> VecStorage<N, RTo, Dynamic>
impl<N: Scalar, RFrom, CFrom, RTo, CTo> Reallocator<N, RFrom, CFrom, RTo, CTo> for DefaultAllocator where
RFrom: Dim,
CFrom: Dim,
RTo: DimName,
CTo: DimName,
Self: Allocator<N, RFrom, CFrom>,
RTo::Value: Mul<CTo::Value>,
Prod<RTo::Value, CTo::Value>: ArrayLength<N>,
[src]
RFrom: Dim,
CFrom: Dim,
RTo: DimName,
CTo: DimName,
Self: Allocator<N, RFrom, CFrom>,
RTo::Value: Mul<CTo::Value>,
Prod<RTo::Value, CTo::Value>: ArrayLength<N>,
unsafe fn reallocate_copy(
rto: RTo,
cto: CTo,
buf: Self::Buffer
) -> ArrayStorage<N, RTo, CTo>
[src]
rto: RTo,
cto: CTo,
buf: Self::Buffer
) -> ArrayStorage<N, RTo, CTo>
impl<N: Scalar, RFrom: DimName, CTo: Dim> Reallocator<N, RFrom, Dynamic, Dynamic, CTo> for DefaultAllocator
[src]
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: VecStorage<N, RFrom, Dynamic>
) -> VecStorage<N, Dynamic, CTo>
[src]
rto: Dynamic,
cto: CTo,
buf: VecStorage<N, RFrom, Dynamic>
) -> VecStorage<N, Dynamic, CTo>
impl<N: Scalar, RFrom: DimName, RTo: DimName> Reallocator<N, RFrom, Dynamic, RTo, Dynamic> for DefaultAllocator
[src]
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: VecStorage<N, RFrom, Dynamic>
) -> VecStorage<N, RTo, Dynamic>
[src]
rto: RTo,
cto: Dynamic,
buf: VecStorage<N, RFrom, Dynamic>
) -> VecStorage<N, RTo, Dynamic>