Add polyval to Function1D

This commit is contained in:
Krad
2023-04-23 11:12:00 +08:00
parent 5e85d0f361
commit 57e712a006
5 changed files with 43 additions and 27 deletions

View File

@@ -48,6 +48,16 @@ namespace Aurora {
Matrix repmat(const Matrix& aMatrix,int aRowTimes, int aColumnTimes, int aSliceTimes);
Matrix log(const Matrix& aMatrix, int aBaseNum = -1);
/**
* 多项式计算
* @brief 例如p[1 0 1],x[3 2 5],代表对多项式 y = x^2 + 1 求(x=3, x=2, x=5)时所有的y
* @attention 本函数的数据一律视为向量,在计算时会完全忽视维度,值考虑作为数组输入
* @param aP 多项式系数,指定为向量
* @param aX 查询点,指定为向量
* @return 查询结果
*/
Matrix polyval(const Matrix& aP, const Matrix& aX);
};