--- a/progs/automata/thompson.sc Mon Sep 30 10:47:49 2024 +0100
+++ b/progs/automata/thompson.sc Fri Oct 11 19:13:00 2024 +0100
@@ -150,11 +150,11 @@
println("Breadth-first search EVIL1 / EVIL2")
for (i <- 1 to 13) {
- println(i + ": " + "%.5f".format(time_needed(2, tmatches_nfa(EVIL1(i), "a" * i))))
+ println(s"$i: ${"%.5f".format(time_needed(2, tmatches_nfa(EVIL1(i), "a" * i)))}")
}
for (i <- 1 to 100 by 5) {
- println(i + " " + "%.5f".format(time_needed(2, tmatches_nfa(EVIL2, "a" * i))))
+ println(s"$i: ${"%.5f".format(time_needed(2, tmatches_nfa(EVIL2, "a" * i)))}")
}
@@ -163,11 +163,11 @@
println("Depth-first search EVIL1 / EVIL2")
for (i <- 1 to 9) {
- println(i + " " + "%.5f".format(time_needed(2, tmatches_nfa2(EVIL1(i), "a" * i))))
+ println(s"$i: ${"%.5f".format(time_needed(2, tmatches_nfa2(EVIL1(i), "a" * i)))}")
}
for (i <- 1 to 7) {
- println(i + " " + "%.5f".format(time_needed(2, tmatches_nfa2(EVIL2, "a" * i))))
+ println(s"$i: ${"%.5f".format(time_needed(2, tmatches_nfa2(EVIL2, "a" * i)))}")
}
@@ -179,11 +179,11 @@
// the state explosion in the subset construction
for (i <- 1 to 7) {
- println(i + ": " + "%.5f".format(time_needed(2, tmatches_dfa(EVIL1(i), "a" * i))))
+ println(s"$i: ${"%.5f".format(time_needed(2, tmatches_dfa(EVIL1(i), "a" * i)))}")
}
for (i <- 1 to 100 by 5) {
- println(i + " " + "%.5f".format(time_needed(2, tmatches_dfa(EVIL2, "a" * i))))
+ println(s"$i: ${"%.5f".format(time_needed(2, tmatches_dfa(EVIL2, "a" * i)))}")
}