progs/mandelbrot.scala
changeset 471 135bf034ac30
parent 470 86a456f8cb92
child 481 e03a0100ec46
--- a/progs/mandelbrot.scala	Sat Sep 23 23:49:44 2023 +0100
+++ b/progs/mandelbrot.scala	Wed Nov 01 15:01:32 2023 +0000
@@ -5,7 +5,9 @@
 // 
 // needs to be called with
 // 
-// scala -cp scala-parallel-collections_3-1.0.4.jar
+// scala-cli --extra-jars scala-parallel-collections_3-1.0.4.jar
+//
+// the library is also uploaded to KEATS 
 //
 // !! UPDATE: On my faster Mac-M1 machine the times
 // !! are ca. 4 secs for the sequential version and
@@ -92,7 +94,8 @@
   viewer.canvas.setRGB(x, y, color.getRGB())
 
 
-// calculates the number of iterations using lazy lists (streams)
+// calculates the number of iterations using lazy lists 
+// (streams)
 //   the iteration goes on for a maximum of max steps,
 //   but might leave early when the pred is satisfied
 def iterations(c: Complex, max: Int) : Int = {
@@ -165,10 +168,10 @@
 
 val delta = (exc2 - exc1) * 0.0333
 
-//println(s"${time_needed(
-//  for (n <- (0 to 12)) 
-//     mandelbrot(exc1 + delta * n, 
-//                exc2 - delta * n, 100))} secs") 
+println(s"${time_needed(
+  for (n <- (0 to 12)) 
+     mandelbrot(exc1 + delta * n, 
+                exc2 - delta * n, 100))} secs")