function_tree 0.2.5 copy "function_tree: ^0.2.5" to clipboard
function_tree: ^0.2.5 copied to clipboard

outdated

A library for parsing and evaluating numerical functions built from strings.

function_tree #

A library for parsing and evaluating numerical functions built from strings.

Usage #

A simple usage example:

import 'package:function_tree/function_tree.dart';
import 'dart:math' show pi;

main() {
  var f = FunctionOfX("1.5 * sin(2 * (x - pi / 3)) + 2");
  print(f(pi));

  var ft = FunctionTree(
    fromExpression: "1.5 * sin(2 * (x - pi / 3)^2) + y",
    withVariableNames: ["x", "y"]);

  print(ft({"x": 1, "y": 2}));
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

74
likes
0
points
6.42k
downloads

Publisher

unverified uploader

Weekly Downloads

A library for parsing and evaluating numerical functions built from strings.

Homepage

License

unknown (license)

More

Packages that depend on function_tree