:github_url: https://github.com/svenevs/exhale-companion .. _program_listing_file_ckpttncpp_MLPartMgr.hpp: Program Listing for File MLPartMgr.hpp ====================================== |exhale_lsh| :ref:`Return to documentation for file ` (``ckpttncpp/MLPartMgr.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once // **Special code for two-pin nets** // Take a snapshot when a move make **negative** gain. // Snapshot in the form of "interface"??? // #include "FMPartMgr.hpp" // import FMPartMgr // #include "netlist.hpp" #include #include #include #include // std::unique_ptr // #include // import LegalCheck // forward declare // template // struct Netlist; // using RngIter = decltype(py::range(1)); // using SimpleNetlist = Netlist; using node_t = typename SimpleNetlist::node_t; extern auto create_contraction_subgraph(const SimpleNetlist&, const py::set&) -> std::unique_ptr; enum class LegalCheck; class MLPartMgr { private: double BalTol; std::uint8_t K; size_t limitsize {7U}; public: int totalcost {}; explicit MLPartMgr(double BalTol) : MLPartMgr(BalTol, 2) { } MLPartMgr(double BalTol, std::uint8_t K) : BalTol {BalTol} , K {K} { } void set_limitsize(size_t limit) { this->limitsize = limit; } template auto run_FMPartition(const SimpleNetlist& H, gsl::span part) -> LegalCheck; };