Add intersect and intersect's unittest.

This commit is contained in:
sunwen
2023-04-26 16:43:09 +08:00
parent 9a3ec2805e
commit abe69eb26d
3 changed files with 80 additions and 1 deletions

View File

@@ -76,6 +76,14 @@ namespace Aurora {
Matrix auroraUnion(const Matrix& aMatrix1, const Matrix& aMatrix2);
Matrix intersect(const Matrix& aMatrix1, const Matrix& aMatrix2);
/**
* 并集
* @param aIa, [C,ia,~] = intersect(A,B)用法中ia的返回值
* @return 并集结果
*/
Matrix intersect(const Matrix& aMatrix1, const Matrix& aMatrix2, Matrix& aIa);
/**
* 多项式计算
* @brief 例如p[1 0 1],x[3 2 5],代表对多项式 y = x^2 + 1 求(x=3, x=2, x=5)时所有的y