pre_testing2/docdiff_test4.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 09 Nov 2020 17:49:12 +0000
changeset 359 8aaf187d25f0
parent 346 663c2a9108d1
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
211
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 211
diff changeset
     2
import CW7a._
211
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
val urban_list1 = List("a", "b", "b", "c", "d")
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
val urban_list2 = List("d", "b", "d", "b", "d")
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
assert(overlap(urban_list1, urban_list2) == 0.5384615384615384)
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
assert(overlap(urban_list1, urban_list1) == 1.0)
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
assert(overlap(urban_list2, urban_list2) == 1.0)