本文整理匯總了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;
}
}