Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.ExtLibs/HeuristicLab.AutoDiff/1.0/AutoDiff-1.0/Exp.cs @ 10743

Last change on this file since 10743 was 8703, checked in by gkronber, 12 years ago

#1960 added HL wrapper plugin for AutoDiff

File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace AutoDiff
7{
8    /// <summary>
9    /// Represents the exponential function <c>e^x</c>
10    /// </summary>
11    [Serializable]
12    public class Exp : Term
13    {
14        /// <summary>
15        /// Constructs a new instance of the <see cref="Exp"/> type.
16        /// </summary>
17        /// <param name="arg">The exponent of the function.</param>
18        public Exp(Term arg)
19        {
20            Arg = arg;
21        }
22
23        /// <summary>
24        /// Gets the exponent term.
25        /// </summary>
26        public Term Arg { get; private set; }
27
28        /// <summary>
29        /// Accepts a term visitor
30        /// </summary>
31        /// <param name="visitor">The term visitor to accept</param>
32        public override void Accept(ITermVisitor visitor)
33        {
34            visitor.Visit(this);
35        }
36
37        /// <summary>
38        /// Accepts a term visitor with a generic result
39        /// </summary>
40        /// <typeparam name="TResult">The type of the result from the visitor's function</typeparam>
41        /// <param name="visitor">The visitor to accept</param>
42        /// <returns>
43        /// The result from the visitor's visit function.
44        /// </returns>
45        public override TResult Accept<TResult>(ITermVisitor<TResult> visitor)
46        {
47            return visitor.Visit(this);
48        }
49    }
50}
Note: See TracBrowser for help on using the repository browser.