Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 |
|
---|
6 | namespace AutoDiff.Compiled
|
---|
7 | {
|
---|
8 | class UnaryFunc : TapeElement
|
---|
9 | {
|
---|
10 | public int Arg;
|
---|
11 | public readonly Func<double, double> Eval;
|
---|
12 | public readonly Func<double, double> Diff;
|
---|
13 |
|
---|
14 | public UnaryFunc(Func<double, double> eval, Func<double, double> diff)
|
---|
15 | {
|
---|
16 | this.Eval = eval;
|
---|
17 | this.Diff = diff;
|
---|
18 | }
|
---|
19 |
|
---|
20 | public override void Accept(ITapeVisitor visitor)
|
---|
21 | {
|
---|
22 | visitor.Visit(this);
|
---|
23 | }
|
---|
24 | }
|
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.