perms: Randomly permute edges or node labels in a graph
Description
Given an adjacency matrix for a graph, permEdgesM2M will return an adjacency matrix after an Erdos-Renyi random permutation of the edges in the graph. perNodesM2M will return an adjacency matrix for a graph with identical structure, but with the node labels permuted.
Usage
permEdgesM2M(mat)
permNodesM2M(mat)
Arguments
mat
A square adjacency matrix for a graph.
Value
A square adjacency matrix for the new graph, subject to a random permutation of the edges or nodes.
References
Balasubramanian, et al. (2004) A graph theoretic approach to integromics - integrating disparate sources of functional genomics data.