progs/re2.scala
changeset 454 edb4ad356c56
parent 453 36e5752fa191
child 471 9476086849ad
equal deleted inserted replaced
453:36e5752fa191 454:edb4ad356c56
    54   (end - start)/(i * 1.0e9)
    54   (end - start)/(i * 1.0e9)
    55 }
    55 }
    56 
    56 
    57 
    57 
    58 //test: (a?{n}) (a{n})
    58 //test: (a?{n}) (a{n})
    59 for (i <- 1 to 1001 by 100) {
    59 for (i <- 1 to 1001 by 10) {
    60   println(i + " " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i))))
    60   println(i + " " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i))))
    61 }
    61 }
    62 
    62 
    63 for (i <- 1 to 1001 by 100) {
    63 for (i <- 1 to 1001 by 10) {
    64   println(i + " " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i))))
    64   println(i + " " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i))))
    65 }
    65 }
    66 
    66 
    67 
    67 
    68 //test: (a*)* b
    68 //test: (a*)* b