78 (end - start)/(i * 1.0e9) |
78 (end - start)/(i * 1.0e9) |
79 } |
79 } |
80 |
80 |
81 |
81 |
82 //test: (a?{n}) (a{n}) |
82 //test: (a?{n}) (a{n}) |
83 for (i <- 1 to 10001 by 1000) { |
83 for (i <- 1 to 9001 by 1000) { |
84 println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i)))) |
84 println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i)))) |
85 } |
85 } |
86 |
86 |
87 for (i <- 1 to 10001 by 1000) { |
87 for (i <- 1 to 9001 by 1000) { |
88 println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i)))) |
88 println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i)))) |
89 } |
89 } |
90 |
90 |
91 //test: (a*)* b |
91 //test: (a*)* b |
92 for (i <- 1 to 7500001 by 500000) { |
92 for (i <- 1 to 7000001 by 500000) { |
93 println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL2, "a" * i)))) |
93 println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL2, "a" * i)))) |
94 } |
94 } |
95 |
95 |
96 for (i <- 1 to 7500001 by 500000) { |
96 for (i <- 1 to 7000001 by 500000) { |
97 println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL2, "a" * i)))) |
97 println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL2, "a" * i)))) |
98 } |
98 } |
99 |
99 |