Add new max function

This commit is contained in:
kradchen
2023-05-19 13:44:00 +08:00
parent 3b894d24bf
commit e32367b7dc
2 changed files with 16 additions and 1 deletions

View File

@@ -359,6 +359,12 @@ Matrix Aurora::max(const Matrix &aMatrix, const Matrix &aOther) {
}
}
Matrix Aurora::max(const Matrix &aMatrix, const double aValue){
double *output = malloc(1);
output[0] = aValue;
return max(aMatrix,Matrix::New(output, 1,1,1));
}
Matrix Aurora::sum(const Matrix &aMatrix, FunctionDirection direction) {
if (aMatrix.getDimSize(2)>1 ) {
std::cerr<< "sum() not support 3D data!"