reachable function

Find the set of vertices reachable from a given set using only paths moving forward in time

Find the set of vertices reachable from a given set using only paths moving forward in time

Does a breadth-first search from the specified set of vertices, respecting the direction and timing of edges. TODO: vertex activity.

forward.reachable(nd, v, start = NULL, end = NULL, per.step.depth = Inf)

Arguments

  • nd: a network (usually a networkDynamic) object
  • v: numeric vector giving the set of initial vertex.ids to start from
  • start: The beginning of the time range to start from
  • end: End of the time range to search to
  • per.step.depth: How many steps (default=1) to search per unit of time.

Details

The default value of per.step.depth=Inf is equivilent to assuming that the `process' takes no time to travel along vertices

Returns

A numeric vector of vertex.ids reachable from the initial set of vertex.id by `traveling' forward in time along active vertices and edges subject to bounding paramters.

Author(s)

skyebend

Note

This is a pure R implementation, probably very slow.

This function could be ill-defined when using non-Inf per.step.depth with networks with instantaneous (onset=terminus) spells as it will treat elements active at time t as active until the next change in the network.

TODO: should be able to specifiy edge weight attribute to be included in time calcualtions.

See Also

See also tPath for a dramatically faster implementation

  • Maintainer: Skye Bender-deMoll
  • License: GPL-3
  • Last published: 2021-11-01