MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / getLabelDiff

Function getLabelDiff

cp-profiler/src/cpprofiler/analysis/path_comp.cpp:47–58  ·  view source on GitHub ↗

Calculate unique labels for both paths (present in one but not in the other)

Source from the content-addressed store, hash-verified

45
46/// Calculate unique labels for both paths (present in one but not in the other)
47std::pair<vector<Label>, vector<Label>>
48getLabelDiff(const std::vector<Label> &path1,
49 const std::vector<Label> &path2)
50{
51 auto diff = set_symmetric_diff(path1, path2);
52
53 auto unique_1 = set_intersect(path1, diff);
54
55 auto unique_2 = set_intersect(path2, diff);
56
57 return std::make_pair(std::move(unique_1), std::move(unique_2));
58}
59
60} // namespace analysis
61} // namespace cpprofiler

Callers 1

updatePathDiffMethod · 0.85

Calls 2

set_symmetric_diffFunction · 0.85
set_intersectFunction · 0.85

Tested by

no test coverage detected