Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16904 for branches


Ignore:
Timestamp:
05/07/19 12:09:34 (6 years ago)
Author:
chaider
Message:

#2971 Renamed NamedIntervals to IntervalCollection

Location:
branches/2971_named_intervals
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs

    r16851 r16904  
    9898    }
    9999
    100     public NamedIntervals IntervalEvaluationCollection {
    101       get { return (NamedIntervals)this[IntervalEvaluationResultName].Value; }
     100    public IntervalCollection IntervalEvaluationCollection {
     101      get { return (IntervalCollection)this[IntervalEvaluationResultName].Value; }
    102102      private set { this[IntervalEvaluationResultName].Value = value; }
    103103    }
     
    127127      estimationLimitResults.Add(new Result(TestNaNEvaluationsResultName, "", new IntValue()));
    128128      Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults));
    129       Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", new NamedIntervals()));
     129      Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", new IntervalCollection()));
    130130      RecalculateResults();
    131131    }
     
    147147        estimationLimitResults.Add(new Result(TestNaNEvaluationsResultName, "", new IntValue()));
    148148        Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults));
    149         Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", new NamedIntervals()));
     149        Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", new IntervalCollection()));
    150150        CalculateResults();
    151151      }
     
    174174    }
    175175
    176     private static NamedIntervals CalculateModelIntervals(ISymbolicRegressionSolution solution) {
    177       var intervalEvaluation = new NamedIntervals();
     176    private static IntervalCollection CalculateModelIntervals(ISymbolicRegressionSolution solution) {
     177      var intervalEvaluation = new IntervalCollection();
    178178      var interpreter = new IntervalInterpreter();
    179179      var problemData = solution.ProblemData;
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/IntervalCollectionView.Designer.cs

    r16896 r16904  
    2121
    2222namespace HeuristicLab.Problems.DataAnalysis.Views {
    23   partial class NamedIntervalsView {
     23  partial class IntervalCollectionView {
    2424    /// <summary>
    2525    /// Required designer variable.
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/IntervalCollectionView.cs

    r16896 r16904  
    2929
    3030  [View("NamedIntervals View")]
    31   [Content(typeof(NamedIntervals), true)]
    32   public sealed partial class NamedIntervalsView : AsynchronousContentView {
     31  [Content(typeof(IntervalCollection), true)]
     32  public sealed partial class IntervalCollectionView : AsynchronousContentView {
    3333
    34     public new NamedIntervals Content {
    35       get => (NamedIntervals)base.Content;
     34    public new IntervalCollection Content {
     35      get => (IntervalCollection)base.Content;
    3636      set => base.Content = value;
    3737    }
     
    4141    }
    4242
    43     public NamedIntervalsView() {
     43    public IntervalCollectionView() {
    4444      InitializeComponent();
    4545      dataGridView.AutoGenerateColumns = false;
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalCollection.cs

    r16896 r16904  
    2828  [Item("NamedIntervals", "Represents variables with their interval ranges.")]
    2929  [StorableType("230B4E4B-41E5-4D33-9BC3-E2DAADDCA5AE")]
    30   public class NamedIntervals : Item {
     30  public class IntervalCollection : Item {
    3131    public static new System.Drawing.Image StaticItemImage {
    3232      get => HeuristicLab.Common.Resources.VSImageLibrary.Object;
     
    5151    }
    5252
    53     public NamedIntervals() : base() { }
     53    public IntervalCollection() : base() { }
    5454    [StorableConstructor]
    55     protected NamedIntervals(StorableConstructorFlag _) : base(_) { }
     55    protected IntervalCollection(StorableConstructorFlag _) : base(_) { }
    5656
    57     protected NamedIntervals(NamedIntervals original, Cloner cloner) : base(original, cloner) {
     57    protected IntervalCollection(IntervalCollection original, Cloner cloner) : base(original, cloner) {
    5858      foreach (var keyValuePair in original.VariableIntervals) {
    5959        VariableIntervals.Add(keyValuePair.Key, new Interval(keyValuePair.Value.LowerBound, keyValuePair.Value.UpperBound));
     
    6262
    6363    public override IDeepCloneable Clone(Cloner cloner) {
    64       return new NamedIntervals(this, cloner);
     64      return new IntervalCollection(this, cloner);
    6565    }
    6666
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r16896 r16904  
    9393      problemData.Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", (IntRange)new IntRange(0, 0).AsReadOnly()));
    9494      problemData.Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>()));
    95       problemData.Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName, "", new NamedIntervals()));
     95      problemData.Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, "", new IntervalCollection()));
    9696      problemData.Parameters.Add(new FixedValueParameter<ProblemDataConstraint>(IntervalConstraintsParameterName, "", new ProblemDataConstraint()));
    9797      emptyProblemData = problemData;
     
    103103    }
    104104
    105     public IFixedValueParameter<NamedIntervals> VariableRangesParameter => (IFixedValueParameter<NamedIntervals>)Parameters[VariableRangesParameterName];
    106 
    107     public NamedIntervals VariableRanges {
     105    public IFixedValueParameter<IntervalCollection> VariableRangesParameter => (IFixedValueParameter<IntervalCollection>)Parameters[VariableRangesParameterName];
     106
     107    public IntervalCollection VariableRanges {
    108108      get => VariableRangesParameter.Value;
    109109      set => VariableRanges = value ?? throw new ArgumentNullException("Variable Ranges", "The given variable ranges are null");
     
    148148      if (!Parameters.ContainsKey(VariableRangesParameterName)) {
    149149        var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
    150         NamedIntervals namedIntervals = new NamedIntervals();
     150        IntervalCollection intervalCollection = new IntervalCollection();
    151151        foreach (var variable in variables) {
    152152          if (!this.Dataset.DoubleVariables.Contains(variable.Value)) continue; // intervals are only possible for double variables
    153153          var variableInterval = Interval.GetInterval(this.Dataset.GetDoubleValues(variable.Value));
    154           namedIntervals.VariableIntervals.Add(variable.Value, variableInterval);
     154          intervalCollection.VariableIntervals.Add(variable.Value, variableInterval);
    155155        }
    156156
    157         Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName, namedIntervals));
     157        Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, intervalCollection));
    158158      }
    159159      if (!Parameters.ContainsKey(IntervalConstraintsParameterName)) {
     
    187187      var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
    188188      Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First()));
    189      
    190       NamedIntervals namedIntervals = new NamedIntervals();
     189
     190      IntervalCollection intervalCollection = new IntervalCollection();
    191191      foreach (var variable in variables) {
    192192        if (!dataset.DoubleVariables.Contains(variable.Value)) continue; // intervals are only possible for double variables
    193193        var variableInterval = Interval.GetInterval(dataset.GetDoubleValues(variable.Value));
    194         namedIntervals.VariableIntervals.Add(variable.Value, variableInterval);
     194        intervalCollection.VariableIntervals.Add(variable.Value, variableInterval);
    195195      }
    196196     
    197       Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName, namedIntervals));
     197      Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, intervalCollection));
    198198      Parameters.Add(new FixedValueParameter<ProblemDataConstraint>(IntervalConstraintsParameterName, new ProblemDataConstraint(this)));
    199199      RegisterParameterEvents();
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs

    r16896 r16904  
    2828    string TargetVariable { get; set; }
    2929
    30     NamedIntervals VariableRanges { get; set; }
     30    IntervalCollection VariableRanges { get; set; }
    3131    ProblemDataConstraint IntervalConstraints { get; set; }
    3232
Note: See TracChangeset for help on using the changeset viewer.