|
| | FMGainMgr (const Gnl &hyprgraph, std::uint8_t num_parts) |
| | Constructs a new FMGainMgr object.
|
| |
| auto | init (std::span< const std::uint8_t > part) -> int |
| | Initializes the FMGainMgr with the given partition information.
|
| |
| auto | is_empty_togo (uint8_t to_part) const -> bool |
| | Checks if the gain bucket for the given partition is empty.
|
| |
| auto | is_empty () const -> bool |
| | Checks if all the gain buckets are empty.
|
| |
| auto | select (std::span< const std::uint8_t > part) -> std::pair< MoveInfoV< node_t >, int > |
| | Selects a vertex to move and computes the associated gain.
|
| |
| auto | select_togo (uint8_t to_part) -> std::pair< node_t, int > |
| | Selects a node to move to the given partition.
|
| |
| auto | update_move (std::span< const std::uint8_t > part, const MoveInfoV< node_t > &move_info_v) -> void |
| | Updates the gain information for the given set of moves.
|
| |
template<typename Gnl, typename GainCalc, class Derived>
class FMGainMgr< Gnl, GainCalc, Derived >
Fiduccia-Mattheyses Gain Manager.
The FMGainMgr class is a CRTP base class for managing the gain calculation and bucket structure used in the Fiduccia-Mattheyses partitioning algorithm. It provides methods for initializing gains, selecting vertices to move, and updating gain values after moves.
- Template Parameters
-
| Gnl | The hypergraph type |
| GainCalc | The gain calculator type |
| Derived | The derived gain manager type (CRTP) |
template<typename Gnl , typename GainCalc , class Derived >
| auto FMGainMgr< Gnl, GainCalc, Derived >::select |
( |
std::span< const std::uint8_t > |
part | ) |
-> std::pair< MoveInfoV< node_t >, int > |
Selects a vertex to move and computes the associated gain.
Evaluates candidate vertices across all partitions, applies constraint checking, and returns the best legal move with its gain value.
- Parameters
-
| [in] | part | The current partition information. |
- Returns
- Pair containing the selected move info and the total gain