Skip to content

Commit

Permalink
Rebuild project and docs
Browse files Browse the repository at this point in the history
Used make and doxygen commands
  • Loading branch information
LBF38 committed Oct 18, 2022
1 parent 9708934 commit b2baa2a
Show file tree
Hide file tree
Showing 50 changed files with 6,670 additions and 6,670 deletions.
14 changes: 7 additions & 7 deletions .vscode/settings.json
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"
}
}
200 changes: 100 additions & 100 deletions README.md
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 modified bin/annuaire
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions docs/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ <h2><a class="anchor" id="autotoc_md9"></a>
Step 4 : Launch the app</h2>
<p>From here, you can launch the app by using <code>./bin/annuaire</code> If you don't add any arguments, like the file, it will tell you how to use the program.</p>
<p>Examples of usage :</p>
<div class="fragment"><div class="line">./bin/womc data/small.txt</div>
<div class="line">./bin/womc data/small.txt --display</div>
<div class="fragment"><div class="line">./bin/annuaire data/small.txt</div>
<div class="line">./bin/annuaire data/small.txt --display</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md10"></a>
Step 5 : Enjoy</h2>
<p>Enjoy the program and compare the execution time of methods.</p>
Expand Down
12 changes: 6 additions & 6 deletions docs/html/list_8c.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
<div class="dyncontent">
<div class="center"><img src="list_8c__incl.png" border="0" usemap="#src_2list_8c" alt=""/></div>
<map name="src_2list_8c" id="src_2list_8c">
<area shape="rect" title="This is the list.c file." alt="" coords="143,5,219,32"/>
<area shape="rect" href="list_8h.html" title="Defines the list.c functions and structures." alt="" coords="153,80,208,107"/>
<area shape="rect" title=" " alt="" coords="5,155,76,181"/>
<area shape="rect" title=" " alt="" coords="101,155,167,181"/>
<area shape="rect" title=" " alt="" coords="192,155,263,181"/>
<area shape="rect" title=" " alt="" coords="287,155,355,181"/>
<area shape="rect" title="This is the list.c file." alt="" coords="143,5,219,32"/>
<area shape="rect" href="list_8h.html" title="Defines the list.c functions and structures." alt="" coords="153,80,208,107"/>
<area shape="rect" title=" " alt="" coords="5,155,76,181"/>
<area shape="rect" title=" " alt="" coords="101,155,167,181"/>
<area shape="rect" title=" " alt="" coords="192,155,263,181"/>
<area shape="rect" title=" " alt="" coords="287,155,355,181"/>
</map>
</div>
</div><table class="memberdecls">
Expand Down
16 changes: 8 additions & 8 deletions docs/html/list_8c__incl.map
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>
20 changes: 10 additions & 10 deletions docs/html/list_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,23 @@
<div class="dyncontent">
<div class="center"><img src="list_8h__incl.png" border="0" usemap="#src_2list_8h" alt=""/></div>
<map name="src_2list_8h" id="src_2list_8h">
<area shape="rect" title="Defines the list.c functions and structures." alt="" coords="142,5,219,32"/>
<area shape="rect" title=" " alt="" coords="5,80,76,107"/>
<area shape="rect" title=" " alt="" coords="101,80,167,107"/>
<area shape="rect" title=" " alt="" coords="192,80,263,107"/>
<area shape="rect" title=" " alt="" coords="287,80,355,107"/>
<area shape="rect" title="Defines the list.c functions and structures." alt="" coords="142,5,219,32"/>
<area shape="rect" title=" " alt="" coords="5,80,76,107"/>
<area shape="rect" title=" " alt="" coords="101,80,167,107"/>
<area shape="rect" title=" " alt="" coords="192,80,263,107"/>
<area shape="rect" title=" " alt="" coords="287,80,355,107"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="list_8h__dep__incl.png" border="0" usemap="#src_2list_8hdep" alt=""/></div>
<map name="src_2list_8hdep" id="src_2list_8hdep">
<area shape="rect" title="Defines the list.c functions and structures." alt="" coords="55,5,133,32"/>
<area shape="rect" href="list_8c.html" title="This is the list.c file." alt="" coords="5,80,81,107"/>
<area shape="rect" href="llist_8h.html" title="Defines the llist.c functions and structures." alt="" coords="105,80,187,107"/>
<area shape="rect" 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" 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"/>
<area shape="rect" title="Defines the list.c functions and structures." alt="" coords="55,5,133,32"/>
<area shape="rect" href="list_8c.html" title="This is the list.c file." alt="" coords="5,80,81,107"/>
<area shape="rect" href="llist_8h.html" title="Defines the llist.c functions and structures." alt="" coords="105,80,187,107"/>
<area shape="rect" 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" 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>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions docs/html/list_8h__dep__incl.map
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>
14 changes: 7 additions & 7 deletions docs/html/list_8h__incl.map
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>
14 changes: 7 additions & 7 deletions docs/html/llist_8c.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@
<div class="dyncontent">
<div class="center"><img src="llist_8c__incl.png" border="0" usemap="#src_2llist_8c" alt=""/></div>
<map name="src_2llist_8c" id="src_2llist_8c">
<area shape="rect" 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" href="llist_8h.html" title="Defines the llist.c functions and structures." alt="" coords="151,80,210,107"/>
<area shape="rect" href="list_8h.html" title="Defines the list.c functions and structures." alt="" coords="153,155,208,181"/>
<area shape="rect" title=" " alt="" coords="5,229,76,256"/>
<area shape="rect" title=" " alt="" coords="101,229,167,256"/>
<area shape="rect" title=" " alt="" coords="192,229,263,256"/>
<area shape="rect" title=" " alt="" coords="287,229,355,256"/>
<area shape="rect" 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" href="llist_8h.html" title="Defines the llist.c functions and structures." alt="" coords="151,80,210,107"/>
<area shape="rect" href="list_8h.html" title="Defines the list.c functions and structures." alt="" coords="153,155,208,181"/>
<area shape="rect" title=" " alt="" coords="5,229,76,256"/>
<area shape="rect" title=" " alt="" coords="101,229,167,256"/>
<area shape="rect" title=" " alt="" coords="192,229,263,256"/>
<area shape="rect" title=" " alt="" coords="287,229,355,256"/>
</map>
</div>
</div><table class="memberdecls">
Expand Down
18 changes: 9 additions & 9 deletions docs/html/llist_8c__incl.map
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>
Loading

0 comments on commit b2baa2a

Please sign in to comment.