progs/mandelbrot3.sc
changeset 425 957808dcb367
parent 424 daf561a83ba6
equal deleted inserted replaced
424:daf561a83ba6 425:957808dcb367
    19 import javax.swing.JPanel
    19 import javax.swing.JPanel
    20 import javax.swing.WindowConstants
    20 import javax.swing.WindowConstants
    21 import scala.language.implicitConversions    
    21 import scala.language.implicitConversions    
    22 import scala.collection.parallel.CollectionConverters._
    22 import scala.collection.parallel.CollectionConverters._
    23 
    23 
    24 object Test {
    24 //object Test {
    25 
    25 
    26 def main() = {
    26 //def main() = {
    27 
    27 
    28 // complex numbers
    28 // complex numbers
    29 case class Complex(val re: Double, val im: Double) { 
    29 case class Complex(val re: Double, val im: Double) { 
    30   // represents the complex number re + im * i
    30   // represents the complex number re + im * i
    31   def +(that: Complex) = Complex(this.re + that.re, this.im + that.im)
    31   def +(that: Complex) = Complex(this.re + that.re, this.im + that.im)
   192 val exB = 0.3654477 + 0.6301795 * i
   192 val exB = 0.3654477 + 0.6301795 * i
   193 
   193 
   194 //time_needed(mandelbrot(exA, exB, 1000))
   194 //time_needed(mandelbrot(exA, exB, 1000))
   195 
   195 
   196 
   196 
   197 }
   197 //}
   198 
   198 
   199 }
   199 //}
   200 
   200 
   201 Test.main()
   201 //Test.main()