mirror of
https://gitlab.com/klmp200/LO27.git
synced 2024-11-26 09:54:13 +00:00
Merge branch 'master' of gitlab.com:klmp200/LO27
This commit is contained in:
commit
5ce36a2607
@ -317,7 +317,7 @@ Matrix freeMatrix(Matrix matrix){
|
|||||||
return matrix;
|
return matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix sumMatrix(Matrix matrix1,Matrix matrix2){
|
Matrix opMatrix(Matrix matrix1,Matrix matrix2,bool (operator)(bool, bool)){
|
||||||
Matrix SumMatrix = CreateMatrix();
|
Matrix SumMatrix = CreateMatrix();
|
||||||
int i =0;
|
int i =0;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
@ -326,7 +326,7 @@ Matrix sumMatrix(Matrix matrix1,Matrix matrix2){
|
|||||||
SumMatrix = SetMatrixDim(SumMatrix,matrix2.colCount,matrix1.rowCount);
|
SumMatrix = SetMatrixDim(SumMatrix,matrix2.colCount,matrix1.rowCount);
|
||||||
for (i=0;i<SumMatrix.colCount;i++){
|
for (i=0;i<SumMatrix.colCount;i++){
|
||||||
for (j=0;j<SumMatrix.rowCount;j++){
|
for (j=0;j<SumMatrix.rowCount;j++){
|
||||||
SetCellValue(SumMatrix,i,j,GetCellValue(matrix1,i,j)+GetCellValue(matrix2,i,j));
|
SetCellValue(SumMatrix,i,j,operator(GetCellValue(matrix1,i,j),GetCellValue(matrix2,i,j)));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -341,6 +341,15 @@ Matrix sumMatrix(Matrix matrix1,Matrix matrix2){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Matrix sumMatrix(Matrix matrix1,Matrix matrix2){
|
||||||
|
return opMatrix(matrix1,matrix2,OR);
|
||||||
|
}
|
||||||
|
|
||||||
|
Matrix mulMatrix(Matrix matrix1,Matrix matrix2){
|
||||||
|
return opMatrix(matrix1,matrix2,AND);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Matrix colSequenceOnMatrix(Matrix m, bool (operator)(bool, bool)){
|
Matrix colSequenceOnMatrix(Matrix m, bool (operator)(bool, bool)){
|
||||||
bool a;
|
bool a;
|
||||||
bool b;
|
bool b;
|
||||||
|
@ -341,7 +341,7 @@ bool bottom_rightRule(Matrix m, int ColPos, int RowPos);
|
|||||||
bool * GetFromRules(Matrix m, int ColPos, int RowPos, int n, int rules[]);
|
bool * GetFromRules(Matrix m, int ColPos, int RowPos, int n, int rules[]);
|
||||||
|
|
||||||
Matrix sumMatrix(Matrix matrix1,Matrix matrix2);
|
Matrix sumMatrix(Matrix matrix1,Matrix matrix2);
|
||||||
|
Matrix mulMatrix(Matrix matrix1,Matrix matrix2);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user