public static double Sum(SuperArray arr) { double r, i; Internal.VERIFY(AFAlgorithm.af_sum_all(out r, out i, arr.variable._ptr)); return(r); }
public static Complex Sum(AFArray arr) { double r, i; Internal.VERIFY(AFAlgorithm.af_sum_all(out r, out i, arr._ptr)); return(new Complex(r, i)); }
public static returnType SumAll <returnType>(Array arr) { double r, i; Internal.VERIFY(AFAlgorithm.af_sum_all(out r, out i, arr._ptr)); if (typeof(returnType) == typeof(Complex)) { return((returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType))); } else { return((returnType)Convert.ChangeType(r, typeof(returnType))); } }