Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Numerics;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace ConsoleApp1
  9. {
  10.     class Equation
  11.     {
  12.         public Func<Complex, Complex> ComputeFunction;
  13.         public Func<Complex,int, int> ComputeIterateFunction;
  14.         public int itMax = 0;
  15.  
  16.         public Complex Compute(Complex c)
  17.         {
  18.             if (ComputeFunction == null) return 0;
  19.             return this.ComputeFunction(c);
  20.         }
  21.  
  22.         public int ComputeIterate(Complex c)
  23.         {
  24.             return ComputeIterateFunction(c, itMax);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement