Skip to content

Commit

Permalink
Add context to analyzer. (#277)
Browse files Browse the repository at this point in the history
* Add context to analyzer.

* Create true/false boolean constants

* .
  • Loading branch information
sys27 committed Aug 25, 2020
1 parent 0a410d7 commit e47470c
Show file tree
Hide file tree
Showing 220 changed files with 5,248 additions and 1,142 deletions.
6 changes: 4 additions & 2 deletions xFunc.Benchmark/Benchmarks/DifferentiatorBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ namespace xFunc.Benchmark.Benchmarks
public class DifferentiatorBenchmark
{
private Differentiator differentiator;
private DifferentiatorContext context;

private IExpression complexExp;

[GlobalSetup]
public void Setup()
{
differentiator = new Differentiator();
context = DifferentiatorContext.Default();

// (abs(sin(cos(tan(ctg(x ^ 2))))) - ln(x ^ 2)) + arcsin(arccos(arctan(arcctg(x ^ 10))))
complexExp = new Add(
Expand Down Expand Up @@ -63,7 +65,7 @@ public void Setup()
}

[Benchmark]
public IExpression ComplexExpression() =>
complexExp.Analyze(differentiator);
public IExpression ComplexExpression()
=> complexExp.Analyze(differentiator, context);
}
}

0 comments on commit e47470c

Please sign in to comment.