feat(linalg): L2 dense explicit, det, trace, and solve
Add dense kernels with element limits, from_formula for $$ matrices, and linalg-basic-smoke covering 2×2 det/trace/solve/explicit. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
96da88e168
commit
03aca7cdac
9 files changed
+742
-8
No files matched your search
@@ -115,6 +115,52 @@ Dense leaf from nested list.
|
||||
> ensure_plugin
|
||||
**> linalg_from_list data=`data`**
|
||||
|
||||
## from_formula
|
||||
+ `formula`
|
||||
|
||||
Absorb a `$$` numeric matrix formula (or nested list / dense map) as a dense leaf.
|
||||
|
||||
> ensure_plugin
|
||||
**> linalg_from_formula formula=`formula`**
|
||||
|
||||
## explicit
|
||||
+ `expr`
|
||||
|
||||
Evaluate a MatExpr tree of dense/eye/zero ops to `linalg_dense` (symbols rejected).
|
||||
|
||||
> ensure_plugin
|
||||
**> linalg_explicit expr=`expr`**
|
||||
|
||||
## det
|
||||
+ `expr`
|
||||
|
||||
> ensure_plugin
|
||||
**> linalg_det expr=`expr`**
|
||||
|
||||
## trace
|
||||
+ `expr`
|
||||
|
||||
> ensure_plugin
|
||||
**> linalg_trace expr=`expr`**
|
||||
|
||||
## solve
|
||||
+ `a`
|
||||
+ `b`
|
||||
|
||||
Solve `a x = b` (Gaussian elimination). Returns `linalg_solve`.
|
||||
|
||||
> ensure_plugin
|
||||
**> linalg_solve a=`a` b=`b`**
|
||||
|
||||
## matmul
|
||||
+ `a`
|
||||
+ `b`
|
||||
|
||||
Dense matrix product → `linalg_dense`.
|
||||
|
||||
> ensure_plugin
|
||||
**> linalg_matmul a=`a` b=`b`**
|
||||
|
||||
## symbol
|
||||
+ `name`
|
||||
+ `rows`
|
||||
|
||||
@@ -109,6 +109,50 @@ import sys:lib/sys.mq.md
|
||||
> 确保插件
|
||||
**> linalg_from_list data=`数据`**
|
||||
|
||||
## 自公式
|
||||
+ `公式`
|
||||
|
||||
吸收 `$$` 数值矩阵公式为稠密叶。
|
||||
|
||||
> 确保插件
|
||||
**> linalg_from_formula formula=`公式`**
|
||||
|
||||
## 求值
|
||||
+ `式`
|
||||
|
||||
将仅含稠密/单位/零阵运算的表达式求成 `linalg_dense`。
|
||||
|
||||
> 确保插件
|
||||
**> linalg_explicit expr=`式`**
|
||||
|
||||
## 行列式
|
||||
+ `式`
|
||||
|
||||
> 确保插件
|
||||
**> linalg_det expr=`式`**
|
||||
|
||||
## 迹
|
||||
+ `式`
|
||||
|
||||
> 确保插件
|
||||
**> linalg_trace expr=`式`**
|
||||
|
||||
## 求解
|
||||
+ `左`
|
||||
+ `右`
|
||||
|
||||
解 `左 · x = 右`,返回 `linalg_solve`。
|
||||
|
||||
> 确保插件
|
||||
**> linalg_solve a=`左` b=`右`**
|
||||
|
||||
## 稠密乘
|
||||
+ `左`
|
||||
+ `右`
|
||||
|
||||
> 确保插件
|
||||
**> linalg_matmul a=`左` b=`右`**
|
||||
|
||||
## 符号
|
||||
+ `名`
|
||||
+ `行`
|
||||
|
||||
Reference in new issue
Block a user