Implementation of Breadth-First Search in R (yikes!)
: a matrix - binary (un)directed connection matrix
: an integer - the source vertex index
DB : a list - DB has two elements: 'distance' is a vector of distances between the source (src) and the ith vertex (0 for src), and 'branch' is a vector of vertices that precede 'i' in the BFS (-1 for src)
#' @useDynLib bctR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.