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)
#define hash_unset(h, key)
Fixed length block allocator.
#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_dir_free(graph_dir_t *d)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static graph_link_t * graph_dir_get_link_to_node(graph_dir_t *d, u32 node_index)
unformat_function_t unformat_graph
static void graph_set_bidirectional_link(graph_t *g, u32 src, u32 dst, u32 distance)
static uword graph_dir_add_link(graph_dir_t *d, u32 node_index, u32 distance)
#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_graph
format_function_t * format_node
u32 graph_set_link(graph_t *g, u32 src, u32 dst, u32 distance)
static void graph_dir_del_link(graph_dir_t *d, u32 node_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
uword graph_del_node(graph_t *g, u32 src)
format_function_t format_graph_node