R/map-neighbors.R
traverse_mp.Rd
Recursive 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:
Origin
IDs of the origin nodes for each edge.
Destination
IDs of the destination nodes for each edge.
OriginType
Types of the origin node for each edge.
DestinationType
Types of the destination node for each edge.
EdgeType
Types 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.