From 833d20a69fe17ab846c153e35230c66a41d8fca9 Mon Sep 17 00:00:00 2001 From: Pixel <> Date: Wed, 28 Feb 2001 11:40:25 +0000 Subject: Premier jet --- lib/PCommon.cc | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 lib/PCommon.cc (limited to 'lib/PCommon.cc') 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 +#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; +} -- cgit v1.2.3