--- a/progs/mandelbrot.scala Sat Dec 16 23:53:28 2017 +0000
+++ b/progs/mandelbrot.scala Mon Jan 15 23:15:34 2018 +0000
@@ -75,8 +75,8 @@
val delta_x = (end.a - start.a) / W
val delta_y = (end.b - start.b) / H
- for (y0 <- (0 until H).par) {
- for (x0 <- (0 until W).par) {
+ for (y0 <- (0 until H)) {
+ for (x0 <- (0 until W)) {
val c = start + Complex(x0 * delta_x, y0 * delta_y)
@@ -124,10 +124,21 @@
// some more computations with example 3
val delta = (exc2 - exc1) * 0.0333
-//time_needed(
-// for (i <- (0 to 12))
-// mandelbrot(exc1 + delta * i,
-// exc2 - delta * i, 1000))
+time_needed(
+ for (i <- (0 to 12))
+ mandelbrot(exc1 + delta * i,
+ exc2 - delta * i, 1000))val exc1 = Complex(0.435396403, 0.367981352)
+val exc2 = Complex(0.451687191, 0.380210061)
+
+//time_needed(mandelbrot(exc1, exc2, 1000))
+
+// some more computations with example 3
+val delta = (exc2 - exc1) * 0.0333
+
+time_needed(
+ for (i <- (0 to 12))
+ mandelbrot(exc1 + delta * i,
+ exc2 - delta * i, 1000))