Struct nalgebra::base::default_allocator::DefaultAllocator [−][src]
pub struct DefaultAllocator;
Expand description
An allocator based on GenericArray
and VecStorage
for statically-sized and dynamically-sized
matrices respectively.
Trait Implementations
type Buffer = VecStorage<N, Dynamic, C>
type Buffer = VecStorage<N, Dynamic, C>
The type of buffer this allocator can instanciate.
Allocates a buffer with the given number of rows and columns without initializing its content.
fn allocate_from_iterator<I: IntoIterator<Item = N>>(
nrows: Dynamic,
ncols: C,
iter: I
) -> Self::Buffer
fn allocate_from_iterator<I: IntoIterator<Item = N>>(
nrows: Dynamic,
ncols: C,
iter: I
) -> Self::Buffer
Allocates a buffer initialized with the content of the given iterator.
type Buffer = ArrayStorage<N, R, C>
type Buffer = ArrayStorage<N, R, C>
The type of buffer this allocator can instanciate.
Allocates a buffer with the given number of rows and columns without initializing its content.
fn allocate_from_iterator<I: IntoIterator<Item = N>>(
nrows: R,
ncols: C,
iter: I
) -> Self::Buffer
fn allocate_from_iterator<I: IntoIterator<Item = N>>(
nrows: R,
ncols: C,
iter: I
) -> Self::Buffer
Allocates a buffer initialized with the content of the given iterator.
type Buffer = VecStorage<N, R, Dynamic>
type Buffer = VecStorage<N, R, Dynamic>
The type of buffer this allocator can instanciate.
Allocates a buffer with the given number of rows and columns without initializing its content.
fn allocate_from_iterator<I: IntoIterator<Item = N>>(
nrows: R,
ncols: Dynamic,
iter: I
) -> Self::Buffer
fn allocate_from_iterator<I: IntoIterator<Item = N>>(
nrows: R,
ncols: Dynamic,
iter: I
) -> Self::Buffer
Allocates a buffer initialized with the content of the given iterator.
impl<N: Scalar, CFrom: Dim, CTo: Dim> Reallocator<N, Dynamic, CFrom, Dynamic, CTo> for DefaultAllocator
impl<N: Scalar, CFrom: Dim, CTo: Dim> Reallocator<N, Dynamic, CFrom, Dynamic, CTo> for DefaultAllocator
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: VecStorage<N, Dynamic, CFrom>
) -> VecStorage<N, Dynamic, CTo>
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: VecStorage<N, Dynamic, CFrom>
) -> VecStorage<N, Dynamic, CTo>
Reallocates a buffer of shape (RTo, CTo)
, possibly reusing a previously allocated buffer
buf
. Data stored by buf
are linearly copied to the output: Read more
impl<N: Scalar, CFrom: Dim, RTo: DimName> Reallocator<N, Dynamic, CFrom, RTo, Dynamic> for DefaultAllocator
impl<N: Scalar, CFrom: Dim, RTo: DimName> Reallocator<N, Dynamic, CFrom, RTo, Dynamic> for DefaultAllocator
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: VecStorage<N, Dynamic, CFrom>
) -> VecStorage<N, RTo, Dynamic>
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: VecStorage<N, Dynamic, CFrom>
) -> VecStorage<N, RTo, Dynamic>
Reallocates a buffer of shape (RTo, CTo)
, possibly reusing a previously allocated buffer
buf
. Data stored by buf
are linearly copied to the output: Read more
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>,
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>,
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: ArrayStorage<N, RFrom, CFrom>
) -> VecStorage<N, Dynamic, CTo>
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: ArrayStorage<N, RFrom, CFrom>
) -> VecStorage<N, Dynamic, CTo>
Reallocates a buffer of shape (RTo, CTo)
, possibly reusing a previously allocated buffer
buf
. Data stored by buf
are linearly copied to the output: Read more
unsafe fn reallocate_copy(
rto: RTo,
cto: CTo,
buf: <Self as Allocator<N, RFrom, CFrom>>::Buffer
) -> ArrayStorage<N, RTo, CTo>
unsafe fn reallocate_copy(
rto: RTo,
cto: CTo,
buf: <Self as Allocator<N, RFrom, CFrom>>::Buffer
) -> ArrayStorage<N, RTo, CTo>
Reallocates a buffer of shape (RTo, CTo)
, possibly reusing a previously allocated buffer
buf
. Data stored by buf
are linearly copied to the output: Read more
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>,
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>,
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: ArrayStorage<N, RFrom, CFrom>
) -> VecStorage<N, RTo, Dynamic>
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: ArrayStorage<N, RFrom, CFrom>
) -> VecStorage<N, RTo, Dynamic>
Reallocates a buffer of shape (RTo, CTo)
, possibly reusing a previously allocated buffer
buf
. Data stored by buf
are linearly copied to the output: Read more
impl<N: Scalar, RFrom: DimName, CTo: Dim> Reallocator<N, RFrom, Dynamic, Dynamic, CTo> for DefaultAllocator
impl<N: Scalar, RFrom: DimName, CTo: Dim> Reallocator<N, RFrom, Dynamic, Dynamic, CTo> for DefaultAllocator
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: VecStorage<N, RFrom, Dynamic>
) -> VecStorage<N, Dynamic, CTo>
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
buf: VecStorage<N, RFrom, Dynamic>
) -> VecStorage<N, Dynamic, CTo>
Reallocates a buffer of shape (RTo, CTo)
, possibly reusing a previously allocated buffer
buf
. Data stored by buf
are linearly copied to the output: Read more
impl<N: Scalar, RFrom: DimName, RTo: DimName> Reallocator<N, RFrom, Dynamic, RTo, Dynamic> for DefaultAllocator
impl<N: Scalar, RFrom: DimName, RTo: DimName> Reallocator<N, RFrom, Dynamic, RTo, Dynamic> for DefaultAllocator
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: VecStorage<N, RFrom, Dynamic>
) -> VecStorage<N, RTo, Dynamic>
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
buf: VecStorage<N, RFrom, Dynamic>
) -> VecStorage<N, RTo, Dynamic>
Reallocates a buffer of shape (RTo, CTo)
, possibly reusing a previously allocated buffer
buf
. Data stored by buf
are linearly copied to the output: Read more
impl<N, R1, R2, C1, C2> SameShapeAllocator<N, R1, C1, R2, C2> for DefaultAllocator where
R1: Dim,
R2: Dim,
C1: Dim,
C2: Dim,
N: Scalar,
DefaultAllocator: Allocator<N, R1, C1> + Allocator<N, SameShapeR<R1, R2>, SameShapeC<C1, C2>>,
ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,
impl<N, R1, R2> SameShapeVectorAllocator<N, R1, R2> for DefaultAllocator where
R1: Dim,
R2: Dim,
N: Scalar,
DefaultAllocator: Allocator<N, R1, U1> + Allocator<N, SameShapeR<R1, R2>>,
ShapeConstraint: SameNumberOfRows<R1, R2>,
Auto Trait Implementations
impl RefUnwindSafe for DefaultAllocator
impl Send for DefaultAllocator
impl Sync for DefaultAllocator
impl Unpin for DefaultAllocator
impl UnwindSafe for DefaultAllocator
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.