Rédaction d'une grande partie de la seconde partie du compte rendu
Retypage de quelques fonctions Correction d'un problème de dépendances dans le Makefile
This commit is contained in:
parent
5a16b7c99a
commit
2c825f16a8
6
Code.ml
6
Code.ml
@ -131,8 +131,6 @@ let decoder code z =
|
|||||||
| (_, e) -> antecedent code ((lxor) z e)
|
| (_, e) -> antecedent code ((lxor) z e)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let cyclencode code (x:vecteur) :vecteur = polmul code.pol x;;
|
|
||||||
|
|
||||||
|
|
||||||
end;;
|
end;;
|
||||||
|
|
||||||
@ -150,6 +148,8 @@ type code_cyclique = t;;
|
|||||||
let get k n pol = {k=k;n=n;pol=pol};;
|
let get k n pol = {k=k;n=n;pol=pol};;
|
||||||
|
|
||||||
|
|
||||||
|
let cyclencode code (x:vecteur) :vecteur = polmul code.pol x;;
|
||||||
|
|
||||||
end;;
|
end;;
|
||||||
|
|
||||||
(*************************************************************)
|
(*************************************************************)
|
||||||
@ -191,4 +191,4 @@ let lineaireVersCyclique code =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
(* Voilà *)
|
(* Voilà *)
|
||||||
|
|||||||
2
Code.mli
2
Code.mli
@ -8,7 +8,7 @@ type t = {
|
|||||||
type code_lineaire = t
|
type code_lineaire = t
|
||||||
|
|
||||||
val encoder : code_lineaire -> Math.vecteur -> Math.vecteur
|
val encoder : code_lineaire -> Math.vecteur -> Math.vecteur
|
||||||
val systematiqueFromRedondance : int -> int -> int list -> code_lineaire
|
val systematiqueFromRedondance : int -> int -> matrice -> code_lineaire
|
||||||
val distance_minimale : code_lineaire -> int
|
val distance_minimale : code_lineaire -> int
|
||||||
val decoder : code_lineaire -> int -> Math.vecteur
|
val decoder : code_lineaire -> int -> Math.vecteur
|
||||||
val appartenir : code_lineaire -> Math.vecteur -> bool
|
val appartenir : code_lineaire -> Math.vecteur -> bool
|
||||||
|
|||||||
1
CompteRendu/.gitignore
vendored
1
CompteRendu/.gitignore
vendored
@ -5,3 +5,4 @@
|
|||||||
*.synctex.gz
|
*.synctex.gz
|
||||||
*.toc
|
*.toc
|
||||||
*.thm
|
*.thm
|
||||||
|
svg-inkscape/
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
\usepackage{calrsfs}
|
\usepackage{calrsfs}
|
||||||
\usepackage{setspace}
|
\usepackage{setspace}
|
||||||
\usepackage{stmaryrd}
|
\usepackage{stmaryrd}
|
||||||
|
\usepackage{svg}
|
||||||
|
|
||||||
\usepackage{bashful}
|
\usepackage{bashful}
|
||||||
|
|
||||||
@ -31,6 +32,8 @@
|
|||||||
|
|
||||||
% Racourcis
|
% Racourcis
|
||||||
\newcommand{\FD}{\mathbb{F}_2\hspace{-.2em}}
|
\newcommand{\FD}{\mathbb{F}_2\hspace{-.2em}}
|
||||||
|
\newcommand\fsign[3]{\item \textbf{#1} : \textit{#2} \qquad Complexité en $\mathcal{O}(#3)$\\}
|
||||||
|
\newcommand\into{\textrightarrow\:}
|
||||||
|
|
||||||
\newtheoremstyle{break}
|
\newtheoremstyle{break}
|
||||||
{\topsep}{\topsep}%
|
{\topsep}{\topsep}%
|
||||||
@ -80,7 +83,7 @@
|
|||||||
$$d_C = \min_{x,y\in C\times C}\left(d(x,y)\right)$$
|
$$d_C = \min_{x,y\in C\times C}\left(d(x,y)\right)$$
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
\begin{theoreme}
|
\begin{theoreme}\label{thCapacité}
|
||||||
On peut alors exprimer $e_d$ et $e_c$ en fonction de $d_C$ :
|
On peut alors exprimer $e_d$ et $e_c$ en fonction de $d_C$ :
|
||||||
|
|
||||||
$$ e_c = d_C - 1 \qquad e_d = \left\lfloor\frac{d_C - 1}{2}\right\rfloor$$
|
$$ e_c = d_C - 1 \qquad e_d = \left\lfloor\frac{d_C - 1}{2}\right\rfloor$$
|
||||||
@ -131,7 +134,7 @@
|
|||||||
On appelle alors \textbf{mot erreur} le mot $E = Z - Y$.
|
On appelle alors \textbf{mot erreur} le mot $E = Z - Y$.
|
||||||
On appelle \text{syndrome} le mot $S = H \cdot Z$.
|
On appelle \text{syndrome} le mot $S = H \cdot Z$.
|
||||||
|
|
||||||
On remarque que $E$ et $Z$ on le même syndrome. On peut plus généralement définir une relation d'équivalence «avoir le même syndrome». Les classes d'équivalence de cette relation sont appelées \textbf{classes latérales}
|
On remarque que $E$ et $Z$ on le même syndrome. On peut plus généralement définir une relation d'équivalence «avoir le même syndrome». Les classes d'équivale nce de cette relation sont appelées \textbf{classes latérales}.
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
\section{Codes cycliques}
|
\section{Codes cycliques}
|
||||||
@ -159,7 +162,71 @@
|
|||||||
|
|
||||||
\part{Algorithmes}
|
\part{Algorithmes}
|
||||||
\section{Des structures de données}
|
\section{Des structures de données}
|
||||||
\section{Liste des fonctions}
|
|
||||||
|
|
||||||
|
La première étape était de créer des structures de données adéquates, c'est à dire permettant d'effectuer les calculs nécessaire à l'utilisation des codes cycliques à moindre coût (temporel).
|
||||||
|
|
||||||
|
\subsection{Matrices et vecteurs}
|
||||||
|
Puisque nous avons affaire à des vecteurs de $\FD^n$ on peut les stocker sous forme d'entier «informatique». Nous sommes alors limités par la taille des mots du processeur, typiquement 32 bits ou 64 bits. Mais il est toujours possible de créer des entiers binaires virtuellement plus «grand». Un autre problème est qu'on ne peut pas récupérer la dimension d'un vecteur, et nous devons donc transmettre la donnée à coté.
|
||||||
|
|
||||||
|
Les matrices sont elles, des listes de vecteurs et sont donc naturellement stockées comme listes d'entiers binaires. On utilisera la structure de liste chainée native d'OCaml.
|
||||||
|
|
||||||
|
|
||||||
|
Nous avons ensuite codé les fonctions suivantes: (Les complexités sont données pour des matrices de $\mathcal{M}_{n,k}(\FD)$, les opérations bit à bit se faisant à temps constant, ce qui est vrai pour les entiers natifs).
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\fsign{produit}{matrice \into vecteur \into vecteur}{k} Renvoie simplement le vecteur produit $Y = M \cdot X$
|
||||||
|
\fsign{identite}{int \into matrice}{n} Renvoie la matrice identité de $\mathcal{M}_n(\FD)$
|
||||||
|
\fsign{print\_matrice}{int \into matrice \into unit}{nk} Affiche la matrice dans le terminal. Il faut spécifier la dimension verticale (des vecteurs). Un exemple de valeur de sortie est donnée figure \ref{print_matriceExemple}
|
||||||
|
\fsign{print\_vecteur}{int \into vecteur \into unit}{n} Affiche le vecteur dans le terminal, vu comme une matrice de $\mathcal{M}_{n,1}(\FD)$ (Exemple figure \ref{print_matriceExemple})
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\subsection{Polynômes}
|
||||||
|
De la même manière, les polynômes sont des vecteurs de l'espace vectoriel $\FD[X]$. On peut donc eux aussi les stocker comme entiers binaires, avec l'entier écrit en base 2: $a_0a_1a_2\cdots a_d$ correspondant au polynôme $P=\displaystyle\sum^d_{i=0}a_i\cdot X^i$. Là encore, nous nous limitons aux polynômes de degré 31 ou 63, à moins d'utiliser des objets virtuels plus avancés.
|
||||||
|
|
||||||
|
Les fonctions suivantes ont été créées (les complexités sont données pour les polynômes $P$ et $Q$ de degrés respectifs $p$ et $q$).
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\fsign{degre}{polynome \into int}{p} Renvoie le degré du polynôme
|
||||||
|
\fsign{polmul}{polynome \into polynome \into polynome}{\min(p,q)} Effectue le produit de deux polynômes dans l'algèbre $\FD[X]$
|
||||||
|
\fsign{poldiveuc}{polynome \into polynome \into polynome $\times$ polynome}{p^2} Effectue la division euclidienne de $P$ par $Q$.
|
||||||
|
|
||||||
|
\fsign{print\_polynome}{polynome \into unit}{p}(Exemple figure \ref{print_matriceExemple})
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\subsection{Codes}
|
||||||
|
|
||||||
|
Les différents codes (linéaires et cycliques) sont stockés comme des enregistrements.
|
||||||
|
|
||||||
|
Les codes linéaires sont la donnée de leurs matrices génératrice et une matrice de contrôle (redondante) ainsi que k et n (nécessaire car les «matrices» n'ont pas la donnée de leur hauteur). Bien que l'on puisse déduire une matrice de contrôle de la matrice génératrice, ce calcul peut se révéler coûteux.
|
||||||
|
|
||||||
|
Les codes cycliques sont simplement les données de k, de n et du polynôme générateur.
|
||||||
|
|
||||||
|
Les fonctions suivantes permettent de manipuler les structures:
|
||||||
|
\begin{itemize}
|
||||||
|
\fsign{systematiqueFromRedondance}{int \into int \into matrice \into code\_lineaire}{k} Renvoie le code linéaire systématique associé à la matrice de redondance de $\mathcal{M}_{n-k,k}$.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\section{Liste des fonctions}
|
||||||
|
|
||||||
|
|
||||||
|
Nous avons ensuite écrit des fonctions permettant de manipuler les codes linéaires:
|
||||||
|
\begin{itemize}
|
||||||
|
\fsign{encoder}{code\_lineaire \into Math.vecteur \into Math.vecteur}{}
|
||||||
|
Encode le vecteur de $\FD^k$ suivant le code linéaire spécifié, il s'agit alors d'un simple produit avec la matrice génératrice.
|
||||||
|
\fsign{appartenir}{code_lineaire -> Math.vecteur -> bool}
|
||||||
|
Renvoie \textit{vrai} si et seulement si le vecteur appartient au code, c'est à dire, si et seulement si $HX=0$ avec $H$ la matrice de contrôle et $X$ le vecteur de $\FD^n$ en question.
|
||||||
|
\fsign{distance\_minimale}{code\_lineaire -> int}{}
|
||||||
|
Renvoie la distance minimale du code, utilisée pour calculer les capacités de détéction et de correction du code (voir \ref{thCapacité})
|
||||||
|
\fsign{decoder}{code\_lineaire \into int \into Math.vecteur}{}
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\part*{Annexes}
|
||||||
|
\begin{figure}[h]
|
||||||
|
\begin{center}
|
||||||
|
\label{print_matriceExemple}
|
||||||
|
\includesvg[scale=.3]{print_output.svg}
|
||||||
|
\caption{Exemple d'affichage de vecteur,matrice et polynômes}
|
||||||
|
\end{center}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|||||||
177
CompteRendu/print_output.svg
Normal file
177
CompteRendu/print_output.svg
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="66.282837mm"
|
||||||
|
height="117.06406mm"
|
||||||
|
viewBox="0 0 66.282836 117.06406"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||||
|
sodipodi:docname="print_output.svg">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.979899"
|
||||||
|
inkscape:cx="10.04794"
|
||||||
|
inkscape:cy="216.89603"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="703"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-0.53453934,-1.3999026)">
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#686868;fill-opacity:1;stroke:none;stroke-width:1.76637125;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect827"
|
||||||
|
width="66.282837"
|
||||||
|
height="117.06406"
|
||||||
|
x="0.53453934"
|
||||||
|
y="1.3999026" />
|
||||||
|
<g
|
||||||
|
aria-label="┌011┐
|
||||||
|
│101│
|
||||||
|
│111│
|
||||||
|
│100│
|
||||||
|
└001┘"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:17.08358955px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="text12">
|
||||||
|
<path
|
||||||
|
d="m 12.454936,16.851757 h 5.980925 v 1.434754 h -4.646269 v 9.576153 h -1.334656 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path822" />
|
||||||
|
<path
|
||||||
|
d="m 23.399111,23.683524 q -2.001983,0 -3.011317,-1.634953 -1.017674,-1.643294 -1.017674,-4.821442 0,-3.18649 1.017674,-4.829785 1.009334,-1.634953 3.011317,-1.634953 2.001983,0 3.019658,1.634953 0.500495,0.800794 0.759085,2.001983 0.258589,1.192849 0.258589,2.827802 0,1.634953 -0.258589,2.827801 -0.25859,1.192848 -0.759085,1.993641 -1.026017,1.634953 -3.019658,1.634953 z m 0,-1.334655 q 1.192848,0 1.768418,-1.267923 0.57557,-1.267922 0.57557,-3.853817 0,-2.602578 -0.57557,-3.853818 -0.57557,-1.276264 -1.768418,-1.276264 -1.176165,0 -1.751735,1.267922 -0.291956,0.62562 -0.442105,1.576562 -0.141807,0.942601 -0.141807,2.285598 0,2.610919 0.583912,3.853817 0.583911,1.267923 1.751735,1.267923 z m 0.01668,-2.210523 q -0.25859,0 -0.408738,-0.358689 -0.150149,-0.358689 -0.250248,-0.842501 -0.08342,-0.392055 -0.141807,-0.925917 -0.05005,-0.542204 -0.05005,-0.825818 0,-0.200199 0.03337,-0.717378 0.03337,-0.517179 0.133465,-0.975966 0.241906,-1.192849 0.650645,-1.192849 0.233564,0 0.392055,0.316981 0.166832,0.316981 0.283614,0.900892 0.08342,0.408739 0.133465,0.925918 0.05005,0.517179 0.05005,0.809134 0,0.166832 -0.03337,0.658987 -0.02502,0.492154 -0.108441,1.009333 -0.20854,1.217873 -0.684011,1.217873 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path824" />
|
||||||
|
<path
|
||||||
|
d="m 30.789765,22.023547 h 2.619262 v -8.93385 l -1.9853,2.260572 -0.917576,-1.117774 2.886192,-3.244881 h 1.685003 v 11.035933 h 2.585895 v 1.418071 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path826" />
|
||||||
|
<path
|
||||||
|
d="m 41.066611,22.023547 h 2.619262 v -8.93385 l -1.9853,2.260572 -0.917576,-1.117774 2.886192,-3.244881 h 1.685003 v 11.035933 h 2.585895 v 1.418071 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path828" />
|
||||||
|
<path
|
||||||
|
d="m 53.562324,18.286511 h -4.637928 v -1.434754 h 5.972583 v 11.010907 h -1.334655 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path830" />
|
||||||
|
<path
|
||||||
|
d="m 12.454936,28.529992 h 1.334656 v 20.687159 h -1.334656 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path832" />
|
||||||
|
<path
|
||||||
|
d="m 20.512918,43.378034 h 2.619262 v -8.93385 l -1.9853,2.260572 -0.917576,-1.117774 2.886192,-3.244881 h 1.685003 v 11.035933 h 2.585895 v 1.418071 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path834" />
|
||||||
|
<path
|
||||||
|
d="m 33.675958,45.038011 q -2.001983,0 -3.011317,-1.634953 -1.017674,-1.643294 -1.017674,-4.821442 0,-3.18649 1.017674,-4.829785 1.009334,-1.634953 3.011317,-1.634953 2.001983,0 3.019658,1.634953 0.500495,0.800793 0.759085,2.001983 0.258589,1.192849 0.258589,2.827802 0,1.634952 -0.258589,2.827801 -0.25859,1.192848 -0.759085,1.993641 -1.026017,1.634953 -3.019658,1.634953 z m 0,-1.334655 q 1.192848,0 1.768418,-1.267923 0.57557,-1.267923 0.57557,-3.853817 0,-2.602579 -0.57557,-3.853818 -0.57557,-1.276264 -1.768418,-1.276264 -1.176165,0 -1.751736,1.267922 -0.291955,0.62562 -0.442104,1.576562 -0.141807,0.942601 -0.141807,2.285598 0,2.610919 0.583911,3.853817 0.583912,1.267923 1.751736,1.267923 z m 0.01668,-2.210523 q -0.25859,0 -0.408738,-0.358689 -0.150149,-0.358689 -0.250248,-0.842501 -0.08342,-0.392055 -0.141807,-0.925917 -0.05005,-0.542204 -0.05005,-0.825818 0,-0.200199 0.03337,-0.717378 0.03337,-0.517179 0.133466,-0.975967 0.241906,-1.192848 0.650644,-1.192848 0.233565,0 0.392055,0.316981 0.166832,0.316981 0.283615,0.900892 0.08342,0.408738 0.133465,0.925917 0.05005,0.517179 0.05005,0.809135 0,0.166832 -0.03337,0.658986 -0.02502,0.492155 -0.108441,1.009334 -0.20854,1.217873 -0.684011,1.217873 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path836" />
|
||||||
|
<path
|
||||||
|
d="m 41.066611,43.378034 h 2.619262 v -8.93385 l -1.9853,2.260572 -0.917576,-1.117774 2.886192,-3.244881 h 1.685003 v 11.035933 h 2.585895 v 1.418071 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path838" />
|
||||||
|
<path
|
||||||
|
d="m 53.562324,28.529992 h 1.334655 v 20.687159 h -1.334655 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path840" />
|
||||||
|
<path
|
||||||
|
d="m 12.454936,49.884479 h 1.334656 v 20.687159 h -1.334656 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path842" />
|
||||||
|
<path
|
||||||
|
d="m 20.512918,64.73252 h 2.619262 v -8.933849 l -1.9853,2.260572 -0.917576,-1.117774 2.886192,-3.244881 h 1.685003 V 64.73252 h 2.585895 v 1.418072 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path844" />
|
||||||
|
<path
|
||||||
|
d="m 30.789765,64.73252 h 2.619262 v -8.933849 l -1.9853,2.260572 -0.917576,-1.117774 2.886192,-3.244881 h 1.685003 V 64.73252 h 2.585895 v 1.418072 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path846" />
|
||||||
|
<path
|
||||||
|
d="m 41.066611,64.73252 h 2.619262 v -8.933849 l -1.9853,2.260572 -0.917576,-1.117774 2.886192,-3.244881 h 1.685003 V 64.73252 h 2.585895 v 1.418072 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path848" />
|
||||||
|
<path
|
||||||
|
d="m 53.562324,49.884479 h 1.334655 v 20.687159 h -1.334655 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path850" />
|
||||||
|
<path
|
||||||
|
d="m 12.454936,71.238966 h 1.334656 v 20.687159 h -1.334656 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path852" />
|
||||||
|
<path
|
||||||
|
d="m 20.512918,86.087007 h 2.619262 v -8.933849 l -1.9853,2.260572 -0.917576,-1.117774 2.886192,-3.244881 h 1.685003 v 11.035932 h 2.585895 v 1.418072 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path854" />
|
||||||
|
<path
|
||||||
|
d="m 33.675958,87.746985 q -2.001983,0 -3.011317,-1.634953 -1.017674,-1.643294 -1.017674,-4.821443 0,-3.186489 1.017674,-4.829784 1.009334,-1.634953 3.011317,-1.634953 2.001983,0 3.019658,1.634953 0.500495,0.800793 0.759085,2.001983 0.258589,1.192849 0.258589,2.827801 0,1.634953 -0.258589,2.827802 -0.25859,1.192848 -0.759085,1.993641 -1.026017,1.634953 -3.019658,1.634953 z m 0,-1.334655 q 1.192848,0 1.768418,-1.267923 0.57557,-1.267923 0.57557,-3.853818 0,-2.602578 -0.57557,-3.853817 -0.57557,-1.276264 -1.768418,-1.276264 -1.176165,0 -1.751736,1.267922 -0.291955,0.62562 -0.442104,1.576562 -0.141807,0.9426 -0.141807,2.285597 0,2.61092 0.583911,3.853818 0.583912,1.267923 1.751736,1.267923 z m 0.01668,-2.210523 q -0.25859,0 -0.408738,-0.358689 -0.150149,-0.358689 -0.250248,-0.842501 -0.08342,-0.392055 -0.141807,-0.925918 -0.05005,-0.542203 -0.05005,-0.825818 0,-0.200198 0.03337,-0.717377 0.03337,-0.517179 0.133466,-0.975967 0.241906,-1.192848 0.650644,-1.192848 0.233565,0 0.392055,0.316981 0.166832,0.31698 0.283615,0.900892 0.08342,0.408738 0.133465,0.925917 0.05005,0.517179 0.05005,0.809135 0,0.166832 -0.03337,0.658986 -0.02502,0.492155 -0.108441,1.009334 -0.20854,1.217873 -0.684011,1.217873 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path856" />
|
||||||
|
<path
|
||||||
|
d="m 43.952804,87.746985 q -2.001984,0 -3.011317,-1.634953 -1.017675,-1.643294 -1.017675,-4.821443 0,-3.186489 1.017675,-4.829784 1.009333,-1.634953 3.011317,-1.634953 2.001983,0 3.019658,1.634953 0.500495,0.800793 0.759085,2.001983 0.258589,1.192849 0.258589,2.827801 0,1.634953 -0.258589,2.827802 -0.25859,1.192848 -0.759085,1.993641 -1.026017,1.634953 -3.019658,1.634953 z m 0,-1.334655 q 1.192848,0 1.768418,-1.267923 0.57557,-1.267923 0.57557,-3.853818 0,-2.602578 -0.57557,-3.853817 -0.57557,-1.276264 -1.768418,-1.276264 -1.176166,0 -1.751736,1.267922 -0.291956,0.62562 -0.442104,1.576562 -0.141807,0.9426 -0.141807,2.285597 0,2.61092 0.583911,3.853818 0.583912,1.267923 1.751736,1.267923 z m 0.01668,-2.210523 q -0.25859,0 -0.408738,-0.358689 -0.150149,-0.358689 -0.250248,-0.842501 -0.08342,-0.392055 -0.141807,-0.925918 -0.05005,-0.542203 -0.05005,-0.825818 0,-0.200198 0.03337,-0.717377 0.03337,-0.517179 0.133466,-0.975967 0.241906,-1.192848 0.650644,-1.192848 0.233565,0 0.392055,0.316981 0.166832,0.31698 0.283615,0.900892 0.08342,0.408738 0.133465,0.925917 0.05005,0.517179 0.05005,0.809135 0,0.166832 -0.03337,0.658986 -0.02502,0.492155 -0.10844,1.009334 -0.20854,1.217873 -0.684011,1.217873 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path858" />
|
||||||
|
<path
|
||||||
|
d="m 53.562324,71.238966 h 1.334655 v 20.687159 h -1.334655 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path860" />
|
||||||
|
<path
|
||||||
|
d="m 12.454936,92.593453 h 1.334656 v 9.676247 h 4.646269 v 1.43476 h -5.980925 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path862" />
|
||||||
|
<path
|
||||||
|
d="m 23.399111,109.10147 q -2.001983,0 -3.011317,-1.63495 -1.017674,-1.6433 -1.017674,-4.82144 0,-3.186493 1.017674,-4.829788 1.009334,-1.634953 3.011317,-1.634953 2.001983,0 3.019658,1.634953 0.500495,0.800793 0.759085,2.001983 0.258589,1.192845 0.258589,2.827805 0,1.63495 -0.258589,2.8278 -0.25859,1.19285 -0.759085,1.99364 -1.026017,1.63495 -3.019658,1.63495 z m 0,-1.33465 q 1.192848,0 1.768418,-1.26793 0.57557,-1.26792 0.57557,-3.85381 0,-2.60258 -0.57557,-3.853821 -0.57557,-1.276264 -1.768418,-1.276264 -1.176165,0 -1.751735,1.267922 -0.291956,0.62562 -0.442105,1.576563 -0.141807,0.9426 -0.141807,2.2856 0,2.61092 0.583912,3.85381 0.583911,1.26793 1.751735,1.26793 z m 0.01668,-2.21053 q -0.25859,0 -0.408738,-0.35869 -0.150149,-0.35868 -0.250248,-0.8425 -0.08342,-0.39205 -0.141807,-0.92591 -0.05005,-0.54221 -0.05005,-0.82582 0,-0.2002 0.03337,-0.71738 0.03337,-0.51718 0.133465,-0.97597 0.241906,-1.192844 0.650645,-1.192844 0.233564,0 0.392055,0.316984 0.166832,0.31698 0.283614,0.90089 0.08342,0.40874 0.133465,0.92592 0.05005,0.51718 0.05005,0.80913 0,0.16683 -0.03337,0.65899 -0.02502,0.49215 -0.108441,1.00933 -0.20854,1.21787 -0.684011,1.21787 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path864" />
|
||||||
|
<path
|
||||||
|
d="m 33.675958,109.10147 q -2.001983,0 -3.011317,-1.63495 -1.017674,-1.6433 -1.017674,-4.82144 0,-3.186493 1.017674,-4.829788 1.009334,-1.634953 3.011317,-1.634953 2.001983,0 3.019658,1.634953 0.500495,0.800793 0.759085,2.001983 0.258589,1.192845 0.258589,2.827805 0,1.63495 -0.258589,2.8278 -0.25859,1.19285 -0.759085,1.99364 -1.026017,1.63495 -3.019658,1.63495 z m 0,-1.33465 q 1.192848,0 1.768418,-1.26793 0.57557,-1.26792 0.57557,-3.85381 0,-2.60258 -0.57557,-3.853821 -0.57557,-1.276264 -1.768418,-1.276264 -1.176165,0 -1.751736,1.267922 -0.291955,0.62562 -0.442104,1.576563 -0.141807,0.9426 -0.141807,2.2856 0,2.61092 0.583911,3.85381 0.583912,1.26793 1.751736,1.26793 z m 0.01668,-2.21053 q -0.25859,0 -0.408738,-0.35869 -0.150149,-0.35868 -0.250248,-0.8425 -0.08342,-0.39205 -0.141807,-0.92591 -0.05005,-0.54221 -0.05005,-0.82582 0,-0.2002 0.03337,-0.71738 0.03337,-0.51718 0.133466,-0.97597 0.241906,-1.192844 0.650644,-1.192844 0.233565,0 0.392055,0.316984 0.166832,0.31698 0.283615,0.90089 0.08342,0.40874 0.133465,0.92592 0.05005,0.51718 0.05005,0.80913 0,0.16683 -0.03337,0.65899 -0.02502,0.49215 -0.108441,1.00933 -0.20854,1.21787 -0.684011,1.21787 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path866" />
|
||||||
|
<path
|
||||||
|
d="m 41.066611,107.44149 h 2.619262 v -8.933845 l -1.9853,2.260575 -0.917576,-1.117777 2.886192,-3.244881 h 1.685003 v 11.035928 h 2.585895 v 1.41808 h -6.873476 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path868" />
|
||||||
|
<path
|
||||||
|
d="m 48.924396,102.2697 h 4.637928 v -9.676247 h 1.334655 v 11.111007 h -5.972583 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Hack;-inkscape-font-specification:Hack;fill:#00f829;fill-opacity:1;stroke:none;stroke-width:0.42708972;stroke-opacity:1"
|
||||||
|
id="path870" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 18 KiB |
5
Makefile
5
Makefile
@ -7,8 +7,9 @@ ascii: $(shell find textes/ -type f -iname "*.txt" ! -iname "*.ascii.txt" | sed
|
|||||||
%.cmx: %.ml
|
%.cmx: %.ml
|
||||||
ocamlopt -c $<
|
ocamlopt -c $<
|
||||||
|
|
||||||
Code.cmo: Math.cmo
|
Code.cmo: Code.ml Math.cmo
|
||||||
|
ocamlc -c "Code.mli"
|
||||||
|
ocamlc -c "Code.ml"
|
||||||
%.cmi: %.mli
|
%.cmi: %.mli
|
||||||
ocamlc -c $<
|
ocamlc -c $<
|
||||||
%.cmo: %.ml
|
%.cmo: %.ml
|
||||||
|
|||||||
16
Math.mli
16
Math.mli
@ -1,20 +1,26 @@
|
|||||||
type vecteur = int
|
type vecteur = int
|
||||||
type matrice = int list
|
type matrice = int list
|
||||||
type polynome = int
|
type polynome = int
|
||||||
|
|
||||||
|
val deux_puissance : int -> int
|
||||||
|
val changer_bit : int -> int -> int
|
||||||
|
val decagauche : int -> int -> int
|
||||||
|
|
||||||
val nthOfBinarint : int -> int -> string
|
val nthOfBinarint : int -> int -> string
|
||||||
val print_matrice : int -> matrice -> unit
|
val print_matrice : int -> matrice -> unit
|
||||||
val print_vecteur : int -> vecteur -> unit
|
val print_vecteur : int -> vecteur -> unit
|
||||||
val print_polynome : polynome -> unit
|
val print_polynome : polynome -> unit
|
||||||
|
|
||||||
val produit : matrice -> vecteur -> vecteur
|
val produit : matrice -> vecteur -> vecteur
|
||||||
val deux_puissance : int -> int
|
val identite : int -> matrice
|
||||||
val orderize : 'a -> 'a -> 'a * 'a
|
val orderize : 'a -> 'a -> 'a * 'a
|
||||||
val identite : int -> int list
|
|
||||||
val changer_bit : int -> int -> int
|
|
||||||
val decagauche : int -> int -> int
|
|
||||||
val respecter : int -> int list -> bool
|
val respecter : int -> int list -> bool
|
||||||
val matriceAuPif : int -> int -> matrice
|
val matriceAuPif : int -> int -> matrice
|
||||||
val polmul : polynome -> polynome -> polynome
|
|
||||||
val degre : polynome -> int
|
val degre : polynome -> int
|
||||||
|
val polmul : polynome -> polynome -> polynome
|
||||||
val poldiveuc : polynome -> polynome -> polynome * polynome
|
val poldiveuc : polynome -> polynome -> polynome * polynome
|
||||||
val poldiv : polynome -> polynome -> polynome
|
val poldiv : polynome -> polynome -> polynome
|
||||||
val polrst : polynome -> polynome -> polynome
|
val polrst : polynome -> polynome -> polynome
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user