#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/GCode/ToolOrderUtils.hpp>
|
| | MatchModeGroupSolver (const std::vector< std::vector< float > > &matrix_, const std::vector< int > &u_nodes, const std::vector< int > &v_nodes, const std::vector< int > &v_capacity, const std::unordered_map< int, std::vector< int > > &uv_unlink_limits={}) |
| std::vector< int > | solve () |
| | ~MatchModeGroupSolver () |
◆ MatchModeGroupSolver()
| Slic3r::MatchModeGroupSolver::MatchModeGroupSolver |
( |
const std::vector< std::vector< float > > & | matrix_, |
|
|
const std::vector< int > & | u_nodes, |
|
|
const std::vector< int > & | v_nodes, |
|
|
const std::vector< int > & | v_capacity, |
|
|
const std::unordered_map< int, std::vector< int > > & | uv_unlink_limits = {} ) |
753 {
754 assert(v_nodes.size() == v_capacity.size());
755 m_solver = std::make_unique<MinCostMaxFlow>();
759
760 m_solver->total_nodes = u_nodes.size() + v_nodes.size() + 2;
761
764
766
767
768
769 for (
int i = 0; i <
m_solver->l_nodes.size(); ++i)
771
772
773 for (
int i = 0; i <
m_solver->r_nodes.size(); ++i)
775
776
777 for (
int i = 0; i <
m_solver->l_nodes.size(); ++i) {
778 int from_idx = i;
779
780
781 std::optional<std::vector<int>> unlink_limits;
782 if (auto iter = uv_unlink_limits.find(i); iter != uv_unlink_limits.end())
783 unlink_limits = iter->second;
784 for (
int j = 0; j <
m_solver->r_nodes.size(); ++j) {
785 if (unlink_limits.has_value() && std::find(unlink_limits->begin(), unlink_limits->end(), j) != unlink_limits->end())
786 continue;
788 }
789 }
790 }
std::unique_ptr< MinCostMaxFlow > m_solver
Definition ToolOrderUtils.hpp:185
References m_solver.
◆ ~MatchModeGroupSolver()
| Slic3r::MatchModeGroupSolver::~MatchModeGroupSolver |
( |
| ) |
|
◆ solve()
| std::vector< int > Slic3r::MatchModeGroupSolver::solve |
( |
| ) |
|
◆ m_solver
| std::unique_ptr<MinCostMaxFlow> Slic3r::MatchModeGroupSolver::m_solver |
|
private |
The documentation for this class was generated from the following files: