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()]#
template<temporal_edge EdgeT>
std::pair<typename EdgeT::TimeType, typename EdgeT::TimeType> time_window(const network<EdgeT> &temporal_network)#

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()]#
template<temporal_edge EdgeT>
std::pair<typename EdgeT::TimeType, typename EdgeT::TimeType> cause_time_window(const network<EdgeT> &temporal_network)#

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()]#
template<temporal_edge EdgeT>
std::pair<typename EdgeT::TimeType, typename EdgeT::TimeType> effect_time_window(const network<EdgeT> &temporal_network)#

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)#
template<network_edge EdgeT>
network<typename EdgeT::StaticProjectionType> effect_time_window(const network<EdgeT> &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.