R/getNumberOfDepots.R

Defines functions getNumberOfDepots

Documented in getNumberOfDepots

#' Returns the number of depots of a network.
#'
#' @template arg_network
#' @return [\code{integer(1)}]
#' @export
getNumberOfDepots = function(x) {
  assertClass(x, "Network")
  if (hasDepots(x)) {
    return(nrow(x$depot.coordinates))
  }
  return(0L)
}
jakobbossek/netgen documentation built on Feb. 11, 2024, 1:02 a.m.