diff options
author | Pixel <> | 2001-02-28 11:40:25 +0000 |
---|---|---|
committer | Pixel <> | 2001-02-28 11:40:25 +0000 |
commit | 833d20a69fe17ab846c153e35230c66a41d8fca9 (patch) | |
tree | 180ba073e59fee8df22cb733be2eec4c452e1b85 /lib/PCommon.cc |
Premier jetstart
Diffstat (limited to 'lib/PCommon.cc')
-rw-r--r-- | lib/PCommon.cc | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/PCommon.cc b/lib/PCommon.cc new file mode 100644 index 0000000..20299ba --- /dev/null +++ b/lib/PCommon.cc @@ -0,0 +1,44 @@ +#include <stdio.h> +#include "config.h" +#include "PCommon.h" + +PriorityList::PriorityList(Key_t IKey, Datas_t const &IDatas):Key(IKey), +Datas(IDatas) +{ +} + +PriorityList::PriorityList(void):Key(0), Datas(NULL) +{ +} + +PriorityList::~PriorityList(void){} + +Key_t PriorityList::ReadKey(Cell C) +{ + return ((PriorityList *) C)->Key; +} + +Datas_t PriorityList::ReadDatas(Cell C) +{ + return ((PriorityList *) C)->Datas; +} + +int PriorityList::n(void) +{ + return Key; +} + +PriorityList *PriorityList::GenericUnion(PriorityList * P) +{ + Key_t IKey; + Datas_t IDatas; + + while (!(P->IsEmpty())) { + IKey = P->Extract_Min(IDatas); + Insert(IKey, IDatas); + } +} + +int PriorityList::GetType(void) { + return type; +} |