本文整理汇总了C#中ComplexFloatMatrix.ConjugateTranspose方法的典型用法代码示例。如果您正苦于以下问题:C# ComplexFloatMatrix.ConjugateTranspose方法的具体用法?C# ComplexFloatMatrix.ConjugateTranspose怎么用?C# ComplexFloatMatrix.ConjugateTranspose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ComplexFloatMatrix
的用法示例。
在下文中一共展示了ComplexFloatMatrix.ConjugateTranspose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InternalCompute
//.........这里部分代码省略.........
s[k] = new ComplexFloat(f,0.0f);
f = cs*e[k].Real + sn*s[k+1].Real;
s[k+1] = -sn*e[k] + cs*s[k+1];
g = sn*e[k+1].Real;
e[k+1] = cs*e[k+1];
if (computeVectors && k < rows)
{
zdrot(u, k, k+1, cs, sn);
}
}
e[m-2] =new ComplexFloat(f,0.0f);
iter = iter + 1;
break;
// convergence.
case 4:
// make the singular value positive
if (s[l].Real < 0.0)
{
s[l] = -s[l];
if (computeVectors)
{
zscalColumn(v, l, 0, -ComplexFloat.One);
}
}
// order the singular value.
while (l != mm-1)
{
if (s[l].Real >= s[l+1].Real)
{
break;
}
t = s[l];
s[l] = s[l+1];
s[l+1] = t;
if (computeVectors && l < cols)
{
zswap(v,l,l+1);
}
if (computeVectors && l < rows)
{
zswap(u,l,l+1);
}
l = l + 1;
}
iter = 0;
m = m - 1;
break;
}
}
// make matrix w from vector s
// there is no constructor, creating diagonal matrix from vector
// doing it ourselves
mm=System.Math.Min(matrix.RowLength,matrix.ColumnLength);
#else
float[] d = new float[mm];
u = new ComplexFloatMatrix(rows);
v = new ComplexFloatMatrix(cols);
ComplexFloat[] a = new ComplexFloat[matrix.data.Length];
Array.Copy(matrix.data, a, matrix.data.Length);
Lapack.Gesvd.Compute(rows, cols, a, d, u.data, v.data );
v.ConjugateTranspose();
for( int i = 0; i < d.Length; i++){
s[i] = d[i];
}
#endif
w=new FloatMatrix(matrix.RowLength,matrix.ColumnLength);
for(int ii=0; ii<matrix.RowLength; ii++)
{
for(int jj=0; jj<matrix.ColumnLength; jj++)
{
if(ii==jj)
{
w[ii,ii]=s[ii];
}
}
}
float eps = (float)System.Math.Pow(2.0,-52.0);
float tol = System.Math.Max(matrix.RowLength,matrix.ColumnLength)*s[0].Real*eps;
rank = 0;
for (int h = 0; h < mm; h++)
{
if (s[h].Real > tol)
{
rank++;
}
}
if( !computeVectors )
{
u = null;
v = null;
}
matrix = null;
}