Changeset 12444


Ignore:
Timestamp:
06/15/15 11:08:52 (4 years ago)
Author:
pfleck
Message:

#2027

  • Removed ISingleValueTerminator and used ThresholdTerminator for the View instead.
  • Added missing description in SingleObjectiveQualityTerminator.
  • Added ITerminationBasedOperator which contains the terminate-flag.
Location:
branches/TerminationCriteria/HeuristicLab.Termination/3.3
Files:
1 added
1 deleted
5 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/HeuristicLab.Termination-3.3.csproj

    r12411 r12444  
    145145  </ItemGroup>
    146146  <ItemGroup>
    147     <Compile Include="ISingleValueTerminator.cs" />
     147    <Compile Include="ITerminationBasedOperator.cs" />
    148148    <Compile Include="SingleObjectiveQualityTerminator.cs" />
    149149    <Compile Include="ThresholdTerminator.cs" />
    150     <Compile Include="Views\SingleValueTerminatorView.cs">
     150    <Compile Include="Views\ThresholdTerminatorView.cs">
    151151      <SubType>UserControl</SubType>
    152152    </Compile>
    153     <Compile Include="Views\SingleValueTerminatorView.Designer.cs">
    154       <DependentUpon>SingleValueTerminatorView.cs</DependentUpon>
     153    <Compile Include="Views\ThresholdTerminatorView.Designer.cs">
     154      <DependentUpon>ThresholdTerminatorView.cs</DependentUpon>
    155155    </Compile>
    156156    <Compile Include="ITerminator.cs" />
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/ITerminator.cs

    r12402 r12444  
    2626  /// An interface which represents an operator for checking a termination criterion.
    2727  /// </summary>
    28   public interface ITerminator : IOperator {
     28  public interface ITerminator : ITerminationBasedOperator {
    2929  }
    3030}
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/SingleObjectiveQualityTerminator.cs

    r12436 r12444  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
    2425using HeuristicLab.Optimization;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2527
    2628namespace HeuristicLab.Termination {
    27   [Item("SingleObjectiveQualityTerminator", "")]
     29  [Item("SingleObjectiveQualityTerminator", "A termination criterion which uses a quality parameter (eg. current best quality) for termination.")]
     30  [StorableClass]
    2831  public class SingleObjectiveQualityTerminator : ComparisonTerminator<DoubleValue> {
     32    [StorableConstructor]
     33    protected SingleObjectiveQualityTerminator(bool deserializing) : base(deserializing) { }
     34    protected SingleObjectiveQualityTerminator(SingleObjectiveQualityTerminator original, Cloner cloner)
     35      : base(original, cloner) { }
    2936    public SingleObjectiveQualityTerminator() { }
    3037
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/TerminationOperator.cs

    r12410 r12444  
    3030  [Item("TerminationOperator", "An operator which either calls the terminate- or the continue branch.")]
    3131  [StorableClass]
    32   public sealed class TerminationOperator : InstrumentedOperator {
     32  public sealed class TerminationOperator : InstrumentedOperator, ITerminationBasedOperator {
    3333    public ILookupParameter<ITerminator> TerminationParameter {
    3434      get { return (ILookupParameter<ITerminator>)Parameters["Termination"]; }
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/ThresholdTerminator.cs

    r12436 r12444  
    3030  [Item("ThresholdTerminator", "Base class for all termination criteria which specifies some threshold.")]
    3131  [StorableClass]
    32   public abstract class ThresholdTerminator<T> : Terminator, ISingleValueTerminator where T : class, IItem, IStringConvertibleValue, new() {
    33     IParameter ISingleValueTerminator.SingleValueParameter {
    34       get { return ThresholdParameter; }
    35     }
     32  public abstract class ThresholdTerminator<T> : Terminator where T : class, IItem, IStringConvertibleValue, new() {
    3633    [Storable]
    3734    private IFixedValueParameter<T> thresholdParameter;
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/Views/ThresholdTerminatorView.Designer.cs

    r12441 r12444  
    2525
    2626namespace HeuristicLab.Termination.Views {
    27   partial class SingleValueTerminatorView {
     27  partial class ThresholdTerminatorView<T> {
    2828    /// <summary>
    2929    /// Required designer variable.
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/Views/ThresholdTerminatorView.cs

    r12441 r12444  
    2020#endregion
    2121
     22using HeuristicLab.Core;
    2223using HeuristicLab.Core.Views;
     24using HeuristicLab.Data;
    2325using HeuristicLab.MainForm;
    2426
     
    2628
    2729  [View("ThresholdTerminator View")]
    28   [Content(typeof(ISingleValueTerminator), true)]
    29   public partial class SingleValueTerminatorView : ItemView {
     30  [Content(typeof(ThresholdTerminator<>), true)]
     31  public partial class ThresholdTerminatorView<T> : ItemView where T : class, IItem, IStringConvertibleValue, new() {
    3032
    31     public new ISingleValueTerminator Content {
    32       get { return (ISingleValueTerminator)base.Content; }
     33    public new ThresholdTerminator<T> Content {
     34      get { return (ThresholdTerminator<T>)base.Content; }
    3335      set { base.Content = value; }
    3436    }
    3537
    36     public SingleValueTerminatorView() {
     38    public ThresholdTerminatorView() {
    3739      InitializeComponent();
    3840    }
     
    4244      viewHost.Content = null;
    4345      if (Content != null) {
    44         viewHost.Content = Content.SingleValueParameter.ActualValue ?? Content.SingleValueParameter;
     46        viewHost.Content = Content.ThresholdParameter.ActualValue ?? Content.ThresholdParameter;
    4547      }
    4648    }
Note: See TracChangeset for help on using the changeset viewer.