本文整理汇总了C#中System.Complex.CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C# Complex.CopyTo方法的具体用法?C# Complex.CopyTo怎么用?C# Complex.CopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Complex
的用法示例。
在下文中一共展示了Complex.CopyTo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CopyFrom
/// <summary>
/// <para>�w�肳�ꂽ1�����z���C�w�肳�ꂽ�s��`���ŃR�s�[����D</para>
/// <para>�z��̃T�C�Y�ƁurowSize * columnSize�v�͈�v���Ȃ���Ȃ�Ȃ��D</para>
/// </summary>
/// <param name="body">�R�s�[�����z��</param>
/// <param name="rowcolSize">�s��=��</param>
/// <param name="subdiaSize">subdiagonal�̃T�C�Y</param>
/// <param name="superdiaSize">superdiagonal�̃T�C�Y</param>
/// <returns>�R�s�[��̎��g�ւ̎Q��</returns>
internal virtual MyComplexBandMatrix CopyFrom(Complex[] body, int rowcolSize, int subdiaSize, int superdiaSize)
{
int rsize = subdiaSize * 2 + superdiaSize + 1;
int csize = rowcolSize;
// ���͂̌���
System.Diagnostics.Debug.Assert(body.Length == rsize * csize);
if (body.Length != rsize * csize)
{
return this;
}
// �o�b�t�@�m��
if (this._rsize == rsize && this._csize == csize)
{
}
else if (this._body != null && this._body.Length == rsize * csize)
{
this._rsize = rsize;
this._csize = csize;
}
else
{
base.Resize(rsize, csize);
}
this._rowcolSize = rowcolSize;
this._subdiaSize = subdiaSize;
this._superdiaSize = superdiaSize;
// �R�s�[
body.CopyTo(this._body, 0);
return this;
}
示例2: ComplexVector
/// <summary>
/// Initializes a new instance of the Vector class that contains elements
/// copied from the specified array.
/// </summary>
/// <param name="type">The vector type</param>
/// <param name="data">The array whose elements are copied to the vector.</param>
public ComplexVector(VectorType type, Complex[] data)
{
if (data.Length < 1) throw new System.ArgumentException("data.Length < 1");
this._Type = type;
this._Data = new Complex[data.Length];
data.CopyTo(this._Data, 0);
//for (int i = 0; i < data.Length; i++)
//{
// this.MeData[i] = data[i];
//}
}
示例3: CopyFrom
/// <summary>
/// <para>�w�肳�ꂽ1�����z���C�w�肳�ꂽ�s��`���ŃR�s�[����D</para>
/// <para>�z��̃T�C�Y�ƁurowSize * columnSize�v�͈�v���Ȃ���Ȃ�Ȃ��D</para>
/// </summary>
/// <param name="body">�R�s�[�����z��</param>
/// <param name="rowSize">�s��</param>
/// <param name="columnSize">��</param>
/// <returns>�R�s�[��̎��g�ւ̎Q��</returns>
internal virtual MyComplexMatrix CopyFrom(Complex[] body, int rowSize, int columnSize)
{
// ���͂̌���
System.Diagnostics.Debug.Assert(body.Length == rowSize * columnSize);
if (body.Length != rowSize * columnSize)
{
return this;
}
// �o�b�t�@�m��
if (this._rsize == rowSize && this._csize == columnSize)
{
// ������Ȃ�
}
else if (this._body != null && this._body.Length == rowSize * columnSize)
{
this._rsize = rowSize;
this._csize = columnSize;
}
else
{
Resize(rowSize, columnSize);
}
// �R�s�[
body.CopyTo(this._body, 0);
return this;
}
示例4: VerifyMatchesNaiveComplex
private static void VerifyMatchesNaiveComplex(
Complex[] samples,
double maximumError,
Func<Complex[], Complex[]> naive,
Action<Complex[]> fast)
{
var spectrumNaive = naive(samples);
var spectrumFast = new Complex[samples.Length];
samples.CopyTo(spectrumFast, 0);
fast(spectrumFast);
AssertHelpers.AlmostEqualList(spectrumNaive, spectrumFast, maximumError);
}