Skip to contents

Checks if the given caugi graph is empty (has no nodes).

Usage

is_empty_caugi(cg)

Arguments

cg

A caugi_graph object.

Value

A logical value indicating whether the graph is empty.

Examples

cg_empty <- caugi_graph(class = "DAG")
is_empty_caugi(cg_empty) # TRUE
#> [1] TRUE
cg_non_empty <- caugi_graph(
  A %-->% B,
  class = "DAG"
)
is_empty_caugi(cg_non_empty) # FALSE
#> [1] FALSE

cg_no_edges_but_has_nodes <- caugi_graph(
  A, B,
  class = "DAG"
)
is_empty_caugi(cg_no_edges_but_has_nodes) # FALSE
#> [1] FALSE