feat(tsl-api-reference): add class and framework API lookup

This commit is contained in:
csh
2026-08-20 13:49:55 +08:00
parent 7233646398
commit 651c1f68d2
637 changed files with 25498 additions and 36673 deletions
@@ -0,0 +1,51 @@
# 数学函数 / 数值计算 / 数值微积分
## `hessian(fun, x)`
声明:function
海塞矩阵 求解函数 fun 在x点的 海塞矩阵
| 参数 | 类型 | 说明 |
| ----- | ------ | ---------------- |
| `fun` | string | 字符串,函数名 |
| `x` | array | 一维数组,指定点 |
返回:array
### 示例
```tsl
return hessian("Hessian.demo", array(3, 4));
```
## `integral(call_back, a, b, method)`
声明:function
求函数的数值积分
| 参数 | 类型 | 说明 |
| ----------- | ------ | -------------------- |
| `call_back` | string | 计算被积函数值的回调 |
| `a` | double | 实型变量。积分下限 |
| `b` | double | 实型变量。积分上限 |
| `method` | string | 积分方法 |
返回:double
### 示例
范例01:使用 Romberg 方法计算积分
```tsl
function fun1(x);
begin
return 2 * x + 1;
end;
a := 1;
b := 3;
callback := "fun1";
return integral(callback, a, b, 'romberg');
// 输出:10
```