Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/ParsedConstraint.cs @ 16774

Last change on this file since 16774 was 16774, checked in by chaider, 5 years ago

#2971 Changed Parser and IntevalConstraint View

File size: 1.8 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Dynamic;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7using System.Windows.Markup;
8using HeuristicLab.Common;
9using HeuristicLab.Core;
10using HeuristicLab.Data;
11using HeuristicLab.Parameters;
12
13namespace HeuristicLab.Problems.DataAnalysis {
14  [Item("ParsedConstraint", "Represents parsed constraints.")]
15  public class ParsedConstraint : Item {
16
17    protected string input;
18    public string Input {
19      get => input;
20      set => input = value;
21    }
22
23    protected IEnumerable<IntervalConstraint> constraints;
24
25    public IEnumerable<IntervalConstraint> Constraints {
26      get => constraints;
27      set => constraints = value;
28    }
29
30    protected IRegressionProblemData problemData;
31
32    public IRegressionProblemData ProblemData {
33      get => problemData;
34      set => problemData = value;
35    }
36
37    protected ParsedConstraint(ParsedConstraint original, Cloner cloner)
38      : base(original, cloner) {
39      this.input = original.Input ?? string.Empty;
40      this.constraints = original.Constraints ?? new ItemList<IntervalConstraint>();
41     
42    }
43
44    public override IDeepCloneable Clone(Cloner cloner) {
45      return new ParsedConstraint(this, cloner);
46    }
47
48    public ParsedConstraint() {
49      this.input = string.Empty;
50      this.constraints = new ItemList<IntervalConstraint>();
51    }
52
53    public ParsedConstraint(string input, IRegressionProblemData problemData) {
54      this.input = input;
55      this.constraints = new ItemList<IntervalConstraint>();
56      this.problemData = problemData;
57    }
58
59    public ParsedConstraint(string input, IEnumerable<IntervalConstraint> constraints) {
60      this.input = input;
61      this.constraints = constraints;
62    }
63  }
64}
Note: See TracBrowser for help on using the repository browser.