26 :
public FMGainMgr<Gnl, FMBiGainCalc<Gnl>, FMBiGainMgr<Gnl>> {
52 auto init(std::span<const std::uint8_t> part) -> int;
62 auto& item = this->
gain_calc.vertex_list[w];
63 if (item.is_locked()) {
66 this->
gain_bucket[1 - part_w].modify_key(item, key);
78 this->_set_key(move_info_v.from_part, move_info_v.v, -gain);
88 auto& vlink = this->
gain_calc.vertex_list[v];
109 auto _set_key(uint8_t whichPart,
const node_t& v,
int key) ->
void {
Binary FM gain calculator for 2-way partitioning.
CRTP base class for FM gain management.
Binary Fiduccia-Mattheyses Gain Calculator.
Definition FMBiGainCalc.hpp:32
Binary Fiduccia-Mattheyses Gain Manager.
Definition FMBiGainMgr.hpp:26
FMBiGainMgr(const Gnl &hyprgraph)
Construct a new FMBiGainMgr object.
Definition FMBiGainMgr.hpp:37
auto lock(uint8_t whichPart, const node_t &v) -> void
Locks the vertex in the specified partition.
Definition FMBiGainMgr.hpp:87
auto init(std::span< const std::uint8_t > part) -> int
Initializes the FMBiGainMgr object with the given partition.
auto lock_all(uint8_t from_part, const node_t &v) -> void
Locks the vertex in the opposite partition from the specified partition.
Definition FMBiGainMgr.hpp:99
typename Gnl::node_t node_t
Definition FMBiGainMgr.hpp:30
auto update_move_v(const MoveInfoV< node_t > &move_info_v, int gain) -> void
Updates the move information for the given vertex and gain.
Definition FMBiGainMgr.hpp:75
auto modify_key(const node_t &w, std::uint8_t part_w, int key) -> void
Modifies the key for the given vertex in the gain bucket of the opposite partition.
Definition FMBiGainMgr.hpp:61
FMBiGainMgr(const Gnl &hyprgraph, std::uint8_t)
Constructs a new FMBiGainMgr object with the given hypergraph.
Definition FMBiGainMgr.hpp:44
Fiduccia-Mattheyses Gain Manager.
Definition FMGainMgr.hpp:32
const Gnl & hyprgraph
Reference to the hypergraph being partitioned.
Definition FMGainMgr.hpp:41
FMBiGainCalc< Gnl > gain_calc
Gain calculator instance.
Definition FMGainMgr.hpp:49
std::vector< BPQueue< node_t > > gain_bucket
Gain buckets for each partition (used in bucket-based gain management)
Definition FMGainMgr.hpp:43
Move information structures for FM partitioning algorithm.
Move information for a single vertex (without net reference)
Definition moveinfo.hpp:37