Multi-column matrix solve

Open
#270 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
data

Research direction

Start by locating the existing Rust solve implementation and its LAPACK dgesv binding. Extend the behavior from a vector right-hand side to an NxK matrix right-hand side, then verify that solving produces an NxK solution for multiple independent columns.

Written by the indexing model from the issue text.

Description

Solve currently implements Ax = b for known NxN matrix A and known N-dimensional vector b, resulting in a N-dimensional solution vector x. A common generalization is Ax = B for the same A, but with B now being a NxK dimensional matrix and x being solved as an NxK dimensional matrix itself.

This generalization is on one hand somewhat trivial as it can be performed via iterated solving for each of the K columns of B independently and could be reasonably implemented in Rust via that method. However, the LAPACK dgesv method already handles this generalization and thus it may be a small generalization of existing solving code to allow it.

As a practical application, this generalized solve is useful for computing Kalman filters where the optimal Kalman gain is computed as PH'/S where PH' is a full matrix whenever the observation space is multidimensional. While S is often well-behaved, it would be ideal to compute the gain via a solve routine as opposed to an invert-and-multiply.

Dominant language
Rust
Stars
452
Forks
95
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-ndarray/ndarray-linalg

All issues in rust-ndarray/ndarray-linalg

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.