AutoDiff.NET

码农软件 · 软件分类 · 其他开发相关 · 2019-10-26 18:14:29

软件介绍

AutoDiff.NET是一个纯.NET库,用于开发人员轻松地构成函数符号化,然后自动计算在任何给定的点函数值和梯度。它适用于结合一个基于梯度的优化库,已经在Mono 2.10 Linux和.NET 4 Windows上测试成功。

示例代码:

using AutoDiff;

class Program
{
    public static void Main(string[] args)
    {
            // define variables
            var x = new Variable();
            var y = new Variable();
            var z = new Variable();

            // define our function
            var func = (x + y) * TermBuilder.Exp(z + x * y);

            // prepare arrays needed for evaluation/differentiation
            Variable[] vars = { x, y, z };
            double[] values = {1, 2, -3 };

            // evaluate func at (1, 2, -3)
            double value = Evaluator.Evaluate(func, vars, values); 

            // calculate the gradient at (1, 2, -3)
            double[] gradient = Differentiator.Differentiate(func, vars, values);

            // print results
            Console.WriteLine("The value at (1, 2, -3) is " + value);
            Console.WriteLine("The gradient at (1, 2, -3) is ({0}, {1}, {2})", gradient[0], gradient[1], gradient[2]);
    }
}

本文地址:https://www.codercto.com/soft/d/17621.html

Structure and Interpretation of Computer Programs - 2nd Edition

Structure and Interpretation of Computer Programs - 2nd Edition

Harold Abelson、Gerald Jay Sussman / The MIT Press / 1996-7-25 / USD 145.56

Structure and Interpretation of Computer Programs has had a dramatic impact on computer science curricula over the past decade. This long-awaited revision contains changes throughout the text. Ther......一起来看看 《Structure and Interpretation of Computer Programs - 2nd Edition 》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

html转js在线工具
html转js在线工具

html转js在线工具