First Commit
This commit is contained in:
parent
3f207ccdd3
commit
74f6b061ba
22 changed files with 435 additions and 0 deletions
25
Yûki/arbre_de_codage/arbre_binaire.h
Normal file
25
Yûki/arbre_de_codage/arbre_binaire.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef __ARBRE_BINAIRE__
|
||||
#define __ARBRE_BINAIRE__
|
||||
|
||||
typedef char Elt;
|
||||
typedef int bool;
|
||||
struct znoeud {
|
||||
Elt elt ;
|
||||
int poids;
|
||||
struct znoeud *fils_gauche;
|
||||
struct znoeud *fils_droit;
|
||||
};
|
||||
typedef struct znoeud noeud ;
|
||||
typedef struct znoeud * arbre;
|
||||
|
||||
arbre creer_arbre_vide(void);
|
||||
arbre creer_arbre_huffman(Elt e, int p, arbre fg, arbre fd);
|
||||
arbre fils_gauche(arbre a);
|
||||
arbre fils_droit(arbre a);
|
||||
Elt racine(arbre a);
|
||||
bool est_arbre_vide(arbre a);
|
||||
|
||||
arbre creer_feuille(Elt e) ;
|
||||
bool est_feuille(arbre a) ;
|
||||
|
||||
#endif
|
||||
Reference in a new issue