* src/tgbatest/randtgba.cc: Some fixes from Denis for ratio stats.
This commit is contained in:
parent
55cc650bfe
commit
7d0b3fe297
2 changed files with 22 additions and 12 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
2005-01-24 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
|
* src/tgbatest/randtgba.cc: Some fixes from Denis for ratio stats.
|
||||||
|
|
||||||
2005-01-20 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
2005-01-20 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
* src/ltlast/formula.hh (formula_ptr_less_than): Two
|
* src/ltlast/formula.hh (formula_ptr_less_than): Two
|
||||||
|
|
|
||||||
|
|
@ -492,16 +492,16 @@ print_ar_stats(ar_stats_type& ar_stats)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
print_ratio_stats(int nbac, const ratio_stat_type& ratio_stats)
|
print_ratio_stats(const std::string& s, const ratio_stat_type& ratio_stats)
|
||||||
{
|
{
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
std::ios::fmtflags old = std::cout.flags();
|
std::ios::fmtflags old = std::cout.flags();
|
||||||
std::cout << std::right << std::fixed << std::setprecision(1);
|
std::cout << std::right << std::fixed << std::setprecision(1);
|
||||||
|
|
||||||
std::cout << "Ratios about emptiness checkers: ";
|
std::cout << "Ratios in case of non-emptiness (" << s << ")"
|
||||||
if (nbac >= 0)
|
<< std::endl;
|
||||||
std::cout << "(" << nbac << " acceptance conditions)";
|
std::cout << "<for all algorithms, the reference size is the one of"
|
||||||
std::cout << std::endl;
|
<< " the generalized automaton>" << std::endl;
|
||||||
std::cout << std::setw(22) << ""
|
std::cout << std::setw(22) << ""
|
||||||
<< " | % states | % transitions |"
|
<< " | % states | % transitions |"
|
||||||
<< std::endl << std::setw(22) << "algorithm"
|
<< std::endl << std::setw(22) << "algorithm"
|
||||||
|
|
@ -912,7 +912,7 @@ main(int argc, char** argv)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spot::tgba* degen = 0;
|
spot::tgba* degen = 0;
|
||||||
if (opt_degen && real_n_acc != 1)
|
if (opt_degen && real_n_acc > 1)
|
||||||
degen = new spot::tgba_tba_proxy(a);
|
degen = new spot::tgba_tba_proxy(a);
|
||||||
|
|
||||||
int n_alg = sizeof(ec_algos) / sizeof(*ec_algos);
|
int n_alg = sizeof(ec_algos) / sizeof(*ec_algos);
|
||||||
|
|
@ -954,8 +954,7 @@ main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
// Notice that ratios are computed w.r.t. the
|
// Notice that ratios are computed w.r.t. the
|
||||||
// generalized automaton a.
|
// generalized automaton a.
|
||||||
int nba = a->number_of_acceptance_conditions();
|
ratio_stats[real_n_acc][algo].count(ecs, a);
|
||||||
ratio_stats[nba][algo].count(ecs, a);
|
|
||||||
glob_ratio_stats[algo].count(ecs, a);
|
glob_ratio_stats[algo].count(ecs, a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1164,12 +1163,19 @@ main(int argc, char** argv)
|
||||||
|
|
||||||
if (!glob_ratio_stats.empty())
|
if (!glob_ratio_stats.empty())
|
||||||
{
|
{
|
||||||
print_ratio_stats(-1, glob_ratio_stats);
|
print_ratio_stats("all tests", glob_ratio_stats);
|
||||||
for (ratio_stats_type::const_iterator i = ratio_stats.begin();
|
if (ratio_stats.size() > 1)
|
||||||
i != ratio_stats.end(); ++i)
|
for (ratio_stats_type::const_iterator i = ratio_stats.begin();
|
||||||
print_ratio_stats(i->first, i->second);
|
i != ratio_stats.end(); ++i)
|
||||||
|
{
|
||||||
|
std::ostringstream s;
|
||||||
|
s << "tests with " << i->first << " acceptance conditions";
|
||||||
|
print_ratio_stats(s.str(), i->second);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!acss_stats.empty())
|
if (!acss_stats.empty())
|
||||||
{
|
{
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue