nalgebra/src/base
Nathan Kent 4a6022d9bf Add methods for in-place reshaping of matrices
There are two major additions in this commit. The first is a new storage
trait, `ReshapableStorage`, that can be implemented for storage types
that can be reshaped in-place. I have implemented this for both the
`ArrayStorage` and `VecStorage` types, as they are the most common and
they are just interpretations of a flat list.

The second is a `Matrix::reshape_generic` method that allows matrices to
be in-place reshaped provided that the underlying storage can handle it.
In practice, this means that the standard matrix types (`MatrixMN` and
`DMatrix`) can be resized to any size that has the same element count.
Resizing between array and vector storage is not implemented due to
`Storage` only being implemented for `VecStorage` variants where at
least one dimension is `Dynamic`.

Additionally, only the generic reshape function is added as it can be a
basis for other reshaping functions (see the resizing functions) and I
am not particularly in the mood to implement a variety of reshaping
methods.
2020-10-25 15:37:18 +01:00
..
alias_slice.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
alias.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
allocator.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
array_storage.rs Add methods for in-place reshaping of matrices 2020-10-25 15:37:18 +01:00
blas.rs Add missing dot-product dimension check. 2020-10-13 17:29:00 +02:00
cg.rs unrolled new_nonuniform_scaling_wrt_point 2020-07-05 13:29:08 -07:00
componentwise.rs Re-add inf/sup. 2020-03-24 19:05:47 +01:00
constraint.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
construction_slice.rs Run cargo fmt. 2020-06-07 09:07:25 +02:00
construction.rs Add Vector::ith_axis to build an unit vector with its i-th component set to 1. 2020-10-25 11:25:38 +01:00
conversion.rs Run rustfmt. 2020-04-05 23:19:10 +02:00
coordinates.rs Move Copy constraint from the definition of Scalar to all its use-sites. 2020-03-02 12:45:37 +01:00
default_allocator.rs Merge pull request #713 from rustsim/soa_simd 2020-04-05 21:16:48 +02:00
dimension.rs clippy: fix #redundant_field_names 2020-10-11 11:42:22 +02:00
edition.rs Add methods for in-place reshaping of matrices 2020-10-25 15:37:18 +01:00
helper.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
indexing.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
iter.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
matrix_alga.rs Re-add all the alga trait impls behind a feature. 2020-04-05 17:53:27 +02:00
matrix_simba.rs Replace alga by simba. 2020-03-21 12:16:46 +01:00
matrix_slice.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
matrix.rs clippy: fix #redundant_field_names 2020-10-11 11:42:22 +02:00
mod.rs Re-add all the alga trait impls behind a feature. 2020-04-05 17:53:27 +02:00
norm.rs Fix compilation of tests. 2020-04-05 18:33:03 +02:00
ops.rs More verbose DMatrix dim asserts where possible. 2020-06-22 17:18:53 -07:00
properties.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
scalar.rs Move Copy constraint from the definition of Scalar to all its use-sites. 2020-03-02 12:45:37 +01:00
statistics.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
storage.rs Add methods for in-place reshaping of matrices 2020-10-25 15:37:18 +01:00
swizzle.rs Move Copy constraint from the definition of Scalar to all its use-sites. 2020-03-02 12:45:37 +01:00
unit.rs Add missing docs. 2020-04-05 18:02:03 +02:00
vec_storage.rs Add methods for in-place reshaping of matrices 2020-10-25 15:37:18 +01:00