R/map-neighbors.R
traverse_mp.RdRecursive function to traverse the meta-path until it is expounded. The variable mp is a list of node types (i.e., a meta-path),
which is shortened on each call of traverse_mp().
traverse_mp(
roots,
mp,
step = 1,
reference_list,
list_type = c("edge", "neighbor"),
verbose = TRUE
)ID of the root node on the first iteration, otherwise, data.table of growing paths.
List of node types (i.e., a meta-path).
Counter for recursive function.
Either an edge list as a data.table or a neighbor reference object constructed
by get_neighbor_list(). If an edge list is provided, the data.table must contain the following columns:
OriginIDs of the origin nodes for each edge.
DestinationIDs of the destination nodes for each edge.
OriginTypeTypes of the origin node for each edge.
DestinationTypeTypes of the destination node for each edge.
EdgeTypeTypes of each edge.
If an edge list is provided, specify "edge". If a neighbor list is provided, specify "neighbor".
Should intermediate calculations be printed to console?
List of all meta-paths from the root node following a specific meta-path, as a data.table.
get_neighbor_list() for neighbor reference object construction.