|
Data Structures Lerax
v3.0-102-gaf18
Opinionated Data Structures & Algorithms
|
Go to the source code of this file.
Typedefs | |
| typedef struct Graph | Graph |
Functions | |
| Graph * | graph_create () |
| Creates a new directed graph. | |
| Graph * | graph_undirected_create () |
| Creates a new undirected graph. | |
| void | graph_add_node (Graph *g, int node) |
| Adds a node to the graph. | |
| void | graph_add_edge (Graph *g, int u, int v) |
| Adds an edge to the graph. | |
| void | graph_remove_edge (Graph *g, int u, int v) |
| Removes an edge from the graph. | |
| void | graph_remove_node (Graph *g, int node) |
| Removes a node from the graph. | |
| bool | graph_has_edge (Graph *g, int u, int v) |
| Checks if an edge exists in the graph. | |
| Set * | graph_get_neighbors (Graph *g, int node) |
| Gets the neighbors of a node. | |
| void | graph_free (Graph *g) |
| Frees the memory allocated for the graph. | |
| void | graph_print (Graph *g) |
| Prints the graph. | |
| Iterator * | graph_bfs (Graph *g, int start_node) |
| Performs a Breadth-First Search on a graph. | |
| Iterator * | graph_dfs (Graph *g, int start_node) |
| Performs a Depth-First Search on a graph. | |