Changeset 801 for trunk/sources/HeuristicLab.Operators/ComparatorBase.cs
- Timestamp:
- 11/21/08 09:48:11 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/ComparatorBase.cs
r77 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Base class for operators which perform comparisons between two items. 31 /// </summary> 29 32 public abstract class ComparatorBase : OperatorBase { 33 /// <summary> 34 /// Initializes a new instance of <see cref="ComparatorBase"/> with three 35 /// variable infos (<c>LeftSide</c>, <c>RightSide</c> and <c>Result</c>). 36 /// </summary> 30 37 protected ComparatorBase() { 31 38 AddVariableInfo(new VariableInfo("LeftSide", "Variable on the left side of the comparison", typeof(IItem), VariableKind.In)); … … 34 41 } 35 42 43 /// <summary> 44 /// Compares two items with each other and injects the <c>Result</c> variable - if it is no local one - into 45 /// the specified <paramref name="scope"/>. 46 /// </summary> 47 /// <remarks>Calls <see cref="Compare"/>.</remarks> 48 /// <exception cref="InvalidOperationException">Thrown when left side of the comparison does not 49 /// implement <see cref="IComparable"/>.</exception> 50 /// <param name="scope">The scope where to apply the compare operation.</param> 51 /// <returns><c>null</c>.</returns> 36 52 public override IOperation Apply(IScope scope) { 37 53 BoolData result = GetVariableValue<BoolData>("Result", scope, false, false); … … 52 68 } 53 69 70 /// <summary> 71 /// Compares two variables with each other. 72 /// </summary> 73 /// <param name="left">The variable on the left side of the comparison.</param> 74 /// <param name="right">The variable on the right side of the comparison.</param> 75 /// <returns><c>true</c> if the comparison query was successful, <c>false</c> otherwise.</returns> 54 76 protected abstract bool Compare(IComparable left, IItem right); 55 77 }
Note: See TracChangeset
for help on using the changeset viewer.