Graph properties#
Density#
- density(network) float #
-
template<network_vertex VertT>
double density(const undirected_network<VertT> &net)#
-
template<network_vertex VertT>
double density(const directed_network<VertT> &net)#
Calculates density of a static, dyadic graph.
Density of an undirected network is the number of edges divided by the number of possible unordered pairs of distinct vertices.
Density of a directed graph is the number of edges divided by the number of possible ordered pairs of distinct vertices.
Note that in the presense of self-links, density might be higher than 1.
Temporal network observation window#
- time_window(temporal_network) Tuple[temporal_network.time_type(), temporal_network.time_type()] #
Finds the range of event times present in the events. If temporal edges have different cause and effect times (i.e. they have delays) this would be equivalent to a tuple consisting of the minimum cause time and maximum effect time. If the events don’t have delays, this returns a tuple with the minimum and the maximum event time.
If the temporal network has no events (edges), this function throws a
std::invalid_argument
in C++ and a ValueError
in Python.
- cause_time_window(temporal_network) Tuple[temporal_network.time_type(), temporal_network.time_type()] #
Finds the range of event cause times present in the events. If the temporal
network has no events (edges), this function throws a
std::invalid_argument
in C++ and a ValueError
in Python. If the
temporal network events don’t have delays, this is indistinguishable from
time_window()
.
- effect_time_window(temporal_network) Tuple[temporal_network.time_type(), temporal_network.time_type()] #
Finds the range of event effect times present in the events. If the temporal
network has no events (edges), this function throws a
std::invalid_argument
in C++ and a ValueError
in Python. If the
temporal network events don’t have delays, this is indistinguishable from
time_window()
.
Static projection of a temporal network#
- static_projection(temporal_network)#
Returns a static projection (also known as spatial projection or time-aggregate) of the temporal network. Each event is stripped of it’s temporal information, and a static network of the most appropriate type is formed. For example, a directed delayed hypergraph temporal network, passed to this function, is projected into a directed hypergraph.
Temporal network link timelines#
- link_timeline(temporal_network, link) List[temporal_network.edge_type()] #
Returns a list of events that correspond to (project to) the static link
link
ordered by cause time of the events.
- link_timelines(temporal_network) List[Tuple[temporal_network.edge_type().static_projection_type(), List[temporal_network.edge_type()]]] #
For each link, each static edge in the static projection of the network, this function returns a list of the events that correspond to (project to) that link ordered by cause time of the events.