main_testing1/drumb_test5.scala
changeset 402 de59aa20a1dc
parent 347 4de31fdc0d67
equal deleted inserted replaced
401:9471c3b7ea02 402:de59aa20a1dc
    10 val urban_prices = List(List(Some(312.204773), Some(26.782711)), 
    10 val urban_prices = List(List(Some(312.204773), Some(26.782711)), 
    11                         List(Some(301.0466), Some(41.244694)), 
    11                         List(Some(301.0466), Some(41.244694)), 
    12                         List(Some(331.462585), Some(51.464207)))
    12                         List(Some(331.462585), Some(51.464207)))
    13 
    13 
    14 
    14 
    15 assert(CW6b.get_deltas(urban_prices) == List(List(Some(-0.03573991804411003), Some(0.539974575389325)), 
    15 assert(M1.get_deltas(urban_prices) == List(List(Some(-0.03573991804411003), Some(0.539974575389325)), 
    16                                           List(Some(0.10103414222249969), Some(0.24777764141006836))))
    16                                           List(Some(0.10103414222249969), Some(0.24777764141006836))))
    17 
    17 
    18 
    18 
    19 //get_prices(List("BIDU"), 2004 to 2008)
    19 //get_prices(List("BIDU"), 2004 to 2008)
    20 val urban_prices2 = List(List(None), List(None), 
    20 val urban_prices2 = List(List(None), List(None), 
    21                          List(Some(6.35)), List(Some(12.241)), 
    21                          List(Some(6.35)), List(Some(12.241)), 
    22                          List(Some(38.188)))
    22                          List(Some(38.188)))
    23 
    23 
    24 
    24 
    25 assert(CW6b.get_deltas(urban_prices2) == List(List(None), List(None), 
    25 assert(M1.get_deltas(urban_prices2) == List(List(None), List(None), 
    26                                         List(Some(0.9277165354330709)), 
    26                                         List(Some(0.9277165354330709)), 
    27                                         List(Some(2.119679764725104))))
    27                                         List(Some(2.119679764725104))))