feat(linalg): L0–L1 formula-first MatExpr plugin
Add plugins/linalg with symbol/mul/transpose/inv simplify (R1–R5), EN/ZH L1, CATALOG/ext add wiring, release native assets, and smokes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b6cceab218
commit
96da88e168
15 files changed
+1542
-22
No files matched your search
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: linalg formula smoke
|
||||
description: (AB)^T simplifies to B^T*A^T; ping ok.
|
||||
import la:ext/linalg/linalg.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
*`A` = > la.symbol name="A" rows=2 cols=3*
|
||||
*`B` = > la.symbol name="B" rows=3 cols=2*
|
||||
*`P` = > la.mul a=`A` b=`B`*
|
||||
*`T` = > la.transpose expr=`P`*
|
||||
*`S` = > la.simplify expr=`T`*
|
||||
*`txt` = > la.ascii expr=`S`*
|
||||
> print text=`txt`
|
||||
|
||||
*`ping` = > la.ping*
|
||||
*`ok` = ping[^ok]*
|
||||
1. `ok`
|
||||
> print text=ping-ok
|
||||
2. *
|
||||
> print text=ping-fail
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: 线性代数公式冒烟
|
||||
description: (AB)^T 化简为 B^T*A^T;探测 ok。
|
||||
import la:ext/linalg/线性代数.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
*`A` = > la.符号 名="A" 行=2 列=3*
|
||||
*`B` = > la.符号 名="B" 行=3 列=2*
|
||||
*`P` = > la.乘 左=`A` 右=`B`*
|
||||
*`T` = > la.转置 式=`P`*
|
||||
*`S` = > la.化简 式=`T`*
|
||||
*`txt` = > la.文本 式=`S`*
|
||||
> 打印 内容=`txt`
|
||||
|
||||
*`ping` = > la.探测*
|
||||
*`ok` = ping[^ok]*
|
||||
1. `ok`
|
||||
> 打印 内容=探测-ok
|
||||
2. *
|
||||
> 打印 内容=探测-fail
|
||||
@@ -2464,6 +2464,31 @@ txn-rollback-ok",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ext_linalg_formula_smoke() {
|
||||
let status = Command::new("cargo")
|
||||
.args(["build", "-p", "marqdo_plugin_linalg"])
|
||||
.current_dir(env!("CARGO_MANIFEST_DIR"))
|
||||
.status()
|
||||
.expect("build linalg plugin");
|
||||
assert!(status.success(), "failed to build marqdo_plugin_linalg");
|
||||
assert_out(
|
||||
"tests/ext/linalg-formula-smoke.mq.md",
|
||||
"B^T*A^T\nping-ok",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ext_linalg_zh_smoke() {
|
||||
let status = Command::new("cargo")
|
||||
.args(["build", "-p", "marqdo_plugin_linalg"])
|
||||
.current_dir(env!("CARGO_MANIFEST_DIR"))
|
||||
.status()
|
||||
.expect("build linalg plugin");
|
||||
assert!(status.success(), "failed to build marqdo_plugin_linalg");
|
||||
assert_out("tests/ext/linalg-zh-smoke.mq.md", "B^T*A^T\n探测-ok");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ext_quantum_bell_smoke() {
|
||||
let status = Command::new("cargo")
|
||||
|
||||
Reference in new issue
Block a user