Event graphs#
Event graphs are an alternative representation of temporal networks as directed acyclic graphs [13, 14]. In this representation, each temporal network event is represented as a vertex, and two of these events are connected by a directed link if the first event is adjacent to the second one.
Event graphs can be used to calculate various reachability properties of temporal networks [13, 15, 16]. For example, the outcomponent of each vertex in the event graph, which corresponds to one of the events of the temporal network, can help us understand the set of reachable temporal network vertices starting from that event [17].
Reticula currently provides two ways of studying temporal networks using their event graph representation:
You can explicitly calculate the event graph representation of a temporal network. This potentially requires a lot of memory, but returns a normal directed network where each vertex happens to be an event. You can then bring all the tools available in Reticula for working with directed networks to bear.
Alternatively, you can construct an implicit event graph. This does not require much more memory than the original temporal network but limits you to direct use or to certain functions that can accept an implicit event graph object.
Explicit event graph#
 event_graph(temporal_network, temporal_adjacency) directed_network[temporal_network.edge_type()] #

template<temporal_edge EdgeT, temporal_adjacency::temporal_adjacency AdjT>
directed_network<EdgeT> event_graph(const network<EdgeT> &temp, const AdjT &adj)#
This function receives a temporal network and a temporal adjacency object and constructs a directed event graph where an event is connected to every other adjacent event.
Note
The constructed event graph is often quite large, even for relatively small temporal networks. This function is best used for constrained temporal adjacency (e.g., limited waitingtime) or for very small temporal networks.
Implicit event graph#
 make_implicit_event_graph(temporal_network, temporal_adjacency) implicit_event_graph[ temporal_network.edge_type(), type(temporal_adjacency::temporal_adjacency)] #
This function, similar to the case of the explicit event graph, receives a temporal network and a temporal adjacency object and constructs a implicit event graph object. You can then pass this object to various function that are designed to receive one.
Implicit event graph functions#
 in_component(implicit_event_graph, root) component[type(root)] #
 out_component(implicit_event_graph, root) component[type(root)] #
Calculates the in or outcomponent of a single vertex in the event graph, i.e.,
the set of all events that can transmit an effect that was first transmitted by
the event root
.
 in_components(implicit_event_graph) List[Tuple[ implicit_event_graph.edge_type(), component[implicit_event_graph.edge_type()]]] #
 out_components(implicit_event_graph) List[Tuple[ implicit_event_graph.edge_type(), component[implicit_event_graph.edge_type()]]] #
Calculates the in or outcomponent of a every vertex in the event graph, i.e., for each event, this function returns the set of all events that can transmit an effect that was first transmitted by that event. The algorithm is described in [17].
 in_component_sizes(implicit_event_graph) List[Tuple[ implicit_event_graph.edge_type(), component_size[implicit_event_graph.edge_type()]]] #
 out_component_sizes(implicit_event_graph) List[Tuple[ implicit_event_graph.edge_type(), component_size[implicit_event_graph.edge_type()]]] #

template<temporal_edge EdgeT, temporal_adjacency::temporal_adjacency AdjT>
std::vector<std::pair<EdgeT, component_size<EdgeT>>> in_component_sizes(const implicit_event_graph<EdgeT, AdjT> &eg)#

template<temporal_edge EdgeT, temporal_adjacency::temporal_adjacency AdjT>
std::vector<std::pair<EdgeT, component_size<EdgeT>>> out_component_sizes(const implicit_event_graph<EdgeT, AdjT> &eg)#
Calculates the size and various properties of in or outcomponent of a every vertex in the event graph, i.e., for each event, this function returns the size of the set of all events that can transmit an effect that was first transmitted by that event. The algorithm is described in [17].
 in_component_size_estimates(implicit_event_graph) List[Tuple[ implicit_event_graph.edge_type(), component_size_estimate[implicit_event_graph.edge_type()]]] #
 out_component_size_estimates(implicit_event_graph) List[Tuple[ implicit_event_graph.edge_type(), component_size_estimate[implicit_event_graph.edge_type()]]] #
Estimate the size and various properties of in or outcomponent of a every vertex in the event graph, i.e., for each event, this function returns the size estimates for the set of all events that can transmit an effect that was first transmitted by that event. The algorithm is described in [17].
 weakly_connected_component(implicit_event_graph, root) component[implicit_event_graph.edge_type()] #
Calculates the weaklyconnected component of an event graph that contains the specified event. The weaklyconnected components of an event graph describe an upperbound on reachability in a network [13].
 weakly_connected_components(implicit_event_graph, singletons: bool = True) List[component[implicit_event_graph.edge_type()]] #
Calculates all weaklyconnected components of an event graph. The weaklyconnected components of an event graph describe an upperbound on reachability in a network [13].
The parameter singletons
, defaulting to true, determines if the
weaklyconnected components consisting of a single event should be returned.