示例#1
0
        public static WWComplex Sub(WWComplex a, WWComplex b)
        {
            var r = new WWComplex(a);

            r.Sub(b);
            return(r);
        }
示例#2
0
        public static double AverageDistance(WWComplex[] a, WWComplex[] b)
        {
            if (a.Length != b.Length)
            {
                throw new ArgumentException("input array length mismatch");
            }

            double d = 0.0;

            for (int i = 0; i < a.Length; ++i)
            {
                var s = WWComplex.Sub(a[i], b[i]);
                d += s.Magnitude();
            }

            d /= a.Length;
            return(d);
        }
示例#3
0
 public static WWComplex Sub(WWComplex a, WWComplex b)
 {
     var r = new WWComplex(a);
     r.Sub(b);
     return r;
 }