This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · lib/linalg

An inverse and a reproducible test matrix

Two things that belong under lib/schur, lib/are, lib/lyap, lib/svd and lib/balance rather than inside any one of them.

inverse solves against each column of the identity. It is here for the places where the inverse itself is needed, such as Newton's iteration for the matrix sign function; anywhere the answer is M^-1 b or M^-1 B, call lin_solve on the right-hand side instead and do not form the inverse at all.

test_matrix is a deterministic mess: the same linear congruential generator every time, so a test that passes today passes tomorrow, and entries with no structure for an algorithm to accidentally exploit. Every module in the library tests against matrices from it.

Used with import linalg.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 21–82