Untitled
unknown
plain_text
a year ago
855 B
10
Indexable
bool BB::CompletionCuts() {
int n_insert_jobs=0;
std::set < int > mySet;
for (Job * j2 = left_jobs.GetFirst(); j2 != NULL; j2 = left_jobs.GetNext(j2)) {
int i = 0;
bool could_fit = false;
for (Job * j1 = partial.GetFirst(); j1 != NULL; j1 = partial.GetNext(j1), i++){
if ((loaded_tools_array[i] & j2 -> tool_bits) == j2 -> tool_bits) {
n_insert_jobs++;
could_fit = true;
break;
}
else if (mySet.find(i) == mySet.end()) {
if (i > 0 && ((loaded_tools_array[i-1] | loaded_tools_array[i]) & j2 -> tool_bits) == j2 -> tool_bits) {
n_insert_jobs;
could_fit = true;
mySet.insert(i);
break;
}
}
}
if (!could_fit)
break;
}
if (n_insert_jobs == left_jobs.GetCount()) {
return true;
}
return false;
}Editor is loading...
Leave a Comment