Rev | Line | |
---|
[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 | /// A constant zero term. Similar to <see cref="Constant"/> but represents only the value 0.
|
---|
| 10 | /// </summary>
|
---|
| 11 | [Serializable]
|
---|
| 12 | public class Zero : Term
|
---|
| 13 | {
|
---|
| 14 | /// <summary>
|
---|
| 15 | /// Accepts a term visitor
|
---|
| 16 | /// </summary>
|
---|
| 17 | /// <param name="visitor">The term visitor to accept.</param>
|
---|
| 18 | public override void Accept(ITermVisitor visitor)
|
---|
| 19 | {
|
---|
| 20 | visitor.Visit(this);
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | /// <summary>
|
---|
| 24 | /// Accepts a term visitor with a generic result
|
---|
| 25 | /// </summary>
|
---|
| 26 | /// <typeparam name="TResult">The type of the result from the visitor's function</typeparam>
|
---|
| 27 | /// <param name="visitor">The visitor to accept</param>
|
---|
| 28 | /// <returns>
|
---|
| 29 | /// The result from the visitor's visit function.
|
---|
| 30 | /// </returns>
|
---|
| 31 | public override TResult Accept<TResult>(ITermVisitor<TResult> visitor)
|
---|
| 32 | {
|
---|
| 33 | return visitor.Visit(this);
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.