Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/08/19 15:29:49 (6 years ago)
Author:
chaider
Message:

#2971 Changed IntervalConstraints View

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Parser/IntervalConstraint.cs

    r16644 r16772  
    1 using HEAL.Attic;
     1using System;
     2using System.ComponentModel;
     3using System.Drawing;
     4using System.Runtime.CompilerServices;
     5using HeuristicLab.Common;
     6using HeuristicLab.Core;
     7using HeuristicLab.Problems.DataAnalysis.Annotations;
     8using HEAL.Attic;
    29
    310namespace HeuristicLab.Problems.DataAnalysis {
    411  [StorableType("8109BE58-CCFB-4462-A2F4-EEE5DFADAFF7")]
    5   public class IntervalConstraint {
     12  [Item("Interval Constraint", "Constraint on intervals.")]
     13  public class IntervalConstraint : Item {
    614    public string Expression { get; set; }
    715    public string Definition { get; set; }
     
    1321    public int NumberOfDerivation { get; set; }
    1422
    15     public IntervalConstraint() { }
     23    public IntervalConstraint() {}
    1624
    17     public IntervalConstraint(string expression, string definition, Interval interval, bool inclusiveLowerBound, bool inclusiveUpperBound, bool isDerivation, string variable, int numberOfDerivation) {
     25    public IntervalConstraint(string expression, string definition, Interval interval, bool inclusiveLowerBound,
     26      bool inclusiveUpperBound, bool isDerivation, string variable, int numberOfDerivation) {
    1827      Expression = expression;
    1928      Definition = definition;
     
    2534      NumberOfDerivation = numberOfDerivation;
    2635    }
     36
     37    public override IDeepCloneable Clone(Cloner cloner) {
     38      return new IntervalConstraint(this, cloner);
     39    }
     40
     41    protected IntervalConstraint(IntervalConstraint original, Cloner cloner)
     42      : base(original, cloner) {
     43      this.Expression = original.Expression;
     44      this.Definition = original.Definition;
     45      this.Interval = original.Interval;
     46      this.InclusiveLowerBound = original.InclusiveLowerBound;
     47      this.InclusiveUpperBound = original.InclusiveUpperBound;
     48      this.IsDerivation = original.IsDerivation;
     49      this.Variable = original.Variable;
     50      this.NumberOfDerivation = NumberOfDerivation;
     51    }
     52
     53    public event EventHandler Changed;
     54    protected virtual void OnChanged(EventArgs e) {
     55      EventHandler handlers = Changed;
     56      if (handlers != null)
     57        handlers(this, e);
     58    }
    2759  }
    2860}
Note: See TracChangeset for help on using the changeset viewer.