540 std::vector<std::vector<std::string>> swapFromPorts;
541 std::vector<std::vector<std::string>> swapToPorts;
547 for (
const auto &bit :
bits)
548 if (ports.count(bit.fromPort))
549 goto foundFromPortMatch;
552 std::vector<std::string> portsVector;
553 for (
const auto &port : ports)
554 portsVector.push_back(port);
555 swapFromPorts.push_back(portsVector);
561 for (
const auto &bit : bits)
562 if (ports.count(bit.toPort))
563 goto foundToPortMatch;
566 std::vector<std::string> portsVector;
567 for (
const auto &port : ports)
568 portsVector.push_back(port);
569 swapToPorts.push_back(portsVector);
575 std::map<std::string, std::string> mapFromPorts, mapToPorts;
579 for (
int i = 0; i < fromPortsPermutations; i++)
583 for (
int j = 0; j < toPortsPermutations; j++) {
std::map< std::string, std::set< std::map< std::string, std::string > > > swapPermutations
static void permutateVectorToMapArray(std::map< std::string, std::string > &map, const std::vector< std::vector< std::string >> &list, int idx)
static int numberOfPermutationsArray(const std::vector< std::vector< std::string >> &list)
bool compareWithFromAndToPermutations(const DiEdge &other, const std::map< std::string, std::string > &mapFromPorts, const std::map< std::string, std::string > &mapToPorts, const std::map< std::string, std::set< std::map< std::string, std::string >>> &swapPermutations) const
std::map< std::string, std::set< std::set< std::string > > > swapPorts