本文整理匯總了C#中System.Complex.Conjugate方法的典型用法代碼示例。如果您正苦於以下問題:C# Complex.Conjugate方法的具體用法?C# Complex.Conjugate怎麽用?C# Complex.Conjugate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Complex
的用法示例。
在下文中一共展示了Complex.Conjugate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Conjugate
public void Conjugate()
{
var c1 = new Complex(3, 6);
var c2 = new Complex(-3, -1);
var cc1 = c1.Conjugate();
var cc2 = c2.Conjugate();
Assert.AreEqual(3, cc1.Real);
Assert.AreEqual(-6, cc1.Imaginary);
Assert.AreEqual(-3, cc2.Real);
Assert.AreEqual(1, cc2.Imaginary);
}
示例2: Conj
public static Complex Conj(Complex z)
{
return z.Conjugate();
}
示例3: PerformGivensRotation
private void PerformGivensRotation(Matrix Q, Matrix R, int i, int j, ref Complex Gii, ref Complex Gij, ref Complex Gji, ref Complex Gjj)
{
// do matrix multiplication by hand for speed
for (int k = 0; k < R.Columns; k++)
{
Complex Rik = R[i, k], Rjk = R[j, k];
R[i, k] = Gii * Rik + Gij * Rjk;
R[j, k] = Gji * Rik + Gjj * Rjk;
}
Complex GTii = Gii.Conjugate(),
GTij = Gji.Conjugate(),
GTji = Gij.Conjugate(),
GTjj = Gjj.Conjugate();
for (int k = 0; k < Q.Rows; k++)
{
Complex Qki = Q[k, i], Qkj = Q[k, j];
Q[k, i] = Qki * GTii + Qkj * GTji;
Q[k, j] = Qki * GTij + Qkj * GTjj;
}
}