unmakeMG | R Documentation |
Splits the adjacency matrix of a loopless mixed graph into three components: directed, undirected and bi-directed.
unmakeMG(amat)
amat |
a square matrix, with dimnames, representing a
loopless mixed graph. The matrix consists of 4 different integers as
an |
The matrices ug
, and bg
are just symmetric Boolean
matrices.
It is the inverse of makeAG
. It returns the following
components.
dg |
the adjacency matrix of the directed edges. |
ug |
the adjacency matrix of the undirected edges. |
bg |
the adjacency matrix of the bi-directed edges. |
Mathias Drton, Giovanni M. Marchetti
makeMG
ag <- makeMG(ug=UG(~y0*y1), dg=DAG(y4~y2, y2~y1), bg=UG(~y2*y3+y3*y4))
isAG(ag)
unmakeMG(ag)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.