graphdot.graph.reorder.pbr.mnom module

class graphdot.graph.reorder.pbr.mnom.PbrMnom(tilesize=8, mnc=100, addMsgNets=True, config=None)[source]

Bases: object

Partitioning-based reordering.

Parameters:
  • tilesize (int, default=8) – Size of the tile to be used for partitioning
  • mnc (int, default=100) – Message net cost. The higher the value, the more aggressive the will try to minimize the number of nonempty tiles.
  • addMsgNets (bool, default=True) – Whether to add message nets to minimize the number of nonempty tiles. Should be True in most cases.
__call__(row_ids, col_ids, nrow, ncol)[source]

Reorder a graph (as represented by a symmetric sparse matrix) using PBR and return the permutation array.

Parameters:
  • row_ids (sequence) – Row indices of the non-zero elements.
  • col_ids (sequence) – Column indices of the non-zero elements.
  • nrow (int) – Number of rows
  • ncol (int) – Number of columns
Returns:

perm – Array of permuted row/column indices.

Return type:

ndarray

partition_hygr(h)[source]