From 48912373fde4845bebe47201729bc328c610ded1 Mon Sep 17 00:00:00 2001 From: Naej Date: Tue, 27 Dec 2016 23:03:37 +0100 Subject: [PATCH 1/2] modif sum avec op --- LibAutomaton/matrix.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/LibAutomaton/matrix.c b/LibAutomaton/matrix.c index b04fa3a..6d4847e 100644 --- a/LibAutomaton/matrix.c +++ b/LibAutomaton/matrix.c @@ -317,7 +317,7 @@ Matrix freeMatrix(Matrix matrix){ return matrix; } -Matrix sumMatrix(Matrix matrix1,Matrix matrix2){ +Matrix opMatrix(Matrix matrix1,Matrix matrix2,bool (operator)(bool, bool)){ Matrix SumMatrix = CreateMatrix(); int i =0; int j = 0; @@ -326,7 +326,7 @@ Matrix sumMatrix(Matrix matrix1,Matrix matrix2){ SumMatrix = SetMatrixDim(SumMatrix,matrix2.colCount,matrix1.rowCount); for (i=0;i Date: Tue, 27 Dec 2016 23:11:15 +0100 Subject: [PATCH 2/2] =?UTF-8?q?corrig=C3=A9=20de=20la=20merde?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LibAutomaton/matrix.c | 4 ++-- LibAutomaton/matrix.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LibAutomaton/matrix.c b/LibAutomaton/matrix.c index 6d4847e..709b0e3 100644 --- a/LibAutomaton/matrix.c +++ b/LibAutomaton/matrix.c @@ -342,11 +342,11 @@ Matrix opMatrix(Matrix matrix1,Matrix matrix2,bool (operator)(bool, bool)){ } Matrix sumMatrix(Matrix matrix1,Matrix matrix2){ - opMatrix(matrix1,matrix2,OR); + return opMatrix(matrix1,matrix2,OR); } Matrix mulMatrix(Matrix matrix1,Matrix matrix2){ - opMatrix(matrix1,matrix2,AND); + return opMatrix(matrix1,matrix2,AND); } diff --git a/LibAutomaton/matrix.h b/LibAutomaton/matrix.h index 58dc71c..389bd4c 100644 --- a/LibAutomaton/matrix.h +++ b/LibAutomaton/matrix.h @@ -231,7 +231,7 @@ Matrix andRowSequenceOnMatrix(Matrix m); */ Matrix orRowSequenceOnMatrix(Matrix m); Matrix sumMatrix(Matrix matrix1,Matrix matrix2); - +Matrix mulMatrix(Matrix matrix1,Matrix matrix2); #endif