2016-12-13 14:55:42 +00:00
|
|
|
#ifndef MTRXGAUD_H
|
|
|
|
#define MTRXGAUD_H
|
|
|
|
|
|
|
|
#include <CellElement.h>
|
|
|
|
#include <list.h>
|
|
|
|
|
|
|
|
/*---Matrix---
|
2016-12-13 14:12:55 +00:00
|
|
|
*Abstract type that describe a boolean matrix
|
2016-12-13 14:55:42 +00:00
|
|
|
*
|
|
|
|
*@colCount : the number of columns of the matrix
|
|
|
|
*@rowIndex : the number of rows of the matrix
|
|
|
|
*
|
|
|
|
*@rows : pointer on the first row that contains a true value
|
|
|
|
*@cols : pointer on the first col that contains a true value
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
typedef struct Matrix {
|
|
|
|
|
|
|
|
int colCount;
|
|
|
|
int rowCount;
|
|
|
|
|
|
|
|
List *cols;
|
|
|
|
List *rows;
|
|
|
|
|
|
|
|
}Matrix;
|
|
|
|
|
|
|
|
|
|
|
|
/*---applyRules---
|
|
|
|
*A function tha allows you to apply some rules n times on the matrix and returns it
|
|
|
|
*
|
|
|
|
*@matrix : A matrix on whitch you would apply the rules
|
|
|
|
*
|
|
|
|
*@Rules : Integer describing the rules
|
|
|
|
*
|
|
|
|
*@N : number of time the rules will be applied
|
|
|
|
*
|
|
|
|
*/
|
2016-12-13 16:28:13 +00:00
|
|
|
Matrix applyRules(Matrix matrix,int Rules, int N);
|
|
|
|
|
|
|
|
Matrix CreateMatrix();
|
2016-12-13 14:55:42 +00:00
|
|
|
|
|
|
|
#endif
|
2016-12-13 14:12:55 +00:00
|
|
|
|