progs/re2.scala
changeset 454 010237a7dae7
parent 453 a5525c780b96
child 471 e5df48ff7033
equal deleted inserted replaced
453:a5525c780b96 454:010237a7dae7
    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