Line data Source code
1 : #include "Static/FixedSolution.hpp" 2 : 3 : #include "Static/supply/Network.hpp" 4 : 5 : using namespace std; 6 : using namespace Static; 7 : 8 0 : FixedSolution::FixedSolution(const Solution &sol): 9 0 : Solution(sol) {} 10 : 11 0 : void FixedSolution::setFlowInEdge(Network::Edge::ID id, Flow flow) { 12 0 : flows[id] = flow; 13 0 : } 14 : 15 0 : Flow FixedSolution::getFlowInEdge(Network::Edge::ID id) const { 16 0 : const auto &it = flows.find(id); 17 0 : if(it != flows.end()) 18 0 : return it->second; 19 : else 20 0 : return Solution::getFlowInEdge(id); 21 : }