marking/drumb_test2.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 19 Jan 2018 14:09:08 +0000
changeset 169 b37052895281
parent 99 e10a9b2fd35a
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
82
28c8e17ab83a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
99
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
     2
val urban_prices = List(List(Some(71.539941), None), 
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
     3
                        List(Some(76.974614), None), 
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
     4
                        List(Some(65.226685), Some(6.35)), 
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
     5
                        List(Some(78.354649), Some(12.241)), 
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
     6
                        List(Some(85.517645), Some(38.188)))
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
     7
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
     8
val urban_deltas = List(List(Some(0.07596697626574789), None), 
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
     9
                        List(Some(-0.152620823795232), None), 
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
    10
                        List(Some(0.20126676681483952), Some(0.9277165354330709)), 
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
    11
                        List(Some(0.09141762603007778), Some(2.119679764725104)))
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
    12
e10a9b2fd35a updated
Christian Urban <urbanc@in.tum.de>
parents: 82
diff changeset
    13
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 99
diff changeset
    14
assert (get_deltas(get_prices(List("IBM", "BIDU"), 2004 to 2008)) == urban_deltas)
82
28c8e17ab83a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15