/*
  .__       .           .     
  [__) _  _.|_  _ ._. _.|_  _ 
  |  \(/,(_.[ )(/,[  (_.[ )(/,...
     _     _                                          
    | |__ (_) __ _ _ __ __ _ _ __ ___  _ __ ___   ___ 
    | '_ \| |/ _` | '__/ _` | '_ ` _ \| '_ ` _ \ / _ \
    | |_) | | (_| | | | (_| | | | | | | | | | | |  __/
    |_.__/|_|\__, |_|  \__,_|_| |_| |_|_| |_| |_|\___|
             |___/                                    
	   
AUTEURS	: Aymeric & Ramazan
GROUPE	: RT (5)
DATE	: 21/03/2003
FICHIER	: arbre.h

*/

#ifndef ARBRE_H
#define ARBRE_H

struct Information
{
	int m1,m2;
	float p;
};

struct Noeud
{
	Information info;
	Noeud *fg,*fd;
};

class Arbre
{
	Noeud *racine;
	int nb_elt;
	public :
		Arbre();
		~Arbre();
		int nb_element() { return nb_elt; }
		float presentRecur(Information,long&);
		Noeud * presentRecur_Noeud(Noeud*,Information,long&);
		bool mot1PlusGrandmot2(Information, Information);
		int ajoute_feuille(Information);
		Noeud * ajoute_feuille_Noeud(Noeud*,Information);
		void liberearbre(Noeud*);
		Noeud * nouveau_Noeud(Noeud*,Noeud*,Information);
		void affiche_noeud_graphique2(Noeud *,int,int,int,int,int *);
		int nettoyage_noeud_graphique(int,int,int *);
		void affiche_noeud_graphique(Noeud *,int,int,ostream &);
		void affiche_graphique(int,int,ostream &);
};

#endif
