-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Used make and doxygen commands
- Loading branch information
Showing
50 changed files
with
6,670 additions
and
6,670 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"files.associations": { | ||
"typeinfo": "c", | ||
"llist.h": "c", | ||
"llist.h": "c", | ||
"list.h": "c" | ||
} | ||
{ | ||
"files.associations": { | ||
"typeinfo": "c", | ||
"llist.h": "c", | ||
"llist.h": "c", | ||
"list.h": "c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,100 @@ | ||
# Projet de C : Annuaire et tri de données | ||
|
||
## Introduction | ||
|
||
L'objectif du projet cette année est de mettre en place un gestionnaire de données du type `Prénom, Nom, Code Postal;`. La première partie définit une structure données qui n'est autre qu'une liste chaînée dans laquelle ces informations seront stockées. La deuxième partie se concentre sur la lecture des données depuis un fichier et de structuration intelligente au chargement. La troisième partie utilise une structure de données plus optimisée, une liste chaînée de listes chaînées. | ||
|
||
## Structure de données | ||
|
||
Les structure de données `list` et `cell` vous sont données et permettent de définir une liste chaînées de personnes à partir de leurs informations : nom, prénom et code postal (ou `fname`, `lname` et `zip`). Un exemple d'utilisation de ces structures de données vous est illustré sur la figure ci-dessous. | ||
|
||
![list image](list.png) | ||
|
||
```c | ||
{ | ||
[prénom 1, nom 1, code postal 1], | ||
[prénom 2, ...], | ||
... | ||
} | ||
``` | ||
|
||
## Lecture de données | ||
|
||
Il faut maintenant lire les données depuis un fichier et les ajouter dynamiquement dans votre structure. Les fichiers présents dans le répertoire `data` peuvent vous servir de tests pour vos fonctions. Trois fichiers de taille différente vous sont proposés contenant respectivement 100, 30000 et 100000 entrées. | ||
|
||
## Structure de données optimisée | ||
|
||
Pour éviter de devoir traverser toutes les entrées en cas d'ajout d'une nouvelle, nous décidons de rajouter la première lettre de chaque nom comme caractère discriminant. Nous allons maintenant utiliser une liste chaînée de liste chaînées, la première représentant les premières lettres des noms de famille, pour accélérer l'accès aux données et l'ajout d'une nouvelle donnée. Un exemple d'utilisation est présentée sur la figure ci-dessous. | ||
|
||
![llist image](llist.png) | ||
|
||
## My C-lang project documentation | ||
|
||
### Introduction | ||
|
||
The C project consists in loading data into a list using two methods. | ||
|
||
### Method 1 | ||
|
||
It is a simple list. We compare the cells made from lines and then insert the cell in the right place. | ||
|
||
### Method 2 | ||
|
||
It is an optimized list using an index. We compare the cells made from lines with an index and then insert the cell in the right index_list. | ||
|
||
### Results | ||
|
||
We compare the execution time of both methods using small, medium and large files. | ||
|
||
The results are that method 2 is quicker than method 1. | ||
|
||
Results in image : | ||
![Small text file on both methods](small.png) | ||
|
||
![Medium text file on both methods](medium.png) | ||
|
||
![Large text file on both methods](large.png) | ||
|
||
## Installation | ||
|
||
How to install and use the program. | ||
|
||
### Step 1 : Download the archive | ||
|
||
Firstly, download the archive containing every source files. | ||
|
||
### Step 2 : Open the archive in a folder | ||
|
||
Then, open the archive in a given folder on your computer. | ||
|
||
### Step 3 : Open a terminal | ||
|
||
Use the terminal (under Linux or any OS) and go to the folder containing the source code. | ||
|
||
For example, you can be in `~/projetc $` | ||
|
||
### Step 4 : Launch the app | ||
|
||
From here, you can launch the app by using `./bin/annuaire` | ||
If you don't add any arguments, like the file, it will tell you how to use the program. | ||
|
||
Examples of usage : | ||
|
||
```bash | ||
./bin/annuaire data/small.txt | ||
./bin/annuaire data/small.txt --display | ||
``` | ||
|
||
### Step 5 : Enjoy | ||
|
||
Enjoy the program and compare the execution time of methods. | ||
|
||
Please consider using `./bin/annuaire` without any arguments to see complete usage and possible options. | ||
|
||
## Credits and documentation | ||
|
||
A documentation was generated by Doxygen in the docs directory. It can be viewed in HTML format or PDF format (compiled from LaTeX). | ||
|
||
The original subject of this C-lang project comes from ENSTA Bretagne's courses in CSN Speciality. | ||
|
||
Subject made by @QDucasse | ||
# Projet de C : Annuaire et tri de données | ||
|
||
## Introduction | ||
|
||
L'objectif du projet cette année est de mettre en place un gestionnaire de données du type `Prénom, Nom, Code Postal;`. La première partie définit une structure données qui n'est autre qu'une liste chaînée dans laquelle ces informations seront stockées. La deuxième partie se concentre sur la lecture des données depuis un fichier et de structuration intelligente au chargement. La troisième partie utilise une structure de données plus optimisée, une liste chaînée de listes chaînées. | ||
|
||
## Structure de données | ||
|
||
Les structure de données `list` et `cell` vous sont données et permettent de définir une liste chaînées de personnes à partir de leurs informations : nom, prénom et code postal (ou `fname`, `lname` et `zip`). Un exemple d'utilisation de ces structures de données vous est illustré sur la figure ci-dessous. | ||
|
||
![list image](list.png) | ||
|
||
```c | ||
{ | ||
[prénom 1, nom 1, code postal 1], | ||
[prénom 2, ...], | ||
... | ||
} | ||
``` | ||
|
||
## Lecture de données | ||
|
||
Il faut maintenant lire les données depuis un fichier et les ajouter dynamiquement dans votre structure. Les fichiers présents dans le répertoire `data` peuvent vous servir de tests pour vos fonctions. Trois fichiers de taille différente vous sont proposés contenant respectivement 100, 30000 et 100000 entrées. | ||
|
||
## Structure de données optimisée | ||
|
||
Pour éviter de devoir traverser toutes les entrées en cas d'ajout d'une nouvelle, nous décidons de rajouter la première lettre de chaque nom comme caractère discriminant. Nous allons maintenant utiliser une liste chaînée de liste chaînées, la première représentant les premières lettres des noms de famille, pour accélérer l'accès aux données et l'ajout d'une nouvelle donnée. Un exemple d'utilisation est présentée sur la figure ci-dessous. | ||
|
||
![llist image](llist.png) | ||
|
||
## My C-lang project documentation | ||
|
||
### Introduction | ||
|
||
The C project consists in loading data into a list using two methods. | ||
|
||
### Method 1 | ||
|
||
It is a simple list. We compare the cells made from lines and then insert the cell in the right place. | ||
|
||
### Method 2 | ||
|
||
It is an optimized list using an index. We compare the cells made from lines with an index and then insert the cell in the right index_list. | ||
|
||
### Results | ||
|
||
We compare the execution time of both methods using small, medium and large files. | ||
|
||
The results are that method 2 is quicker than method 1. | ||
|
||
Results in image : | ||
![Small text file on both methods](small.png) | ||
|
||
![Medium text file on both methods](medium.png) | ||
|
||
![Large text file on both methods](large.png) | ||
|
||
## Installation | ||
|
||
How to install and use the program. | ||
|
||
### Step 1 : Download the archive | ||
|
||
Firstly, download the archive containing every source files. | ||
|
||
### Step 2 : Open the archive in a folder | ||
|
||
Then, open the archive in a given folder on your computer. | ||
|
||
### Step 3 : Open a terminal | ||
|
||
Use the terminal (under Linux or any OS) and go to the folder containing the source code. | ||
|
||
For example, you can be in `~/projetc $` | ||
|
||
### Step 4 : Launch the app | ||
|
||
From here, you can launch the app by using `./bin/annuaire` | ||
If you don't add any arguments, like the file, it will tell you how to use the program. | ||
|
||
Examples of usage : | ||
|
||
```bash | ||
./bin/annuaire data/small.txt | ||
./bin/annuaire data/small.txt --display | ||
``` | ||
|
||
### Step 5 : Enjoy | ||
|
||
Enjoy the program and compare the execution time of methods. | ||
|
||
Please consider using `./bin/annuaire` without any arguments to see complete usage and possible options. | ||
|
||
## Credits and documentation | ||
|
||
A documentation was generated by Doxygen in the docs directory. It can be viewed in HTML format or PDF format (compiled from LaTeX). | ||
|
||
The original subject of this C-lang project comes from ENSTA Bretagne's courses in CSN Speciality. | ||
|
||
Subject made by @QDucasse |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<map id="src/list.c" name="src/list.c"> | ||
<area shape="rect" id="node1" title="This is the list.c file." alt="" coords="143,5,219,32"/> | ||
<area shape="rect" id="node2" href="$list_8h.html" title="Defines the list.c functions and structures." alt="" coords="153,80,208,107"/> | ||
<area shape="rect" id="node3" title=" " alt="" coords="5,155,76,181"/> | ||
<area shape="rect" id="node4" title=" " alt="" coords="101,155,167,181"/> | ||
<area shape="rect" id="node5" title=" " alt="" coords="192,155,263,181"/> | ||
<area shape="rect" id="node6" title=" " alt="" coords="287,155,355,181"/> | ||
</map> | ||
<map id="src/list.c" name="src/list.c"> | ||
<area shape="rect" id="node1" title="This is the list.c file." alt="" coords="143,5,219,32"/> | ||
<area shape="rect" id="node2" href="$list_8h.html" title="Defines the list.c functions and structures." alt="" coords="153,80,208,107"/> | ||
<area shape="rect" id="node3" title=" " alt="" coords="5,155,76,181"/> | ||
<area shape="rect" id="node4" title=" " alt="" coords="101,155,167,181"/> | ||
<area shape="rect" id="node5" title=" " alt="" coords="192,155,263,181"/> | ||
<area shape="rect" id="node6" title=" " alt="" coords="287,155,355,181"/> | ||
</map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<map id="src/list.h" name="src/list.h"> | ||
<area shape="rect" id="node1" title="Defines the list.c functions and structures." alt="" coords="55,5,133,32"/> | ||
<area shape="rect" id="node2" href="$list_8c.html" title="This is the list.c file." alt="" coords="5,80,81,107"/> | ||
<area shape="rect" id="node3" href="$llist_8h.html" title="Defines the llist.c functions and structures." alt="" coords="105,80,187,107"/> | ||
<area shape="rect" id="node4" href="$llist_8c.html" title="This is the llist.c file It implements the 2nd method of the project. In order to optimize the loadin..." alt="" coords="51,155,131,181"/> | ||
<area shape="rect" id="node5" href="$main_8c.html" title="This is the main.c file used to launch the methods for loading files." alt="" coords="156,155,245,181"/> | ||
</map> | ||
<map id="src/list.h" name="src/list.h"> | ||
<area shape="rect" id="node1" title="Defines the list.c functions and structures." alt="" coords="55,5,133,32"/> | ||
<area shape="rect" id="node2" href="$list_8c.html" title="This is the list.c file." alt="" coords="5,80,81,107"/> | ||
<area shape="rect" id="node3" href="$llist_8h.html" title="Defines the llist.c functions and structures." alt="" coords="105,80,187,107"/> | ||
<area shape="rect" id="node4" href="$llist_8c.html" title="This is the llist.c file It implements the 2nd method of the project. In order to optimize the loadin..." alt="" coords="51,155,131,181"/> | ||
<area shape="rect" id="node5" href="$main_8c.html" title="This is the main.c file used to launch the methods for loading files." alt="" coords="156,155,245,181"/> | ||
</map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<map id="src/list.h" name="src/list.h"> | ||
<area shape="rect" id="node1" title="Defines the list.c functions and structures." alt="" coords="142,5,219,32"/> | ||
<area shape="rect" id="node2" title=" " alt="" coords="5,80,76,107"/> | ||
<area shape="rect" id="node3" title=" " alt="" coords="101,80,167,107"/> | ||
<area shape="rect" id="node4" title=" " alt="" coords="192,80,263,107"/> | ||
<area shape="rect" id="node5" title=" " alt="" coords="287,80,355,107"/> | ||
</map> | ||
<map id="src/list.h" name="src/list.h"> | ||
<area shape="rect" id="node1" title="Defines the list.c functions and structures." alt="" coords="142,5,219,32"/> | ||
<area shape="rect" id="node2" title=" " alt="" coords="5,80,76,107"/> | ||
<area shape="rect" id="node3" title=" " alt="" coords="101,80,167,107"/> | ||
<area shape="rect" id="node4" title=" " alt="" coords="192,80,263,107"/> | ||
<area shape="rect" id="node5" title=" " alt="" coords="287,80,355,107"/> | ||
</map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<map id="src/llist.c" name="src/llist.c"> | ||
<area shape="rect" id="node1" title="This is the llist.c file It implements the 2nd method of the project. In order to optimize the loadin..." alt="" coords="141,5,221,32"/> | ||
<area shape="rect" id="node2" href="$llist_8h.html" title="Defines the llist.c functions and structures." alt="" coords="151,80,210,107"/> | ||
<area shape="rect" id="node3" href="$list_8h.html" title="Defines the list.c functions and structures." alt="" coords="153,155,208,181"/> | ||
<area shape="rect" id="node4" title=" " alt="" coords="5,229,76,256"/> | ||
<area shape="rect" id="node5" title=" " alt="" coords="101,229,167,256"/> | ||
<area shape="rect" id="node6" title=" " alt="" coords="192,229,263,256"/> | ||
<area shape="rect" id="node7" title=" " alt="" coords="287,229,355,256"/> | ||
</map> | ||
<map id="src/llist.c" name="src/llist.c"> | ||
<area shape="rect" id="node1" title="This is the llist.c file It implements the 2nd method of the project. In order to optimize the loadin..." alt="" coords="141,5,221,32"/> | ||
<area shape="rect" id="node2" href="$llist_8h.html" title="Defines the llist.c functions and structures." alt="" coords="151,80,210,107"/> | ||
<area shape="rect" id="node3" href="$list_8h.html" title="Defines the list.c functions and structures." alt="" coords="153,155,208,181"/> | ||
<area shape="rect" id="node4" title=" " alt="" coords="5,229,76,256"/> | ||
<area shape="rect" id="node5" title=" " alt="" coords="101,229,167,256"/> | ||
<area shape="rect" id="node6" title=" " alt="" coords="192,229,263,256"/> | ||
<area shape="rect" id="node7" title=" " alt="" coords="287,229,355,256"/> | ||
</map> |
Oops, something went wrong.