isDAG: Check Direct Acyclic Graph (DAG) Condition

View source: R/catnet.dags.R

isDAGR Documentation

Check Direct Acyclic Graph (DAG) Condition

Description

For a pair of node and parent lists, the function checks whether the DAG condition holds or not.

Usage

isDAG(lnodes, lpars)

Arguments

lnodes

a list of nodes

lpars

a list of node parents

Details

The DAG verification algorithm is based on the topological ordering of the graph nodes. If node ordering is not possible, the graph is not a DAG.

Value

A logical TRUE/FALSE value.

Author(s)

N. Balov

Examples

  cnet <- cnRandomCatnet(numnodes=20, maxParents=3, numCategories=2)
  isDAG(lnodes=cnet@nodes, lpars=cnet@parents)

catnet documentation built on Nov. 10, 2022, 5:08 p.m.