#ifndef __BHEAP_H__ #define __BHEAP_H__ #include #include #ifdef __cplusplus class BHeap:public PriorityList { private: int Degree; BHeap *Father, *Child, *Brother; CList *FP; void Link(BHeap * z); void Merge(BHeap * H); BHeap(Key_t IKey, Datas_t const &IDatas); // Insert Cell Insert(BHeap * x); public: BHeap(void); // Constructor ~BHeap(void); // Destructor virtual int rn(void); virtual Key_t ReadKey(Cell C); virtual Datas_t ReadDatas(Cell C); virtual void Dump(ostream & os); virtual bool IsEmpty(void); virtual Cell Min(void); virtual Cell Insert(Key_t IKey, Datas_t const &IDatas); virtual Key_t Extract_Min(Datas_t & Datas); virtual PriorityList *Union(PriorityList * P); virtual bool Lower_Key(Cell x, Key_t NKey); virtual Key_t Delete(Datas_t & Datas, Cell x); }; #else #error This librairy will only compile with a C++ compiler. #endif #endif