1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-11-25 14:04:14 +00:00

Début du raport et renommage de fonction

This commit is contained in:
Antoine Bartuccio 2016-12-30 19:49:55 +01:00
parent c9bab1fc1b
commit 09ffea11ec
5 changed files with 52 additions and 3 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ Libs/
*.exe
build/
Doc/
*.pdf

View File

@ -129,7 +129,7 @@ void DisplayMatrixGUI(Matrix m, bool useSDL){
printf("Press ENTER or the red cross to exit the window and continue.\n");
NewWindowFromMatrix(m);
} else {
BasicPrintMatrix(m);
printMatrix(m);
}
}

View File

@ -263,7 +263,7 @@ bool SetCellValue(Matrix matrix, int ColPos, int RowPos,bool value){
}
}
void BasicPrintMatrix(Matrix matrix){
void printMatrix(Matrix matrix){
/* Non optimisé : debug fx */
int i = 0;
int j = 0;

View File

@ -189,7 +189,7 @@ Matrix SetMatrixDim(Matrix matrix,int nbCols,int nbRows);
*@return void
*
*/
void BasicPrintMatrix(Matrix matrix);
void printMatrix(Matrix matrix);
bool RecursiveFreeCol(Matrix matrix, cellElement * elem);

48
report.md Normal file
View File

@ -0,0 +1,48 @@
% Cellular Automaton LO27
% Bartuccio Antoine \cr Porée De Ridder Jean
% Autumn 2016
\newpage
# Introduction
The goal of this project is to provide a library containing a new abstract data type called **Matrix** with associated function to manipulate them. The final program have to enable a user to test the library in an interactive and practical way.
Since we decided to not store false value in our matrix, we decided not to worry too much about performances and we encapsulated all access to stored data in the Matrix structure to avoid too much complexity and allow more modularity, readability and re-usability. We created high level tools to manipulate our matrix and used it all along the project.
For compilation we didn't used the **-ansi** flag since we had to deal with both clang and gcc for compilation and clang didn't accept this flag. Instead, we used the **-std=c89** flag witch contains the same rules but is accepted on both softwares. Compiling with **-ansi** still works.
We decided to create two different library. One for the graphical interface (which require SDL2) and the other with the Matrix data type) so this way you may just have to compile one lib if you don't need the gui.
# Description of abstract data types
Every function and data type are described in the documentation given with the project. This documentation is generated with doxygen.
# Algorithmic
The most interesting function are *GetCellValue* and *SetCellValue*. Those are the one we rely on the most. They are our way of dealing with our complex data structure allowing us to avoid to store false values. They are the functions that need the more computational power on the long run but are really useful due to their level of abstraction and their high level.
```C
```
Functions *andColSequenceOnMatrix* and *orColSequenceOnMatrix* are implemented with *colSequenceOnMatrix* and are really not interesting so we're gonna provide the algorithm of the last one :
```C
```
This is the same thing for *andRowSequenceOnMatrix* and *orRowSequenceOnMatrix* :
```C
```
Here are the algorithm of the function *applyRules* and all the one related to it :
```C
```
# Conclusion