Free cookie consent management tool by TermsFeed Policy Generator

source: branches/crossvalidation-2434/HeuristicLab.ExtLibs/HeuristicLab.AutoDiff/1.0/AutoDiff-1.0/Log.cs @ 13825

Last change on this file since 13825 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 a natural logarithm function
10    /// </summary>
11    [Serializable]
12    public class Log : Term
13    {
14        /// <summary>
15        /// Constructs a new instance of the <see cref="Log"/> class.
16        /// </summary>
17        /// <param name="arg">The argument of the natural logarithm</param>
18        public Log(Term arg)
19        {
20            Arg = arg;
21        }
22
23        /// <summary>
24        /// Accepts a terms visitor
25        /// </summary>
26        /// <param name="visitor">The term visitor to accept</param>
27        public override void Accept(ITermVisitor visitor)
28        {
29            visitor.Visit(this);
30        }
31
32        /// <summary>
33        /// Gets the natural logarithm argument.
34        /// </summary>
35        public Term Arg { get; private set; }
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.