diff --git a/Base/include/MatrixBase.h b/Base/include/MatrixBase.h index 9562766..ba431c1 100644 --- a/Base/include/MatrixBase.h +++ b/Base/include/MatrixBase.h @@ -73,7 +73,7 @@ namespace FasTC { // Matrix multiplication template - MatrixBase operator*(const MatrixBase<_T, nCols, nTarget> &m) { + MatrixBase MultiplyMatrix(const MatrixBase<_T, nCols, nTarget> &m) const { MatrixBase result; for(int r = 0; r < nRows; r++) for(int c = 0; c < nTarget; c++) { diff --git a/Base/include/VectorBase.h b/Base/include/VectorBase.h index c3df4b4..e313b90 100644 --- a/Base/include/VectorBase.h +++ b/Base/include/VectorBase.h @@ -198,7 +198,7 @@ namespace FasTC { MultSwitch(const TypeOne &a, const TypeTwo &b) : m_A(a), m_B(b) { } - ResultType GetMultiplication() { return m_A * m_B; } + ResultType GetMultiplication() const { return m_A * m_B; } }; template @@ -216,7 +216,7 @@ namespace FasTC { MultSwitch(const TypeOne &a, const TypeTwo &b) : m_A(a), m_B(b) { } - ResultType GetMultiplication() { return ScalarMultiply(m_B, m_A); } + ResultType GetMultiplication() const { return ScalarMultiply(m_B, m_A); } }; template @@ -234,7 +234,7 @@ namespace FasTC { MultSwitch(const TypeOne &a, const TypeTwo &b) : m_A(a), m_B(b) { } - ResultType GetMultiplication() { return ScalarMultiply(m_A, m_B); } + ResultType GetMultiplication() const { return ScalarMultiply(m_A, m_B); } }; template @@ -252,7 +252,7 @@ namespace FasTC { MultSwitch(const TypeOne &a, const TypeTwo &b) : m_A(a), m_B(b) { } - ResultType GetMultiplication() { return m_A.Dot(m_B); } + ResultType GetMultiplication() const { return m_A.Dot(m_B); } }; template