adj.upper.tri {HEMDAG} | R Documentation |
Binary upper triangular adjacency matrix
Description
Compute a binary square upper triangular matrix where rows and columns correspond to the nodes' name of the graph g
.
Usage
adj.upper.tri(g)
Arguments
g |
a graph of class |
Details
The nodes of the matrix are topologically sorted (by using the tsort
function of the RBGL package).
Let's denote with adj
our adjacency matrix. Then adj
represents a partial order data set in which the class j
dominates the class i
. In other words, adj[i,j]=1
means that j
dominates i
; adj[i,j]=0
means that there
is no edge between the class i
and the class j
. Moreover the nodes of adj
are ordered such that adj[i,j]=1
implies , i.e.
adj
is upper triangular.
Value
An adjacency matrix which is square, logical and upper triangular.
Examples
data(graph);
adj <- adj.upper.tri(g);
[Package HEMDAG version 2.7.4 Index]