aridProj | R Documentation |
Compute the (maximal) arid or ancestral projection of a graph
aridProj(graph, maximal = TRUE, verbose = FALSE)
ancProj(graph, maximal = TRUE, directed = FALSE)
graph |
an ADMG as an object of class |
maximal |
should the projection computed be maximal? |
verbose |
logical: should additional output be given? |
directed |
logical: is graph an ADMG? |
The input graph should be a summary graph for ancProj
,
and an ADMG for aridProj
.
Algorithm for aridProj()
: compute the intrinsic closure of every
vertex. Use this to obtain directed edges. Then add in bidirected
edges for vertices not already adjacent. Then go through pairs
and check if intrinsic closures are joined by a bidirected edge.
Algorithm for ancProj()
: go through in a topological order and check
no siblings are among ancestors. If there are at say v
, then look for parents and
siblings, recursively if the latter are also ancestors. Remove any bidirected
edges from discovered vertices to v
and add directed edges from them
to v
If maximal graph asked for, then also check intrinsic closures of the pairs.
ancProj()
: obtain ancestral projection
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.