powered by
For a pair of node and parent lists, the function checks whether the DAG condition holds or not.
isDAG(lnodes, lpars)
a list of nodes
a list of node parents
A logical TRUE/FALSE value.
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.
# NOT RUN { cnet <- cnRandomCatnet(numnodes=20, maxpars=3, numcats=2) isDAG(lnodes=cnet@nodes, lpars=cnet@pars) # }
Run the code above in your browser using DataLab