15 #ifndef included_clib_graph_h 16 #define included_clib_graph_h 81 _vec_len (d->
links) = n_links;
#define hash_set(h, key, value)
format_function_t format_graph_node
#define hash_unset(h, key)
always_inline void graph_set_bidirectional_link(graph_t *g, u32 src, u32 dst, u32 distance)
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.
always_inline void graph_dir_free(graph_dir_t *d)
uword * link_index_by_node_index
unformat_function_t unformat_graph
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
always_inline void graph_dir_del_link(graph_dir_t *d, u32 node_index)
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
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
always_inline graph_link_t * graph_dir_get_link_to_node(graph_dir_t *d, u32 node_index)
always_inline uword graph_dir_add_link(graph_dir_t *d, u32 node_index, u32 distance)
u32 graph_set_link(graph_t *g, u32 src, u32 dst, u32 distance)