✨ feat(tsl-api-reference): add class and framework API lookup
This commit is contained in:
+51
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user