33 instantiations of Complex
System.Numerics (33)
System\Numerics\Complex.cs (33)
70public static readonly Complex Zero = new Complex(0.0, 0.0); 71public static readonly Complex One = new Complex(1.0, 0.0); 72public static readonly Complex ImaginaryOne = new Complex(0.0, 1.0); 84return new Complex((magnitude * Math.Cos(phase)), (magnitude * Math.Sin(phase))); 111return (new Complex((-value.m_real), (-value.m_imaginary))); 116return (new Complex((left.m_real + right.m_real), (left.m_imaginary + right.m_imaginary))); 121return (new Complex((left.m_real - right.m_real), (left.m_imaginary - right.m_imaginary))); 128return (new Complex(result_Realpart, result_Imaginarypart)); 140return new Complex((a + b * doc) / (c + d * doc), (b - a * doc) / (c + d * doc)); 143return new Complex((b + a * cod) / (d + c * cod), (-a + b * cod) / (d + c * cod)); 177return (new Complex(value.m_real, (-value.m_imaginary))); 215return (new Complex(value, 0.0)); 218return (new Complex(value, 0.0)); 221return (new Complex(value, 0.0)); 225return (new Complex(value, 0.0)); 229return (new Complex(value, 0.0)); 233return (new Complex(value, 0.0)); 237return (new Complex(value, 0.0)); 240return (new Complex(value, 0.0)); 243return (new Complex(value, 0.0)); 246return (new Complex(value, 0.0)); 249return (new Complex((Double)value, 0.0)); 252return (new Complex((Double)value, 0.0)); 290return new Complex(Math.Sin(a) * Math.Cosh(b), Math.Cos(a) * Math.Sinh(b)); 298return new Complex(Math.Sinh(a) * Math.Cos(b), Math.Cosh(a) * Math.Sin(b)); 309return new Complex(Math.Cos(a) * Math.Cosh(b), - (Math.Sin(a) * Math.Sinh(b))); 317return new Complex(Math.Cosh(a) * Math.Cos(b), Math.Sinh(a) * Math.Sin(b)); 335Complex Two = new Complex(2.0, 0.0); 343return (new Complex((Math.Log(Abs(value))), (Math.Atan2(value.m_imaginary, value.m_real)))); 362return (new Complex(result_re, result_im)); 393return new Complex(t * Math.Cos(newRho), t * Math.Sin(newRho)); 398return Pow(value, new Complex(power, 0)); 409return (new Complex(result_re, result_im));
103 references to Complex
System.Numerics (103)
System\Numerics\Complex.cs (103)
30public struct Complex : IEquatable<Complex>, IFormattable { 58return Complex.Abs(this); 70public static readonly Complex Zero = new Complex(0.0, 0.0); 71public static readonly Complex One = new Complex(1.0, 0.0); 72public static readonly Complex ImaginaryOne = new Complex(0.0, 1.0); 82public static Complex FromPolarCoordinates(Double magnitude, Double phase) /* Factory method to take polar inputs and create a Complex object */ 87public static Complex Negate(Complex value) { 91public static Complex Add(Complex left, Complex right) { 95public static Complex Subtract(Complex left, Complex right) { 99public static Complex Multiply(Complex left, Complex right) { 103public static Complex Divide(Complex dividend, Complex divisor) { 108public static Complex operator -(Complex value) /* Unary negation of a complex number */ 115public static Complex operator +(Complex left, Complex right) { 120public static Complex operator -(Complex left, Complex right) { 124public static Complex operator *(Complex left, Complex right) { 131public static Complex operator /(Complex left, Complex right) { 150public static Double Abs(Complex value) { 174public static Complex Conjugate(Complex value) { 180public static Complex Reciprocal(Complex value) { 183return Complex.Zero; 186return Complex.One / value; 191public static bool operator ==(Complex left, Complex right) { 196public static bool operator !=(Complex left, Complex right) { 204if (!(obj is Complex)) return false; 205return this == ((Complex)obj); 207public bool Equals(Complex value) { 214public static implicit operator Complex(Int16 value) { 217public static implicit operator Complex(Int32 value) { 220public static implicit operator Complex(Int64 value) { 224public static implicit operator Complex(UInt16 value) { 228public static implicit operator Complex(UInt32 value) { 232public static implicit operator Complex(UInt64 value) { 236public static implicit operator Complex(SByte value) { 239public static implicit operator Complex(Byte value) { 242public static implicit operator Complex(Single value) { 245public static implicit operator Complex(Double value) { 248public static explicit operator Complex(BigInteger value) { 251public static explicit operator Complex(Decimal value) { 287public static Complex Sin(Complex value) { 294public static Complex Sinh(Complex value) /* Hyperbolic sin */ 301public static Complex Asin(Complex value) /* Arcsin */ 306public static Complex Cos(Complex value) { 313public static Complex Cosh(Complex value) /* Hyperbolic cos */ 319public static Complex Acos(Complex value) /* Arccos */ 324public static Complex Tan(Complex value) { 329public static Complex Tanh(Complex value) /* Hyperbolic tan */ 333public static Complex Atan(Complex value) /* Arctan */ 335Complex Two = new Complex(2.0, 0.0); 341public static Complex Log(Complex value) /* Log of the complex number value to the base of 'e' */ 346public static Complex Log(Complex value, Double baseValue) /* Log of the complex number to a the base of a double */ 350public static Complex Log10(Complex value) /* Log to the base of 10 of the complex number */ 353Complex temp_log = Log(value); 357public static Complex Exp(Complex value) /* The complex number raised to e */ 366public static Complex Sqrt(Complex value) /* Square root ot the complex number */ 368return Complex.FromPolarCoordinates(Math.Sqrt(value.Magnitude), value.Phase / 2.0); 371public static Complex Pow(Complex value, Complex power) /* A complex number raised to another complex number */ 374if (power == Complex.Zero) { 375return Complex.One; 378if (value == Complex.Zero) { 379return Complex.Zero; 387double rho = Complex.Abs(value); 396public static Complex Pow(Complex value, Double power) // A complex number raised to a real number 405private static Complex Scale(Complex value, Double factor) {