movement of struct
@@ -19,14 +19,13 @@ typedef struct
double priority;
void *address;
} Item;
+
typedef struct
{
Item *items;
int items_amount;
} PriorityQueue;
-//Methods//
-//-------//
typedef struct
{
bool added;
@@ -34,9 +33,13 @@ typedef struct
bool evicted;
Item evictedItem;
} PriorityQueue_Push_Feedback;
+
+//Methods//
+//-------//
//Push element of a certain priority into the queue.
-//If successful, addedItem will point to the item in the data structure, with address of the evicted item
+//If successful, addedItem will point to the item in the data structure, with address of the evicted item, if eviction happened
PriorityQueue_Push_Feedback PriorityQueue_Push(PriorityQueue *queue, double priority, int maxElements);
+//Retrieve first item of the queue
Item PriorityQueue_Pop(PriorityQueue *queue);
#endif
