Type: | Package |
Title: | Use Graph Structure to Travel |
Version: | 0.1.0 |
Author: | JinanPang[aut, cre], HuiLi[ctb] |
Maintainer: | Jinan Pang <pang.jinan@qq.com> |
Description: | It is used to travel graphs, by using DFS and BFS to get the path from node to each leaf node. Depth first traversal(DFS) is a recursive algorithm for searching all the vertices of a graph or tree data structure. Traversal means visiting all the nodes of a graph. Breadth first traversal(BFS) algorithm is used to search a tree or graph data structure for a node that meets a set of criteria. It starts at the tree’s root or graph and searches/visits all nodes at the current depth level before moving on to the nodes at the next depth level. Also, it provides the matrix which is reachable between each node. Implement reference about Baruch Awerbuch (1985) <doi:10.1016/0020-0190(85)90083-3>. |
License: | GPL-2 |
LazyData: | TRUE |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
Imports: | methods, knitr |
VignetteBuilder: | knitr |
Suggests: | rmarkdown |
NeedsCompilation: | no |
Packaged: | 2023-03-22 00:18:47 UTC; stongan |
Depends: | R (≥ 3.5.0) |
Repository: | CRAN |
Date/Publication: | 2023-03-22 09:20:12 UTC |
edge file to R
Description
A dataset Of edge
Usage
edge
Format
a:
Get travel path of graph
Description
Get travel path of graph
Usage
get_graph_info(edgeMatrix = HGraph::edge, varVec = c("a", "b", "c"))
Arguments
edgeMatrix |
a matrix |
varVec |
a vector |
Value
Graph struct
Examples
aedge <- matrix(0, 3, 3, dimnames=list(c("a", "b", "c"), c("a", "b", "c")))
aedge["a","b"]<-1
aedge["a","c"]<-1
aedge["b","c"]<-1
results <- get_graph_info(edgeMatrix=aedge, varVec=c("a", "b", "c"))
print(results)