R/path.lengths.sink.R

Defines functions path.lengths.sink

Documented in path.lengths.sink

path.lengths.sink <- function(G, sink = NULL, inf.paths = TRUE){
  D <- distances(G, mode = "out")
  sink.dist <- D[,which(colnames(D) == sink)]
  out <- sink.dist[which(sink.dist != 0)]
  if(!inf.paths) out <- out[which(out != Inf)]
  out
}

Try the streamDAG package in your browser

Any scripts or data that you put into this service are public.

streamDAG documentation built on Oct. 7, 2023, 1:08 a.m.