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/TP4/AB.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sem_4/Algo/TP4/AB.h (limited to 'sem_4/Algo/TP4/AB.h') 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 +#include + +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 -- cgit v1.2.3