adjMatrix function

Adjacency matrix of a graph

Adjacency matrix of a graph

Transforms the ``edge matrix'' of a graph into the adjacency matrix.

adjMatrix(A)

Arguments

  • A: a square matrix representing the edge matrix of a graph.

Details

Given the edge matrix AA of a graph, this can be transformed into an adjacency matrix EE with the formula E=(AI)TE = (A-I)^T.

Returns

  • E: the adjacency matrix of the graph.

Author(s)

Giovanni M. Marchetti

See Also

edgematrix

Examples

amat <- DAG(y ~ x+z, z~u+v) E <- edgematrix(amat) adjMatrix(E)