summaryrefslogtreecommitdiff
path: root/sem_4/Algo/TP7/ArbreBinaireRecherche.h
diff options
context:
space:
mode:
Diffstat (limited to 'sem_4/Algo/TP7/ArbreBinaireRecherche.h')
-rw-r--r--sem_4/Algo/TP7/ArbreBinaireRecherche.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/sem_4/Algo/TP7/ArbreBinaireRecherche.h b/sem_4/Algo/TP7/ArbreBinaireRecherche.h
new file mode 100644
index 0000000..56b0e43
--- /dev/null
+++ b/sem_4/Algo/TP7/ArbreBinaireRecherche.h
@@ -0,0 +1,57 @@
+#ifndef ARBREBINAIRERECHERCHE_H
+#define ARBREBINAIRERECHERCHE_H
+
+#include <iostream>
+#include <sstream>
+
+
+#include <cstdlib>
+#include <fstream>
+
+
+using namespace std;
+
+
+typedef int Valeur;
+
+class SommetABR;
+
+typedef SommetABR* ABR;
+
+class SommetABR {
+ public:
+ Valeur racine;
+ ABR Pere,SAG, SAD;
+ bool FGP;
+
+ void GrefferSAG(ABR g);
+ void GrefferSAD(ABR d);
+
+ SommetABR(Valeur v);
+ SommetABR(SommetABR& s);
+
+
+ void SupprimerSAG();
+ void SupprimerSAD();
+
+ bool FeuilleP();
+
+ void RemplacerPourLePerePar(ABR);
+
+ std::string* TikzRecursABR(int ligne,int gauche, int droite, int numeroPere, int typeFils, ABR Ar);
+
+// ABR
+
+ ABR PlusPetit();
+ ABR RechercherValeur(Valeur v);
+ void InsererValeur(Valeur v);
+ ABR SupprimerValeur(Valeur v); // notez la dissym�trie
+ ABR SupMin();
+};
+
+
+ //void SortieLatex(ABR, std::string filepath);
+
+
+
+#endif