Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/19 10:57:30 (6 years ago)
Author:
chaider
Message:

#2971 added getter and setter for variable ranges and interval constraints

Location:
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r16830 r16841  
    105105    public IFixedValueParameter<NamedIntervals> VariableRangesParameter => (IFixedValueParameter<NamedIntervals>)Parameters[VariableRangesParameterName];
    106106
    107     public NamedIntervals VariableRanges => VariableRangesParameter.Value;
     107    public NamedIntervals VariableRanges {
     108      get => VariableRangesParameter.Value;
     109      set => VariableRanges = value ?? throw new ArgumentNullException("Variable Ranges", "The given variable ranges are null");
     110    }
     111
    108112
    109113    public IFixedValueParameter<ParsedConstraint> IntervalConstraintsParameter => (IFixedValueParameter<ParsedConstraint>)Parameters[IntervalConstraintsParameterName];
    110     public ParsedConstraint IntervalConstraints => IntervalConstraintsParameter.Value;
     114
     115    public ParsedConstraint IntervalConstraints {
     116      get => IntervalConstraintsParameter.Value;
     117      set => IntervalConstraints = value ?? throw new ArgumentNullException("IntervalCosntraint", "The given Constraint is null.");
     118    }
     119
    111120
    112121    public string TargetVariable {
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs

    r16830 r16841  
    2828    string TargetVariable { get; set; }
    2929
    30     NamedIntervals VariableRanges { get; }
    31     ParsedConstraint IntervalConstraints { get; }
     30    NamedIntervals VariableRanges { get; set; }
     31    ParsedConstraint IntervalConstraints { get; set; }
    3232    IEnumerable<double> TargetVariableValues { get; }
    3333    IEnumerable<double> TargetVariableTrainingValues { get; }
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/ParsedConstraint.cs

    r16830 r16841  
    3434                                                  "Target:y in [0 .. 100]" + Environment.NewLine + Environment.NewLine +
    3535                                                  "#Example for constraint on model parameter: " + Environment.NewLine +
    36                                                   "dy/dx in [0 .. 10]" + Environment.NewLine +
    37                                                   "\u2202²y/\u2202x² in ]-1 .. inf.[";
     36                                                  "dy / dx in [0 .. 10]" + Environment.NewLine +
     37                                                  "\u2202²y / \u2202x² in ]-1 .. inf.[";
    3838     
    3939    public string Input { get; set; }
Note: See TracChangeset for help on using the changeset viewer.