Ranked Partition

class RankedPartition(vertexes)
property nvertexes: int

The number of vertexes in this partition.

Return type

int

static rank_to_partition_idx(rank)

Convert a rank to the corresponding index in the list of classes of nodes. -inf is the first rank, then 0, and so on.

Parameters

rank (Union[int, float]) – The input rank.

Return type

int

append_at_rank(block, rank)

Append a new block in the class corresponding to the given rank.

Parameters
  • block (_QBlock) – The new block.

  • rank (Union[int, float]) – The input rank.

append_at_index(block, index)

Append a new block in the index-th class.

Parameters
  • block – The new block.

  • rank – The index of the class.

clear_rank(rank)

Clear the list of blocks in the class corresponding to rank.

Parameters
  • block – The new block.

  • rank (Union[int, float]) – The input rank.

clear_index(index)

Clear the list of blocks in the index-th class.

Parameters
  • block – The new block.

  • rank – The index of the class.