Expand description
This module provides some utility functions for working with assignments and RLE encoding. It also provides a function to sort a JSON file by a key so as to make the BEN encoding more efficient.
Functions§
- Convert a vector of assignments to a run-length encoded (RLE) vector.
- Convert a run-length encoded (RLE) vector to a vector of assignments.
- Sorts a JSON-formatted NetworkX graph file by a key. This function will sort the nodes in the graph by the key provided and then relabel the nodes in the graph from 0 to n-1 where n is the number of nodes in the graph. It will also relabel the edges in the graph to match the new node labels.