[8703] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 |
|
---|
| 6 | namespace AutoDiff
|
---|
| 7 | {
|
---|
| 8 | /// <summary>
|
---|
| 9 | /// Visitor for terms that has no result from its computations.
|
---|
| 10 | /// </summary>
|
---|
| 11 | public interface ITermVisitor
|
---|
| 12 | {
|
---|
| 13 | /// <summary>
|
---|
| 14 | /// Performs an action for a constant term.
|
---|
| 15 | /// </summary>
|
---|
| 16 | /// <param name="constant">The input term.</param>
|
---|
| 17 | void Visit(Constant constant);
|
---|
| 18 |
|
---|
| 19 | /// <summary>
|
---|
| 20 | /// Performs an action for a zero term.
|
---|
| 21 | /// </summary>
|
---|
| 22 | /// <param name="zero">The input term.</param>
|
---|
| 23 | void Visit(Zero zero);
|
---|
| 24 |
|
---|
| 25 | /// <summary>
|
---|
| 26 | /// Performs an action for a constant power term.
|
---|
| 27 | /// </summary>
|
---|
| 28 | /// <param name="power">The input term.</param>
|
---|
| 29 | void Visit(ConstPower power);
|
---|
| 30 |
|
---|
| 31 | /// <summary>
|
---|
| 32 | /// Performs an action for a power term.
|
---|
| 33 | /// </summary>
|
---|
| 34 | /// <param name="power">The input term.</param>
|
---|
| 35 | void Visit(TermPower power);
|
---|
| 36 |
|
---|
| 37 | /// <summary>
|
---|
| 38 | /// Performs an action for a product term.
|
---|
| 39 | /// </summary>
|
---|
| 40 | /// <param name="product">The input term.</param>
|
---|
| 41 | void Visit(Product product);
|
---|
| 42 |
|
---|
| 43 | /// <summary>
|
---|
| 44 | /// Performs an action for a sum term.
|
---|
| 45 | /// </summary>
|
---|
| 46 | /// <param name="sum">The input term.</param>
|
---|
| 47 | void Visit(Sum sum);
|
---|
| 48 |
|
---|
| 49 | /// <summary>
|
---|
| 50 | /// Performs an action for a variable term.
|
---|
| 51 | /// </summary>
|
---|
| 52 | /// <param name="variable">The input term.</param>
|
---|
| 53 | void Visit(Variable variable);
|
---|
| 54 |
|
---|
| 55 | /// <summary>
|
---|
| 56 | /// Performs an action for a logarithm term.
|
---|
| 57 | /// </summary>
|
---|
| 58 | /// <param name="log">The input term.</param>
|
---|
| 59 | void Visit(Log log);
|
---|
| 60 |
|
---|
| 61 | /// <summary>
|
---|
| 62 | /// Performs an action for an exponential function term.
|
---|
| 63 | /// </summary>
|
---|
| 64 | /// <param name="exp">The input term.</param>
|
---|
| 65 | void Visit(Exp exp);
|
---|
| 66 |
|
---|
| 67 | /// <summary>
|
---|
| 68 | /// Performs an action for an unary function.
|
---|
| 69 | /// </summary>
|
---|
| 70 | /// <param name="func">The unary function</param>
|
---|
| 71 | void Visit(UnaryFunc func);
|
---|
| 72 |
|
---|
| 73 | /// <summary>
|
---|
| 74 | /// Performs an action for a binary function.
|
---|
| 75 | /// </summary>
|
---|
| 76 | /// <param name="func">The binary function</param>
|
---|
| 77 | void Visit(BinaryFunc func);
|
---|
| 78 |
|
---|
| 79 | /// <summary>
|
---|
| 80 | /// Performs an action for a n-ary function.
|
---|
| 81 | /// </summary>
|
---|
| 82 | /// <param name="func">The n-ary function</param>
|
---|
| 83 | void Visit(NaryFunc func);
|
---|
| 84 | }
|
---|
| 85 | }
|
---|