A left-leaning red-black binary search tree.
t_queue * graph_adjacency(const t_graph *graph, const void *v)
Returns the queue with all the vertices in this graph that are adjancent to the specified vertex.
size_t v
The number of vertices.
void graph_add_edge(t_graph *graph, const void *v1, const void *v2)
Adds an edge between two vertices in the graph.
t_queue * graph_vertices(const t_graph *graph)
Returns the queue with all the vertices in this graph.
void graph_delete(t_graph *graph)
Deletes this graph and frees all the associated data.
size_t e
The number of edges.
t_rbt * adj
The set of arrays, where each arrays represents the adjacency of a given vertex.
A graph implemented using a set of arrays.
const t_type * type
The type of vertices in the graph.
Doubly-linked list of generic items.
A full representation of a data type, used to achieve polymorphism in the implementation of data stru...
int graph_adjacent(const t_graph *graph, const void *v1, const void *v2)
Are two vertices in the graph adjacent to each other?
t_graph * graph_new(const t_type *type)
Initializes a new graph with vertices of the specified type.
void graph_add_vertex(t_graph *graph, const void *v)
Adds a vertex to the graph.