Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PersistenceOverhaul/HeuristicLab.ExtLibs/HeuristicLab.AutoDiff/1.0/AutoDiff-1.0/TermPower.cs @ 17137

Last change on this file since 17137 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    public class TermPower : Term
9    {
10        public TermPower(Term baseTerm, Term exponent)
11        {
12            Base = baseTerm;
13            Exponent = exponent;
14        }
15
16        /// <summary>
17        /// Gets the base term of the power function
18        /// </summary>
19        public Term Base { get; private set; }
20
21        /// <summary>
22        /// Gets the exponent term of the power function.
23        /// </summary>
24        public Term Exponent { get; private set; }
25
26        /// <summary>
27        /// Accepts a term visitor.
28        /// </summary>
29        /// <param name="visitor">The term visitor to accept.</param>
30        public override void Accept(ITermVisitor visitor)
31        {
32            visitor.Visit(this);
33        }
34
35        /// <summary>
36        /// Accepts a term visitor with a generic result
37        /// </summary>
38        /// <typeparam name="TResult">The type of the result from the visitor's function</typeparam>
39        /// <param name="visitor">The visitor to accept</param>
40        /// <returns>
41        /// The result from the visitor's visit function.
42        /// </returns>
43        public override TResult Accept<TResult>(ITermVisitor<TResult> visitor)
44        {
45            return visitor.Visit(this);
46        }
47    }
48}
Note: See TracBrowser for help on using the repository browser.