using System; using System.Collections.Generic; using System.Dynamic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Markup; using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Data; using HeuristicLab.Parameters; namespace HeuristicLab.Problems.DataAnalysis { [Item("ParsedConstraint", "Represents parsed constraints.")] public class ParsedConstraint : Item { protected string input; public string Input { get => input; set => input = value; } protected IEnumerable constraints; public IEnumerable Constraints { get => constraints; set => constraints = value; } protected string targetVariable; public string TargetVariable { get => targetVariable; set => targetVariable = value; } protected IEnumerable allowedVariables; public IEnumerable AllowedVariables { get => allowedVariables; set => allowedVariables = value; } protected ParsedConstraint(ParsedConstraint original, Cloner cloner) : base(original, cloner) { this.input = original.Input ?? string.Empty; this.constraints = original.Constraints ?? new ItemList(); } public override IDeepCloneable Clone(Cloner cloner) { return new ParsedConstraint(this, cloner); } public ParsedConstraint() { this.input = string.Empty; this.constraints = new ItemList(); } public ParsedConstraint(string input, string targetVariable, IEnumerable allowedVariables) { this.input = input; this.constraints = new ItemList(); this.targetVariable = targetVariable; this.allowedVariables = allowedVariables; } public ParsedConstraint(string input, IEnumerable constraints) { this.input = input; this.constraints = constraints; } } }