Work on testing.

This commit is contained in:
jgoppert
2015-11-05 10:44:21 -05:00
parent a703c8169e
commit f7b1c63b86
12 changed files with 242 additions and 165 deletions
+39
View File
@@ -293,6 +293,45 @@ public:
}
}
Matrix<Type, M, N> abs()
{
Matrix<Type, M, N> r;
for (int i=0; i<M; i++) {
for (int j=0; j<M; j++) {
r(i,j) = fabs((*this)(i,j));
}
}
return r;
}
Type max()
{
Type max = (*this)(0,0);
for (int i=0; i<M; i++) {
for (int j=0; j<M; j++) {
Type val = (*this)(i,j);
if (val > max) {
max = val;
}
}
}
return max;
}
Type min()
{
Type min = (*this)(0,0);
for (int i=0; i<M; i++) {
for (int j=0; j<M; j++) {
Type val = (*this)(i,j);
if (val < min) {
min = val;
}
}
}
return min;
}
};
template<typename Type, size_t M, size_t N>