1
Fork 0
mirror of https://github.com/Jaxan/hybrid-ads.git synced 2025-04-28 07:27:45 +02:00

Removes some output

This commit is contained in:
Joshua Moerman 2015-02-16 17:36:42 +01:00
parent c945740cb5
commit 864d0818d1

View file

@ -71,8 +71,7 @@ int main(int argc, char *argv[]){
cout << "starting with " << part.size() << " blocks / " << N << " states" << endl; cout << "starting with " << part.size() << " blocks / " << N << " states" << endl;
queue<pair<partition_refine::BlockRef, reference_wrapper<splijtboom>>> work; queue<pair<partition_refine::BlockRef, reference_wrapper<splijtboom>>> work;
const auto push = [&work](auto br, auto & sp){ work.push({br, sp}); const auto push = [&work](auto br, auto & sp){ work.push({br, sp}); };
cout << "pushed "; for(auto && x : sp.states) cout << x; cout << endl; };
const auto pop = [&work](){ const auto r = work.front(); work.pop(); return r; }; const auto pop = [&work](){ const auto r = work.front(); work.pop(); return r; };
push(part.find(0), root); push(part.find(0), root);
@ -82,14 +81,18 @@ int main(int argc, char *argv[]){
auto block = block_boom.first; auto block = block_boom.first;
splijtboom & boom = block_boom.second; splijtboom & boom = block_boom.second;
cout << "current\t"; if(verbose){
for(auto s : boom.states) cout << s << " "; cout << "current\t";
cout << endl; for(auto s : boom.states) cout << s << " ";
cout << endl;
}
if(boom.states.size() == 1) continue; if(boom.states.size() == 1) continue;
// if(elems_in(*block) == 1) continue; // if(elems_in(*block) == 1) continue;
cout << "considering" << endl; if(verbose){
cout << "considering" << endl;
}
// First try to split on output // First try to split on output
for(size_t symbol = 0; symbol < P; ++symbol){ for(size_t symbol = 0; symbol < P; ++symbol){
@ -118,7 +121,9 @@ int main(int argc, char *argv[]){
push(new_blocks.first++, boom.children[i++]); push(new_blocks.first++, boom.children[i++]);
} }
cout << "splitted output into " << nb << endl; if(verbose){
cout << "splitted output into " << nb << endl;
}
goto has_split; goto has_split;
} }
@ -139,15 +144,17 @@ int main(int argc, char *argv[]){
continue; continue;
} }
cout << "split\t"; if(verbose){
for(auto s : oboom.states) cout << s << " "; cout << "split\t";
cout << endl; for(auto s : oboom.states) cout << s << " ";
cout << "into "; cout << endl;
for(auto & c : oboom.children) { cout << "into ";
for(auto s : c.states) cout << s << " "; for(auto & c : oboom.children) {
cout << "- "; for(auto s : c.states) cout << s << " ";
cout << "- ";
}
cout << endl;
} }
cout << endl;
// a succesful split, construct the children // a succesful split, construct the children
boom.seperator.resize(oboom.seperator.size() + 1); boom.seperator.resize(oboom.seperator.size() + 1);
@ -175,7 +182,9 @@ int main(int argc, char *argv[]){
push(new_blocks.first++, boom.children[i++]); push(new_blocks.first++, boom.children[i++]);
} }
cout << "splitted state into " << nb << endl; if(verbose){
cout << "splitted state into " << nb << endl;
}
goto has_split; goto has_split;
} }
@ -184,7 +193,7 @@ int main(int argc, char *argv[]){
has_split: has_split:
cout << "we have " << part.size() << " blocks / " << N << " states" << endl; cout << "we have " << part.size() << " blocks / " << N << " states" << endl;
cout << "and still " << work.size() << " work" << endl << endl; cout << "and still " << work.size() << " work" << endl;
} }
cout << "jippiejeejjo" << endl; cout << "jippiejeejjo" << endl;
} }