struct Graph Graph
Definition graph.h:19
Graph * graph_undirected_create()
Creates a new undirected graph.
int graph_get_edge_weight(Graph *g, int u, int v)
Gets the weight of an edge.
Set * graph_get_neighbors(Graph *g, int node)
Gets the neighbors of a node.
void graph_remove_edge(Graph *g, int u, int v)
Removes an edge from the graph.
Graph * graph_create()
Creates a new directed graph.
Iterator * graph_dfs(Graph *g, int start_node)
Performs a Depth-First Search on a graph.
void graph_add_node(Graph *g, int node)
Adds a node to the graph.
Iterator * graph_bfs(Graph *g, int start_node)
Performs a Breadth-First Search on a graph.
void graph_add_edge(Graph *g, int u, int v)
Adds an edge to the graph.
void graph_print(Graph *g)
Prints the graph.
bool graph_has_edge(Graph *g, int u, int v)
Checks if an edge exists in the graph.
void graph_free(Graph *g)
Frees the memory allocated for the graph.
void graph_remove_node(Graph *g, int node)
Removes a node from the graph.
void graph_add_edge_with_weight(Graph *g, int u, int v, int weight)
Adds a weighted edge to the graph.
struct Set Set
A basic implementation of a Set.
Definition set.h:27
A generic iterator struct.
Definition iterator.h:13