diff --git a/slides/cours_9.md b/slides/cours_9.md new file mode 100644 index 0000000000000000000000000000000000000000..e5a7c8efa7360ef587de5afc8586c88265fd1357 --- /dev/null +++ b/slides/cours_9.md @@ -0,0 +1,495 @@ +--- +title: "Piles et files d'attente" +date: "2021-12-07" +--- + +# Les piles (1/5) + +## Qu'est-ce donc? + +* Structure de données abstraite... + +. . . + +* de type `LIFO` (*Last in first out*). + +](figs/Stack.svg){width=70%} + +## Des exemples de la vraie vie + +. . . + +* Pile d'assiettes, de livres, ... +* Adresses visitées par un navigateur web. +* Les calculatrices du passé (en polonaise inverse). +* Les boutons *undo* de vos éditeurs de texte (aka *u* dans vim). + +# Les piles (2/5) + +## Fonctionnalités + +. . . + +1. Empiler (push): ajouter un élément sur la pile. +2. Dépiler (pop): retirer l'élément du sommet de la pile et le retrouner. +3. Liste vide? (is_empty?). + +. . . + +4. Jeter un oeil (peek): retourner l'élément du sommet de la pile (sans le dépiler). +5. Nombre d'éléments (length). + +## Comment faire les 4,5 à partir de 1 à 3? + +. . . + +4. Dépiler l'élément, le copier, puis l'empiler à nouveau. +5. Dépiler jusqu'à ce que la pile soit vide, puis empiler à nouveau. + +. . . + +## Existe en deux goûts + +* Pile avec ou sans limite de capacité (à concurrence de la taille de la +mémoire). + +# Les piles (3/5) + +## Implémentation + +* Jusqu'ici on n'a pas du tout parlé d'implémentation (d'où le nom de structure + abstraite). +* Pas de choix unique d'implémentation. + +## Quelle structure de données allons nous utiliser? + +. . . + +Et oui vous avez deviné: un tableau! + +## La structure: de quoi avons-nous besoin (pile de taille fixe)? + +. . . + +```C +#define MAX_CAPACITY 500 +typedef struct _stack { + int data[MAX_CAPACITY]; // les données + int top; // indice du sommet +} stack; +``` + +# Les piles (4/5) + +## Initialisation + +. . . + +```C +void stack_init(stack *s) { + s->top = -1; +} +``` + +## Est vide? + +. . . + +```C +bool stack_is_empty(stack s) { + return s.top == -1; +} +``` + +## Empiler (ajouter un élément au sommet) + +. . . + +```C +void stack_push(stack *s, int val) { + s->top += 1; + s->data[s->top] = val; +} +``` + +# Les piles (5/5) + +## Dépiler (enlever l'élément du sommet) + +. . . + +```C +int stack_pop(stack *s) { + s->top -= 1; + return s->data[s->top+1]; +} +``` + +## Jeter un oeil (regarder le sommet) + +. . . + +```C +int stack_peek(stack *s) { + return s->data[s->top]; +} +``` + +## Quelle est la complexité de ces opérations? + +. . . + +## Voyez-vous des problèmes potentiels avec cette implémentation? + +. . . + +* Empiler avec une pile pleine. +* Dépiler avec une pile vide. +* Jeter un oeil au sommet d'une pile vide. + +# Gestion d'erreur, level 0 + +* Il y a plusieurs façon de traiter les erreur: + * Ne rien faire (laisser la responsabilité à l'utilisateur). + * Faire paniquer le programme (il plante plus ou moins violemment). + * Utiliser des codes d'erreurs. + +## La panique + +* En C, on a les `assert()` pour faire paniquer un programme. + + +# Assertions (1/3) + +```C +#include <assert.h> +void assert(int expression); +``` + +## Qu'est-ce donc? + +- Macro permettant de tester une condition lors de l'exécution d'un programme: + - Si `expression == 0`{.C} (condition fausse), `assert()`{.C} affiche un message d'erreur sur `stderr`{.C} et termine l'exécution du programme. + - Sinon l'exécution se poursuit normalement. + - Peuvent être désactivés à la compilation avec `-DNDEBUG` (équivalent à `#define + NDEBUG`) + +## À quoi ça sert? + +- Permet de réaliser des tests unitaires. +- Permet de tester des conditions catastrophiques d'un programme. +- **Ne permet pas** de gérer les erreurs. + +# Assertions (2/3) + +<!-- \footnotesize --> + +## Exemple + +```C +#include <assert.h> +void stack_push(stack *s, int val) { + assert(s->top < MAX_CAPACITY-1); + s->top += 1; + s->data[s->top] = val; +} +int stack_pop(stack *s) { + assert(s->top >= 0); + s->top -= 1; + return s->data[s->top+1]; +} +int stack_peek(stack *s) { + assert(s->top >= 0); + return s->data[s->top]; +} +``` + +# Assertions (3/3) + +## Cas typiques d'utilisation + +- Vérification de la validité des pointeurs (typiquement `!= NULL`{.C}). +- Vérification du domaine des indices (dépassement de tableau). + +## Bug vs. erreur de *runtime* + +- Les assertions sont là pour détecter les bugs (erreurs d'implémentation). +- Les assertions ne sont pas là pour gérer les problèmes externes au programme (allocation mémoire qui échoue, mauvais paramètre d'entrée passé par l'utilisateur, ...). + +. . . + +- Mais peuvent être pratiques quand même pour ça... +- Typiquement désactivées dans le code de production. + +# La pile dynamique + +## Comment modifier le code précédent pour avoir une taille dynamique? + +. . . + +```C +// alloue une zone mémoire de size octets +void *malloc(size_t size); +// change la taille allouée à size octets (contiguïté garantie) +void *realloc(void *ptr, size_t size); +``` + +## Et maintenant? + +. . . + +```C +stack_create(); // crée une pile avec une taille par défaut +// vérifie si la pile est pleine et réalloue si besoin +stack_push(); +// vérifie si la pile est vide/trop grande +// et réalloue si besoin +stack_pop(); +``` + +## Exercice: ouvrir un repo/issues pour l'implémentation + +* Oui-oui cela est une introduction au développement collaboratif (et + hippie). + +# Le tri à deux piles (1/3) + +## Cas pratique + +{width=70%} + +# Le tri à deux piles (2/3) + +## Exercice: formaliser l'algorithme + +. . . + +## Algorithme de tri nécessitant 2 piles (G, D) + +Soit `tab` le tableau à trier: + +```C +pour i de 0 à N-1 + tant que (tab[i] > que le sommet de G) + dépiler G dans D + tant que (tab[i] < que le sommet de D) + dépiler de D dans G + empiler tab[i] sur G +dépiler tout D dans G +tab est trié dans G +``` + +# Le tri à deux piles (3/3) + +## Exercice: trier le tableau `[2, 10, 5, 20, 15]` + +```C + + + + + + + + + + + + + + + + +``` + +# La calculatrice (1/8) + +## Vocabulaire + +```C +2 + 3 = 2 3 +, +``` + +`2` et `3` sont les *opérandes*, `+` l'*opérateur*. + +. . . + +## La notation infixe + +```C +2 * (3 + 2) - 4 = 6. +``` + +## La notation postfixe + +```C +2 3 2 + * 4 - = 6. +``` + +## Exercice: écrire `2 * 3 * 4 + 2` en notation `postfixe` + +. . . + +```C +2 3 4 * * 2 + = (2 * (3 * 4)) + 2. +``` + +# La calculatrice (2/8) + +## De infixe à post-fixe + +* Une *pile* est utilisée pour stocker *opérateurs* et *parenthèses*. +* Les opérateurs on des *priorités* différentes. + +```C +^ : priorité 3 +* / : priorité 2 ++ - : priorité 1 +( ) : priorité 0 // pas un opérateur mais bon +``` + + +# La calculatrice (3/8) + +## De infixe à post-fixe: algorithme + +* On lit l'expression infixe de gauche à droite. + +* On examine le prochain caractère de l'expression infixe. + * Si opérande, le placer dans l'expression du résultat. + * Si parenthèse le mettre dans la pile (priorité 0). + * Si opérateur, comparer sa priorité avec celui du sommet de la pile: + * Si sa priorité est plus élevée, empiler. + * Sinon dépiler l'opérateur de la pile dans l'expression du résultat et + recommencer jusqu'à apparition d'un opérateur de priorité plus faible + au sommet de la pile (ou pile vide). + * Si parenthèse fermée, dépiler les opérateurs du sommet de la pile et les + placer dans l'expression du résultat, jusqu'à ce qu'une parenthèse + ouverte apparaisse au sommet, dépiler également la parenthèse. + * Si il n'y a pas de caractère dans l'expression dépiler tous les + opérateurs dans le résultat. + +# La calculatrice (4/8) + +## De infixe à post-fixe: exemple + +```C +Infixe Postfixe Pile Priorité +((A*B)/D-F)/(G+H) Vide Vide Néant + (A*B)/D-F)/(G+H) Vide ( 0 + A*B)/D-F)/(G+H) Vide (( 0 + *B)/D-F)/(G+H) A (( 0 + B)/D-F)/(G+H) A ((* 2 + )/D-F)/(G+H) AB ((* 2 + /D-F)/(G+H) AB* ( 0 + D-F)/(G+H) AB* (/ 2 + -F)/(G+H) AB*D (/ 2 + F)/(G+H) AB*D/ (- 1 + )/(G+H) AB*D/F (- 1 + /(G+H) AB*D/F- Vide Néant +``` + +# La calculatrice (5/8) + +## De infixe à post-fixe: exemple + +```C +Infixe Postfixe Pile Priorité +((A*B)/D-F)/(G+H) Vide Vide Néant +-------------------------------------------------------- + /(G+H) AB*D/F- Vide Néant + (G+H) AB*D/F- / 2 + G+H) AB*D/F- /( 0 + +H) AB*D/F-G /( 0 + H) AB*D/F-G /(+ 1 + ) AB*D/F-GH /(+ 1 + Vide AB*D/F-GH+ / 2 + Vide AB*D/F-GH+/ Vide Néant +``` + +# La calculatrice (6/8) + +\footnotesize + +## Exercice: écrire le code et le poster sur matrix + +* Quelle est la signature de la fonction? + +. . . + +```C +char *infix_to_postfix(char* infix) { // init and alloc stack and postfix + for (size_t i = 0; i < strlen(infix); ++i) { + if (is_operand(infix[i])) { + // we just add operands in the new postfix string + } else if (infix[i] == '(') { + // we push opening parenthesis into the stack + stack_push(&s, infix[i]); + } else if (infix[i] == ')') { + // we pop everything into the postfix + } else if (is_operator(infix[i])) { + // this is an operator. We add it to the postfix based + // on the priority of what is already in the stack and push it + } + } + // pop all the operators from the s at the end of postfix + // and end the postfix with `\0` + return postfix; +} +``` + + +# La calculatrice (7/8) + +## Évaluation d'expression postfixe: algorithme + +* Chaque *opérateur* porte sur les deux opérandes qui le précèdent. +* Le *résultat d'une opération* est un nouvel *opérande* qui est remis au + sommet de la pile. + +## Exemple + +```C +2 3 4 + * 5 - = ? +``` + +* On parcours de gauche à droite: + +```C +Caractère lu Pile opérandes + 2 2 + 3 2, 3 + 4 2, 3, 4 + + 2, (3 + 4) + * 2 * 7 + 5 14, 5 + - 14 - 5 = 9 +``` + +# La calculatrice (8/8) + +## Évaluation d'expression postfixe: algorithme + +1. La valeur d'un opérande est *toujours* empilée. +2. L'opérateur s'applique *toujours* au 2 opérandes au sommet. +3. Le résultat est remis au sommet. + +## Exercice: écrire l'algorithme (et poster sur matrix) + +. . . + +```C +bool evaluate(char *postfix, double *val) { // init stack + for (size_t i = 0; i < strlen(postfix); ++i) { + if (is_operand(postfix[i])) { + stack_push(&s, postfix[i]); + } else if (is_operator(postfix[i])) { + double rhs = stack_pop(&s); + double lhs = stack_pop(&s); + stack_push(&s, op(postfix[i], lhs, rhs); + } } + return stack_pop(&s); +} +``` + diff --git a/slides/figs/tri_piles.svg b/slides/figs/tri_piles.svg new file mode 100644 index 0000000000000000000000000000000000000000..bed1916f6bdaa5f3943cd676dfd50ea7765f3bc9 --- /dev/null +++ b/slides/figs/tri_piles.svg @@ -0,0 +1,1098 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="400.30954mm" + height="338.27808mm" + viewBox="0 0 400.30953 338.27808" + version="1.1" + id="svg5" + inkscape:version="1.1.1 (3bf5ae0, 2021-09-20)" + sodipodi:docname="tri_piles.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview7" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:document-units="mm" + showgrid="false" + inkscape:object-nodes="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:zoom="0.17983246" + inkscape:cx="372.569" + inkscape:cy="316.96169" + inkscape:window-width="944" + inkscape:window-height="1022" + inkscape:window-x="962" + inkscape:window-y="44" + inkscape:window-maximized="1" + inkscape:current-layer="layer1"> + <inkscape:grid + type="xygrid" + id="grid1021" + originx="62.88159" + originy="-54.378437" /> + </sodipodi:namedview> + <defs + id="defs2" /> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(62.881592,-54.378433)"> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="31.093731" + y="195.68054" + id="text9123"><tspan + sodipodi:role="line" + id="tspan9121" + style="stroke-width:0.264583" + x="31.093731" + y="195.68054">17</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="143.56741" + y="195.67538" + id="text9123-38-6"><tspan + sodipodi:role="line" + id="tspan9121-5-1" + style="stroke-width:0.264583" + x="143.56741" + y="195.67538">34</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="255.97629" + y="195.67538" + id="text9123-38-1"><tspan + sodipodi:role="line" + id="tspan9121-5-5" + style="stroke-width:0.264583" + x="255.97629" + y="195.67538">34</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="86.707741" + y="331.52029" + id="text9123-38-9"><tspan + sodipodi:role="line" + id="tspan9121-5-8" + style="stroke-width:0.264583" + x="86.707741" + y="331.52029">34</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="143.56741" + y="352.64828" + id="text9123-38-4"><tspan + sodipodi:role="line" + id="tspan9121-5-81" + style="stroke-width:0.264583" + x="143.56741" + y="352.64828">34</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="255.97629" + y="352.64828" + id="text9123-38-0"><tspan + sodipodi:role="line" + id="tspan9121-5-3" + style="stroke-width:0.264583" + x="255.97629" + y="352.64828">34</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="198.97969" + y="195.68054" + id="text9123-2"><tspan + sodipodi:role="line" + id="tspan9121-9" + style="stroke-width:0.264583" + x="198.97969" + y="195.68054">17</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="311.38858" + y="195.68054" + id="text9123-3"><tspan + sodipodi:role="line" + id="tspan9121-90" + style="stroke-width:0.264583" + x="311.38858" + y="195.68054">17</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="86.570801" + y="373.73682" + id="text9123-8"><tspan + sodipodi:role="line" + id="tspan9121-8" + style="stroke-width:0.264583" + x="86.570801" + y="373.73682">17</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="198.97969" + y="373.73682" + id="text9123-5"><tspan + sodipodi:role="line" + id="tspan9121-0" + style="stroke-width:0.264583" + x="198.97969" + y="373.73682">17</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="255.83934" + y="289.21954" + id="text9123-9"><tspan + sodipodi:role="line" + id="tspan9121-6" + style="stroke-width:0.264583" + x="255.83934" + y="289.21954">17</tspan></text> + <g + id="g11117"> + <g + id="g10399"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953" + width="38.364582" + height="21.166666" + x="18.448671" + y="181.23958" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3" + width="38.364582" + height="21.166666" + x="18.448671" + y="160.15623" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6" + width="38.364582" + height="21.166666" + x="18.448671" + y="139.02823" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7" + width="38.364582" + height="21.166666" + x="18.448671" + y="117.94488" /> + <g + id="g10389"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + </g> + <g + id="g10399-6" + transform="translate(55.549231)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-2" + width="38.364582" + height="21.166666" + x="18.448671" + y="181.23958" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-9" + width="38.364582" + height="21.166666" + x="18.448671" + y="160.15623" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-1" + width="38.364582" + height="21.166666" + x="18.448671" + y="139.02823" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-2" + width="38.364582" + height="21.166666" + x="18.448671" + y="117.94488" /> + <g + id="g10389-7"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-0" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-9" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-3" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 18.520833,202.40625 H 112.44792" + id="path11016" /> + </g> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-62" + width="38.364582" + height="21.166666" + x="130.85757" + y="181.23958" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-6" + width="38.364582" + height="21.166666" + x="130.85757" + y="160.15623" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-18" + width="38.364582" + height="21.166666" + x="130.85757" + y="139.02823" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-7" + width="38.364582" + height="21.166666" + x="130.85757" + y="117.94488" /> + <g + id="g10389-9" + transform="translate(112.4089)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-2" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-0" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-2" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-2-7" + width="38.364582" + height="21.166666" + x="186.4068" + y="181.23958" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-9-5" + width="38.364582" + height="21.166666" + x="186.4068" + y="160.15623" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-1-9" + width="38.364582" + height="21.166666" + x="186.4068" + y="139.02823" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-2-2" + width="38.364582" + height="21.166666" + x="186.4068" + y="117.94488" /> + <g + id="g10389-7-2" + transform="translate(167.95813)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-0-8" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-9-9" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-3-7" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 130.92973,202.40625 h 93.92709" + id="path11016-3" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-9" + width="38.364582" + height="21.166666" + x="243.26645" + y="181.23958" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-3" + width="38.364582" + height="21.166666" + x="243.26645" + y="160.15623" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-19" + width="38.364582" + height="21.166666" + x="243.26645" + y="139.02823" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-4" + width="38.364582" + height="21.166666" + x="243.26645" + y="117.94488" /> + <g + id="g10389-78" + transform="translate(224.81778)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-4" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-5" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-0" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-2-1" + width="38.364582" + height="21.166666" + x="298.81567" + y="181.23958" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-9-0" + width="38.364582" + height="21.166666" + x="298.81567" + y="160.15623" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-1-6" + width="38.364582" + height="21.166666" + x="298.81567" + y="139.02823" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-2-3" + width="38.364582" + height="21.166666" + x="298.81567" + y="117.94488" /> + <g + id="g10389-7-20" + transform="translate(280.36701)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-0-6" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-9-1" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-3-5" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 243.33861,202.40625 H 337.2657" + id="path11016-5" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-37" + width="38.364582" + height="21.166666" + x="18.448673" + y="359.29584" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-4" + width="38.364582" + height="21.166666" + x="18.448673" + y="338.21249" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-5" + width="38.364582" + height="21.166666" + x="18.448673" + y="317.0845" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-25" + width="38.364582" + height="21.166666" + x="18.448673" + y="296.00116" /> + <g + id="g10389-4" + transform="translate(2e-6,178.05627)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-7" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-4" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-4" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-2-78" + width="38.364582" + height="21.166666" + x="73.997902" + y="359.29584" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-9-6" + width="38.364582" + height="21.166666" + x="73.997902" + y="338.21249" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-1-8" + width="38.364582" + height="21.166666" + x="73.997902" + y="317.0845" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-2-8" + width="38.364582" + height="21.166666" + x="73.997902" + y="296.00116" /> + <g + id="g10389-7-4" + transform="translate(55.549233,178.05627)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-0-3" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-9-14" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-3-9" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 18.520835,380.46252 H 112.44792" + id="path11016-2" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-62-8" + width="38.364582" + height="21.166666" + x="130.85757" + y="359.29584" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-6-9" + width="38.364582" + height="21.166666" + x="130.85757" + y="338.21249" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-18-2" + width="38.364582" + height="21.166666" + x="130.85757" + y="317.0845" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-7-6" + width="38.364582" + height="21.166666" + x="130.85757" + y="296.00116" /> + <g + id="g10389-9-6" + transform="translate(112.4089,178.05627)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-2-4" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-0-9" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-2-5" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-2-7-4" + width="38.364582" + height="21.166666" + x="186.4068" + y="359.29584" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-9-5-8" + width="38.364582" + height="21.166666" + x="186.4068" + y="338.21249" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-1-9-7" + width="38.364582" + height="21.166666" + x="186.4068" + y="317.0845" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-2-2-1" + width="38.364582" + height="21.166666" + x="186.4068" + y="296.00116" /> + <g + id="g10389-7-2-7" + transform="translate(167.95813,178.05627)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-0-8-2" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-9-9-7" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-3-7-2" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 130.92973,380.46252 h 93.92709" + id="path11016-3-2" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-9-0" + width="38.364582" + height="21.166666" + x="243.26645" + y="359.29584" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-3-6" + width="38.364582" + height="21.166666" + x="243.26645" + y="338.21249" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-19-1" + width="38.364582" + height="21.166666" + x="243.26645" + y="317.0845" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-4-5" + width="38.364582" + height="21.166666" + x="243.26645" + y="296.00116" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-4-4" + width="38.364582" + height="21.166666" + x="243.26645" + y="274.77856" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-5-9" + width="38.364582" + height="21.166666" + x="243.26645" + y="253.65056" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-0-0" + width="38.364582" + height="21.166666" + x="243.26645" + y="232.5672" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-2-1-1" + width="38.364582" + height="21.166666" + x="298.81567" + y="359.29584" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-9-0-7" + width="38.364582" + height="21.166666" + x="298.81567" + y="338.21249" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-1-6-7" + width="38.364582" + height="21.166666" + x="298.81567" + y="317.0845" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-2-3-1" + width="38.364582" + height="21.166666" + x="298.81567" + y="296.00116" /> + <g + id="g10389-7-20-1" + transform="translate(280.36701,178.05627)"> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-0-6-5" + width="38.364582" + height="21.166666" + x="18.448671" + y="96.722282" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-9-1-9" + width="38.364582" + height="21.166666" + x="18.448671" + y="75.594284" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-3-5-7" + width="38.364582" + height="21.166666" + x="18.448671" + y="54.510933" /> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 243.33861,380.46252 H 337.2657" + id="path11016-5-7" /> + <text + xml:space="preserve" + style="font-size:9.92302px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.248075" + x="17.667999" + y="216.45665" + id="text17742"><tspan + sodipodi:role="line" + id="tspan17740" + style="stroke-width:0.248075" + x="17.667999" + y="216.45665">traitement de 17</tspan></text> + <text + xml:space="preserve" + style="font-size:9.92302px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.248075" + x="242.48578" + y="216.45665" + id="text17742-6"><tspan + sodipodi:role="line" + id="tspan17740-7" + style="stroke-width:0.248075" + x="242.48578" + y="216.45665">traitement de 20</tspan></text> + <text + xml:space="preserve" + style="font-size:9.92302px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.248075" + x="260.53665" + y="392.51599" + id="text17742-3"><tspan + sodipodi:role="line" + id="tspan17740-6" + style="stroke-width:0.248075" + x="260.53665" + y="392.51599">état final</tspan></text> + <text + xml:space="preserve" + style="font-size:9.92302px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.248075" + x="130.0769" + y="392.51599" + id="text17742-5"><tspan + sodipodi:role="line" + id="tspan17740-63" + style="stroke-width:0.248075" + x="130.0769" + y="392.51599">traitement de 25</tspan></text> + <text + xml:space="preserve" + style="font-size:9.92302px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.248075" + x="130.0769" + y="216.45665" + id="text17742-9"><tspan + sodipodi:role="line" + id="tspan17740-4" + style="stroke-width:0.248075" + x="130.0769" + y="216.45665">traitement de 34</tspan></text> + <text + xml:space="preserve" + style="font-size:9.92302px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.248075" + x="17.668001" + y="392.51599" + id="text17742-8"><tspan + sodipodi:role="line" + id="tspan17740-1" + style="stroke-width:0.248075" + x="17.668001" + y="392.51599">traitement de 40</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="256.02795" + y="174.59204" + id="text9123-38"><tspan + sodipodi:role="line" + id="tspan9121-5" + style="stroke-width:0.264583" + x="256.02795" + y="174.59204">20</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="86.759415" + y="352.64828" + id="text9123-38-04"><tspan + sodipodi:role="line" + id="tspan9121-5-4" + style="stroke-width:0.264583" + x="86.759415" + y="352.64828">20</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="199.16832" + y="352.64828" + id="text9123-38-44"><tspan + sodipodi:role="line" + id="tspan9121-5-7" + style="stroke-width:0.264583" + x="199.16832" + y="352.64828">20</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="256.02795" + y="310.43695" + id="text9123-38-63"><tspan + sodipodi:role="line" + id="tspan9121-5-17" + style="stroke-width:0.264583" + x="256.02795" + y="310.43695">20</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="31.339378" + y="373.73163" + id="text9123-38-5"><tspan + sodipodi:role="line" + id="tspan9121-5-9" + style="stroke-width:0.264583" + x="31.339378" + y="373.73163">40</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="143.74828" + y="373.73163" + id="text9123-38-5-6"><tspan + sodipodi:role="line" + id="tspan9121-5-9-2" + style="stroke-width:0.264583" + x="143.74828" + y="373.73163">40</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="256.15717" + y="373.73163" + id="text9123-38-5-1"><tspan + sodipodi:role="line" + id="tspan9121-5-9-7" + style="stroke-width:0.264583" + x="256.15717" + y="373.73163">40</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="143.69919" + y="331.52029" + id="text9123-38-5-8"><tspan + sodipodi:role="line" + id="tspan9121-5-9-5" + style="stroke-width:0.264583" + x="143.69919" + y="331.52029">25</tspan></text> + <g + id="g41345" + transform="translate(0,-0.68789673)"> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="-50.176193" + y="196.36844" + id="text9123-88"><tspan + sodipodi:role="line" + id="tspan9121-3" + style="stroke-width:0.264583" + x="-50.176193" + y="196.36844">17</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="-50.039249" + y="175.27994" + id="text9123-38-6-1"><tspan + sodipodi:role="line" + id="tspan9121-5-1-8" + style="stroke-width:0.264583" + x="-50.039249" + y="175.27994">34</tspan></text> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-18-1" + width="38.364582" + height="21.166666" + x="-62.749088" + y="181.92747" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-7-8" + width="38.364582" + height="21.166666" + x="-62.749088" + y="160.84413" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-5-2-9" + width="38.364582" + height="21.166666" + x="-62.749092" + y="139.62154" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-6-3-0-7" + width="38.364582" + height="21.166666" + x="-62.749092" + y="118.49354" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.264999" + id="rect7953-3-7-5-2-53" + width="38.364582" + height="21.166666" + x="-62.749092" + y="97.410187" /> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="-49.987576" + y="154.05734" + id="text9123-38-96"><tspan + sodipodi:role="line" + id="tspan9121-5-43" + style="stroke-width:0.264583" + x="-49.987576" + y="154.05734">20</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="-49.858387" + y="132.92934" + id="text9123-38-5-3"><tspan + sodipodi:role="line" + id="tspan9121-5-9-3" + style="stroke-width:0.264583" + x="-49.858387" + y="132.92934">40</tspan></text> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="-49.907478" + y="111.84599" + id="text9123-38-5-8-8"><tspan + sodipodi:role="line" + id="tspan9121-5-9-5-6" + style="stroke-width:0.264583" + x="-49.907478" + y="111.84599">25</tspan></text> + </g> + <text + xml:space="preserve" + style="font-size:10.5833px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583" + x="256.10806" + y="331.52029" + id="text9123-38-5-8-7"><tspan + sodipodi:role="line" + id="tspan9121-5-9-5-4" + style="stroke-width:0.264583" + x="256.10806" + y="331.52029">25</tspan></text> + </g> +</svg>