当前位置: 首页>>代码示例>>C#>>正文


C# Complex.CopyTo方法代码示例

本文整理汇总了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;
        }
开发者ID:liuqingjie06,项目名称:HPlaneWGSimulatorXDelFEM,代码行数:42,代码来源:MyComplexBandMatrix.cs

示例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];
            //}
        }
开发者ID:davidsiaw,项目名称:neuron,代码行数:19,代码来源:ComplexVector.cs

示例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;
        }
开发者ID:ryujimiya,项目名称:HPlaneWGSimulator,代码行数:36,代码来源:MyComplexMatrix.cs

示例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);
        }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:14,代码来源:MatchingNaiveTransformTest.cs


注:本文中的System.Complex.CopyTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。