Convert a vector of strings, representing the names of a square matrix, to an adjacency key matrix.
Usage
namesToAdjacencyKey(vector, upper_triangle = TRUE)
Arguments
- vector
Vector representing the names of a square matrix.
- upper_triangle
Not Implemented.
Value
A character matrix with 2 rows and choose(length(vector), 2) columns. Each column contains a pair of names representing a unique adjacency (edge) between nodes in the original square matrix.
Details
Returns a matrix with 2 rows and choose(length(vector), 2) columns, where each column represents a unique pair of names from the input vector, corresponding to the upper triangle of a square matrix.