#include "pathqueue.h"

Go to the source code of this file.
Functions | |
Queue functions | |
This functions implements a queue needed by other functions. | |
| int | queueIsEmpty (NodeQueue *q) |
| void | pushNode (NodeQueue *q, int x, int y) |
| void | pushNodeLast (NodeQueue *q, int x, int y) |
| int | popNode (NodeQueue *q, Node *n) |
| void | printQueue (NodeQueue *q) |
| NodeQueue * | newQueue (void) |
| int | delQueue (NodeQueue *q) |
| int | isInQueue (NodeQueue *q, int x, int y) |
| void | drainQueue (NodeQueue *q) |
Definition in file pathqueue.c.
| int delQueue | ( | NodeQueue * | q | ) |
Free queue memory
| q | Queue |
Definition at line 133 of file pathqueue.c.
Referenced by aAlgorithm().

| void drainQueue | ( | NodeQueue * | q | ) |
Free memory allocated in the queue
| q | Queue |
Definition at line 162 of file pathqueue.c.
Referenced by aAlgorithm().

| int isInQueue | ( | NodeQueue * | q, | |
| int | x, | |||
| int | y | |||
| ) |
Finds out if the node (X,Y) is in the queue
| q | Queue | |
| x | Coordonate X of a cell | |
| y | Coordonate Y of a cell |
Definition at line 147 of file pathqueue.c.
Referenced by aAlgorithm(), and calculateMapHeuristic().

| NodeQueue* newQueue | ( | void | ) |
Init queue values
| q | Queue |
Definition at line 121 of file pathqueue.c.
Referenced by aAlgorithm(), and calculateMapHeuristic().

Pop the first node of the queue
| q | Queue | |
| n | Pointer to a node |
Definition at line 88 of file pathqueue.c.
Referenced by aAlgorithm(), calculateMapHeuristic(), and drainQueue().

| void printQueue | ( | NodeQueue * | q | ) |
Print the queue
| q | Queue |
Definition at line 106 of file pathqueue.c.
| void pushNode | ( | NodeQueue * | q, | |
| int | x, | |||
| int | y | |||
| ) |
Push a node into the queue in a FIFO mode
| q | Queue | |
| x | Coordonate X of a cell | |
| y | Coordonate Y of a cell |
Definition at line 34 of file pathqueue.c.
Referenced by calculateMapHeuristic().

| void pushNodeLast | ( | NodeQueue * | q, | |
| int | x, | |||
| int | y | |||
| ) |
Push a node into the queue in a LIFO mode
| q | Queue | |
| x | Coordonate X of a cell | |
| y | Coordonate Y of a cell |
Definition at line 61 of file pathqueue.c.
Referenced by aAlgorithm().

| int queueIsEmpty | ( | NodeQueue * | q | ) |
Tests if a queue is empty
| q | A queue |
Definition at line 23 of file pathqueue.c.
Referenced by aAlgorithm(), calculateMapHeuristic(), delQueue(), popNode(), pushNode(), pushNodeInOrder(), and pushNodeLast().

1.5.3