Function adj_matrix_access

Function Documentation

static inline void *adj_matrix_access(const struct adj_matrix *const matrix, size_t u, size_t v)

Access an element of the adjacency matrix.

Parameters:
  • matrix – The matrix handle.

  • u – Edge source.

  • v – Edge sink.

Returns:

The value of the edge between the two vertices (may dereference as 0 if no edge exists—used adj_matrix_edge_query() to be sure).