#ifndef MTRXGAUD_H #define MTRXGAUD_H #include #include /*---Matrix--- *Abstract type that describe a boolean matrix * *@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 * */ Matrix applyRules(Matrix matrix,int Rules, int N); /** *Create a void Matrix * *@return a matrix * */ Matrix CreateMatrix(); /** *Find and return the cell in the given matrix * *@param matrix the Matrix where we search *@param ColPos an int indicating the column of the cell *@param RowPos an int indicating the row of the cell * *@return a cellElement * */ cellElement * FindMatrixElem(Matrix matrix, int ColPos, int RowPos); /** *Create the cell in the given matrix * *@param matrix the Matrix *@param ColPos an int indicating the column of the cell *@param RowPos an int indicating the row of the cell * *@return a bool (error code) * */ bool CreateMatrixElem(Matrix matrix, int ColPos, int RowPos); /** *Delete the cell in the given matrix * *@param matrix the Matrix *@param ColPos an int indicating the column of the cell *@param RowPos an int indicating the row of the cell * *@return an error code (int) * */ int SupprMatrixElem(Matrix matrix, int ColPos, int RowPos); /** *Delete or create the cell in the given matrix to fit the value * *@param matrix the Matrix *@param ColPos an int indicating the column of the cell *@param RowPos an int indicating the row of the cell * *@return an error code (bool) * */ bool SetCellValue(Matrix matrix, int ColPos, int RowPos, bool value); /** *Checks out the value of the cell in the given matrix * *@param matrix the Matrix *@param ColPos an int indicating the column of the cell *@param RowPos an int indicating the row of the cell * *@return the value (bool) * */ bool GetCellValue(Matrix matrix, int ColPos, int RowPos); Matrix SetMatrixDim(Matrix matrix,int nbCols,int nbRows); void BasicPrintMatrix(Matrix matrix); Matrix freeMatrix(Matrix matrix); #endif