Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.AutoDiff/1.0/AutoDiff-1.0/Zero.cs @ 12062

Last change on this file since 12062 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    /// 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.