15 #ifndef included_clib_graph_h 16 #define included_clib_graph_h 83 _vec_len (d->
links) = n_links;
#define hash_set(h, key, value)
format_function_t format_graph_node
#define hash_unset(h, key)
Fixed length block allocator.
format_function_t format_graph
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
uword * link_index_by_node_index
static void graph_set_bidirectional_link(graph_t *g, u32 src, u32 dst, u32 distance)
unformat_function_t unformat_graph
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
uword graph_del_node(graph_t *g, u32 src)
#define vec_free(V)
Free vector's memory (no header).
void graph_del_link(graph_t *g, u32 src, u32 dst)
format_function_t * format_node
static void graph_dir_del_link(graph_dir_t *d, u32 node_index)
static uword graph_dir_add_link(graph_dir_t *d, u32 node_index, u32 distance)
static graph_link_t * graph_dir_get_link_to_node(graph_dir_t *d, u32 node_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static void graph_dir_free(graph_dir_t *d)
u32 graph_set_link(graph_t *g, u32 src, u32 dst, u32 distance)