ITPub博客

首页 > > > c# 矩阵计算库Math.Net

c# 矩阵计算库Math.Net

作者:Ruiyuan Li 时间:2017-06-14 00:00:00 0 删除 编辑

c#矩阵运算库:https://github.com/mathnet

下载链接:https://pan.baidu.com/s/1dFvhy4x,https://onedrive.live.com/?id=84F3672F8CDA3E91%21440210&cid=84F3672F8CDA3E91

API文档:https://numerics.mathdotnet.com/api/

运行示例:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MathNet.Numerics.LinearAlgebra;
using MathNet.Numerics.LinearAlgebra.Double;

namespace Training
{
    class Program
    {
        static void Main(string[] args)
        {
            Matrix<double> A = DenseMatrix.OfArray(new double[,] { 
                {1, 1, 1, 1},
                {1, 2, 3, 4},
                {4, 3, 2, 1},
            });
            Vector<double>[] nullspace = A.Kernel();

            var B = A * (1 * nullspace[0] - 2 * nullspace[1]);
            
            Console.WriteLine(A.ToString());
            Console.WriteLine(B.ToString());
            Console.Read();
        }
    }
}


转载请注明: » c# 矩阵计算库Math.Net
<!-- -->

原文作者:;如有侵权,请联系管理员删除。

请登录后发表评论 登录
全部评论

注册时间:2020-05-21

  • 博文量
    495
  • 访问量
    4824