1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Dynamic;
|
---|
4 | using System.Linq;
|
---|
5 | using System.Text;
|
---|
6 | using System.Threading.Tasks;
|
---|
7 | using System.Windows.Markup;
|
---|
8 | using HeuristicLab.Common;
|
---|
9 | using HeuristicLab.Core;
|
---|
10 | using HeuristicLab.Data;
|
---|
11 | using HeuristicLab.Parameters;
|
---|
12 |
|
---|
13 | namespace 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 | }
|
---|