00001 /*************************************************************************** 00002 BinTree.h - description 00003 ------------------- 00004 begin : Fri Jan 17 2003 00005 copyright : (C) 2003 by LEA / TUM 00006 email : taeubig@in.tum.de 00007 ***************************************************************************/ 00008 00009 #ifndef BINTREE_H 00010 #define BINTREE_H 00011 00012 #include <LEDA/list.h> 00013 00014 00021 typedef struct knot { 00022 double val; 00023 bool leaf; 00024 knot* child1; 00025 knot* child2; 00026 leda_list_item content; 00027 } knot; 00028 00029 00030 class BinTree { 00031 public: 00032 BinTree(leda_list_item li, double val); 00033 ~BinTree(); 00034 00035 BinTree* join(BinTree bt); 00036 knot* getRoot(); 00037 00038 00039 private: 00040 knot* root; 00041 00042 }; 00043 00044 #endif