breadth: Breadth-First Search

Description Usage Arguments Value

View source: R/Distance.R

Description

Implementation of Breadth-First Search in R (yikes!)

Usage

1
breadth(CIJ, src)

Arguments

CIJ

: a matrix - binary (un)directed connection matrix

src

: an integer - the source vertex index

Value

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


ncullen93/bctR documentation built on May 23, 2017, 11:35 a.m.