Changeset 801 for trunk/sources
- Timestamp:
- 11/21/08 09:48:11 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/Interfaces/IScope.cs
r776 r801 96 96 97 97 /// <summary> 98 /// Gets the actual name the given alias.98 /// Gets the actual name of the given alias. 99 99 /// </summary> 100 100 /// <param name="name">The alias whose actual name is searched.</param> -
trunk/sources/HeuristicLab.Core/Variable.cs
r776 r801 69 69 } 70 70 /// <summary> 71 /// Initializes a new instance of <see cref="Variable"/> with the specifi fed <paramref name="name"/>71 /// Initializes a new instance of <see cref="Variable"/> with the specified <paramref name="name"/> 72 72 /// and the specified <paramref name="value"/>. 73 73 /// </summary> -
trunk/sources/HeuristicLab.Operators/AddVariableInfoDialog.cs
r51 r801 31 31 32 32 namespace HeuristicLab.Operators { 33 /// <summary> 34 /// Dialog to add a variable info. 35 /// </summary> 33 36 public partial class AddVariableInfoDialog : Form { 34 37 private IVariableInfo myVariableInfo; 38 /// <summary> 39 /// Gets the current variable info. 40 /// </summary> 35 41 public IVariableInfo VariableInfo { 36 42 get { return myVariableInfo; } 37 43 } 38 44 45 /// <summary> 46 /// Initializes a new instance of <see cref="AddVariableInfoDialog"/>. 47 /// </summary> 39 48 public AddVariableInfoDialog() { 40 49 InitializeComponent(); -
trunk/sources/HeuristicLab.Operators/CombinedOperator.cs
r89 r801 28 28 29 29 namespace HeuristicLab.Operators { 30 /// <summary> 31 /// Contains an operator graph and automatically injects its sub-operators into the scope it is 32 /// applied on (useful for modularization to assemble complex operators out of simpler ones). 33 /// </summary> 30 34 public class CombinedOperator : DelegatingOperator { 31 35 private string myDescription; 36 /// <summary> 37 /// Gets the description of the current instance. 38 /// </summary> 32 39 public override string Description { 33 40 get { return myDescription; } 34 41 } 35 42 private IOperatorGraph myOperatorGraph; 43 /// <summary> 44 /// Gets the operator graph of the current instance. 45 /// </summary> 36 46 public IOperatorGraph OperatorGraph { 37 47 get { return myOperatorGraph; } 38 48 } 39 49 50 /// <summary> 51 /// Initializes a new instance of <see cref="CombinedOperator"/>. 52 /// </summary> 40 53 public CombinedOperator() 41 54 : base() { … … 47 60 } 48 61 62 /// <summary> 63 /// Sets the description of the current instance. 64 /// </summary> 65 /// <remarks>Calls <see cref="OnDescriptionChanged"/>.</remarks> 66 /// <exception cref="NullReferenceException">Thrown when <paramref name="description"/> is <c>null</c>.</exception> 67 /// <param name="description">The description to set.</param> 49 68 public void SetDescription(string description) { 50 69 if (description == null) … … 57 76 } 58 77 78 /// <summary> 79 /// Clones the current instance (deep clone). 80 /// </summary> 81 /// <remarks>Calls <see cref="OperatorBase.Clone 82 /// (System.Collections.Generic.IDictionary<System.Guid, object>)"/> 83 /// of base class <see cref="DelegatingOperator"/>.<br/> 84 /// Deep clone through <see cref="Auxiliary.Clone"/> method of helper class 85 /// <see cref="Auxiliary"/>.</remarks> 86 /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param> 87 /// <returns>The cloned object as <see cref="CombinedOperator"/>.</returns> 59 88 public override object Clone(IDictionary<Guid, object> clonedObjects) { 60 89 CombinedOperator clone = (CombinedOperator)base.Clone(clonedObjects); … … 64 93 } 65 94 95 /// <summary> 96 /// Adds all sub operators to the specified <paramref name="scope"/>. 97 /// </summary> 98 /// <param name="scope">The scope where to inject the sub operators.</param> 99 /// <returns><c>null</c> if the initial operator is <c>nulll</c>, else a new 100 /// <see cref="AtomicOperation"/> with the initial operator and the given <paramref name="scope"/>.</returns> 66 101 public override IOperation Apply(IScope scope) { 67 102 if (OperatorGraph.InitialOperator != null) { … … 77 112 } 78 113 114 /// <summary> 115 /// Creates a new instance of <see cref="CombinedOperatorView"/> to display the current instance. 116 /// </summary> 117 /// <returns>The created view as <see cref="CombinedOperatorView"/>.</returns> 79 118 public override IView CreateView() { 80 119 return new CombinedOperatorView(this); 81 120 } 82 121 122 /// <summary> 123 /// Occurs when the description of the current instance has been changed. 124 /// </summary> 83 125 public event EventHandler DescriptionChanged; 126 /// <summary> 127 /// Fires a new <c>DescriptionChanged</c> event. 128 /// </summary> 84 129 protected virtual void OnDescriptionChanged() { 85 130 if (DescriptionChanged != null) … … 88 133 89 134 #region Persistence Methods 135 /// <summary> 136 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>. 137 /// </summary> 138 /// <remarks>The description and the operator graph of the current instance are saved as child 139 /// nodes with tag names <c>Description</c> <c>OperatorGraph</c>.<br/> 140 /// Calls <see cref="OperatorBase.GetXmlNode"/> of base class <see cref="DelegatingOperator"/>.</remarks> 141 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param> 142 /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param> 143 /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param> 144 /// <returns>The saved <see cref="XmlNode"/>.</returns> 90 145 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 91 146 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 96 151 return node; 97 152 } 153 /// <summary> 154 /// Loads the persisted instance from the specified <paramref name="node"/>. 155 /// </summary> 156 /// <remarks>Calls <see cref="OperatorBase.Populate"/> of base class <see cref="DelegatingOperator"/>. 157 /// <br/> See <see cref="GetXmlNode"/> for further information on how the data must be saved.</remarks> 158 /// <param name="node">The <see cref="XmlNode"/> where the operator is saved.</param> 159 /// <param name="restoredObjects">The dictionary of all already restored objects. 160 /// (Needed to avoid cycles.)</param> 98 161 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 99 162 base.Populate(node, restoredObjects); -
trunk/sources/HeuristicLab.Operators/CombinedOperatorView.cs
r52 r801 30 30 31 31 namespace HeuristicLab.Operators { 32 /// <summary> 33 /// The visual representation of a <see cref="CombinedOperator"/>. 34 /// </summary> 32 35 public partial class CombinedOperatorView : ViewBase { 36 /// <summary> 37 /// Gets or sets the combined operator to display. 38 /// </summary> 39 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>. 40 /// No own data storage present.</remarks> 33 41 public CombinedOperator CombinedOperator { 34 42 get { return (CombinedOperator)Item; } … … 36 44 } 37 45 46 /// <summary> 47 /// Removes the eventhandlers in all children and from the underlying <see cref="CombinedOperator"/>. 48 /// </summary> 49 /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 38 50 protected override void RemoveItemEvents() { 39 51 operatorGraphView.OperatorGraph = null; … … 44 56 base.RemoveItemEvents(); 45 57 } 46 58 59 /// <summary> 60 /// Adds event handlers in all children and to the underlying <see cref="CombinedOperator"/>. 61 /// </summary> 62 /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 47 63 protected override void AddItemEvents() { 48 64 base.AddItemEvents(); … … 54 70 } 55 71 72 /// <summary> 73 /// Initializes a new instance of <see cref="CombinedOperatorView"/>. 74 /// </summary> 56 75 public CombinedOperatorView() { 57 76 InitializeComponent(); 58 77 } 78 /// <summary> 79 /// Initializes a new instance of <see cref="CombinedOperatorView"/> with the specified 80 /// <paramref name="combinedOperator"/>. 81 /// </summary> 82 /// <param name="combinedOperator">The combined operator to display.</param> 59 83 public CombinedOperatorView(CombinedOperator combinedOperator) 60 84 : this() { … … 62 86 } 63 87 88 /// <summary> 89 /// Updates all controls with the latest data of the model. 90 /// </summary> 64 91 protected override void UpdateControls() { 65 92 base.UpdateControls(); -
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 } -
trunk/sources/HeuristicLab.Operators/ConditionalBranch.cs
r49 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Branch of (one or)two operators whose executions depend on a specific condition. 31 /// </summary> 29 32 public class ConditionalBranch : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"ConditionalBranch expects to have 1 or 2 sub-operators. … … 35 39 } 36 40 41 /// <summary> 42 /// Initializes a new instance of <see cref="ConditionalBranch"/> with one variable info 43 /// (<c>Condition</c>). 44 /// </summary> 37 45 public ConditionalBranch() 38 46 : base() { … … 40 48 } 41 49 50 /// <summary> 51 /// Applies the operator of branch one under a specific condition on the given 52 /// <paramref name="scope"/>, or - if existent - operator of branch two if the condition could not 53 /// be fulfilled. 54 /// </summary> 55 /// <param name="scope">The scope to apply the operators on.</param> 56 /// <returns>A new <see cref="AtomicOperation"/> with either operator 1 or operator 2 applied 57 /// to the given <paramref name="scope"/> or <c>null</c>.</returns> 42 58 public override IOperation Apply(IScope scope) { 43 59 BoolData resultData = GetVariableValue<BoolData>("Condition", scope, true); -
trunk/sources/HeuristicLab.Operators/Counter.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Class to increment an int variable by 1. 31 /// </summary> 29 32 public class Counter : OperatorBase { 33 /// <summary> 34 /// Gets the description of the current instance. 35 /// </summary> 30 36 public override string Description { 31 37 get { return @"TODO\r\nOperator description still missing ..."; } 32 38 } 33 39 40 /// <summary> 41 /// Initializes a new instance of <see cref="Counter"/> with one variable info (<c>Value</c>). 42 /// </summary> 34 43 public Counter() 35 44 : base() { … … 37 46 } 38 47 48 /// <summary> 49 /// Increments an int value of the specified <paramref name="scope"/> by one. 50 /// </summary> 51 /// <param name="scope">The scope whose variable should be incremented.</param> 52 /// <returns><c>null</c>.</returns> 39 53 public override IOperation Apply(IScope scope) { 40 54 IntData value = GetVariableValue<IntData>("Value", scope, true); -
trunk/sources/HeuristicLab.Operators/DataCollector.cs
r723 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Collects values of specific variable names in a given scope. 31 /// </summary> 29 32 public class DataCollector : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="DataCollector"/> with two variable infos 40 /// (<c>VariableNames</c> and <c>Values</c>). 41 /// </summary> 34 42 public DataCollector() { 35 43 IVariableInfo variableNamesVariableInfo = new VariableInfo("VariableNames", "Names of variables whose values should be collected", typeof(ItemList<StringData>), VariableKind.In); … … 41 49 } 42 50 51 /// <summary> 52 /// Collects the values of a specified list of variable names in the given <paramref name="scope"/>. 53 /// </summary> 54 /// <param name="scope">The scope where to collect the values from.</param> 55 /// <returns><c>null</c>.</returns> 43 56 public override IOperation Apply(IScope scope) { 44 57 ItemList<StringData> names = GetVariableValue<ItemList<StringData>>("VariableNames", scope, false); -
trunk/sources/HeuristicLab.Operators/DelegatingOperator.cs
r113 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Base class for operators that call other operators. 31 /// </summary> 29 32 public abstract class DelegatingOperator : OperatorBase { 33 /// <summary> 34 /// Executes the specified operator in the given <paramref name="scope"/>. 35 /// </summary> 36 /// <remarks>Calls <see cref="OperatorBase.OnExecuted"/>.<br/> 37 /// Will be executed two times: First to execute the operation where the local variables 38 /// are added to the global scope and a second time to remove the local variables again.</remarks> 39 /// <param name="scope">The scope where to apply the operation.</param> 40 /// <returns><c>null</c>.</returns> 30 41 public override IOperation Execute(IScope scope) { 31 42 myCanceled = false; -
trunk/sources/HeuristicLab.Operators/DoubleCounter.cs
r311 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Class to add a specified interval to a double value. 31 /// </summary> 29 32 public class DoubleCounter : OperatorBase { 33 /// <summary> 34 /// Gets the description of the current instance. 35 /// </summary> 30 36 public override string Description { 31 37 get { return @"Adds a given interval to a double value"; } 32 38 } 33 39 40 /// <summary> 41 /// Initializes a new instance of <see cref="DoubleCounter"/>, including two variable infos 42 /// (<c>Value</c> and <c>Interval</c>). 43 /// </summary> 34 44 public DoubleCounter() 35 45 : base() { … … 38 48 } 39 49 50 /// <summary> 51 /// Adds to a double value of the given <paramref name="scope"/> a specified interval. 52 /// </summary> 53 /// <param name="scope">The scope whose variable should be incremented.</param> 54 /// <returns><c>null</c>.</returns> 40 55 public override IOperation Apply(IScope scope) { 41 56 DoubleData value = GetVariableValue<DoubleData>("Value", scope, true); -
trunk/sources/HeuristicLab.Operators/EmptyOperator.cs
r2 r801 26 26 27 27 namespace HeuristicLab.Operators { 28 /// <summary> 29 /// Placeholder and also used for testing; Does nothing. 30 /// </summary> 28 31 public class EmptyOperator : OperatorBase { 32 /// <inheritdoc select="summary"/> 29 33 public override string Description { 30 34 get { return "An empty operator just does nothing. Useful for testing and as a place holder for sub-operators of SequentialSubScopesProcessor and ParallelSubScopesProcessor."; } 31 35 } 32 36 37 /// <summary> 38 /// Initializes a new instance of <see cref="EmptyOperator"/>. 39 /// </summary> 33 40 public EmptyOperator() 34 41 : base() { 35 42 } 36 43 44 /// <summary> 45 /// Does nothing. 46 /// </summary> 47 /// <param name="scope">The scope to apply the operator on.</param> 48 /// <returns><c>null</c>.</returns> 37 49 public override IOperation Apply(IScope scope) { 38 50 return null; -
trunk/sources/HeuristicLab.Operators/EqualToComparator.cs
r2 r801 28 28 29 29 namespace HeuristicLab.Operators { 30 /// <summary> 31 /// Operator to check whether two items are equal to each other. 32 /// </summary> 30 33 public class EqualToComparator : ComparatorBase { 34 35 /// <inheritdoc select="summary"/> 31 36 public override string Description { 32 37 get { return @"TODO\r\nOperator description still missing ..."; } 33 38 } 34 39 40 /// <summary> 41 /// Initializes a new instance of <see cref="EqualToComparator"/>. 42 /// </summary> 35 43 public EqualToComparator() 36 44 : base() { 37 45 } 38 46 47 /// <summary> 48 /// Checks whether the two specified items are equal to each other. 49 /// </summary> 50 /// <param name="left">The left side of the comparison.</param> 51 /// <param name="right">The right side of the comparison.</param> 52 /// <returns><c>true</c> if the two elements are equal to each other, <c>false otherwise</c>.</returns> 39 53 protected override bool Compare(IComparable left, IItem right) { 40 54 return left.CompareTo(right) == 0; -
trunk/sources/HeuristicLab.Operators/GreaterOrEqualThanComparator.cs
r2 r801 28 28 29 29 namespace HeuristicLab.Operators { 30 /// <summary> 31 /// Operator to check whether one item is equal or greater than another. 32 /// </summary> 30 33 public class GreaterOrEqualThanComparator : ComparatorBase { 34 /// <inheritdoc select="summary"/> 31 35 public override string Description { 32 36 get { return @"TODO\r\nOperator description still missing ..."; } 33 37 } 34 38 /// <summary> 39 /// Initializes a new instance of <see cref="GreaterOrEqualThanComparator"/>. 40 /// </summary> 35 41 public GreaterOrEqualThanComparator() 36 42 : base() { 37 43 } 38 44 45 /// <summary> 46 /// Checks whether the <paramref name="left"/> item is greater or equal to the <paramref name="right"/>. 47 /// </summary> 48 /// <param name="left">The left side of the comparison.</param> 49 /// <param name="right">The right side of the comparison.</param> 50 /// <returns><c>true</c> if the <paramref name="left"/> item is greater or equal to the 51 /// <paramref name="right"/>, <c>false</c> otherwise.</returns> 39 52 protected override bool Compare(IComparable left, IItem right) { 40 53 return left.CompareTo(right) >= 0; -
trunk/sources/HeuristicLab.Operators/GreaterThanComparator.cs
r2 r801 28 28 29 29 namespace HeuristicLab.Operators { 30 /// <summary> 31 /// Operator to check whether an item is greater than another one. 32 /// </summary> 30 33 public class GreaterThanComparator : ComparatorBase { 34 /// <inheritdoc select="summary"/> 31 35 public override string Description { 32 36 get { return @"TODO\r\nOperator description still missing ..."; } 33 37 } 34 38 39 /// <summary> 40 /// Initializes a new instance of <see cref="GreaterThanComparator"/>. 41 /// </summary> 35 42 public GreaterThanComparator() 36 43 : base() { 37 44 } 38 45 46 /// <summary> 47 /// Checks whether the <paramref name="left"/> item is greater than the <paramref name="right"/>. 48 /// </summary> 49 /// <param name="left">The left side of the comparison.</param> 50 /// <param name="right">The right side of the comparison.</param> 51 /// <returns><c>true</c> if the <paramref name="left"/> item is greater than the 52 /// <paramref name="right"/>, <c>false</c> otherwise.</returns> 39 53 protected override bool Compare(IComparable left, IItem right) { 40 54 return left.CompareTo(right) > 0; -
trunk/sources/HeuristicLab.Operators/HeuristicLabOperatorsPlugin.cs
r582 r801 26 26 27 27 namespace HeuristicLab.Operators { 28 /// <summary> 29 /// Plugin class for HeuristicLab.Operators plugin. 30 /// </summary> 28 31 [ClassInfo(Name = "HeuristicLab.Operators-3.2")] 29 32 [PluginFile(Filename = "HeuristicLab.Operators-3.2.dll", Filetype = PluginFileType.Assembly)] -
trunk/sources/HeuristicLab.Operators/LessOrEqualThanComparator.cs
r2 r801 28 28 29 29 namespace HeuristicLab.Operators { 30 /// <summary> 31 /// Operator to check whether an item is less or equal to another one. 32 /// </summary> 30 33 public class LessOrEqualThanComparator : ComparatorBase { 34 /// <inheritdoc select="summary"/> 31 35 public override string Description { 32 36 get { return @"TODO\r\nOperator description still missing ..."; } 33 37 } 34 38 39 /// <summary> 40 /// Initializes a new instance of <see cref="LessOrEqualThanComparator"/>. 41 /// </summary> 35 42 public LessOrEqualThanComparator() 36 43 : base() { 37 44 } 38 45 46 /// <summary> 47 /// Checks whether the <paramref name="left"/> item is less or equal to the <paramref name="right"/>. 48 /// </summary> 49 /// <param name="left">The left side of the comparison.</param> 50 /// <param name="right">The right side of the comparison.</param> 51 /// <returns><c>true</c> if the <paramref name="left"/> item is less or equal to the 52 /// <paramref name="right"/>, <c>false</c> otherwise.</returns> 39 53 protected override bool Compare(IComparable left, IItem right) { 40 54 return left.CompareTo(right) <= 0; -
trunk/sources/HeuristicLab.Operators/LessThanComparator.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Operator to check whether an item is less than another one. 31 /// </summary> 29 32 public class LessThanComparator : ComparatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="LessThanComparator"/>. 40 /// </summary> 34 41 public LessThanComparator() 35 42 : base() { 36 43 } 37 44 45 /// <summary> 46 /// Checks whether the <paramref name="left"/> item is less than the <paramref name="right"/>. 47 /// </summary> 48 /// <param name="left">The left side of the comparison.</param> 49 /// <param name="right">The right side of the comparison.</param> 50 /// <returns><c>true</c> if the <paramref name="left"/> item is less than the 51 /// <paramref name="right"/>, <c>false</c> otherwise.</returns> 38 52 protected override bool Compare(IComparable left, IItem right) { 39 53 return left.CompareTo(right) < 0; -
trunk/sources/HeuristicLab.Operators/OperatorExtractor.cs
r50 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Retrieves an operator from a specified scope and returns a successor operation with this operation 31 /// and scope. 32 /// </summary> 29 33 public class OperatorExtractor : OperatorBase { 34 /// <inheritdoc select="summary"/> 30 35 public override string Description { 31 36 get { return @"An operator extractor retrievs an operator from the scope it is applied on and returns a successor operation containing this operator and the current scope. Lookup for the operator is done recursively. … … 34 39 } 35 40 41 /// <summary> 42 /// Initializes a new instance of <see cref="OperatorExtractor"/> with 43 /// one variable info (<c>Operator</c>). 44 /// </summary> 36 45 public OperatorExtractor() 37 46 : base() { … … 39 48 } 40 49 50 /// <summary> 51 /// Gets an operator from the specified <paramref name="scope"/> and returns an 52 /// <see cref="AtomicOperation"/> containing this operator and scope. 53 /// </summary> 54 /// <param name="scope">The scope where to apply the operator on.</param> 55 /// <returns>A new <see cref="AtomicOperation"/> containing the operator and the given 56 /// <paramref name="scope"/>.</returns> 41 57 public override IOperation Apply(IScope scope) { 42 58 IOperator op = GetVariableValue<IOperator>("Operator", scope, true, true); -
trunk/sources/HeuristicLab.Operators/ParallelProcessor.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Performs <c>n</c> operators on the given scope; operations can be executed in parallel. 31 /// </summary> 29 32 public class ParallelProcessor : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Applies <c>n</c> operators on the given <paramref name="scope"/>. 40 /// </summary> 41 /// <param name="scope">The scope to apply the operators on.</param> 42 /// <returns>A new <see cref="CompositeOperation"/> with the <c>n</c> operators applied 43 /// to the given <paramref name="scope"/> with the <c>ExecuteInParallel</c> set to <c>true</c>.</returns> 34 44 public override IOperation Apply(IScope scope) { 35 45 CompositeOperation next = new CompositeOperation(); -
trunk/sources/HeuristicLab.Operators/ParallelSubScopesProcessor.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Performs <c>n</c> operators on <c>n</c> subscopes, operations can be executed in parallel. 31 /// </summary> 29 32 public class ParallelSubScopesProcessor : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Applies <c>n</c> operators on all the <c>n</c> sub scopes of the given <paramref name="scope"/>. 40 /// </summary> 41 /// <param name="scope">The scope on whose sub scopes the operators are applied.</param> 42 /// <returns>A new <see cref="CompositeOperation"/> with the <c>i</c>th operator applied 43 /// on the <c>i</c>th sub scope, the <c>ExecuteInParallel</c> flag set to <c>true</c>.</returns> 34 44 public override IOperation Apply(IScope scope) { 35 45 CompositeOperation next = new CompositeOperation(); -
trunk/sources/HeuristicLab.Operators/ScopeCleaner.cs
r101 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Operator that removes all variables in the given scope and deletes also all subscopes. 31 /// </summary> 29 32 public class ScopeCleaner : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"Removes all variables in the current scope and deletes all subscopes"; } 32 36 } 33 37 38 /// <summary> 39 /// Deletes all variable and sub scopes from the given <paramref name="scope"/>. 40 /// </summary> 41 /// <remarks>Calls <see cref="IScope.Clear"/> of interface <see cref="IScope"/>.</remarks> 42 /// <param name="scope">The scope to clear.</param> 43 /// <returns><c>null</c>.</returns> 34 44 public override IOperation Apply(IScope scope) { 35 45 scope.Clear(); -
trunk/sources/HeuristicLab.Operators/SequentialProcessor.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Performs <c>n</c> operators on the given scope sequentially. 31 /// </summary> 29 32 public class SequentialProcessor : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Applies <c>n</c> operators on the given <paramref name="scope"/>. 40 /// </summary> 41 /// <param name="scope">The scope to apply the operators on.</param> 42 /// <returns>A new <see cref="CompositeOperation"/> with the <c>n</c> operators applied 43 /// to the given <paramref name="scope"/>.</returns> 34 44 public override IOperation Apply(IScope scope) { 35 45 CompositeOperation next = new CompositeOperation(); -
trunk/sources/HeuristicLab.Operators/SequentialSubScopesProcessor.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Performs <c>n</c> operators on <c>n</c> subscopes, operations must be executed sequentially. 31 /// </summary> 29 32 public class SequentialSubScopesProcessor : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Applies <c>n</c> operators on all the <c>n</c> sub scopes of the given <paramref name="scope"/>. 40 /// </summary> 41 /// <param name="scope">The scope on whose sub scopes the operators are applied.</param> 42 /// <returns>A new <see cref="CompositeOperation"/> with the <c>i</c>th operator applied 43 /// on the <c>i</c>th sub scope.</returns> 34 44 public override IOperation Apply(IScope scope) { 35 45 CompositeOperation next = new CompositeOperation(); -
trunk/sources/HeuristicLab.Operators/SingleObjectiveEvaluatorBase.cs
r77 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Calculates the quality of a solution candidate. 31 /// </summary> 29 32 public abstract class SingleObjectiveEvaluatorBase : OperatorBase { 33 /// <summary> 34 /// Initializes a new instance of <see cref="SingleObjectiveEvaluatorBase"/> with one variable info 35 /// (<c>Quality</c>). 36 /// </summary> 30 37 public SingleObjectiveEvaluatorBase() 31 38 : base() { … … 33 40 } 34 41 42 /// <summary> 43 /// Evaluates the quality of a solution candidate. 44 /// </summary> 45 /// <remarks>Creates a new variable with the calculated quality if it not already exists, and 46 /// injects it in the given <paramref name="scope"/> if it is not a local one.</remarks> 47 /// <param name="scope">The scope where to evaluate the quality.</param> 48 /// <returns><c>null</c>.</returns> 35 49 public override IOperation Apply(IScope scope) { 36 50 double qualityValue = Evaluate(scope); … … 49 63 } 50 64 65 /// <summary> 66 /// Calculates the quality of a solution candidate in the given <paramref name="scope"/>. 67 /// </summary> 68 /// <param name="scope">The scope where to calculate the quality.</param> 69 /// <returns>A double value that indicates the quality.</returns> 51 70 protected abstract double Evaluate(IScope scope); 52 71 } -
trunk/sources/HeuristicLab.Operators/Sorter.cs
r77 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Sorts all sub scopes of a given scope. 31 /// </summary> 29 32 public class Sorter : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="Sorter"/> with two variable infos 40 /// (<c>Descending</c> and <c>Value</c>). 41 /// </summary> 34 42 public Sorter() 35 43 : base() { … … 38 46 } 39 47 48 /// <summary> 49 /// Sorts all sub scopes of the given <paramref name="scope"/>. 50 /// </summary> 51 /// <remarks>Calls <see cref="IScope.ReorderSubScopes"/>.</remarks> 52 /// <param name="scope">The scope where to apply the sorting.</param> 53 /// <returns><c>null</c>.</returns> 40 54 public override IOperation Apply(IScope scope) { 41 55 bool descending = GetVariableValue<BoolData>("Descending", scope, true).Data; -
trunk/sources/HeuristicLab.Operators/StochasticBranch.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Branch of (one or) two operators that have different probabilities to get executed. 31 /// </summary> 29 32 public class StochasticBranch : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="StochasticBranch"/> with two variable infos 40 /// (<c>Random</c> and <c>Probability</c>). 41 /// </summary> 34 42 public StochasticBranch() 35 43 : base() { … … 38 46 } 39 47 48 /// <summary> 49 /// Applies the operator of branch one with a specific probability on the given 50 /// <paramref name="scope"/>, or - if existent - with another probability operator of branch two. 51 /// </summary> 52 /// <param name="scope">The scope to apply the operators on.</param> 53 /// <returns>A new <see cref="AtomicOperation"/> with either operator 1 or operator 2 applied 54 /// to the given <paramref name="scope"/> or <c>null</c>.</returns> 40 55 public override IOperation Apply(IScope scope) { 41 56 IRandom random = GetVariableValue<IRandom>("Random", scope, true); -
trunk/sources/HeuristicLab.Operators/StochasticMultiBranch.cs
r46 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Branch of operators that have different probabilities to get executed. 31 /// </summary> 29 32 public class StochasticMultiBranch : OperatorBase { 33 ///<inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="StochasticMultiBranch"/> with two variable infos 40 /// (<c>Probabilities</c> and <c>Random</c>). 41 /// </summary> 34 42 public StochasticMultiBranch() 35 43 : base() { … … 38 46 } 39 47 48 /// <summary> 49 /// Applies an operator of the branches to the specified <paramref name="scope"/> with a 50 /// specific probability. 51 /// </summary> 52 /// <exception cref="InvalidOperationException">Thrown when the list of probabilites does not 53 /// match the number of operators or if there was another problem with the list of probabilities.</exception> 54 /// <param name="scope">The scope to apply the operators on.</param> 55 /// <returns>A new <see cref="AtomicOperation"/> with a specific operator, depending 56 /// on its probability, applied on the given <paramref name="scope"/>.</returns> 40 57 public override IOperation Apply(IScope scope) { 41 58 IRandom random = GetVariableValue<IRandom>("Random", scope, true); -
trunk/sources/HeuristicLab.Operators/SubScopesCreater.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Operator to create sub scopes in a given scope. 31 /// </summary> 29 32 public class SubScopesCreater : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="SubScopesCreater"/> with one variable info (<c>SubScopes</c>). 40 /// </summary> 34 41 public SubScopesCreater() 35 42 : base() { … … 37 44 } 38 45 46 /// <summary> 47 /// Creates a specified number of sub scopes in the given <paramref name="scope"/>. 48 /// </summary> 49 /// <param name="scope">The scope where to create the sub scopes.</param> 50 /// <returns><c>null</c>.</returns> 39 51 public override IOperation Apply(IScope scope) { 40 52 IntData count = GetVariableValue<IntData>("SubScopes", scope, true); -
trunk/sources/HeuristicLab.Operators/SubScopesMixer.cs
r788 r801 59 59 /// </example> 60 60 /// </remarks> 61 /// <exception cref="ArgumentException">Thrown when the number of sub scopes cannot be divided by 62 /// the number of partitions without remainder.</exception> 61 63 /// <param name="scope">The scope whose sub scopes should be mixed.</param> 62 64 /// <returns><c>null</c>.</returns> -
trunk/sources/HeuristicLab.Operators/SubScopesRemover.cs
r591 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Removes one specified or - if nothing specified - all operators from the given scope. 31 /// </summary> 29 32 public class SubScopesRemover : OperatorBase { 33 /// <inheritdoc/> 30 34 public override string Description { 31 35 get { … … 34 38 } 35 39 40 /// <summary> 41 /// Initializes a new instance of <see cref="SubScopesRemover"/> with one variable info 42 /// (<c>SubScopeIndex</c>). 43 /// </summary> 36 44 public SubScopesRemover() 37 45 : base() { … … 39 47 } 40 48 49 /// <summary> 50 /// Removes one sub scope with a specified index from the given <paramref name="scope"/>, or if no 51 /// index has been specified, all sub scopes are removed. 52 /// </summary> 53 /// <exception cref="InvalidOperationException">Thrown when no sub scope with the specified index 54 /// exists.</exception> 55 /// <param name="scope">The scope whose sub scope(s) to remove.</param> 56 /// <returns><c>null</c>.</returns> 41 57 public override IOperation Apply(IScope scope) { 42 58 IntData index = GetVariableValue<IntData>("SubScopeIndex", scope, true, false); -
trunk/sources/HeuristicLab.Operators/UnequalToComparator.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Operator to check whether two items are not equal to each other. 31 /// </summary> 29 32 public class UnequalToComparator : ComparatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="UnequalToComparator"/>. 40 /// </summary> 34 41 public UnequalToComparator() 35 42 : base() { 36 43 } 37 44 45 /// <summary> 46 /// Checks whether the <paramref name="left"/> item is not equal to the <paramref name="right"/>. 47 /// </summary> 48 /// <param name="left">The left side of the comparison.</param> 49 /// <param name="right">The right side of the comparison.</param> 50 /// <returns><c>true</c> if the <paramref name="left"/> item is not equal 51 /// to the <paramref name="right"/>, <c>false</c> otherwise.</returns> 38 52 protected override bool Compare(IComparable left, IItem right) { 39 53 return left.CompareTo(right) != 0; -
trunk/sources/HeuristicLab.Operators/UniformParallelSubScopesProcessor.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Performs the same operator on all <c>n</c> existing sub scopes of a given scope; 31 /// operations can be executed in parallel. 32 /// </summary> 29 33 public class UniformParallelSubScopesProcessor : OperatorBase { 34 /// <inheritdoc select="summary"/> 30 35 public override string Description { 31 36 get { return @"TODO\r\nOperator description still missing ..."; } 32 37 } 33 38 39 /// <summary> 40 /// Applies one operator on all the sub scopes of the given <paramref name="scope"/>. 41 /// </summary> 42 /// <param name="scope">The scope on whose sub scopes the operator is applied.</param> 43 /// <returns>A new <see cref="CompositeOperation"/> with one operator and all sub scopes and 44 /// the <c>ExecuteInParallel</c> flag set to <c>true</c>.</returns> 34 45 public override IOperation Apply(IScope scope) { 35 46 CompositeOperation next = new CompositeOperation(); -
trunk/sources/HeuristicLab.Operators/UniformSequentialSubScopesProcessor.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Performs the same operator on all existing sub scopes of a given scope, 31 /// must be executed sequentially. 32 /// </summary> 29 33 public class UniformSequentialSubScopesProcessor : OperatorBase { 34 /// <inheritdoc select="summary"/> 30 35 public override string Description { 31 36 get { return @"TODO\r\nOperator description still missing ..."; } 32 37 } 33 38 39 /// <summary> 40 /// Applies one operator on all the sub scopes of the given <paramref name="scope"/>. 41 /// </summary> 42 /// <param name="scope">The scope on whose sub scopes the operator is applied.</param> 43 /// <returns>A new <see cref="CompositeOperation"/> with one operator and all sub scopes.</returns> 34 44 public override IOperation Apply(IScope scope) { 35 45 CompositeOperation next = new CompositeOperation(); -
trunk/sources/HeuristicLab.Operators/VariableInjector.cs
r2 r801 27 27 28 28 namespace HeuristicLab.Operators { 29 /// <summary> 30 /// Class to inject local variables into the scope. 31 /// </summary> 29 32 public class VariableInjector : OperatorBase { 30 33 private Dictionary<IVariable, IVariableInfo> variableVariableInfoTable; 31 34 private Dictionary<IVariableInfo, IVariable> variableInfoVariableTable; 32 35 36 /// <inheritdoc select="summary"/> 33 37 public override string Description { 34 38 get { return @"TODO\r\nOperator description still missing ..."; } 35 39 } 36 40 41 /// <summary> 42 /// Initializes a new instance of <see cref="VariableInjector"/>. 43 /// </summary> 37 44 public VariableInjector() 38 45 : base() { … … 41 48 } 42 49 50 /// <summary> 51 /// Clones the current instance (deep clone). 52 /// </summary> 53 /// <remarks>Deep clone performed with <see cref="Auxiliary.Clone"/> of helper class 54 /// <see cref="Auxiliary"/>.</remarks> 55 /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param> 56 /// <returns>The cloned object as <see cref="VariableInjector"/>.</returns> 43 57 public override object Clone(IDictionary<Guid, object> clonedObjects) { 44 58 VariableInjector clone = new VariableInjector(); … … 50 64 } 51 65 66 /// <summary> 67 /// Adds the specified <paramref name="variable"/> to the current instance to get injected. 68 /// </summary> 69 /// <param name="variable">The variable to add.</param> 70 /// <remarks>Calls private method <see cref="CreateVariableInfo"/> and <see cref="OperatorBase.AddVariable"/> 71 /// of base class <see cref="OperatorBase"/>.</remarks> 52 72 public override void AddVariable(IVariable variable) { 53 73 base.AddVariable(variable); … … 55 75 } 56 76 77 /// <summary> 78 /// Removes a variable with the specified <paramref name="name"/> from the current injector. 79 /// </summary> 80 /// <remarks>Calls private method <see cref="DeleteVariableInfo"/> and <see cref="OperatorBase.RemoveVariable"/> 81 /// of base class <see cref="OperatorBase"/>.</remarks> 82 /// <param name="name">The name of the </param> 57 83 public override void RemoveVariable(string name) { 58 84 DeleteVariableInfo(name); … … 60 86 } 61 87 88 /// <summary> 89 /// Adds the specified variables to the given <paramref name="scope"/> (and removes them first, 90 /// if they already exist in the current scope). 91 /// </summary> 92 /// <param name="scope">The scope where to inject the variables.</param> 93 /// <returns><c>null</c>.</returns> 62 94 public override IOperation Apply(IScope scope) { 63 95 foreach (IVariable variable in Variables) { … … 69 101 } 70 102 103 /// <summary> 104 /// Creates a new instance of <see cref="VariableInjectorView"/> to display the current instance. 105 /// </summary> 106 /// <returns>The created view as <see cref="VariableInjectorView"/>.</returns> 71 107 public override IView CreateView() { 72 108 return new VariableInjectorView(this); … … 108 144 109 145 #region Persistence Methods 146 /// <summary> 147 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>. 148 /// <note type="caution"> Variable infos are not persisted!</note> 149 /// </summary> 150 /// <remarks>Calls <see cref="OperatorBase.GetXmlNode"/> of base class <see cref="OperatorBase"/>.</remarks> 151 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param> 152 /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param> 153 /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param> 154 /// <returns>The saved <see cref="XmlNode"/>.</returns> 110 155 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 111 156 XmlNode node = base.GetXmlNode(name, document, persistedObjects); -
trunk/sources/HeuristicLab.Operators/VariableInjectorView.cs
r2 r801 30 30 31 31 namespace HeuristicLab.Operators { 32 /// <summary> 33 /// Visual representation of <see cref="VariableInjector"/>. 34 /// </summary> 32 35 public partial class VariableInjectorView : OperatorBaseView { 36 /// <summary> 37 /// Gets or sets the <see cref="HeuristicLab.Operators.VariableInjector"/> to display. 38 /// </summary> 39 /// <remarks>Uses property <see cref="OperatorBaseView.Operator"/> of base class 40 /// <see cref="OperatorBaseView"/>. No own data storage present.</remarks> 33 41 public VariableInjector VariableInjector { 34 get { return (VariableInjector) Item; }42 get { return (VariableInjector)Operator; } 35 43 set { base.Operator = value; } 36 44 } 37 45 46 /// <summary> 47 /// Initializes a new instance of <see cref="VariableInjectorView"/>. 48 /// </summary> 38 49 public VariableInjectorView() { 39 50 InitializeComponent(); 40 51 tabControl.SelectedTab = variablesTabPage; 41 52 } 53 /// <summary> 54 /// Initializes a new instance of <see cref="VariableInjectorView"/> with the specified 55 /// <paramref name="variableInjector"/>. 56 /// </summary> 57 /// <param name="variableInjector">The variable injector to display.</param> 42 58 public VariableInjectorView(VariableInjector variableInjector) 43 59 : this() {
Note: See TracChangeset
for help on using the changeset viewer.