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


C# ComplexFloatMatrix.SetColumn方法代码示例

本文整理汇总了C#中ComplexFloatMatrix.SetColumn方法的典型用法代码示例。如果您正苦于以下问题:C# ComplexFloatMatrix.SetColumn方法的具体用法?C# ComplexFloatMatrix.SetColumn怎么用?C# ComplexFloatMatrix.SetColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ComplexFloatMatrix的用法示例。


在下文中一共展示了ComplexFloatMatrix.SetColumn方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetColumnArrayWrongRank

 public void SetColumnArrayWrongRank()
 {
   ComplexFloatMatrix a = new ComplexFloatMatrix(2,2);
   ComplexFloat[] b = new ComplexFloat[3];
   a.SetColumn(1,b);
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:6,代码来源:ComplexFloatMatrixTest.cs

示例2: SetColumnArray

 public void SetColumnArray()
 {
   ComplexFloatMatrix a = new ComplexFloatMatrix(2,2);
   ComplexFloat[] b = new ComplexFloat[2];
   b[0] = new ComplexFloat(1,1);
   b[1] = new ComplexFloat(2,2);
   a.SetColumn(0,b);
   Assert.AreEqual(b[0], a[0,0]);
   Assert.AreEqual(b[1], a[1,0]);
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:10,代码来源:ComplexFloatMatrixTest.cs

示例3: SetColumnArrayOutOfRange

 public void SetColumnArrayOutOfRange()
 {
   ComplexFloatMatrix a = new ComplexFloatMatrix(2,2);
   ComplexFloat[] b = new ComplexFloat[2];
   a.SetColumn(2,b);
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:6,代码来源:ComplexFloatMatrixTest.cs

示例4: SetColumnWrongRank

 public void SetColumnWrongRank()
 {
   ComplexFloatMatrix a = new ComplexFloatMatrix(2,2);
   ComplexFloatVector b = new ComplexFloatVector(3);
   a.SetColumn(1,b);
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:6,代码来源:ComplexFloatMatrixTest.cs

示例5: SetColumnOutOfRange

 public void SetColumnOutOfRange()
 {
   ComplexFloatMatrix a = new ComplexFloatMatrix(2,2);
   ComplexFloatVector b = new ComplexFloatVector(2);
   a.SetColumn(2,b);
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:6,代码来源:ComplexFloatMatrixTest.cs

示例6: SetColumn

 public void SetColumn()
 {
   ComplexFloatMatrix a = new ComplexFloatMatrix(2,2);
   ComplexFloatVector b = new ComplexFloatVector(2);
   b[0] = 1;
   b[1] = 2;
   a.SetColumn(0,b);
   Assert.AreEqual(b[0], a[0,0]);
   Assert.AreEqual(b[1], a[1,0]);
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:10,代码来源:ComplexFloatMatrixTest.cs

示例7: Solve

		/// <summary>
		/// Solve a square Toeplitz system with a right-side matrix.
		/// </summary>
		/// <param name="Y">The right-side matrix</param>
		/// <returns>The solution matrix.</returns>
		/// <exception cref="ArgumentNullException">
		/// Parameter <B>Y</B> is a null reference.
		/// </exception>
		/// <exception cref="RankException">
		/// The number of rows in <B>Y</B> is not equal to the number of rows in the Toeplitz matrix.
		/// </exception>
		/// <exception cref="SingularMatrixException">
		/// The Toeplitz matrix or one of the the leading sub-matrices is singular.
		/// </exception>
		/// <remarks>
		/// This member solves the linear system <B>TX</B> = <B>Y</B>, where <B>T</B> is
		/// a square Toeplitz matrix, <B>X</B> is the unknown solution matrix
		/// and <B>Y</B> is a known matrix.
		/// <para>
		/// The class implicitly decomposes the inverse Toeplitz matrix into a <b>UDL</b> factorisation
		/// using the Levinson algorithm, before calculating the solution vector.
		/// </para>
		/// </remarks>
		public ComplexFloatMatrix Solve(IROComplexFloatMatrix Y)
		{
			ComplexFloatMatrix X;
			ComplexFloat Inner;
			ComplexFloat[] a, b, x, y;
			int i, j, l;

			// check parameters
			if (Y == null)
			{
				throw new System.ArgumentNullException("Y");
			}
			else if (m_Order != Y.Columns)
			{
				throw new RankException("The numer of rows in Y is not equal to the number of rows in the Toeplitz matrix.");
			}

			Compute();

			if (m_IsSingular == true)
			{
				throw new SingularMatrixException("One of the leading sub-matrices is singular.");
			}

			// allocate memory for solution
			X = new ComplexFloatMatrix(m_Order, Y.Rows);
			x = new ComplexFloat[m_Order];

			for (l = 0; l < Y.Rows; l++)
			{
				// get right-side column
				y = ComplexFloatVector.GetColumnAsArray(Y, l);

				// solve left-side column
				for (i = 0; i < m_Order; i++)
				{
					a = m_LowerTriangle[i];
					b = m_UpperTriangle[i];

					Inner = y[i];
					for (j = 0; j < i; j++)
					{
						Inner += a[j] * y[j];
					}
					Inner *= m_Diagonal[i];

					x[i] = Inner;
					for (j = 0; j < i; j++)
					{
						x[j] += Inner * b[j];
					}
				}

				// insert left-side column into the matrix
				X.SetColumn(l, x);
			}

			return X;
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:82,代码来源:ComplexFloatLevinson.cs


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