diff options
Diffstat (limited to 'sem_4/Algo/TP4/AB.h')
| -rw-r--r-- | sem_4/Algo/TP4/AB.h | 44 |
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 |
