# Convert the node pair (3,7) into an index, where the total number of nodes is 10,
# for directed and undirected interactions
i <- 3
j <- 7
n <- 10
directedIndex <- convertNodePair(i,j,n,TRUE)
undirectedIndex <- convertNodePair(i,j,n,FALSE)
Run the code above in your browser using DataLab