Linear algebra library for Rust.
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. |
||
---|---|---|
.circleci | ||
.github | ||
benches | ||
ci | ||
examples | ||
nalgebra-glm | ||
nalgebra-lapack | ||
src | ||
tests | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
CHANGELOG.md | ||
LICENSE | ||
Makefile | ||
README.md | ||
rustfmt.toml |