4a6022d9bf
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. |
||
---|---|---|
.. | ||
cargo | ||
dimensional_genericity.rs | ||
homogeneous_coordinates.rs | ||
linear_system_resolution.rs | ||
matrix_construction.rs | ||
matrixcompare.rs | ||
mvp.rs | ||
point_construction.rs | ||
raw_pointer.rs | ||
reshaping.rs | ||
scalar_genericity.rs | ||
screen_to_view_coords.rs | ||
transform_conversion.rs | ||
transform_matrix4.rs | ||
transform_vector_point3.rs | ||
transform_vector_point.rs | ||
transformation_pointer.rs | ||
unit_wrapper.rs |