⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sample4_11.cs

📁 使用C#编辑的一些矩阵运算的源程序
💻 CS
字号:
/*
 * 示例程序Sample4_11: LEquations类的求解托伯利兹方程组的列文逊方法
 */

using System;
using CSharpAlgorithm.Algorithm;

namespace CSharpAlgorithm.Sample
{
	class Class1
	{
		[STAThread]
		static void Main(string[] args)
		{
            // 系数矩阵数据
            double[] mtxDataCoef10 = {
                                         6.0,5.0,4.0,3.0,2.0,1.0,
                                         5.0,6.0,5.0,4.0,3.0,2.0,
                                         4.0,5.0,6.0,5.0,4.0,3.0,
                                         3.0,4.0,5.0,6.0,5.0,4.0,
                                         2.0,3.0,4.0,5.0,6.0,5.0,
                                         1.0,2.0,3.0,4.0,5.0,6.0};
            // 常数矩阵数据
            double[] mtxDataConst10 = {
                                          11.0,
                                          9.0,
                                          9.0,
                                          9.0,
                                          13.0,
                                          17.0};
		
            // 构造系数矩阵
            Matrix mtxCoef10 = new Matrix(6, mtxDataCoef10);
            // 构造常数矩阵
            Matrix mtxConst10 = new Matrix(6, 1, mtxDataConst10);

            // 构造线性方程组
            LEquations leqs10 = new LEquations(mtxCoef10, mtxConst10);
		
            // 求解托伯利兹方程组的列文逊方法
            Matrix mtxResult10 = new Matrix();
            if (leqs10.GetRootsetTlvs(mtxResult10))
            {
                Console.WriteLine(mtxResult10);
            }
            else
            {
                Console.WriteLine("失败");
            }
        }
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -