Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2956_apriori_knowledge/HeuristicLab.Problems.DataAnalysis/3.4/IntervalItem.cs @ 16542

Last change on this file since 16542 was 16303, checked in by chaider, 6 years ago

#2956: Added intermediate of a-priori knowledge

File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using HeuristicLab.Common;
7using HeuristicLab.Core;
8using HeuristicLab.Data;
9using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
10using HeuristicLab.Problems.DataAnalysis.Interfaces;
11
12namespace HeuristicLab.Problems.DataAnalysis {
13  [StorableClass]
14  public class IntervalItem : NamedItem, IInterval {
15    public IntervalItem() : base() {
16      Name = "Constraint";
17      Variable.SetValue("");
18      Formulation.SetValue("");
19    }
20
21    public IntervalItem(string name, string variable, string formulation) {
22      Name = name;
23      Variable.SetValue(variable);
24      Formulation.SetValue(formulation);
25    }
26
27    [StorableConstructor]
28    protected IntervalItem(bool deserializing) : base(deserializing) { }
29    protected IntervalItem(IntervalItem original, Cloner cloner)
30      : base(original, cloner) {
31      variable = original.variable;
32      formulation = original.formulation;
33      name = original.name;
34    }
35
36    protected IStringConvertibleValue variable = new StringValue();
37
38    public IStringConvertibleValue Variable {
39      get { return variable; }
40    }
41
42    protected IStringConvertibleValue formulation = new StringValue();
43    public IStringConvertibleValue Formulation {
44      get { return formulation; }
45    }
46
47    public override IDeepCloneable Clone(Cloner cloner) {
48      return new IntervalItem(this, cloner);
49    }
50
51
52  }
53}
Note: See TracBrowser for help on using the repository browser.