| reachability | R Documentation |
The number or share of other vertices each vertex can reach along time-respecting paths, and the number or share that can reach it. Reachability is the temporal replacement for component membership: in a static network two vertices in the same component reach each other by definition, whereas in a temporal network reach depends on whether the timing lines up.
reachability(
dn,
direction = c("both", "forward", "backward"),
at = NULL,
sessions = c("bounded", "collapse", "separate"),
start = NULL,
end = NULL,
traversal_time = 0,
measure = "reach",
plot = FALSE
)
dn |
A temporal network from |
direction |
|
at |
Forward source-availability time or backward arrival deadline,
defaulting to the beginning or end of each observed period respectively.
Unlike in |
sessions |
How to treat sessions, as in |
start, end |
Inclusive lower and upper traversal-time bounds. Interval spells remain terminus-exclusive. |
traversal_time |
Nonnegative duration charged for every hop, in the
network's time unit. A calendar network also accepts a scalar |
measure |
One or both of |
plot |
Whether to draw the result as well as return it. Drawing is a
side effect in the manner of |
Reachability uses paths() traversal semantics: nondecreasing times,
unlimited waiting, half-open interval spells, and a separate exact timestamp
rule for point events. Positive traversal_time requires interval occupancy
to finish within continuous pair activity and delays a point-trigger arrival.
Declared vertex activity additionally requires active hop endpoints and a
valid anchor, and every vertex is anchored at its own presence: each search
starts at that vertex's first instant inside the window, or its last
instant searching backward, rather than at the window bound. A vertex never
present inside the window reaches nothing, which is reported as zero rather
than as a missing row. Waiting after a valid anchor may cross vertex
inactivity; interval traversal requires both endpoints continuously through
completion, while a delayed point requires the receiver again at completion.
For backward reachability, the resolved end is a common deadline and
latest-departure suprema determine whether a vertex can reach the target.
The canonical start and end bounds apply one closed traversal-time window
to both forward and backward queries.
The source is excluded: a count is the number of distinct other vertices in the reachable set, not the number of journeys. A proportion divides that count by the full network size minus one. It is defined as zero for a singleton network. In separate-session output the same full-network denominator is retained in every session block.
In separate-session output, a session entirely outside a one-sided bound contributes zero-reach rows rather than aborting the complete result. Its missing implicit bound is clamped to the supplied bound, producing the empty journey at that boundary and no eligible hop.
Failures are classed. An unrecognised measure raises
dynet_unknown_measure; a malformed measure, a negative
traversal_time, at combined with start or end, or a window that
cannot hold a journey raises dynet_bad_input; and a window disjoint from
explicit observation raises dynet_outside_observation.
A dynet_metric at node level: a tidy data frame with one row per
vertex per requested measure, columns node, measure and value,
preceded by session under sessions = "separate". Proportion
measures are named forward_reach and backward_reach; counts are named
forward_reach_count and backward_reach_count. as.data.frame()
returns the plain frame.
Holme, P. (2005). Network reachability of real-world contact sequences. Physical Review E, 71(4), 046119.
Holme, P., & Saramaki, J. (2012). Temporal networks. Physics Reports, 519(3), 97-125.
# Reachability searches every ordered pair, so the example uses a small
# inline network to stay fast. The verb takes any `dynet`.
dn <- dynet(data.frame(
from = c("A", "B", "C", "A"),
to = c("B", "C", "D", "D"),
start = c(0, 1, 2, 3),
end = c(1, 2, 3, 4)
))
reachability(dn)
reachability(dn, direction = "forward")
reachability(dn, start = 0, end = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.