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:
parent
c945740cb5
commit
864d0818d1
1 changed files with 26 additions and 17 deletions
15
src/main.cpp
15
src/main.cpp
|
@ -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;
|
||||||
|
|
||||||
|
if(verbose){
|
||||||
cout << "current\t";
|
cout << "current\t";
|
||||||
for(auto s : boom.states) cout << s << " ";
|
for(auto s : boom.states) cout << s << " ";
|
||||||
cout << endl;
|
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;
|
||||||
|
|
||||||
|
if(verbose){
|
||||||
cout << "considering" << endl;
|
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++]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(verbose){
|
||||||
cout << "splitted output into " << nb << endl;
|
cout << "splitted output into " << nb << endl;
|
||||||
|
}
|
||||||
|
|
||||||
goto has_split;
|
goto has_split;
|
||||||
}
|
}
|
||||||
|
@ -139,6 +144,7 @@ int main(int argc, char *argv[]){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(verbose){
|
||||||
cout << "split\t";
|
cout << "split\t";
|
||||||
for(auto s : oboom.states) cout << s << " ";
|
for(auto s : oboom.states) cout << s << " ";
|
||||||
cout << endl;
|
cout << endl;
|
||||||
|
@ -148,6 +154,7 @@ int main(int argc, char *argv[]){
|
||||||
cout << "- ";
|
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++]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(verbose){
|
||||||
cout << "splitted state into " << nb << endl;
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue