本文整理汇总了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;
}
}