pub fn adjacency_matrix_to_string(
adjacency_matrix: &[f32],
size: usize,
) -> String
Expand description
Converts an adjacency matrix to its string representation in graph6 format.
The adjacency matrix must be a vector with elements stored in row-major order.
§Panics
Panics if size
is greater than 258,047.
§Example
let adjacency_matrix = vec![0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0];
let size = 3;
let graph = graph6::adjacency_matrix_to_string(&adjacency_matrix, size);
assert_eq!(graph, String::from("BW"));