Fiduccia-Mattheyses Partition Constraint Manager.
More...
#include <FMConstrMgr.hpp>
|
| 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.
|
| |
|
| using | node_t = typename Gnl::node_t |
| |
|
| | 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.
|
| |
|
| 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.
|
| |
template<typename Gnl>
class FMConstrMgr< Gnl >
Fiduccia-Mattheyses Partition Constraint Manager.
- Template Parameters
-
◆ node_t
template<typename Gnl >
| using FMConstrMgr< Gnl >::node_t = typename Gnl::node_t |
|
protected |
◆ FMConstrMgr() [1/2]
Constructs a new FMConstrMgr object with the given hypergraph and balance tolerance, using a default of 2 partitions.
- Parameters
-
| [in] | hyprgraph | The hypergraph to use for the FMConstrMgr. |
| [in] | bal_tol | The balance tolerance to use for the FMConstrMgr. |
◆ FMConstrMgr() [2/2]
Constructs a new FMConstrMgr object with the given hypergraph, balance tolerance, and number of partitions.
- Parameters
-
| [in] | hyprgraph | The hypergraph to use for the FMConstrMgr. |
| [in] | bal_tol | The balance tolerance to use for the FMConstrMgr. |
| [in] | num_parts | The number of partitions to use for the FMConstrMgr. |
◆ check_constraints()
Check if the proposed moves in the given vector of move information can be legally performed while satisfying the constraints.
- Parameters
-
| [in] | move_info_v | A vector of information about the proposed node moves. |
- Returns
- true If the proposed moves can be legally performed while satisfying the constraints.
-
false If the proposed moves cannot be legally performed or would violate the constraints.
◆ check_legal()
Check if the proposed move of the given nodes can be legally performed, and if so, whether it would improve the current partitioning.
- Parameters
-
| [in] | move_info_v | A vector of information about the proposed node moves. |
- Returns
- LegalCheck Indicates whether the move is not satisfied, would get better, or is fully satisfied.
◆ final_check()
template<typename Gnl >
| auto FMConstrMgr< Gnl >::final_check |
( |
std::span< const std::uint8_t > |
part | ) |
-> bool |
Performs a final check on the partitioning based on the given partition information.
- Parameters
-
| [in] | part | The partition information to check. |
◆ init()
template<typename Gnl >
| auto FMConstrMgr< Gnl >::init |
( |
std::span< const std::uint8_t > |
part | ) |
-> void |
Initializes the FMConstrMgr with the given partition information.
- Parameters
-
| [in] | part | The partition information to initialize the FMConstrMgr with. |
◆ update_move()
Update the partitioning based on the proposed node moves.
- Parameters
-
| [in] | move_info_v | A vector of information about the proposed node moves. |
◆ diff
Difference between current partition weight and target for each partition.
◆ lowerbound
Lower bound for partition weight (based on balance tolerance)
◆ num_parts
The documentation for this class was generated from the following file: