R/length.R

Defines functions length.DirectedGraphBuilder length.DirectedAcyclicGraph length.DirectedGraph

#' @export
length.DirectedGraph <- function(x) {
  x$length()
}

#' @export
length.DirectedAcyclicGraph <- function(x) {
  x$length()
}

#' @export
length.DirectedGraphBuilder <- function(x) {
  rlang::warn("Length of a graph builder is always 1")
  1
}

Try the orbweaver package in your browser

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

orbweaver documentation built on June 8, 2025, 11:40 a.m.