From 9fe033ea88c2f705ec18c232873d056e0c229d72 Mon Sep 17 00:00:00 2001 From: Gaspard Coulet Date: Wed, 28 Apr 2021 23:05:53 +0200 Subject: Initial commit --- sem_4/Algo/TP7/ArbreBinaireRecherche.h | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sem_4/Algo/TP7/ArbreBinaireRecherche.h (limited to 'sem_4/Algo/TP7/ArbreBinaireRecherche.h') 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 +#include + + +#include +#include + + +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 -- cgit v1.2.3