Skip to content

Behavior of mmulStrassen #114

@holub008

Description

@holub008

mmulStrassen does not compute a matrix multiplication, as its name implies.

new Matrix([[1, 2]]).mmulStrassen(new Matrix([[1,2],[3,4]])).to2DArray()
// returns [[7, 10], [0,0]]

The caller gets back a multiplication result, zero padded to a square matrix. I believe this is done intentionally in embed, see comment here. It's unclear why the returned result wouldn't be trimmed to the correct dimensions (perhaps it made the recursion easier to implement?).

While this may not be unintentional, I think it's misleading at best; it's not documented anywhere I could find.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions