main_testing2/danube_test3.scala
changeset 384 6e1237691307
parent 347 4de31fdc0d67
child 403 ffce7b61b446
--- a/main_testing2/danube_test3.scala	Mon Dec 07 01:25:41 2020 +0000
+++ b/main_testing2/danube_test3.scala	Fri Jan 15 02:40:57 2021 +0000
@@ -35,22 +35,13 @@
 
 assert(urban_ck(ls5_urban))
 
+// fourth test !!!
 
 /*
-import io.Source
-import scala.util._
-
-def urban_get_csv_file(name: String) : List[String] = {
-  val csv = Source.fromFile(name)
-  csv.mkString.split("\n").toList.drop(1)
-}
+ 
+val ls6_urban = (10 to 500 by 10).map(_.toString).toList
+val ls7_urban = ls6_urban zip ls6_urban.tail
+val ls8_urban = ls7_urban ::: ls7_urban.reverse
 
-def urban_process_ratings(lines: List[String]) : List[(String, String)] = {
-  for (cols <- lines.map(_.split(",").toList); 
-       if (cols(2).toFloat >= 4)) yield (cols(0), cols(1))  
-}
-
-val urban_ratings = urban_process_ratings(urban_get_csv_file("ratings.csv").take(1000))
-
-assert(urban_ck(urban_ratings))
+assert(urban_ck(ls8_urban)) 
 */