feat(linalg): L5 examples, public feature pages, and skill docs

Ship SVD / least-squares examples, heatmap-hinton draw paths, coerce
dense factors into MatExpr ops, and document ext/linalg in skill/README.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-07 14:36:17 +08:00
1 parent 70fb2fbfb2
commit 01287d9e7e
15 files changed
+238 -26

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# linalg-svd
Dense SVD via `ext/linalg`: singular values + structure / hinton SVG.
```bash
cargo build --release -p marqdo_plugin_linalg
marqdo ext add linalg
marqdo run examples/linalg-svd/index.mq.md
# optional: marqdo view examples/linalg-svd/
```
Design: [ext-linalg.md](../../doc/design/ext-linalg.md) · sibling: [linalg-least-squares](../linalg-least-squares/).
+25
View File
@@ -0,0 +1,25 @@
---
title: SVD structure demo
description: Diagonal SVD + structure SVG via ext/linalg.
import la:ext/linalg/linalg.mq.md
---
# SVD from a runnable document
A diagonal matrix has singular values on the diagonal. `factorize kind=svd` returns `U`, `S`, `Vt`; `draw kind=svd` writes a teaching structure SVG for `view`.
# main
`M` =
$$
\begin{bmatrix}4&0\\0&2\end{bmatrix}
$$
*`M` = > la.from_formula formula=`M`*
*`f` = > la.factorize matrix=`M` kind="svd"*
*`S` = f[^S]*
*`_` = > la.draw factor=`f` kind="svd" path="svd-structure.svg"*
*`hm` = > la.draw factor=`M` kind="hinton" path="svd-hinton.svg"*
> print text=`S`
> print text=svd-ok