UCFD_SPARSE  v1.0
Documentation
Loading...
Searching...
No Matches
queue.c File Reference


More...

#include <stdio.h>
#include <stdlib.h>
#include "queue.h"
Include dependency graph for queue.c:

Go to the source code of this file.

Functions

void initQueue (struct Queue *queue)
 Initialize queue structure with NULL value. More...
 
int isEmpty (struct Queue *queue)
 Check if queue structure is empty. More...
 
void enqueue (struct Queue *queue, int data)
 Allocate new node and add to queue structure. More...
 
int dequeue (struct Queue *queue)
 Take out the first added element. More...
 

Detailed Description


======================================================================================================================

Queue data structure for computing Reverse Cuthill-McKee algorithm. Queue is a FIFO (First-In First-Out) data structure to access data in serial input order.

Author
Date
July 2024
Version
1.0
Copyright
Copyright (c) 2024, Namhyoung Kim and Jin Seok Park, Inha University, All rights reserved.
License
This project is release under the terms of the MIT License (see LICENSE file).

Definition in file queue.c.

Function Documentation

◆ dequeue()

int dequeue ( struct Queue queue)

Take out the first added element.

Parameters
queueQueue data structure to take element out
[out]popdataValue of poped data

Definition at line 77 of file queue.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enqueue()

void enqueue ( struct Queue queue,
int  data 
)

Allocate new node and add to queue structure.

Parameters
queueQueue data structure to add new node
dataValue to add

Definition at line 55 of file queue.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initQueue()

void initQueue ( struct Queue queue)

Initialize queue structure with NULL value.

Parameters
queueQueue data structure to initialize

Definition at line 30 of file queue.c.

Here is the caller graph for this function:

◆ isEmpty()

int isEmpty ( struct Queue queue)

Check if queue structure is empty.

Parameters
queueQueue data structure to check

Definition at line 41 of file queue.c.

Here is the caller graph for this function: