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

Fiduccia-Mattheyses num_parts-Way Partition Constraint Manager. More...

#include <FMKWayConstrMgr.hpp>

Inheritance diagram for FMKWayConstrMgr< Gnl >:
Inheritance graph
[legend]
Collaboration diagram for FMKWayConstrMgr< Gnl >:
Collaboration graph
[legend]

Public Member Functions

 FMKWayConstrMgr (const Gnl &hyprgraph, double bal_tol, std::uint8_t num_parts)
 Constructs a new FMKWayConstrMgr object.
 
auto select_togo () const -> std::uint8_t
 Selects the next partition to move a node to.
 
auto init (std::span< const std::uint8_t > part) -> void
 Initializes the FMKWayConstrMgr object with the given partition information.
 
auto check_legal (const MoveInfoV< typename Gnl::node_t > &move_info_v) -> LegalCheck
 Checks if the given move information is legal according to the constraints.
 
- Public Member Functions inherited from FMConstrMgr< Gnl >
auto init (std::span< const std::uint8_t > part) -> void
 Initializes the FMConstrMgr with the given partition information.
 
auto check_legal (const MoveInfoV< node_t > &move_info_v) -> LegalCheck
 Check if the proposed move of the given nodes can be legally performed, and if so, whether it would improve the current partitioning.
 
auto check_constraints (const MoveInfoV< node_t > &move_info_v) -> bool
 Check if the proposed moves in the given vector of move information can be legally performed while satisfying the constraints.
 
auto update_move (const MoveInfoV< node_t > &move_info_v) -> void
 Update the partitioning based on the proposed node moves.
 
auto final_check (std::span< const std::uint8_t > part) -> bool
 Performs a final check on the partitioning based on the given partition information.
 

Additional Inherited Members

- Protected Types inherited from FMConstrMgr< Gnl >
using node_t = typename Gnl::node_t
 
- Protected Member Functions inherited from FMConstrMgr< Gnl >
 FMConstrMgr (const Gnl &hyprgraph, double bal_tol)
 Constructs a new FMConstrMgr object with the given hypergraph and balance tolerance, using a default of 2 partitions.
 
 FMConstrMgr (const Gnl &hyprgraph, double bal_tol, std::uint8_t num_parts)
 Constructs a new FMConstrMgr object with the given hypergraph, balance tolerance, and number of partitions.
 
- Protected Attributes inherited from FMConstrMgr< Gnl >
std::vector< unsigned int > diff
 Difference between current partition weight and target for each partition.
 
unsigned int lowerbound {}
 Lower bound for partition weight (based on balance tolerance)
 
std::uint8_t num_parts
 Number of partitions.
 

Detailed Description

template<typename Gnl>
class FMKWayConstrMgr< Gnl >

Fiduccia-Mattheyses num_parts-Way Partition Constraint Manager.

Template Parameters
Gnl

Constructor & Destructor Documentation

◆ FMKWayConstrMgr()

template<typename Gnl >
FMKWayConstrMgr< Gnl >::FMKWayConstrMgr ( const Gnl &  hyprgraph,
double  bal_tol,
std::uint8_t  num_parts 
)
inline

Constructs a new FMKWayConstrMgr object.

Parameters
[in]hyprgraphThe hypergraph to use.
[in]bal_tolThe balance tolerance to use.
[in]num_partsThe number of partitions.

Member Function Documentation

◆ check_legal()

template<typename Gnl >
auto FMKWayConstrMgr< Gnl >::check_legal ( const MoveInfoV< typename Gnl::node_t > &  move_info_v) -> LegalCheck

Checks if the given move information is legal according to the constraints.

Parameters
[in]move_info_vThe move information to check.
Returns
LegalCheck The result of the legality check.

◆ init()

template<typename Gnl >
auto FMKWayConstrMgr< Gnl >::init ( std::span< const std::uint8_t >  part) -> void
inline

Initializes the FMKWayConstrMgr object with the given partition information.

Parameters
[in]partA span of the partition indices for each node.

◆ select_togo()

template<typename Gnl >
auto FMKWayConstrMgr< Gnl >::select_togo ( ) const -> std::uint8_t

Selects the next partition to move a node to.

Returns
The index of the partition to move the node to.

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