CkPttn 1.2.4
Loading...
Searching...
No Matches
FMBiConstrMgr.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include "FMConstrMgr.hpp" // import FMConstrMgr
9
17template <typename Gnl> class FMBiConstrMgr : public FMConstrMgr<Gnl> {
18 public:
25 FMBiConstrMgr(const Gnl& hyprgraph, double bal_tol) : FMConstrMgr<Gnl>{hyprgraph, bal_tol, 2} {}
26
33 FMBiConstrMgr(const Gnl& hyprgraph, double bal_tol, std::uint8_t /*num_parts*/)
34 : FMConstrMgr<Gnl>{hyprgraph, bal_tol, 2} {}
35
41 auto select_togo() const -> std::uint8_t { return this->diff[0] < this->diff[1] ? 0 : 1; }
42};
FM partition constraint manager.
Constraint Manager.
Definition FMBiConstrMgr.hpp:17
FMBiConstrMgr(const Gnl &hyprgraph, double bal_tol, std::uint8_t)
Constructs a new FMBiConstrMgr object for the general framework.
Definition FMBiConstrMgr.hpp:33
FMBiConstrMgr(const Gnl &hyprgraph, double bal_tol)
Construct a new FMBiConstrMgr object (for general framework)
Definition FMBiConstrMgr.hpp:25
auto select_togo() const -> std::uint8_t
Selects the partition to move a vertex to based on the difference in partition sizes.
Definition FMBiConstrMgr.hpp:41
Fiduccia-Mattheyses Partition Constraint Manager.
Definition FMConstrMgr.hpp:29
std::vector< unsigned int > diff
Difference between current partition weight and target for each partition.
Definition FMConstrMgr.hpp:42