2016-12-10 01:28:10 +00:00
|
|
|
/*********************************************************************************
|
|
|
|
* File Name : main.c
|
|
|
|
* Created By : klmp200
|
|
|
|
* Creation Date : [2016-12-10 01:06]
|
|
|
|
* Last Modified : [2016-12-10 01:07]
|
2016-12-10 20:11:46 +00:00
|
|
|
* Description :
|
2016-12-10 01:28:10 +00:00
|
|
|
**********************************************************************************/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2016-12-13 14:12:55 +00:00
|
|
|
#include <matrix.h>
|
2016-12-10 20:11:46 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv){
|
2016-12-13 16:28:13 +00:00
|
|
|
Matrix matrix = CreateMatrix();
|
2016-12-26 19:44:39 +00:00
|
|
|
Matrix m2;
|
2016-12-27 00:24:27 +00:00
|
|
|
Matrix m3;
|
|
|
|
BooleanMatrix bmatrix = CreateBooleanMatrix(5, 5);
|
|
|
|
|
|
|
|
bmatrix = RandomizeBooleanMatrix(bmatrix);
|
|
|
|
m3 = newMatrix(bmatrix);
|
|
|
|
FreeBooleanMatrix(bmatrix);
|
|
|
|
BasicPrintMatrix(m3);
|
|
|
|
freeMatrix(m3);
|
|
|
|
|
2016-12-24 14:18:19 +00:00
|
|
|
int Rule = 256;
|
2016-12-13 14:55:42 +00:00
|
|
|
int N = 1;
|
2016-12-13 14:12:55 +00:00
|
|
|
applyRules(matrix,Rule,N);
|
2016-12-24 15:07:50 +00:00
|
|
|
matrix = SetMatrixDim(matrix,3,3);
|
2016-12-13 14:55:42 +00:00
|
|
|
|
2016-12-24 14:18:19 +00:00
|
|
|
BasicPrintMatrix(matrix);
|
2016-12-13 14:55:42 +00:00
|
|
|
|
2016-12-24 14:18:19 +00:00
|
|
|
SetCellValue(matrix,0,0,true);
|
2016-12-24 15:07:50 +00:00
|
|
|
SetCellValue(matrix,0,1,true);
|
|
|
|
SetCellValue(matrix,0,2,true);
|
2016-12-24 14:18:19 +00:00
|
|
|
BasicPrintMatrix(matrix);
|
2016-12-11 02:25:21 +00:00
|
|
|
|
2016-12-24 14:18:19 +00:00
|
|
|
SetCellValue(matrix,0,0,false);
|
2016-12-24 15:07:50 +00:00
|
|
|
SetCellValue(matrix,0,1,false);
|
2016-12-26 19:44:39 +00:00
|
|
|
BasicPrintMatrix(matrix);
|
|
|
|
|
|
|
|
m2 = colSequenceOnMatrix(matrix, OR);
|
|
|
|
BasicPrintMatrix(m2);
|
|
|
|
freeMatrix(m2);
|
|
|
|
m2 = rowSequenceOnMatrix(matrix, AND);
|
|
|
|
BasicPrintMatrix(m2);
|
|
|
|
freeMatrix(m2);
|
2016-12-24 15:07:50 +00:00
|
|
|
|
|
|
|
freeMatrix(matrix);
|
2016-12-10 01:28:10 +00:00
|
|
|
return 0;
|
2016-12-10 20:11:46 +00:00
|
|
|
|
2016-12-10 01:28:10 +00:00
|
|
|
}
|
2016-12-24 15:07:50 +00:00
|
|
|
/* todo
|
|
|
|
*modifier DeleteListContent avec sli
|
2016-12-26 16:00:25 +00:00
|
|
|
*/
|