Skip to content
/ ev3 Public
forked from openturns/ev3

C++ library to compute symbolic derivatives

Notifications You must be signed in to change notification settings

ohahn/ev3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Ev3

Ev3 is a C++ library to compute symbolic derivatives written by [Leo Liberti] (http://www.lix.polytechnique.fr/~liberti/academic.html).

It is an alternative to libmatheval but under the more permissive CPL license.

The library was originaly available here, and used also [here] (https://projects.coin-or.org/ROSE/browser/rose/Ev3) with some modifications. This is the debugged version used in the OpenTURNS software.

Here a snippet which define two variables and derivates an expression:

#include <iostream>
#include "expression.h"
#include "parser.h"

int main()
{  
  Ev3::ExpressionParser parser;
  parser.SetVariableID("x1", 0);
  parser.SetVariableID("x2", 1);
  int nerr = 0;
  Ev3::Expression expr = parser.Parse("x1*sin(x2)", nerr);
  Ev3::Expression derivative = Ev3::Diff(expr, 1);
  std::cout << derivative->ToString() << std::endl;
}

About

C++ library to compute symbolic derivatives

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.3%
  • CMake 2.7%