/// <summary> /// Lanczos window. /// Periodic version, useful e.g. for FFT purposes. /// </summary> public static double[] LanczosPeriodic(int width) { double phaseStep = 2.0 / width; var w = new double[width]; for (int i = 0; i < w.Length; i++) { w[i] = Trig.Sinc(i * phaseStep - 1.0); } return(w); }
Exponential() { double exp = Math.Exp(real); if (IsReal) { return(new Complex(exp, 0d)); } return(new Complex( exp * Trig.Cosine(imag), exp * Trig.Sine(imag) )); }
HyperbolicCotangent() { if (IsReal) { return(new Complex(Trig.HyperbolicCotangent(real), 0d)); } double sini = Trig.Sine(imag); double sinhr = Trig.HyperbolicSine(real); double denom = sini * sini + sinhr * sinhr; return(new Complex( sinhr * Trig.HyperbolicCosine(real) / denom, sini * Trig.Cosine(imag) / denom )); }
HyperbolicTangent() { if (IsReal) { return(new Complex(Trig.HyperbolicTangent(real), 0d)); } double cosi = Trig.Cosine(imag); double sinhr = Trig.HyperbolicSine(real); double denom = cosi * cosi + sinhr * sinhr; return(new Complex( Trig.HyperbolicCosine(real) * sinhr / denom, cosi * Trig.Sine(imag) / denom )); }
Cosecant() { if (IsReal) { return(new Complex(Trig.Cosecant(real), 0d)); } double sinr = Trig.Sine(real); double sinhi = Trig.HyperbolicSine(imag); double denom = sinr * sinr + sinhi * sinhi; return(new Complex( sinr * Trig.HyperbolicCosine(imag) / denom, -Trig.Cosine(real) * sinhi / denom )); }
Tangent() { if (IsReal) { return(new Complex(Trig.Tangent(real), 0d)); } double cosr = Trig.Cosine(real); double sinhi = Trig.HyperbolicSine(imag); double denom = cosr * cosr + sinhi * sinhi; return(new Complex( Trig.Sine(real) * cosr / denom, sinhi * Trig.HyperbolicCosine(imag) / denom )); }
public static Complex Tanh(Complex value) { return(Trig.Tanh(value)); }
public static Complex Cosh(Complex value) { return(Trig.Cosh(value)); }
public static Complex Sinh(Complex value) { return(Trig.Sinh(value)); }
public static Complex Atan(Complex value) { return(Trig.Atan(value)); }
public static Complex Acos(Complex value) { return(Trig.Acos(value)); }
/// <summary>Trigonometric Hyperbolic Cosine (cosh, Cosinus hyperbolicus) of this <c>Complex</c>.</summary> public Complex HyperbolicCosine() { if (IsReal) { return(new Complex(Trig.HyperbolicCosine(real), 0d)); } return(new Complex(Trig.HyperbolicCosine(real) * Trig.Cosine(imag), Trig.HyperbolicSine(real) * Trig.Sine(imag))); }