dimforge / dimforge/nalgebra

Row-by-row version of from_iterator

Open
#850 3 comments 1 reaction 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

Forgive me if this already exists, because I couldn't find it in the docs, but is there a way to construct a matrix row-by-row using an iterator? (for cases when source data structure already represents them in row-by-row form)

Currently the only way I found is creating matrix `NxM` using `from_iterator`, and then invoking `transpose` to get `MxN`, but this is rather inefficient - first, it needs to fill in matrix in incorrect order, then construct a separate matrix (`transpose_mut` fails because it says it works only on square matrices), and then walk over all the temporary data rearranging items in correct order.

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.