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

Constraint Manager. More...

#include <FMBiConstrMgr.hpp>

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

Public Member Functions

 FMBiConstrMgr (const Gnl &hyprgraph, double bal_tol)
 Construct a new FMBiConstrMgr object (for general framework)
 
 FMBiConstrMgr (const Gnl &hyprgraph, double bal_tol, std::uint8_t)
 Constructs a new FMBiConstrMgr object for the general framework.
 
auto select_togo () const -> std::uint8_t
 Selects the partition to move a vertex to based on the difference in partition sizes.
 
- 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 FMBiConstrMgr< Gnl >

Constraint Manager.

Check if (the move of v can satisfied, makebetter, or NotSatisfied

Template Parameters
Gnl

Constructor & Destructor Documentation

◆ FMBiConstrMgr() [1/2]

template<typename Gnl >
FMBiConstrMgr< Gnl >::FMBiConstrMgr ( const Gnl &  hyprgraph,
double  bal_tol 
)
inline

Construct a new FMBiConstrMgr object (for general framework)

Parameters
[in]hyprgraphThe hypergraph to use
[in]bal_tolThe balance tolerance to use

◆ FMBiConstrMgr() [2/2]

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

Constructs a new FMBiConstrMgr object for the general framework.

Parameters
[in]hyprgraphThe hypergraph to use.
[in]bal_tolThe balance tolerance to use.

Member Function Documentation

◆ select_togo()

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

Selects the partition to move a vertex to based on the difference in partition sizes.

Returns
std::uint8_t The index of the partition to move the vertex to (0 or 1).

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