nalgebra/examples
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
..
cargo Release nalgebra v0.21.0 2020-04-05 23:19:10 +02:00
dimensional_genericity.rs Run cargo fmt. 2020-04-05 18:49:48 +02:00
homogeneous_coordinates.rs Run rustfmt. 2018-11-06 18:32:20 +01:00
linear_system_resolution.rs Add an example for the resolution of a linear system. 2018-11-10 13:57:40 +01:00
matrix_construction.rs Add methods for in-place reshaping of matrices 2020-10-25 15:37:18 +01:00
matrixcompare.rs Improve matrixcompare example 2020-06-29 19:03:20 +02:00
mvp.rs Run rust fmt. 2018-02-03 13:59:05 +01:00
point_construction.rs Implement From<Vector> for Point. 2018-10-27 15:00:18 +02:00
raw_pointer.rs Run rust fmt. 2018-02-03 13:59:05 +01:00
reshaping.rs Add methods for in-place reshaping of matrices 2020-10-25 15:37:18 +01:00
scalar_genericity.rs Fix compilation of tests. 2020-03-21 23:44:24 +01:00
screen_to_view_coords.rs Run rust fmt. 2018-02-03 13:59:05 +01:00
transform_conversion.rs Fix compilation of tests. 2020-03-21 23:44:24 +01:00
transform_matrix4.rs Fix compilation of tests. 2020-03-21 23:44:24 +01:00
transform_vector_point3.rs Fix compilation of tests. 2020-03-21 23:44:24 +01:00
transform_vector_point.rs Run rustfmt. 2018-11-06 18:32:20 +01:00
transformation_pointer.rs Run rust fmt. 2018-02-03 13:59:05 +01:00
unit_wrapper.rs Run rust fmt. 2018-02-03 13:59:05 +01:00