Skip to content

Row-by-row version of from_iterator #850

Open
@RReverser

Description

@RReverser

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions