diff --git a/cr/images/algo_base.png b/cr/images/algo_base.png new file mode 100644 index 0000000..3d83b54 Binary files /dev/null and b/cr/images/algo_base.png differ diff --git a/cr/images/mutation.png b/cr/images/mutation.png new file mode 100644 index 0000000..1e5a39f Binary files /dev/null and b/cr/images/mutation.png differ diff --git a/cr/images/reproduction.png b/cr/images/reproduction.png new file mode 100644 index 0000000..135d7f3 Binary files /dev/null and b/cr/images/reproduction.png differ diff --git a/cr/images/selection.png b/cr/images/selection.png new file mode 100644 index 0000000..18e0deb Binary files /dev/null and b/cr/images/selection.png differ diff --git a/cr/lib/cr.sty b/cr/lib/cr.sty index 97f501d..55a762d 100644 --- a/cr/lib/cr.sty +++ b/cr/lib/cr.sty @@ -2,6 +2,7 @@ \usepackage{geometry} \usepackage[french]{babel} \usepackage[T1]{fontenc} +\usepackage{xparse} \graphicspath{{images/}} \geometry{ @@ -51,10 +52,28 @@ \end{titlepage} } -\newcommand{\crfigure}[2] { +\NewDocumentCommand{\crfigure}{O{0.75\textwidth} m m}{ \begin{figure}[h] \centering - \includegraphics[width=0.75\textwidth]{#1} - \caption{#2} + \includegraphics[width=#1]{#2} + \caption{#3} \end{figure} } + +\NewDocumentCommand{\twofigures}{O{0.75\textwidth} m m m m}{ + \begin{figure}[h] + \centering + \begin{minipage}[t]{0.45\dimexpr#1} + \centering + \includegraphics[width=\textwidth]{#2} + \caption{#3} + \end{minipage} + \hspace{0.05\textwidth} + \begin{minipage}[t]{0.45\dimexpr#1} + \centering + \includegraphics[width=\textwidth]{#4} + \caption{#5} + \end{minipage} + \end{figure} +} + diff --git a/cr/src/source.tex b/cr/src/source.tex index 16e8091..503d711 100644 --- a/cr/src/source.tex +++ b/cr/src/source.tex @@ -31,8 +31,10 @@ Afin de résoudre le problème posé nous avons donc dû mettre en place un algo \section{Algortihme simplifié} -Voici un algorigramme simplifié de notre programme : +Voici des algorigrammes de la boucle principale du programme ainsi que des fonctions principales : +\twofigures[0.8\textwidth]{algo\_base}{Algorigramme de la boucle principale}{selection}{Algorigramme de la fonction de sélection} +\twofigures[0.8\textwidth]{reproduction}{Algorigramme de la fonction de reproduction}{mutation}{Algorigrammes de la fonction de mutation} \end{document}