Translates a sequence of nodes from a G* graph, generated with any of the available transformations, to a sequence of nodes in terms of the original G.

parse_vpath(vpath)

Arguments

vpath

A vector of character type, representing a path as a sequence of nodes. The nodes are supposed to belong to an original graph G, but be written in terms of G*.

Value

A new vector of character type, representing the same path as vpath but with the nodes names translated to the original graph G's names.

See also

Other Parsers: direct_graph, get_all_nodes

Examples

# Obtain the vpath from any way, an algorithm or random walk. # Call the parsing function translated_vpath <- parse_vpath( c("s|u", "s|u|v", "u|v|y", "t") ) # Print the result translated_vpath
#> [1] "u" "v" "y" "t"