Incidence

#include<hysj/graphs/incidence.hpp>

In namespace graphs:

enum incidence_tag
enumerator adirectional
enumerator unidirectional
enumerator bidirectional
Names the types of incidence a graph can support.

auto incident(auto tag, auto direction, const auto &graph, auto id)
Hook for accessing the incident elements of id.

Shorthands

unspecified vincident = bind(incident, vertex_tag)
unspecified eincident = bind(incident, edge_tag)

Traits

template<element_tag T, typename D, typename G, typename I>
using traits::incident_t
The deduced retur-type of incident invoked with these types parameters.

template<element_tag T, typename D, typename G, typename I>
using traits::incident_id_t
Short hand for the value-type of traits::incident_t.

Concepts

template<typename G, element_tag T, typename D, typename I>
concept concepts::incidence_graph
A graph that supports the incidence relation for elements of type T, identified by I, in the direction-specifier of D.


auto port(auto direction, const auto &graph, auto id)
Function computing the incident vertex of id in direction.

Shorthands

unspecified head = bind(port, in_tag)
unspecified tail = bind(port, out_tag)

template<typename G, typename I>
auto ports(const G &g, I i)
Returns a tuple of the incident vertices of the edge i.

Builtin

#include<hysj/graphs/builtin/incidence_graphs.hpp>

In namespace builtin:

template<incidence_tag G, typename V, typename E>
struct incidence_graph