Incidence ========= :cpp:include:`#include` .. cpp:namespace:: hysj .. cpp:namespace-push:: graphs In namespace :cpp:any:`graphs`: .. cpp:enum:: incidence_tag .. rest-script:: from hysj.graphs import IncidenceTag as Enum for e in Enum.__members__.values(): print(f'.. cpp:enumerator:: {e.name}') | Names the types of incidence a graph can support. | .. cpp:function:: auto incident(auto tag,auto direction,const auto &graph,auto id) | Hook for accessing the incident elements of :cpp:expr:`id`. *Shorthands* .. rest-script:: from hysj.graphs import * for e in ElementTag.__members__.values(): print(f'.. cpp:var:: unspecified {e.name[0]}incident = bind(incident,{e.name}_tag)') *Traits* .. cpp:type:: template traits::incident_t | The deduced retur-type of :cpp:expr:`incident` invoked with these types parameters. | .. cpp:type:: template traits::incident_id_t | Short hand for the value-type of :cpp:type:`traits::incident_t`. | *Concepts* .. cpp:concept:: template concepts::incidence_graph | A graph that supports the incidence relation for elements of type :cpp:expr:`T`, identified by :cpp:expr:`I`, in the direction-specifier of :cpp:type:`D`. | | .. cpp:function:: auto port(auto direction,const auto &graph,auto id) | Function computing the incident vertex of :cpp:var:`id` in :cpp:var:`direction`. | *Shorthands* .. cpp:var:: unspecified head = bind(port,in_tag) unspecified tail = bind(port,out_tag) | .. cpp:function:: template auto ports(const G &g,I i) | Returns a tuple of the incident vertices of the edge :cpp:var:`i`. | Builtin ------- :cpp:include:`#include` .. cpp:namespace-push:: builtin In namespace :cpp:any:`builtin`: .. cpp:struct:: template incidence_graph | Implements :cpp:concept:`concepts::incidence_graph`, :cpp:concept:`concepts::element_property_of`, for :cpp:expr:`element_tag::vertex` and :cpp:type:`V`, and :cpp:expr:`element_tag::edge` and :cpp:type:`E`. | .. cpp:namespace-pop:: .. cpp:namespace-pop::