|
| | NNPartMgr (const Gnl &hyprgraph, GainMgr &gain_mgr, ConstrMgr &constr_mgr, size_t num_parts) |
| | Constructs a new NNPartMgr object.
|
| |
| | PartMgrBase (const Gnl &hyprgraph, GainMgr &gain_mgr, ConstrMgr &constr_mgr, size_t num_parts) |
| | Construct a new Part Mgr Base object.
|
| |
| void | init (std::span< std::uint8_t > part) |
| | Initializes the partition manager with the given partition.
|
| |
| auto | legalize (std::span< std::uint8_t > part) -> LegalCheck |
| | Legalizes the partition to satisfy balance constraints.
|
| |
| void | optimize (std::span< std::uint8_t > part) |
| | Optimizes the partition using the FM algorithm.
|
| |
template<typename Gnl, typename GainMgr, typename ConstrMgr>
class NNPartMgr< Gnl, GainMgr, ConstrMgr >
No-Nonsense Partitioning Algorithm Manager.
NNPartMgr reuses the shared FM algorithm skeleton from PartMgrBase (Template Method pattern: init/legalize/optimize) and overrides only the single-pass behaviour: unlike FM it is a pure greedy local search that stops at the first non-positive-gain move (no look-ahead / snapshot / rollback) and never locks a moved vertex. The gain-computation and constraint-validation strategies remain injected as template parameters.
- Template Parameters
-
template<typename Gnl , typename GainMgr , typename ConstrMgr >
| void NNPartMgr< Gnl, GainMgr, ConstrMgr >::_optimize_1pass |
( |
std::span< std::uint8_t > |
part | ) |
|
|
overrideprotectedvirtual |
Performs a single pass of the No-Nonsense optimization algorithm.
Pure greedy local search: repeatedly takes the highest-gain move from the gain buckets while its gain is strictly positive, and stops at the first non-positive-gain move. It performs no snapshotting/rollback and does not lock moved vertices.
- Parameters
-
| [in,out] | part | The partition vector to optimize |
Reimplemented from PartMgrBase< Gnl, GainMgr, ConstrMgr >.