|
| Graph * | graph_create () |
| | Creates a new directed graph.
|
| Graph * | graph_undirected_create () |
| | Creates a new undirected graph.
|
| Graph * | graph_tarjan_create (bool directed) |
| | Creates a new tarjan graph.
|
| size_t | graph_size (Graph *g) |
| | Get the number of nodes.
|
| bool | graph_is_directed (Graph *g) |
| | Check if graph is weighted.
|
| bool | graph_is_weighted (Graph *g) |
| | Check if graph is weighted.
|
| 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_add_edge_with_weight (Graph *g, int u, int v, int weight) |
| | Adds a weighted edge to the graph.
|
| int | graph_get_edge_weight (Graph *g, int u, int v) |
| | Gets the weight of an edge.
|
| 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.
|
| bool | graph_has_node (Graph *g, int u) |
| | Checks if a node 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.
|
| void | graph_export_to_dot (Graph *g, const char *filename) |
| | Exports the graph to a DOT file for visualization with Graphviz.
|
| 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.
|
| Iterator * | graph_nodes_iterator (Graph *g) |
| | Iterate over nodes of the graph.
|
| List * | graph_edges (Graph *g) |
| | List with edges of the graph with (key,data).
|
| List * | graph_edges_ordered (Graph *g) |
| | List with edges of the graph with (key,data) ordered ascending.
|
| int | graph_edges_sum (Graph *g) |
| | Sum of the edge weights. If undirected, calculate (u, v) == (v, u) only once.
|
| int | graph_max_node_id (Graph *g) |
| | Get the maximum node id on the graph.
|
| bool | graph_acyclical (Graph *g) |
| | Check if graph has cycles.
|
| bool | graph_is_dag (Graph *g) |
| | Check if graph can be classified as Directed Acyclical Graph.
|
| Graph * | graph_tarjan (Graph *g) |
| | Create a new graph with tarjan arc classification as weight of the edges.
|
| int * | graph_strong_components (Graph *g) |
| | Create a array of strong components using tarjan algorithm.
|
| List * | graph_topological_sort (Graph *g) |
| | Creat a list with the nodes in topological sort.
|
| Graph * | graph_dijkstra (Graph *g, int source) |
| | Run dijkstra algorithm on the graph.
|
| Graph * | graph_kruskal (Graph *g) |
| | Run Kruskal algorithm to get the minimum-span tree.
|
| Graph * | graph_prim (Graph *g, int start) |
| | Run Prim algorithm to get the minimum-span tree.
|
| int | graph_minimum_distance (Graph *g, int source, int destination) |
| | Run dijkstra algorithm and calculate the minimum distance.
|
| List * | graph_shortest_path (Graph *g, int source, int destination) |
| | Run dijkstra algorithm and return the shortest path.
|