PandA-2024.02
|
#include "bfs.h"
Go to the source code of this file.
Macros | |
#define | Q_PUSH(node) { queue[q_in==0?N_NODES-1:q_in-1]=node; q_in=(q_in+1)%N_NODES; } |
#define | Q_PEEK() (queue[q_out]) |
#define | Q_POP() { q_out = (q_out+1)%N_NODES; } |
#define | Q_EMPTY() (q_in>q_out ? q_in==q_out+1 : (q_in==0)&&(q_out==N_NODES-1)) |
Functions | |
void | bfs (node_t nodes[N_NODES], edge_t edges[N_EDGES], node_index_t starting_node, level_t level[N_NODES], edge_index_t level_counts[N_LEVELS]) |
#define Q_EMPTY | ( | ) | (q_in>q_out ? q_in==q_out+1 : (q_in==0)&&(q_out==N_NODES-1)) |
#define Q_POP | ( | ) | { q_out = (q_out+1)%N_NODES; } |