本文整理汇总了C#中YAMP.ScalarValue.Conjugate方法的典型用法代码示例。如果您正苦于以下问题:C# ScalarValue.Conjugate方法的具体用法?C# ScalarValue.Conjugate怎么用?C# ScalarValue.Conjugate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类YAMP.ScalarValue
的用法示例。
在下文中一共展示了ScalarValue.Conjugate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CholeskyDecomposition
/// <summary>
/// Cholesky algorithm for symmetric and positive definite matrix.
/// </summary>
/// <param name="Arg">Square, symmetric matrix.</param>
/// <returns>Structure to access L and isspd flag.</returns>
public CholeskyDecomposition(MatrixValue Arg)
{
// Initialize.
var A = Arg.GetComplexMatrix();
n = Arg.DimensionY;
L = new ScalarValue[n][];
for (int i = 0; i < n; i++)
L[i] = new ScalarValue[n];
isspd = Arg.DimensionX == n;
// Main loop.
for (int i = 0; i < n; i++)
{
var Lrowi = L[i];
var d = ScalarValue.Zero;
for (int j = 0; j < i; j++)
{
var Lrowj = L[j];
var s = new ScalarValue();
for (int k = 0; k < j; k++)
s += Lrowi[k] * Lrowj[k].Conjugate();
s = (A[i][j] - s) / L[j][j];
Lrowi[j] = s;
d += s * s.Conjugate();
isspd = isspd && (A[j][i] == A[i][j]);
}
d = A[i][i] - d;
isspd = isspd & (d.Abs() > 0.0);
L[i][i] = d.Sqrt();
for (int k = i + 1; k < n; k++)
L[i][k] = ScalarValue.Zero;
}
}