97 references to new
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
101P11 = new Complex(1.2, 3.4),
Microsoft.ML.TimeSeries (14)
AdaptiveSingularSpectrumSequenceModeler.cs (6)
842_info.RootsBeforeStabilization = new[] { new Complex(_alpha[0], 0) }; 852_info.RootsAfterStabilization = new[] { new Complex(_alpha[0], 0) }; 917roots[i] = new Complex(roots[i].Real, 0); 1064roots[i] = new Complex(roots[i].Magnitude, 0); 1066roots[i] = new Complex(-roots[i].Magnitude, 0); 1068roots[i] = new Complex(-roots[i].Magnitude, 0);
PolynomialUtils.cs (6)
32root1 = new Complex((-b + sqrtDelta) / 2, 0); 33root2 = new Complex((-b - sqrtDelta) / 2, 0); 37root1 = new Complex(-b / 2, sqrtDelta / 2); 38root2 = new Complex(-b / 2, -sqrtDelta / 2); 97roots[0] = new Complex(-coefficients[i], 0); 127roots[j] = new Complex(realPart[j], imaginaryPart[j]);
SeasonalityDetector.cs (2)
88var energies = fftRe.Select((m, i) => new Complex(m, fftIm[i])).ToArray(); 105var values = ifftRe.Select((t, i) => new Complex(t, ifftIm[i])).ToArray();
System.Runtime.Numerics (82)
System\Numerics\Complex.cs (82)
35public static readonly Complex Zero = new(0.0, 0.0); 36public static readonly Complex One = new(1.0, 0.0); 37public static readonly Complex ImaginaryOne = new(0.0, 1.0); 38public static readonly Complex NaN = new(double.NaN, double.NaN); 39public static readonly Complex Infinity = new(double.PositiveInfinity, double.PositiveInfinity); 71return new Complex(magnitude * cos, magnitude * sin); 141return new Complex(-value.m_real, -value.m_imaginary); 146return new Complex(left.m_real + right.m_real, left.m_imaginary + right.m_imaginary); 151return new Complex(left.m_real + right, left.m_imaginary); 156return new Complex(left + right.m_real, right.m_imaginary); 161return new Complex(left.m_real - right.m_real, left.m_imaginary - right.m_imaginary); 166return new Complex(left.m_real - right, left.m_imaginary); 171return new Complex(left - right.m_real, -right.m_imaginary); 179return new Complex(result_realpart, result_imaginarypart); 188return new Complex(double.NaN, double.NaN); 191return new Complex(left.m_real * right, double.NaN); 196return new Complex(double.NaN, left.m_imaginary * right); 199return new Complex(left.m_real * right, left.m_imaginary * right); 208return new Complex(double.NaN, double.NaN); 211return new Complex(left * right.m_real, double.NaN); 216return new Complex(double.NaN, left * right.m_imaginary); 219return new Complex(left * right.m_real, left * right.m_imaginary); 234return new Complex((a + b * doc) / (c + d * doc), (b - a * doc) / (c + d * doc)); 239return new Complex((b + a * cod) / (d + c * cod), (-a + b * cod) / (d + c * cod)); 250return new Complex(double.NaN, double.NaN); 257return new Complex(double.NaN, double.NaN); 260return new Complex(left.m_real / right, double.NaN); 265return new Complex(double.NaN, left.m_imaginary / right); 269return new Complex(left.m_real / right, left.m_imaginary / right); 283return new Complex(a / (c + d * doc), (-a * doc) / (c + d * doc)); 288return new Complex(a * cod / (d + c * cod), -a / (d + c * cod)); 326return new Complex(value.m_real, -value.m_imaginary); 382return new Complex(sin * Math.Cosh(value.m_imaginary), cos * Math.Sinh(value.m_imaginary)); 392Complex sin = Sin(new Complex(-value.m_imaginary, value.m_real)); 393return new Complex(sin.m_imaginary, -sin.m_real); 413return new Complex(u, v); 419return new Complex(cos * Math.Cosh(value.m_imaginary), -sin * Math.Sinh(value.m_imaginary)); 425return Cos(new Complex(-value.m_imaginary, value.m_real)); 445return new Complex(u, v); 466return new Complex(sin / D, Math.Sinh(y2) / D); 471return new Complex(sin / cosh / D, Math.Tanh(y2) / D); 478Complex tan = Tan(new Complex(-value.m_imaginary, value.m_real)); 479return new Complex(tan.m_imaginary, -tan.m_real); 484Complex two = new(2.0, 0.0); 614return new Complex(Math.Log(Abs(value)), Math.Atan2(value.m_imaginary, value.m_real)); 642return new Complex(double.PositiveInfinity, value.m_imaginary); 644return new Complex(double.NaN, double.NaN); 650return new Complex(double.NaN, double.PositiveInfinity); 654return new Complex(double.PositiveInfinity, double.NaN); 656return new Complex(double.NaN, double.NaN); 664return new Complex(0.0, Math.Sqrt(-value.m_real)); 667return new Complex(Math.Sqrt(value.m_real), 0.0); 705return (new Complex(double.PositiveInfinity, imaginaryCopy)); 733return new Complex(x, y); 764return Pow(value, new Complex(power, 0)); 771return new Complex(realResult, imaginaryResuilt); 780return new Complex((double)value, 0.0); 788return new Complex((double)value, 0.0); 793return new Complex((double)value, 0.0); 802return new Complex((double)value, 0.0); 811return new Complex(value, 0.0); 819return new Complex(value, 0.0); 824return new Complex(value, 0.0); 832return new Complex((double)value, 0.0); 840return new Complex((double)value, 0.0); 845return new Complex(value, 0.0); 850return new Complex(value, 0.0); 855return new Complex(value, 0.0); 863return new Complex(value, 0.0); 869return new Complex(value, 0.0); 874return new Complex(value, 0.0); 880return new Complex(value, 0.0); 886return new Complex(value, 0.0); 892return new Complex(value, 0.0); 901return new Complex(value, 0.0); 909static Complex IAdditiveIdentity<Complex, Complex>.AdditiveIdentity => new(0.0, 0.0); 930static Complex IMultiplicativeIdentity<Complex, Complex>.MultiplicativeIdentity => new(1.0, 0.0); 937static Complex INumberBase<Complex>.One => new(1.0, 0.0); 943static Complex INumberBase<Complex>.Zero => new(0.0, 0.0); 1462return new Complex(result_realpart, result_imaginarypart); 2205result = new Complex(real, imaginary); 2254static Complex ISignedNumber<Complex>.NegativeOne => new(-1.0, 0.0);