Macaulay2 » Documentation
Packages » GraphicalModels :: directedEdgesMatrix
next | previous | forward | backward | up | index | toc

directedEdgesMatrix -- matrix corresponding to the directed edges of a digraph or a mixed graph

Synopsis

Description

This method returns the $n \times{} n$ matrix of direct causal effect indeterminates. This matrix has the parameter $l_{(i,j)}$ in the $(i,j)$ position if there is a directed edge $i \to j$, and 0 otherwise. Note that this matrix is not symmetric. The documentation of gaussianRing further describes the indeterminates $l_{(i,j)}$.

i1 : G = mixedGraph(digraph {{b,{c,d}},{c,{d}}},bigraph {{a,d}})

o1 = MixedGraph{Bigraph => Bigraph{a => {d}}   }
                                   d => {a}
                Digraph => Digraph{b => {c, d}}
                                   c => {d}
                                   d => {}
                Graph => Graph{}

o1 : MixedGraph
i2 : R = gaussianRing G

o2 = R

o2 : PolynomialRing
i3 : compactMatrixForm =false;
i4 : directedEdgesMatrix R

o4 = |  0  0    0     0   |
     |                    |
     |  0  0  l     l     |
     |         b,c   b,d  |
     |                    |
     |  0  0    0   l     |
     |               c,d  |
     |                    |
     |  0  0    0     0   |

             4      4
o4 : Matrix R  <-- R
i5 : D = digraph{{a,b},{c,d}}

o5 = Digraph{a => {b}}
             b => {}
             c => {d}
             d => {}

o5 : Digraph
i6 : directedEdgesMatrix gaussianRing D

o6 = |  0  0    0     0   |
     |                    |
     |  0  0  l     l     |
     |         b,c   b,d  |
     |                    |
     |  0  0    0   l     |
     |               c,d  |
     |                    |
     |  0  0    0     0   |

             4      4
o6 : Matrix R  <-- R

See also

Ways to use directedEdgesMatrix:

For the programmer

The object directedEdgesMatrix is a method function.