data_structures
graph_delete.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* graph_delete.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2020/07/22 01:02:31 by unite #+# #+# */
10 /* Updated: 2020/07/22 14:56:58 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "graph.h"
15 
16 void graph_delete(t_graph *graph)
17 {
18  if (!graph)
19  return ;
20  rbt_delete(graph->adj);
21  free(graph);
22 }
rbt_delete
void rbt_delete(t_rbt *rbt)
Deletes this tree and free all its items and the associated data.
Definition: rbt_delete.c:34
s_graph::adj
t_rbt * adj
The set of arrays, where each arrays represents the adjacency of a given vertex.
Definition: graph.h:43
s_graph
A graph implemented using a set of arrays.
Definition: graph.h:39
graph_delete
void graph_delete(t_graph *graph)
Deletes this graph and frees all the associated data.
Definition: graph_delete.c:16
graph.h