From 205f2459063a123cabd83fb66b3880a72fb357bf Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 23 Jun 2017 21:19:11 +0100 Subject: Continuing tests --- include/YAGE/Math/matrix.hpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/YAGE/Math/matrix.hpp b/include/YAGE/Math/matrix.hpp index d4566c98..d1c5fd74 100644 --- a/include/YAGE/Math/matrix.hpp +++ b/include/YAGE/Math/matrix.hpp @@ -235,6 +235,22 @@ Matrix operator-(const T &lhs, Matrix rhs) return rhs; } +template +bool operator==(const Matrix &lhs, const Matrix &rhs) +{ + for(int i=0; i std::ostream& operator<<(std::ostream &os, const Matrix &mat) { @@ -304,12 +320,12 @@ template Matrix transpose(const Matrix return trans; } -template T dot(const Vector &v1, const Vector &v2) +template T dot(const Matrix &m1, const Matrix &m2) { T sum=0; for(int i=0; i multiply(const Matrix &m1, const Matrix &m2) { for(int j=0; j