diff --git a/.gitignore b/.gitignore index 51fa643..46b1663 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .idea/ -cmake-build-debug/* +cmake-*/* cmake-build-debug-wsl/* build*/ .vscode/ diff --git a/src/Function2D.h b/src/Function2D.h index 3a3bbec..1429e95 100644 --- a/src/Function2D.h +++ b/src/Function2D.h @@ -148,6 +148,13 @@ namespace Aurora Matrix dot(const Matrix &aMatrix, const Matrix &aOther, FunctionDirection direction = Column); + /** + * 转换下标为索引值 + * @attention 索引值按照其实为1与matlab对应,在C++中使用需要-1 + * @param aVMatrixSize + * @param aSliceIdxs + * @return + */ Matrix sub2ind(const Matrix &aVMatrixSize, std::initializer_list aSliceIdxs); };