:github_url: https://github.com/svenevs/exhale-companion .. _program_listing_file_ckpttncpp_FMConstrMgr.hpp: Program Listing for File FMConstrMgr.hpp ======================================== |exhale_lsh| :ref:`Return to documentation for file ` (``ckpttncpp/FMConstrMgr.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include "netlist.hpp" #include #include #include #include enum class LegalCheck { notsatisfied, getbetter, allsatisfied }; class FMConstrMgr { private: const SimpleNetlist& H; double BalTol; unsigned int totalweight {0}; unsigned int weight {}; // cache value protected: std::vector diff; unsigned int lowerbound {}; std::uint8_t K; FMConstrMgr(const SimpleNetlist& H, double BalTol) : FMConstrMgr(H, BalTol, 2) { } FMConstrMgr(const SimpleNetlist& H, double BalTol, std::uint8_t K); public: using node_t = typename SimpleNetlist::node_t; auto init(gsl::span part) -> void; auto check_legal(const MoveInfoV& move_info_v) -> LegalCheck; auto check_constraints(const MoveInfoV& move_info_v) -> bool; auto update_move(const MoveInfoV& move_info_v) -> void; };