template<typename Gnl>
FMBiGainMgr class

FMBiGainMgr.

Template parameters
Gnl

Base classes

template<typename Gnl, typename GainCalc, class Derived>
class FMGainMgr<Gnl, FMBiGainCalc<Gnl>, FMBiGainMgr<Gnl>>

Public types

using Base = FMGainMgr<Gnl, FMBiGainCalc<Gnl>, FMBiGainMgr<Gnl>>
using GainCalc_ = FMBiGainCalc<Gnl>
using node_t = typename Gnl::node_t

Constructors, destructors, conversion operators

FMBiGainMgr(const Gnl& hyprgraph) explicit
Construct a new FMBiGainMgr object.
FMBiGainMgr(const Gnl& hyprgraph, std::uint8_t)
Constructs a new FMBiGainMgr object with the given hypergraph.

Public functions

auto init(gsl::span<const std::uint8_t> part) -> int -> auto
Initializes the FMBiGainMgr object with the given partition.
auto modify_key(const node_t& w, std::uint8_t part_w, int key) -> void -> auto
Modifies the key for the given vertex in the gain bucket of the opposite partition.
auto update_move_v(const MoveInfoV<node_t>& move_info_v, int gain) -> void -> auto
Updates the move information for the given vertex and gain.
auto lock(uint8_t whichPart, const node_t& v) -> void -> auto
Locks the vertex in the specified partition.
auto lock_all(uint8_t from_part, const node_t& v) -> void -> auto
Locks the vertex in the opposite partition from the specified partition.

Function documentation

template<typename Gnl>
FMBiGainMgr<Gnl>::FMBiGainMgr(const Gnl& hyprgraph) explicit

Construct a new FMBiGainMgr object.

Parameters
hyprgraph in The hypergraph to be used for the FMBiGainMgr object

template<typename Gnl>
FMBiGainMgr<Gnl>::FMBiGainMgr(const Gnl& hyprgraph, std::uint8_t)

Constructs a new FMBiGainMgr object with the given hypergraph.

Parameters
hyprgraph in The hypergraph to be used for the FMBiGainMgr object.

template<typename Gnl>
auto FMBiGainMgr<Gnl>::init(gsl::span<const std::uint8_t> part) -> int

Initializes the FMBiGainMgr object with the given partition.

Parameters
part in The partition to initialize the FMBiGainMgr object with.
Returns int The result of the initialization.

template<typename Gnl>
auto FMBiGainMgr<Gnl>::modify_key(const node_t& w, std::uint8_t part_w, int key) -> void

Modifies the key for the given vertex in the gain bucket of the opposite partition.

Parameters
in The vertex whose key is to be modified.
part_w in The partition that the vertex belongs to.
key in The new key value to be set for the vertex.

template<typename Gnl>
auto FMBiGainMgr<Gnl>::update_move_v(const MoveInfoV<node_t>& move_info_v, int gain) -> void

Updates the move information for the given vertex and gain.

Parameters
move_info_v in The move information for the vertex.
gain in The gain associated with the move.

template<typename Gnl>
auto FMBiGainMgr<Gnl>::lock(uint8_t whichPart, const node_t& v) -> void

Locks the vertex in the specified partition.

Parameters
whichPart in The partition to lock the vertex in.
in The vertex to lock.

template<typename Gnl>
auto FMBiGainMgr<Gnl>::lock_all(uint8_t from_part, const node_t& v) -> void

Locks the vertex in the opposite partition from the specified partition.

Parameters
from_part in The partition that the vertex is currently in.
in The vertex to lock.