MLPartMgr class

Multilevel Partition Manager.

Constructors, destructors, conversion operators

MLPartMgr(double bal_tol) explicit
Constructs a new MLPartMgr object with the given balance tolerance and a default number of partitions (2).
MLPartMgr(double bal_tol, std::uint8_t num_parts)
Constructs a new MLPartMgr object with the given balance tolerance and number of partitions.

Public functions

void set_limitsize(size_t limit)
Sets the limit size for the partitioning.
template<typename Gnl, typename PartMgr>
auto run_FMPartition(const Gnl& hyprgraph, gsl::span<std::uint8_t> part) -> LegalCheck -> auto
Runs the Fiduccia-Mattheyses (FM) partitioning algorithm on the given hypergraph.

Public variables

int total_cost

Function documentation

MLPartMgr::MLPartMgr(double bal_tol) explicit

Constructs a new MLPartMgr object with the given balance tolerance and a default number of partitions (2).

Parameters
bal_tol in The balance tolerance for the partitioning.

MLPartMgr::MLPartMgr(double bal_tol, std::uint8_t num_parts)

Constructs a new MLPartMgr object with the given balance tolerance and number of partitions.

Parameters
bal_tol in The balance tolerance for the partitioning.
num_parts in The number of partitions to create.

void MLPartMgr::set_limitsize(size_t limit)

Sets the limit size for the partitioning.

Parameters
limit in The new limit size for the partitioning.

template<typename Gnl, typename PartMgr>
auto MLPartMgr::run_FMPartition(const Gnl& hyprgraph, gsl::span<std::uint8_t> part) -> LegalCheck

Runs the Fiduccia-Mattheyses (FM) partitioning algorithm on the given hypergraph.

Template parameters
Gnl The type of the hypergraph.
PartMgr The type of the partition manager.
Parameters
hyprgraph in The input hypergraph to partition.
part in/out The partition vector to store the partitioning results.
Returns LegalCheck The legality check result of the partitioning.