reach_graph_per_source
Computes a separate reach graph for each given source node.
This is the induced subgraph of the set of nodes that are reachable within a given number of steps (or hops) to that source node. Reach networks are often referred to as ego networks in the context of social networks.
Parameters
- g : SAS graph object
-
Specifies the input graph to assess.
- source : node or iterable of nodes
-
Specifies one or more source nodes from which to compute the reach network.
- max_reach : int, optional
-
Specifies the number of steps (or hops) to traverse from the source nodes. The default is 1.
- data : bool, optional
-
Specifies whether or not to retain attributes. The default is True, which means that the node and edge attributes of the graph are retained.
Yields
- generator
-
Yields a generator of subgraphs; each subgraph represents one reach network. The generator has the solution_summary attribute, which contains information about the results of the algorithm.