Add matrix equality operator

This commit is contained in:
Pavel Krajcevski 2014-03-20 18:33:24 -04:00
parent 125809d721
commit 675ebc28a1

View file

@ -77,6 +77,16 @@ namespace FasTC {
return ret; return ret;
} }
// Equality operator
template<typename _T>
bool operator==(MatrixBase<_T, nRows, nCols> &other) const {
bool result = true;
for(int i = 0; i < Size; i++) {
result = result && (mat[i] == other[i]);
}
return result;
}
// Matrix multiplication // Matrix multiplication
template<typename _T, const int nTarget> template<typename _T, const int nTarget>
MatrixBase<T, nRows, nTarget> MultiplyMatrix(const MatrixBase<_T, nCols, nTarget> &m) const { MatrixBase<T, nRows, nTarget> MultiplyMatrix(const MatrixBase<_T, nCols, nTarget> &m) const {