Skip to content

Wiebke/ev3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 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%