#include <ckpttn/FMBiGainCalc.hpp>
          template<typename Gnl>
          FMBiGainCalc class
        
        
        | Template parameters | |
|---|---|
| Gnl | |
Public types
Constructors, destructors, conversion operators
- FMBiGainCalc(const Gnl& hyprgraph, std::uint8_t) explicit
 - Constructs a new FMBiGainCalc object.
 
Public functions
- auto init(std::span<const std::uint8_t> part) -> int -> auto
 - Initializes the FMBiGainCalc object.
 - auto update_move_init() -> void -> auto
 - This function does nothing in 2-way partitioning.
 - 
              void init_idx_vec(const node_
t& v, const node_ t& net)  - Initializes the index vector for a given vertex and net.
 - 
              auto update_move_2pin_net(std::span<const std::uint8_t> part,
              const MoveInfo<node_
t>& move_info) -> node_t -> auto  - Update a 2-pin net during a move operation.
 - 
              auto update_move_3pin_net(std::span<const std::uint8_t> part,
              const MoveInfo<node_
t>& move_info) -> std::vector< int > -> auto  - Update the gain values for a 3-pin net during a move operation.
 - 
              auto update_move_general_net(std::span<const std::uint8_t> part,
              const MoveInfo<node_
t>& move_info) -> std::vector< int > -> auto  - Update the gain values for a general net during a move operation.
 
Public variables
- int delta_gain_w
 - 
              FMPmr::vector<node_
t> idx_vec  - bool special_handle_2pin_nets
 
Function documentation
              
                template<typename Gnl>
              
               FMBiGainCalc<Gnl>:: FMBiGainCalc(const Gnl& hyprgraph,
              std::uint8_t) explicit 
            
            Constructs a new FMBiGainCalc object.
| Parameters | |
|---|---|
| hyprgraph in | The hypergraph to use for the FMBiGainCalc object. | 
              
                template<typename Gnl>
              
              auto FMBiGainCalc<Gnl>:: init(std::span<const std::uint8_t> part) -> int
            
            Initializes the FMBiGainCalc object.
| Parameters | |
|---|---|
| part in | The partition information. | 
| Returns | The total cost of the initial partition. | 
This function initializes the FMBiGainCalc object by resetting the total cost, vertex list, and initial gain list. It then calls the _init_gain function for each net in the hypergraph to initialize the gain values.
              
                template<typename Gnl>
              
              void FMBiGainCalc<Gnl>:: init_idx_vec(const node_ t& v,
              const node_ t& net)
            
            Initializes the index vector for a given vertex and net.
| Parameters | |
|---|---|
| v in | The vertex to initialize the index vector for. | 
| net in | The net to initialize the index vector for. | 
This function is used to initialize the index vector for a given vertex and net in the FMBiGainCalc object.
              
                template<typename Gnl>
              
              auto FMBiGainCalc<Gnl>:: update_move_2pin_net(std::span<const std::uint8_t> part,
              const MoveInfo<node_ t>& move_info) -> node_t
            
            Update a 2-pin net during a move operation.
| Parameters | |
|---|---|
| part in | The current partition information. | 
| move_info in | The information about the move being performed. | 
| Returns | The vertex that was moved. | 
This function updates the gain values for a 2-pin net when a vertex is moved during a partitioning operation.
              
                template<typename Gnl>
              
              auto FMBiGainCalc<Gnl>:: update_move_3pin_net(std::span<const std::uint8_t> part,
              const MoveInfo<node_ t>& move_info) -> std::vector< int >
            
            Update the gain values for a 3-pin net during a move operation.
| Parameters | |
|---|---|
| part in | The current partition information. | 
| move_info in | The information about the move being performed. | 
| Returns | A vector of integers representing the updated gain values for the net. | 
This function updates the gain values for a 3-pin net when a vertex is moved during a partitioning operation.
              
                template<typename Gnl>
              
              auto FMBiGainCalc<Gnl>:: update_move_general_net(std::span<const std::uint8_t> part,
              const MoveInfo<node_ t>& move_info) -> std::vector< int >
            
            Update the gain values for a general net during a move operation.
| Parameters | |
|---|---|
| part in | The current partition information. | 
| move_info in | The information about the move being performed. | 
| Returns | A vector of integers representing the updated gain values for the net. | 
This function updates the gain values for a general net (with more than 3 pins) when a vertex is moved during a partitioning operation.