3

我需要评估简化为:

using System;
using System.Collections.Generic;
using MathNet.Symbolics;

namespace GtEq {
    static class Program {
        private static void Main(string[] args) {
            var eq = Infix.ParseOrThrow("a > b");
            var result = Evaluate.Evaluate(new Dictionary<string, FloatingPoint>() {
                {"a", 5.0},
                {"b", 1.0}
            }, eq);
            Console.WriteLine(result);
        }
    }
}

它抛出解析器行,没有得到“>”的含义。 在此处输入图像描述 我想知道是否有一种通用的方法来扩展 MathNet.Symbolics 以支持 "> < >= <=" 操作?

4

0 回答 0