c# 矩阵计算库Math.Net

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

下载链接:https://pan.baidu.com/s/1dFvhy4xhttps://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();
        }
    }
}


0 条评论

    发表评论

    电子邮件地址不会被公开。 必填项已用 * 标注