CkPttn 1.2.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FMPartMgr< Gnl, GainMgr, ConstrMgr > Class Template Reference

Fiduccia-Mattheyses Partitioning Algorithm Manager. More...

#include <FMPartMgr.hpp>

Inheritance diagram for FMPartMgr< Gnl, GainMgr, ConstrMgr >:
Inheritance graph
[legend]
Collaboration diagram for FMPartMgr< Gnl, GainMgr, ConstrMgr >:
Collaboration graph
[legend]

Public Member Functions

 FMPartMgr (const Gnl &hyprgraph, GainMgr &gain_mgr, ConstrMgr &constr_mgr, size_t num_parts)
 Constructs a new FMPartMgr object.
 
 FMPartMgr (const Gnl &hyprgraph, GainMgr &gain_mgr, ConstrMgr &constr_mgr)
 Constructs a new FMPartMgr object.
 
- Public Member Functions inherited from PartMgrBase< Gnl, GainMgr, ConstrMgr >
 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.
 

Additional Inherited Members

- Public Types inherited from PartMgrBase< Gnl, GainMgr, ConstrMgr >
using GainCalc_ = typename GainMgr::GainCalc_
 
using GainMgr_ = GainMgr
 
using ConstrMgr_ = ConstrMgr
 
- Public Attributes inherited from PartMgrBase< Gnl, GainMgr, ConstrMgr >
int total_cost {}
 
- Protected Attributes inherited from PartMgrBase< Gnl, GainMgr, ConstrMgr >
const Gnl & hyprgraph
 Reference to the hypergraph being partitioned.
 
GainMgr & gain_mgr
 Gain manager for computing and managing gains.
 
ConstrMgr & validator
 Constraint manager for validating partition constraints.
 
size_t num_parts
 Number of partitions.
 

Detailed Description

template<typename Gnl, typename GainMgr, typename ConstrMgr>
class FMPartMgr< Gnl, GainMgr, ConstrMgr >

Fiduccia-Mattheyses Partitioning Algorithm Manager.

The FMPartMgr class is a subclass of PartMgrBase and is used for managing the partitioning of a hypergraph (Gnl) using the Fiduccia-Mattheyses algorithm. It takes a hypergraph, a gain manager, a constraint manager, and the number of partitions as input. It provides methods for taking a snapshot of the current partition and restoring a partition from a snapshot.

Template Parameters
Gnl
GainMgr
ConstrMgr

Constructor & Destructor Documentation

◆ FMPartMgr() [1/2]

template<typename Gnl , typename GainMgr , typename ConstrMgr >
FMPartMgr< Gnl, GainMgr, ConstrMgr >::FMPartMgr ( const Gnl &  hyprgraph,
GainMgr &  gain_mgr,
ConstrMgr &  constr_mgr,
size_t  num_parts 
)
inline

Constructs a new FMPartMgr object.

Parameters
[in]hyprgraphThe hypergraph to be partitioned
[in,out]gain_mgrThe gain manager used for the partitioning
[in,out]constr_mgrThe constraint manager used for the partitioning
[in]num_partsThe number of partitions to create

◆ FMPartMgr() [2/2]

template<typename Gnl , typename GainMgr , typename ConstrMgr >
FMPartMgr< Gnl, GainMgr, ConstrMgr >::FMPartMgr ( const Gnl &  hyprgraph,
GainMgr &  gain_mgr,
ConstrMgr &  constr_mgr 
)
inline

Constructs a new FMPartMgr object.

Parameters
[in]hyprgraphThe hypergraph to be partitioned
[in,out]gain_mgrThe gain manager used for the partitioning
[in,out]constr_mgrThe constraint manager used for the partitioning

The documentation for this class was generated from the following file: