summaryrefslogtreecommitdiff
path: root/sem_4/Algo/TP4/AB.h
diff options
context:
space:
mode:
authorGaspard Coulet <gaspard.coulet@mines-ales.org>2021-04-28 23:05:53 +0200
committerGaspard Coulet <gaspard.coulet@mines-ales.org>2021-04-28 23:05:53 +0200
commit9fe033ea88c2f705ec18c232873d056e0c229d72 (patch)
tree0647dc8c51610c7336c88c04de2068ea14b21e17 /sem_4/Algo/TP4/AB.h
Initial commit
Diffstat (limited to 'sem_4/Algo/TP4/AB.h')
-rw-r--r--sem_4/Algo/TP4/AB.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/sem_4/Algo/TP4/AB.h b/sem_4/Algo/TP4/AB.h
new file mode 100644
index 0000000..436d639
--- /dev/null
+++ b/sem_4/Algo/TP4/AB.h
@@ -0,0 +1,44 @@
+//AB.h
+
+#ifndef AB_H
+#define AB_H
+
+#include <iostream>
+#include <sstream>
+
+typedef int Valeur;
+
+class Sommet;
+
+typedef Sommet* AB;
+void SortieLatex(AB Ar, std::string filepath);
+ std::string* TikzRecursAB(int ligne,int gauche, int droite, int numeroPere, int typeFils, AB Ar);
+
+class Sommet {
+ public:
+ Valeur racine;
+ AB Pere,SAG, SAD;
+ bool FGP;
+
+ int hauteur,balanceGmoinsD;
+
+
+ Sommet(Valeur v);
+ Sommet(Sommet& s);
+
+ void GrefferSAG(AB g);
+ void GrefferSAD(AB d);
+
+ void SupprimerSAG();
+ void SupprimerSAD();
+
+ bool FeuilleP();
+
+ void RemplacerPourLePerePar(AB);
+
+ std::string* TikzRecursAB(int ligne,int gauche, int droite, int numeroPere, int typeFils, AB Ar);
+};
+
+
+
+#endif