Free cookie consent management tool by TermsFeed Policy Generator

source: branches/ExportSymbolicDataAnalysisSolutions/HeuristicLab.ExtLibs/HeuristicLab.AutoDiff/1.0/AutoDiff-1.0/Product.cs @ 10355

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

#1960 added HL wrapper plugin for AutoDiff

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