Pathing#

raphtory.algorithms.temporally_reachable_nodes(g, max_hops, start_time, seed_nodes, stop_nodes=None)#

Temporally reachable nodes – the nodes that are reachable by a time respecting path followed out from a set of seed nodes at a starting time.

This function starts at a set of seed nodes and follows all time respecting paths until either a) a maximum number of hops is reached, b) one of a set of stop nodes is reached, or c) no further time respecting edges exist. A time respecting path is a sequence of nodes v_1, v_2, … , v_k such that there exists a sequence of edges (v_i, v_i+1, t_i) with t_i < t_i+1 for i = 1, … , k - 1.

Parameters:
  • g (Raphtory graph) – directed Raphtory graph

  • max_hops (int) – maximum number of hops to propagate out

  • start_time (int) – time at which to start the path (such that t_1 > start_time for any path starting from these seed nodes)

  • seed_nodes (list(str) or list(int)) – list of vertex names or ids which should be the starting nodes

  • stop_nodes (list(str) or list(int)) – nodes at which a path shouldn’t go any further

Returns:

AlgorithmResult with string keys and float values mapping vertex names to their pagerank value.

Return type:

AlgorithmResult