Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.ExtLibs/HeuristicLab.AutoDiff/1.0/AutoDiff-1.0/Variable.cs @ 17982

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

#1960 added HL wrapper plugin for AutoDiff

File size: 1.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace AutoDiff
7{
8    /// <summary>
9    /// Represents a variable term. Variable terms are substituted for real values during evaluation and
10    /// differentiation.
11    /// </summary>
12    [Serializable]
13    public class Variable : Term
14    {
15        /// <summary>
16        /// Accepts a term visitor
17        /// </summary>
18        /// <param name="visitor">The term visitor to accept.</param>
19        public override void Accept(ITermVisitor visitor)
20        {
21            visitor.Visit(this);
22        }
23
24        /// <summary>
25        /// Accepts a term visitor with a generic result
26        /// </summary>
27        /// <typeparam name="TResult">The type of the result from the visitor's function</typeparam>
28        /// <param name="visitor">The visitor to accept</param>
29        /// <returns>
30        /// The result from the visitor's visit function.
31        /// </returns>
32        public override TResult Accept<TResult>(ITermVisitor<TResult> visitor)
33        {
34            return visitor.Visit(this);
35        }
36    }
37}
Note: See TracBrowser for help on using the repository browser.