Adjacency

#include<hysj/graphs/adjacency.hpp>

In namespace graphs:

template<element_tag T>
auto semiadjacent(constant_t<T> t, auto d0, auto d1, const auto &g, auto i)
Hook to compute the semiadjacent ids of i. These are computed by first computing the incident ids in direction d0, and from each of those, computing the incident ids in the direction d1.

auto exclusive_semiadjacent(auto t, auto d0, auto d1, const auto &g, auto i)
The semiadjacent of i, modulo i itself.

template<element_tag T>
auto adjacent(constant_t<T> t, auto d, const auto &g, auto i) const
Hook for computing the adjacent elements of i. The default behaviour computes them via semiadjacent(t, d, d, g, i).

Traits

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

Concepts

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