one_to_many: Retrieve Shortest Paths from One Source to Multiple...

Description Usage Arguments Details Value

View source: R/targbetween.R

Description

This helper function retrieves the set of shortest paths connecting all possible dyads that can be formed from a single source vertex to a vector of destination vertices, for subsequent use by compute_targbetween.

Usage

1
one_to_many(network, source, destination, mode)

Arguments

network

An igraph network graph

source

A single vertex or a vector of vertices in network

destination

A vector of one or more vertices in network

mode

A character value indicating the mode for all_shortest_paths ("in", "out", or "all")

Details

This function should not be called directly. Instead, provide the network and the set of dyads that you want to analyze to targbetween_alldyads. That function calls one_to_many as needed.

Note that other functions that call one_to_many may reverse source and destination in order to identify the shortest paths from many source vertices to a single destination vertex. When this is done for directed networks, the mode argument is set to "in" rather than "out" as its value. (If the network is treated as undirected in the analysis, mode = "all" regardless of whether source and destination are reversed.)

Value

A list of shortest paths from the source vertex to each of the destination vertices.


bcbritt/targbetween documentation built on April 21, 2021, 6:12 p.m.