adj.g <- matrix( c(0,0,1,
0,0,1,
0,0,0), 3, 3, byrow = TRUE )
# adj.g: adjacency matrix of graph with 3 nodes and 2 links
gnorm( adj.g, b = 3, D = diag(3) )
Run the code above in your browser using DataLab