コード例 #1
0
 public static Function Abs(ComplexFunction z)
 {
     return Function.Sqrt(z.re * z.re + z.im * z.im);
 }
コード例 #2
0
 public static Function Arg(ComplexFunction z)
 {
     // Use Complex.Arg through the inner class defined below.
     return new ArgFunction(z);
 }
コード例 #3
0
 public ReSqrtFunction(ComplexFunction z)
 {
     this.z = z;
 }
コード例 #4
0
 public void Update(ComplexFunction z05)
 {
     this.z05 = z05;
 }
コード例 #5
0
 public ArgFunction(ComplexFunction z)
 {
     this.z = z;
 }
コード例 #6
0
 static ComplexFunction()
 {
     I = new ComplexFunction(0.0, 1.0);
 }
コード例 #7
0
 public static ComplexFunction Sqr(ComplexFunction z)
 {
     return new ComplexFunction(z.re * z.re - z.im * z.im, 2.0 * z.re * z.im);
 }
コード例 #8
0
 public static ComplexFunction Sqrt(ComplexFunction z)
 {
     ReSqrtFunction re = new ReSqrtFunction(z);
     ImSqrtFunction im = new ImSqrtFunction(z);
     ComplexFunction z05 = new ComplexFunction(re, im);
     re.Update(z05);
     im.Update(z05);
     return z05;
 }
コード例 #9
0
 public static Function Re(ComplexFunction z)
 {
     return z.re;
 }
コード例 #10
0
 public static ComplexFunction Log(ComplexFunction z)
 {
     return new ComplexFunction(0.5 * Function.Log(z.re * z.re + z.im * z.im), Arg(z));
 }
コード例 #11
0
 public static Function Im(ComplexFunction z)
 {
     return z.im;
 }
コード例 #12
0
 public static ComplexFunction Exp(ComplexFunction z)
 {
     Function c = Function.Exp(z.re);
     return new ComplexFunction(c * Function.Cos(z.im), c * Function.Sin(z.im));
 }
コード例 #13
0
 public static ComplexFunction Conjugate(ComplexFunction z)
 {
     return new ComplexFunction(z.re, -z.im);
 }