core_testing2/docdiff_test4.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 02 Nov 2023 13:53:37 +0000
changeset 474 b528d1d3d3c3
parent 473 ac79c2e534bd
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
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
473
ac79c2e534bd updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
     3
def urbanmain() = {
ac79c2e534bd updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
     4
  import C2._
211
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
473
ac79c2e534bd updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
     6
  val urban_list1 = List("a", "b", "b", "c", "d")
ac79c2e534bd updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
     7
  val urban_list2 = List("d", "b", "d", "b", "d")
211
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
473
ac79c2e534bd updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
     9
  assert(overlap(urban_list1, urban_list2) == 0.5384615384615384)
ac79c2e534bd updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    10
  assert(overlap(urban_list1, urban_list1) == 1.0)
ac79c2e534bd updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    11
  assert(overlap(urban_list2, urban_list2) == 1.0)
ac79c2e534bd updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    12
}