dimforge / dimforge/nalgebra

Add method to convert a Matrix into a Vec.

Open
#479 4 comments 2 reactions 0 assignees View on GitHub
enhancement good first issue P-medium
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

See https://github.com/rustsim/nalgebra/issues/473#issuecomment-440038489

The goal is to add an `.into_vec` method that would either unwrap the underlying `Vec` storage, or would perform a copy if the storage is not `MatrixVec`.

Note that one way of achieving this would be to add an implementation of `IntoIter` for `Matrix`. Then the `matrix.into_iter().collect()` will do the trick and will not perform any copy for matrices with a `MatrixVec` storage because of [that optimization](https://github.com/rust-lang/rust/issues/46084#issuecomment-345524508).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.