Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17896


Ignore:
Timestamp:
03/16/21 11:08:18 (19 months ago)
Author:
gkronber
Message:

#3073: refactoring to prepare for trunk integration

Location:
branches/3073_IA_constraint_splitting_reintegration
Files:
1 added
2 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/IntervalArithmeticGrammar.cs

    r17887 r17896  
    1 using System.Collections.Generic;
     1#region License Information
     2
     3/* HeuristicLab
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     5 *
     6 * This file is part of HeuristicLab.
     7 *
     8 * HeuristicLab is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * HeuristicLab is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
     22#endregion
     23using System.Collections.Generic;
    224using System.Linq;
    325using HEAL.Attic;
     
    830namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    931  [StorableType("5A2300A0-D0FC-4F2D-B910-F86384FE9052")]
    10   [Item("IntervalArithmeticGrammar", "Represents a grammar for interval arithmetic")]
     32  [Item("IntervalArithmeticGrammar", "Represents a grammar for interval arithmetic which includes linear scaling parts implicitly.")]
    1133  public class IntervalArithmeticGrammar : DataAnalysisGrammar, ISymbolicDataAnalysisGrammar {
    1234    public IntervalArithmeticGrammar() : base(ItemAttribute.GetName(typeof(IntervalArithmeticGrammar)),
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithBoundsEstimator.cs

    r17891 r17896  
    1 using System;
     1#region License Information
     2
     3/* HeuristicLab
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     5 *
     6 * This file is part of HeuristicLab.
     7 *
     8 * HeuristicLab is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * HeuristicLab is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
     22#endregion
     23using System;
    224using System.Collections.Generic;
    3 using System.Collections.ObjectModel;
    425using System.Linq;
    526using HEAL.Attic;
     
    3455    private IntervalArithBoundsEstimator(IntervalArithBoundsEstimator original, Cloner cloner) : base(original, cloner) { }
    3556
    36     public IntervalArithBoundsEstimator() : base("IA Bounds Estimator",
     57    public IntervalArithBoundsEstimator() : base("Interval Arithmetic Bounds Estimator",
    3758      "Estimates the bounds of the model with interval arithmetic") {
    3859      Parameters.Add(new FixedValueParameter<IntValue>(EvaluatedSolutionsParameterName,
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithCompiledExpressionBoundsEstimator.cs

    r17891 r17896  
    1 using HEAL.Attic;
     1#region License Information
     2
     3/* HeuristicLab
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     5 *
     6 * This file is part of HeuristicLab.
     7 *
     8 * HeuristicLab is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * HeuristicLab is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
     22#endregion
     23
     24using HEAL.Attic;
    225using HeuristicLab.Common;
    326using HeuristicLab.Core;
     
    4568    private readonly object syncRoot = new object();
    4669
    47     public IntervalArithCompiledExpressionBoundsEstimator() : base("Interval Arith Bounds Estimator",
     70    public IntervalArithCompiledExpressionBoundsEstimator() : base("Interval Arithmetic Compiled Expression Bounds Estimator",
    4871      "Estimates the bounds of the model with interval arithmetic, by first compiling the model into a lambda.") {
    4972      Parameters.Add(new FixedValueParameter<IntValue>(EvaluatedSolutionsParameterName,
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/IntervalUtil.cs

    r17891 r17896  
    1 using System;
     1#region License Information
     2
     3/* HeuristicLab
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     5 *
     6 * This file is part of HeuristicLab.
     7 *
     8 * HeuristicLab is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * HeuristicLab is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
     22#endregion
     23using System;
    224using System.Collections.Generic;
    325using System.Linq;
     
    4769      }
    4870    }
    49 
    5071  }
    5172}
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r17893 r17896  
    309309    <Compile Include="Interfaces\IDataPreprocessorStarter.cs" />
    310310    <Compile Include="Interfaces\IPartialDependencePlot.cs" />
    311     <Compile Include="IntervalCollectionView.cs">
    312       <SubType>UserControl</SubType>
    313     </Compile>
    314     <Compile Include="IntervalCollectionView.Designer.cs">
    315       <DependentUpon>IntervalCollectionView.cs</DependentUpon>
    316     </Compile>
    317     <Compile Include="IntervalConstraintView.cs">
    318       <SubType>UserControl</SubType>
    319     </Compile>
    320     <Compile Include="IntervalConstraintView.Designer.cs">
    321       <DependentUpon>IntervalConstraintView.cs</DependentUpon>
    322     </Compile>
    323311    <Compile Include="MenuItems\ChangeDataOfOptimizersMenuItem.cs" />
    324312    <Compile Include="MenuItems\ShrinkDataAnalysisRunsMenuItem.cs" />
     
    353341      <DependentUpon>ConfidenceRegressionSolutionLineChartView.cs</DependentUpon>
    354342    </Compile>
     343    <Compile Include="Regression\IntervalCollectionView.cs">
     344      <SubType>UserControl</SubType>
     345    </Compile>
     346    <Compile Include="Regression\IntervalCollectionView.Designer.cs">
     347      <DependentUpon>IntervalCollectionView.cs</DependentUpon>
     348    </Compile>
    355349    <Compile Include="Regression\RegressionEnsembleSolutionModelWeightsView.cs">
    356350      <SubType>UserControl</SubType>
     
    443437      <DependentUpon>RegressionSolutionScatterPlotView.cs</DependentUpon>
    444438    </Compile>
    445     <Compile Include="ShapeConstraintsView.cs">
    446       <SubType>UserControl</SubType>
    447     </Compile>
    448     <Compile Include="ShapeConstraintsView.Designer.cs">
     439    <Compile Include="Regression\ShapeConstraintsView.cs">
     440      <SubType>UserControl</SubType>
     441    </Compile>
     442    <Compile Include="Regression\ShapeConstraintsView.Designer.cs">
    449443      <DependentUpon>ShapeConstraintsView.cs</DependentUpon>
     444    </Compile>
     445    <Compile Include="Regression\ShapeConstraintView.cs">
     446      <SubType>UserControl</SubType>
     447    </Compile>
     448    <Compile Include="Regression\ShapeConstraintView.Designer.cs">
     449      <DependentUpon>ShapeConstraintView.cs</DependentUpon>
    450450    </Compile>
    451451    <Compile Include="Solution Views\ClassificationSolutionView.cs">
     
    603603      <DependentUpon>AbstractFeatureCorrelationView.cs</DependentUpon>
    604604    </EmbeddedResource>
    605     <EmbeddedResource Include="IntervalConstraintView.resx">
    606       <DependentUpon>IntervalConstraintView.cs</DependentUpon>
    607     </EmbeddedResource>
    608605    <EmbeddedResource Include="Properties\Resources.resx">
    609606      <Generator>ResXFileCodeGenerator</Generator>
    610607      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    611608    </EmbeddedResource>
    612     <EmbeddedResource Include="ShapeConstraintsView.resx">
    613       <DependentUpon>ShapeConstraintsView.cs</DependentUpon>
    614     </EmbeddedResource>
    615609  </ItemGroup>
    616610  <ItemGroup>
     611    <EmbeddedResource Include="Resources\shapeConstraintsHelp.rtf" />
    617612    <None Include="Resources\VS2008ImageLibrary_Annotations_Information.png" />
    618613  </ItemGroup>
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Properties/Resources.Designer.cs

    r17893 r17896  
    11//------------------------------------------------------------------------------
    22// <auto-generated>
    3 //     Dieser Code wurde von einem Tool generiert.
    4 //     Laufzeitversion:4.0.30319.42000
     3//     This code was generated by a tool.
     4//     Runtime Version:4.0.30319.42000
    55//
    6 //     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
    7 //     der Code erneut generiert wird.
     6//     Changes to this file may cause incorrect behavior and will be lost if
     7//     the code is regenerated.
    88// </auto-generated>
    99//------------------------------------------------------------------------------
     
    1414   
    1515    /// <summary>
    16     ///   Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
     16    ///   A strongly-typed resource class, for looking up localized strings, etc.
    1717    /// </summary>
    18     // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
    19     // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
    20     // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
    21     // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
     18    // This class was auto-generated by the StronglyTypedResourceBuilder
     19    // class via a tool like ResGen or Visual Studio.
     20    // To add or remove a member, edit your .ResX file then rerun ResGen
     21    // with the /str option, or rebuild your VS project.
    2222    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
    2323    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     
    3434       
    3535        /// <summary>
    36         ///   Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
     36        ///   Returns the cached ResourceManager instance used by this class.
    3737        /// </summary>
    3838        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
     
    4848       
    4949        /// <summary>
    50         ///   Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
    51         ///   Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
     50        ///   Overrides the current thread's CurrentUICulture property for all
     51        ///   resource lookups using this strongly typed resource class.
    5252        /// </summary>
    5353        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
     
    6262       
    6363        /// <summary>
    64         ///   Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
     64        ///   Looks up a localized string similar to {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang2057{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil\fcharset0 Consolas;}{\f2\fnil\fcharset1 Cambria Math;}}
     65        ///{\colortbl ;\red0\green0\blue0;}
     66        ///{\*\generator Riched20 10.0.18362}{\*\mmathPr\mmathFont2\mwrapIndent1440 }\viewkind4\uc1
     67        ///\pard\sa200\sl276\slmult1\cf1\fs19\lang9 Within the text field you can define different types of shape constraints e.g. range constraints, monotonicity constraints.\par
     68        ///
     69        ///\pard\sl276\slmult1 To define a model constraint: \par
     70        ///
     71        ///\p [rest of string was truncated]&quot;;.
     72        /// </summary>
     73        internal static string shapeConstraintsHelp_rtf {
     74            get {
     75                return ResourceManager.GetString("shapeConstraintsHelp.rtf", resourceCulture);
     76            }
     77        }
     78       
     79        /// <summary>
     80        ///   Looks up a localized resource of type System.Drawing.Bitmap.
    6581        /// </summary>
    6682        internal static System.Drawing.Bitmap VS2008ImageLibrary_Annotations_Information {
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Properties/Resources.resx

    r17893 r17896  
    119119  </resheader>
    120120  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
     121  <data name="shapeConstraintsHelp.rtf" type="System.Resources.ResXFileRef, System.Windows.Forms">
     122    <value>..\Resources\shapeConstraintsHelp.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
     123  </data>
    121124  <data name="VS2008ImageLibrary_Annotations_Information" type="System.Resources.ResXFileRef, System.Windows.Forms">
    122125    <value>..\Resources\VS2008ImageLibrary_Annotations_Information.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/IntervalCollectionView.Designer.cs

    r17894 r17896  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/IntervalCollectionView.cs

    r17894 r17896  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    9595
    9696    private void SetColumnNames() {
    97       dataGridView.Columns.Add("lowerBound", "Lower Bound");
    98       dataGridView.Columns.Add("upperBound", "Upper Bound");
     97      dataGridView.Columns.Add("lowerBound", "Lower bound");
     98      dataGridView.Columns.Add("upperBound", "Upper bound");
    9999    }
    100100
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintView.Designer.cs

    r17895 r17896  
    1 namespace HeuristicLab.Problems.DataAnalysis.Views {
    2   partial class IntervalConstraintView {
     1#region License Information
     2
     3/* HeuristicLab
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     5 *
     6 * This file is part of HeuristicLab.
     7 *
     8 * HeuristicLab is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * HeuristicLab is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
     22# endregion
     23
     24namespace HeuristicLab.Problems.DataAnalysis.Views {
     25  partial class ShapeConstraintView {
    326    /// <summary>
    427    /// Required designer variable.
     
    1134    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    1235    protected override void Dispose(bool disposing) {
    13         if (disposing && (components != null)) {
    14             components.Dispose();
    15         }
    16         base.Dispose(disposing);
     36      if (disposing && (components != null)) {
     37        components.Dispose();
     38      }
     39      base.Dispose(disposing);
    1740    }
    1841
     
    2447    /// </summary>
    2548    private void InitializeComponent() {
    26             this.components = new System.ComponentModel.Container();
    27             this.lowerboundLabel = new System.Windows.Forms.Label();
    28             this.upperboundLabel = new System.Windows.Forms.Label();
    29             this.variableLabel = new System.Windows.Forms.Label();
    30             this.numberderivationLabel = new System.Windows.Forms.Label();
    31             this.upperboundInput = new System.Windows.Forms.TextBox();
    32             this.lowerboundInput = new System.Windows.Forms.TextBox();
    33             this.variableInput = new System.Windows.Forms.TextBox();
    34             this.groupBox1 = new System.Windows.Forms.GroupBox();
    35             this.weightInput = new System.Windows.Forms.TextBox();
    36             this.WeightLab = new System.Windows.Forms.Label();
    37             this.regionLab = new System.Windows.Forms.Label();
    38             this.regionView = new HeuristicLab.Problems.DataAnalysis.Views.IntervalCollectionView();
    39             this.label1 = new System.Windows.Forms.Label();
    40             this.numberderivationInput = new System.Windows.Forms.ComboBox();
    41             this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
    42             this.groupBox1.SuspendLayout();
    43             ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    44             this.SuspendLayout();
    45             //
    46             // lowerboundLabel
    47             //
    48             this.lowerboundLabel.AutoSize = true;
    49             this.lowerboundLabel.Location = new System.Drawing.Point(8, 101);
    50             this.lowerboundLabel.Name = "lowerboundLabel";
    51             this.lowerboundLabel.Size = new System.Drawing.Size(69, 13);
    52             this.lowerboundLabel.TabIndex = 2;
    53             this.lowerboundLabel.Text = "Lowerbound:";
    54             //
    55             // upperboundLabel
    56             //
    57             this.upperboundLabel.AutoSize = true;
    58             this.upperboundLabel.Location = new System.Drawing.Point(8, 126);
    59             this.upperboundLabel.Name = "upperboundLabel";
    60             this.upperboundLabel.Size = new System.Drawing.Size(69, 13);
    61             this.upperboundLabel.TabIndex = 3;
    62             this.upperboundLabel.Text = "Upperbound:";
    63             //
    64             // variableLabel
    65             //
    66             this.variableLabel.AutoSize = true;
    67             this.variableLabel.Location = new System.Drawing.Point(8, 47);
    68             this.variableLabel.Name = "variableLabel";
    69             this.variableLabel.Size = new System.Drawing.Size(48, 13);
    70             this.variableLabel.TabIndex = 7;
    71             this.variableLabel.Text = "Variable:";
    72             //
    73             // numberderivationLabel
    74             //
    75             this.numberderivationLabel.AutoSize = true;
    76             this.numberderivationLabel.Location = new System.Drawing.Point(8, 74);
    77             this.numberderivationLabel.Name = "numberderivationLabel";
    78             this.numberderivationLabel.Size = new System.Drawing.Size(65, 13);
    79             this.numberderivationLabel.TabIndex = 8;
    80             this.numberderivationLabel.Text = "#Derivation:";
    81             //
    82             // upperboundInput
    83             //
    84             this.upperboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    85             | System.Windows.Forms.AnchorStyles.Right)));
    86             this.upperboundInput.Location = new System.Drawing.Point(108, 123);
    87             this.upperboundInput.Name = "upperboundInput";
    88             this.upperboundInput.Size = new System.Drawing.Size(473, 20);
    89             this.upperboundInput.TabIndex = 11;
    90             this.upperboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.upperboundInput_Validating);
    91             this.upperboundInput.Validated += new System.EventHandler(this.upperboundInput_Validated);
    92             //
    93             // lowerboundInput
    94             //
    95             this.lowerboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    96             | System.Windows.Forms.AnchorStyles.Right)));
    97             this.lowerboundInput.Location = new System.Drawing.Point(108, 98);
    98             this.lowerboundInput.Name = "lowerboundInput";
    99             this.lowerboundInput.Size = new System.Drawing.Size(473, 20);
    100             this.lowerboundInput.TabIndex = 12;
    101             this.lowerboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.lowerboundInput_Validating);
    102             this.lowerboundInput.Validated += new System.EventHandler(this.lowerboundInput_Validated);
    103             //
    104             // variableInput
    105             //
    106             this.variableInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    107             | System.Windows.Forms.AnchorStyles.Right)));
    108             this.variableInput.Location = new System.Drawing.Point(108, 44);
    109             this.variableInput.Name = "variableInput";
    110             this.variableInput.Size = new System.Drawing.Size(473, 20);
    111             this.variableInput.TabIndex = 15;
    112             //
    113             // groupBox1
    114             //
    115             this.groupBox1.Controls.Add(this.weightInput);
    116             this.groupBox1.Controls.Add(this.WeightLab);
    117             this.groupBox1.Controls.Add(this.regionLab);
    118             this.groupBox1.Controls.Add(this.regionView);
    119             this.groupBox1.Controls.Add(this.label1);
    120             this.groupBox1.Controls.Add(this.numberderivationInput);
    121             this.groupBox1.Controls.Add(this.variableInput);
    122             this.groupBox1.Controls.Add(this.lowerboundInput);
    123             this.groupBox1.Controls.Add(this.upperboundInput);
    124             this.groupBox1.Controls.Add(this.numberderivationLabel);
    125             this.groupBox1.Controls.Add(this.variableLabel);
    126             this.groupBox1.Controls.Add(this.upperboundLabel);
    127             this.groupBox1.Controls.Add(this.lowerboundLabel);
    128             this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
    129             this.groupBox1.Location = new System.Drawing.Point(0, 0);
    130             this.groupBox1.Name = "groupBox1";
    131             this.groupBox1.Size = new System.Drawing.Size(587, 380);
    132             this.groupBox1.TabIndex = 0;
    133             this.groupBox1.TabStop = false;
    134             this.groupBox1.Text = "Interval Constraints Detail";
    135             //
    136             // weightInput
    137             //
    138             this.weightInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    139             | System.Windows.Forms.AnchorStyles.Right)));
    140             this.weightInput.Location = new System.Drawing.Point(108, 150);
    141             this.weightInput.Name = "weightInput";
    142             this.weightInput.Size = new System.Drawing.Size(473, 20);
    143             this.weightInput.TabIndex = 33;
    144             this.weightInput.TextChanged += new System.EventHandler(this.weightInput_TextChanged);
    145             //
    146             // WeightLab
    147             //
    148             this.WeightLab.AutoSize = true;
    149             this.WeightLab.Location = new System.Drawing.Point(8, 153);
    150             this.WeightLab.Name = "WeightLab";
    151             this.WeightLab.Size = new System.Drawing.Size(44, 13);
    152             this.WeightLab.TabIndex = 32;
    153             this.WeightLab.Text = "Weight:";
    154             //
    155             // regionLab
    156             //
    157             this.regionLab.AutoSize = true;
    158             this.regionLab.Location = new System.Drawing.Point(8, 188);
    159             this.regionLab.Name = "regionLab";
    160             this.regionLab.Size = new System.Drawing.Size(49, 13);
    161             this.regionLab.TabIndex = 31;
    162             this.regionLab.Text = "Regions:";
    163             //
    164             // regionView
    165             //
    166             this.regionView.Caption = "IntervalCollection View";
    167             this.regionView.Content = null;
    168             this.regionView.Location = new System.Drawing.Point(108, 188);
    169             this.regionView.Name = "regionView";
    170             this.regionView.ReadOnly = false;
    171             this.regionView.Size = new System.Drawing.Size(473, 186);
    172             this.regionView.TabIndex = 30;
    173             this.regionView.TabStop = false;
    174             //
    175             // label1
    176             //
    177             this.label1.AutoSize = true;
    178             this.label1.Location = new System.Drawing.Point(11, -105);
    179             this.label1.Name = "label1";
    180             this.label1.Size = new System.Drawing.Size(49, 13);
    181             this.label1.TabIndex = 28;
    182             this.label1.Text = "Enabled:";
    183             //
    184             // numberderivationInput
    185             //
    186             this.numberderivationInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    187             | System.Windows.Forms.AnchorStyles.Right)));
    188             this.numberderivationInput.FormattingEnabled = true;
    189             this.numberderivationInput.Location = new System.Drawing.Point(108, 71);
    190             this.numberderivationInput.Name = "numberderivationInput";
    191             this.numberderivationInput.Size = new System.Drawing.Size(473, 21);
    192             this.numberderivationInput.TabIndex = 27;
    193             this.numberderivationInput.SelectedIndexChanged += new System.EventHandler(this.numberderivationInput_SelectedIndexChanged);
    194             //
    195             // errorProvider
    196             //
    197             this.errorProvider.ContainerControl = this;
    198             this.errorProvider.RightToLeft = true;
    199             //
    200             // IntervalConstraintView
    201             //
    202             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    203             this.Controls.Add(this.groupBox1);
    204             this.Name = "IntervalConstraintView";
    205             this.Size = new System.Drawing.Size(587, 380);
    206             this.groupBox1.ResumeLayout(false);
    207             this.groupBox1.PerformLayout();
    208             ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    209             this.ResumeLayout(false);
     49      this.components = new System.ComponentModel.Container();
     50      this.lowerboundLabel = new System.Windows.Forms.Label();
     51      this.upperboundLabel = new System.Windows.Forms.Label();
     52      this.variableLabel = new System.Windows.Forms.Label();
     53      this.numberOfDerivationLabel = new System.Windows.Forms.Label();
     54      this.upperboundInput = new System.Windows.Forms.TextBox();
     55      this.lowerboundInput = new System.Windows.Forms.TextBox();
     56      this.variableInput = new System.Windows.Forms.TextBox();
     57      this.groupBox = new System.Windows.Forms.GroupBox();
     58      this.weightTextBox = new System.Windows.Forms.TextBox();
     59      this.weightLabel = new System.Windows.Forms.Label();
     60      this.regionLabel = new System.Windows.Forms.Label();
     61      this.regionView = new HeuristicLab.Problems.DataAnalysis.Views.IntervalCollectionView();
     62      this.numberOfDerivationsComboBox = new System.Windows.Forms.ComboBox();
     63      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     64      this.groupBox.SuspendLayout();
     65      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     66      this.SuspendLayout();
     67      //
     68      // lowerboundLabel
     69      //
     70      this.lowerboundLabel.AutoSize = true;
     71      this.lowerboundLabel.Location = new System.Drawing.Point(8, 75);
     72      this.lowerboundLabel.Name = "lowerboundLabel";
     73      this.lowerboundLabel.Size = new System.Drawing.Size(72, 13);
     74      this.lowerboundLabel.TabIndex = 4;
     75      this.lowerboundLabel.Text = "Lower bound:";
     76      //
     77      // upperboundLabel
     78      //
     79      this.upperboundLabel.AutoSize = true;
     80      this.upperboundLabel.Location = new System.Drawing.Point(8, 101);
     81      this.upperboundLabel.Name = "upperboundLabel";
     82      this.upperboundLabel.Size = new System.Drawing.Size(72, 13);
     83      this.upperboundLabel.TabIndex = 6;
     84      this.upperboundLabel.Text = "Upper bound:";
     85      //
     86      // variableLabel
     87      //
     88      this.variableLabel.AutoSize = true;
     89      this.variableLabel.Location = new System.Drawing.Point(8, 22);
     90      this.variableLabel.Name = "variableLabel";
     91      this.variableLabel.Size = new System.Drawing.Size(48, 13);
     92      this.variableLabel.TabIndex = 0;
     93      this.variableLabel.Text = "Variable:";
     94      //
     95      // numberderivationLabel
     96      //
     97      this.numberOfDerivationLabel.AutoSize = true;
     98      this.numberOfDerivationLabel.Location = new System.Drawing.Point(8, 48);
     99      this.numberOfDerivationLabel.Name = "numberderivationLabel";
     100      this.numberOfDerivationLabel.Size = new System.Drawing.Size(58, 13);
     101      this.numberOfDerivationLabel.TabIndex = 2;
     102      this.numberOfDerivationLabel.Text = "Derivative:";
     103      //
     104      // upperboundInput
     105      //
     106      this.upperboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     107            | System.Windows.Forms.AnchorStyles.Right)));
     108      this.upperboundInput.Location = new System.Drawing.Point(86, 98);
     109      this.upperboundInput.Name = "upperboundInput";
     110      this.upperboundInput.Size = new System.Drawing.Size(495, 20);
     111      this.upperboundInput.TabIndex = 7;
     112      this.upperboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.upperboundInput_Validating);
     113      this.upperboundInput.Validated += new System.EventHandler(this.upperboundInput_Validated);
     114      //
     115      // lowerboundInput
     116      //
     117      this.lowerboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     118            | System.Windows.Forms.AnchorStyles.Right)));
     119      this.lowerboundInput.Location = new System.Drawing.Point(86, 72);
     120      this.lowerboundInput.Name = "lowerboundInput";
     121      this.lowerboundInput.Size = new System.Drawing.Size(495, 20);
     122      this.lowerboundInput.TabIndex = 5;
     123      this.lowerboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.lowerboundInput_Validating);
     124      this.lowerboundInput.Validated += new System.EventHandler(this.lowerboundInput_Validated);
     125      //
     126      // variableInput
     127      //
     128      this.variableInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     129            | System.Windows.Forms.AnchorStyles.Right)));
     130      this.variableInput.Location = new System.Drawing.Point(86, 19);
     131      this.variableInput.Name = "variableInput";
     132      this.variableInput.Size = new System.Drawing.Size(495, 20);
     133      this.variableInput.TabIndex = 1;
     134      //
     135      // groupBox
     136      //
     137      this.groupBox.Controls.Add(this.weightTextBox);
     138      this.groupBox.Controls.Add(this.weightLabel);
     139      this.groupBox.Controls.Add(this.regionLabel);
     140      this.groupBox.Controls.Add(this.regionView);
     141      this.groupBox.Controls.Add(this.numberOfDerivationsComboBox);
     142      this.groupBox.Controls.Add(this.variableInput);
     143      this.groupBox.Controls.Add(this.lowerboundInput);
     144      this.groupBox.Controls.Add(this.upperboundInput);
     145      this.groupBox.Controls.Add(this.numberOfDerivationLabel);
     146      this.groupBox.Controls.Add(this.variableLabel);
     147      this.groupBox.Controls.Add(this.upperboundLabel);
     148      this.groupBox.Controls.Add(this.lowerboundLabel);
     149      this.groupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     150      this.groupBox.Location = new System.Drawing.Point(0, 0);
     151      this.groupBox.Name = "groupBox";
     152      this.groupBox.Size = new System.Drawing.Size(587, 380);
     153      this.groupBox.TabIndex = 0;
     154      this.groupBox.TabStop = false;
     155      this.groupBox.Text = "Shape Constraint Detail";
     156      //
     157      // weightInput
     158      //
     159      this.weightTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     160            | System.Windows.Forms.AnchorStyles.Right)));
     161      this.weightTextBox.Location = new System.Drawing.Point(86, 124);
     162      this.weightTextBox.Name = "weightInput";
     163      this.weightTextBox.Size = new System.Drawing.Size(495, 20);
     164      this.weightTextBox.TabIndex = 9;
     165      this.weightTextBox.TextChanged += new System.EventHandler(this.weightInput_TextChanged);
     166      //
     167      // WeightLab
     168      //
     169      this.weightLabel.AutoSize = true;
     170      this.weightLabel.Location = new System.Drawing.Point(8, 127);
     171      this.weightLabel.Name = "WeightLab";
     172      this.weightLabel.Size = new System.Drawing.Size(44, 13);
     173      this.weightLabel.TabIndex = 8;
     174      this.weightLabel.Text = "Weight:";
     175      //
     176      // regionLab
     177      //
     178      this.regionLabel.AutoSize = true;
     179      this.regionLabel.Location = new System.Drawing.Point(8, 150);
     180      this.regionLabel.Name = "regionLab";
     181      this.regionLabel.Size = new System.Drawing.Size(49, 13);
     182      this.regionLabel.TabIndex = 10;
     183      this.regionLabel.Text = "Regions:";
     184      //
     185      // regionView
     186      //
     187      this.regionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     188            | System.Windows.Forms.AnchorStyles.Left)
     189            | System.Windows.Forms.AnchorStyles.Right)));
     190      this.regionView.Caption = "IntervalCollection View";
     191      this.regionView.Content = null;
     192      this.regionView.Location = new System.Drawing.Point(86, 150);
     193      this.regionView.Name = "regionView";
     194      this.regionView.ReadOnly = false;
     195      this.regionView.Size = new System.Drawing.Size(495, 224);
     196      this.regionView.TabIndex = 11;
     197      this.regionView.TabStop = false;
     198      //
     199      // numberderivationInput
     200      //
     201      this.numberOfDerivationsComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     202            | System.Windows.Forms.AnchorStyles.Right)));
     203      this.numberOfDerivationsComboBox.FormattingEnabled = true;
     204      this.numberOfDerivationsComboBox.Location = new System.Drawing.Point(86, 45);
     205      this.numberOfDerivationsComboBox.Name = "numberderivationInput";
     206      this.numberOfDerivationsComboBox.Size = new System.Drawing.Size(495, 21);
     207      this.numberOfDerivationsComboBox.TabIndex = 3;
     208      this.numberOfDerivationsComboBox.SelectedIndexChanged += new System.EventHandler(this.numberderivationInput_SelectedIndexChanged);
     209      //
     210      // errorProvider
     211      //
     212      this.errorProvider.ContainerControl = this;
     213      this.errorProvider.RightToLeft = true;
     214      //
     215      // ShapeConstraintView
     216      //
     217      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
     218      this.Controls.Add(this.groupBox);
     219      this.Name = "ShapeConstraintView";
     220      this.Size = new System.Drawing.Size(587, 380);
     221      this.groupBox.ResumeLayout(false);
     222      this.groupBox.PerformLayout();
     223      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     224      this.ResumeLayout(false);
    210225
    211226    }
     
    213228    #endregion
    214229
    215     private System.Windows.Forms.Label         lowerboundLabel;
    216     private System.Windows.Forms.Label         upperboundLabel;
    217     private System.Windows.Forms.Label         variableLabel;
    218     private System.Windows.Forms.Label         numberderivationLabel;
    219     private System.Windows.Forms.TextBox       upperboundInput;
    220     private System.Windows.Forms.TextBox       lowerboundInput;
    221     private System.Windows.Forms.TextBox       variableInput;
    222     private System.Windows.Forms.GroupBox      groupBox1;
     230    private System.Windows.Forms.Label lowerboundLabel;
     231    private System.Windows.Forms.Label upperboundLabel;
     232    private System.Windows.Forms.Label variableLabel;
     233    private System.Windows.Forms.Label numberOfDerivationLabel;
     234    private System.Windows.Forms.TextBox upperboundInput;
     235    private System.Windows.Forms.TextBox lowerboundInput;
     236    private System.Windows.Forms.TextBox variableInput;
     237    private System.Windows.Forms.GroupBox groupBox;
    223238    private System.Windows.Forms.ErrorProvider errorProvider;
    224     private System.Windows.Forms.ComboBox      numberderivationInput;
    225     private System.Windows.Forms.Label         label1;
     239    private System.Windows.Forms.ComboBox numberOfDerivationsComboBox;
    226240    private IntervalCollectionView regionView;
    227     private System.Windows.Forms.Label regionLab;
    228         private System.Windows.Forms.TextBox weightInput;
    229         private System.Windows.Forms.Label WeightLab;
    230     }
     241    private System.Windows.Forms.Label regionLabel;
     242    private System.Windows.Forms.TextBox weightTextBox;
     243    private System.Windows.Forms.Label weightLabel;
     244  }
    231245}
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintView.cs

    r17895 r17896  
    22
    33/* HeuristicLab
    4  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    55 *
    66 * This file is part of HeuristicLab.
     
    2929
    3030namespace HeuristicLab.Problems.DataAnalysis.Views {
    31   [View("Interval Constraint Detail View")]
     31  [View("Shape Constraint View")]
    3232  [Content(typeof(ShapeConstraint), true)]
    33   public sealed partial class IntervalConstraintView : ItemView {
     33  public sealed partial class ShapeConstraintView : ItemView {
    3434    public new ShapeConstraint Content {
    3535      get => (ShapeConstraint)base.Content;
     
    3737    }
    3838
    39     public IntervalConstraintView() {
     39    public ShapeConstraintView() {
    4040      InitializeComponent();
    4141      int[] items = { 1, 2, 3 };
    42       numberderivationInput.DataSource = items;
     42      numberOfDerivationsComboBox.DataSource = items;
    4343    }
    4444
     
    6262      base.SetEnabledStateOfControls();
    6363      variableInput.Enabled = Content != null && !Locked && !ReadOnly;
    64       numberderivationInput.Enabled = Content != null && !Locked && !ReadOnly;
     64      numberOfDerivationsComboBox.Enabled = Content != null && !Locked && !ReadOnly;
    6565      lowerboundInput.Enabled = Content != null && !Locked && !ReadOnly;
    6666      upperboundInput.Enabled = Content != null && !Locked && !ReadOnly;
    67       weightInput.Enabled = Content != null && !Locked && !ReadOnly;
     67      weightTextBox.Enabled = Content != null && !Locked && !ReadOnly;
    6868    }
    6969
     
    9696        lowerboundInput.Text = string.Empty;
    9797        upperboundInput.Text = string.Empty;
    98         weightInput.Text = string.Empty;
     98        weightTextBox.Text = string.Empty;
    9999        return;
    100100      }
     
    102102      lowerboundInput.Text = Content.Interval.LowerBound.ToString();
    103103      upperboundInput.Text = Content.Interval.UpperBound.ToString();
    104       weightInput.Text = Content.Weight.ToString();
     104      weightTextBox.Text = Content.Weight.ToString();
    105105
    106106      variableInput.Text = Content.Variable;
    107107      if (!Content.IsDerivative) {
    108         numberderivationInput.Enabled = false;
    109         numberderivationInput.SelectedItem = null;
    110         numberderivationInput.Text = "0";
     108        numberOfDerivationsComboBox.Enabled = false;
     109        numberOfDerivationsComboBox.SelectedItem = null;
     110        numberOfDerivationsComboBox.Text = "0";
    111111      } else {
    112         numberderivationLabel.Visible = true;
    113         numberderivationInput.Visible = true;
    114         numberderivationInput.Enabled = true;
    115         numberderivationInput.SelectedItem = Content.NumberOfDerivations;
     112        numberOfDerivationLabel.Visible = true;
     113        numberOfDerivationsComboBox.Visible = true;
     114        numberOfDerivationsComboBox.Enabled = true;
     115        numberOfDerivationsComboBox.SelectedItem = Content.NumberOfDerivations;
    116116      }
    117117
     
    172172
    173173    private void numberderivationInput_SelectedIndexChanged(object sender, EventArgs e) {
    174       if (numberderivationInput.SelectedItem == null) {
     174      if (numberOfDerivationsComboBox.SelectedItem == null) {
    175175        Content.NumberOfDerivations = 0;
    176         numberderivationInput.Enabled = false;
    177         return;
    178       }
    179 
    180       if ((int)numberderivationInput.SelectedItem == 1)
     176        numberOfDerivationsComboBox.Enabled = false;
     177        return;
     178      }
     179
     180      if ((int)numberOfDerivationsComboBox.SelectedItem == 1)
    181181        Content.NumberOfDerivations = 1;
    182       else if ((int)numberderivationInput.SelectedItem == 2)
     182      else if ((int)numberOfDerivationsComboBox.SelectedItem == 2)
    183183        Content.NumberOfDerivations = 2;
    184       else if ((int)numberderivationInput.SelectedItem == 3)
     184      else if ((int)numberOfDerivationsComboBox.SelectedItem == 3)
    185185        Content.NumberOfDerivations = 3;
    186186    }
    187187
    188188    private void weightInput_TextChanged(object sender, EventArgs e) {
    189       var value = ParseDoubleValue(weightInput.Text, weightInput, errorProvider);
     189      var value = ParseDoubleValue(weightTextBox.Text, weightTextBox, errorProvider);
    190190      if (!double.IsNaN(value)) Content.Weight = value;
    191191    }
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintsView.Designer.cs

    r17894 r17896  
    22
    33/* HeuristicLab
    4  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    55 *
    66 * This file is part of HeuristicLab.
     
    5252    private void InitializeComponent() {
    5353            this.components = new System.ComponentModel.Container();
    54             this.splitContainer1 = new System.Windows.Forms.SplitContainer();
    55             this.groupBox1 = new System.Windows.Forms.GroupBox();
     54            this.splitContainer = new System.Windows.Forms.SplitContainer();
     55            this.groupBox = new System.Windows.Forms.GroupBox();
    5656            this.constraintsInput = new System.Windows.Forms.TextBox();
    5757            this.parseBtn = new System.Windows.Forms.Button();
    58             this.label1 = new System.Windows.Forms.Label();
     58            this.infoLabel = new System.Windows.Forms.Label();
    5959            this.errorOutput = new System.Windows.Forms.Label();
    60             this.intervalConstraintsView = new HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint>();
    61             this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
    62             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
    63             this.splitContainer1.Panel1.SuspendLayout();
    64             this.splitContainer1.Panel2.SuspendLayout();
    65             this.splitContainer1.SuspendLayout();
    66             this.groupBox1.SuspendLayout();
     60            this.shapeConstraintsView = new HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint>();
     61            this.toolTip = new System.Windows.Forms.ToolTip(this.components);
     62            ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     63            this.splitContainer.Panel1.SuspendLayout();
     64            this.splitContainer.Panel2.SuspendLayout();
     65            this.splitContainer.SuspendLayout();
     66            this.groupBox.SuspendLayout();
    6767            this.SuspendLayout();
    6868            //
    6969            // splitContainer1
    7070            //
    71             this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
    72             this.splitContainer1.Location = new System.Drawing.Point(0, 0);
    73             this.splitContainer1.Name = "splitContainer1";
     71            this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     72            this.splitContainer.Location = new System.Drawing.Point(0, 0);
     73            this.splitContainer.Name = "splitContainer1";
    7474            //
    7575            // splitContainer1.Panel1
    7676            //
    77             this.splitContainer1.Panel1.Controls.Add(this.groupBox1);
     77            this.splitContainer.Panel1.Controls.Add(this.groupBox);
    7878            //
    7979            // splitContainer1.Panel2
    8080            //
    81             this.splitContainer1.Panel2.Controls.Add(this.intervalConstraintsView);
    82             this.splitContainer1.Size = new System.Drawing.Size(888, 629);
    83             this.splitContainer1.SplitterDistance = 296;
    84             this.splitContainer1.TabIndex = 0;
     81            this.splitContainer.Panel2.Controls.Add(this.shapeConstraintsView);
     82            this.splitContainer.Size = new System.Drawing.Size(888, 629);
     83            this.splitContainer.SplitterDistance = 296;
     84            this.splitContainer.TabIndex = 0;
    8585            //
    8686            // groupBox1
    8787            //
    88             this.groupBox1.Controls.Add(this.constraintsInput);
    89             this.groupBox1.Controls.Add(this.parseBtn);
    90             this.groupBox1.Controls.Add(this.label1);
    91             this.groupBox1.Controls.Add(this.errorOutput);
    92             this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
    93             this.groupBox1.Location = new System.Drawing.Point(0, 0);
    94             this.groupBox1.Name = "groupBox1";
    95             this.groupBox1.Size = new System.Drawing.Size(296, 629);
    96             this.groupBox1.TabIndex = 3;
    97             this.groupBox1.TabStop = false;
    98             this.groupBox1.Text = "Constraints Input";
     88            this.groupBox.Controls.Add(this.constraintsInput);
     89            this.groupBox.Controls.Add(this.parseBtn);
     90            this.groupBox.Controls.Add(this.infoLabel);
     91            this.groupBox.Controls.Add(this.errorOutput);
     92            this.groupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     93            this.groupBox.Location = new System.Drawing.Point(0, 0);
     94            this.groupBox.Name = "groupBox1";
     95            this.groupBox.Size = new System.Drawing.Size(296, 629);
     96            this.groupBox.TabIndex = 3;
     97            this.groupBox.TabStop = false;
     98            this.groupBox.Text = "Constraints Input";
    9999            //
    100100            // constraintsInput
     
    123123            // label1
    124124            //
    125             this.label1.AutoSize = true;
    126             this.label1.Dock = System.Windows.Forms.DockStyle.Top;
    127             this.label1.Image = global::HeuristicLab.Problems.DataAnalysis.Views.Properties.Resources.VS2008ImageLibrary_Annotations_Information;
    128             this.label1.Location = new System.Drawing.Point(3, 16);
    129             this.label1.Name = "label1";
    130             this.label1.Size = new System.Drawing.Size(19, 13);
    131             this.label1.TabIndex = 4;
    132             this.label1.Text = "    ";
    133             this.toolTip1.SetToolTip(this.label1, "Double-click to open description.");
    134             this.label1.DoubleClick += new System.EventHandler(this.label1_DoubleClick);
     125            this.infoLabel.AutoSize = true;
     126            this.infoLabel.Dock = System.Windows.Forms.DockStyle.Top;
     127            this.infoLabel.Image = global::HeuristicLab.Problems.DataAnalysis.Views.Properties.Resources.VS2008ImageLibrary_Annotations_Information;
     128            this.infoLabel.Location = new System.Drawing.Point(3, 16);
     129            this.infoLabel.Name = "label1";
     130            this.infoLabel.Size = new System.Drawing.Size(19, 13);
     131            this.infoLabel.TabIndex = 4;
     132            this.infoLabel.Text = "    ";
     133            this.toolTip.SetToolTip(this.infoLabel, "Double-click to open description.");
     134            this.infoLabel.DoubleClick += new System.EventHandler(this.helpButton_DoubleClick);
    135135            //
    136136            // errorOutput
     
    148148            // intervalConstraintsView
    149149            //
    150             this.intervalConstraintsView.Dock = System.Windows.Forms.DockStyle.Fill;
    151             this.intervalConstraintsView.Location = new System.Drawing.Point(0, 0);
    152             this.intervalConstraintsView.Name = "intervalConstraintsView";
    153             this.intervalConstraintsView.Size = new System.Drawing.Size(588, 629);
    154             this.intervalConstraintsView.TabIndex = 2;
    155             this.intervalConstraintsView.TabStop = false;
     150            this.shapeConstraintsView.Dock = System.Windows.Forms.DockStyle.Fill;
     151            this.shapeConstraintsView.Location = new System.Drawing.Point(0, 0);
     152            this.shapeConstraintsView.Name = "intervalConstraintsView";
     153            this.shapeConstraintsView.Size = new System.Drawing.Size(588, 629);
     154            this.shapeConstraintsView.TabIndex = 2;
     155            this.shapeConstraintsView.TabStop = false;
    156156            //
    157157            // ShapeConstraintsView
     
    159159            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    160160            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    161             this.Controls.Add(this.splitContainer1);
     161            this.Controls.Add(this.splitContainer);
    162162            this.Name = "ShapeConstraintsView";
    163163            this.Size = new System.Drawing.Size(888, 629);
    164             this.splitContainer1.Panel1.ResumeLayout(false);
    165             this.splitContainer1.Panel2.ResumeLayout(false);
    166             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
    167             this.splitContainer1.ResumeLayout(false);
    168             this.groupBox1.ResumeLayout(false);
    169             this.groupBox1.PerformLayout();
     164            this.splitContainer.Panel1.ResumeLayout(false);
     165            this.splitContainer.Panel2.ResumeLayout(false);
     166            ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
     167            this.splitContainer.ResumeLayout(false);
     168            this.groupBox.ResumeLayout(false);
     169            this.groupBox.PerformLayout();
    170170            this.ResumeLayout(false);
    171171
     
    173173    #endregion
    174174
    175     private System.Windows.Forms.SplitContainer splitContainer1;
    176     private System.Windows.Forms.GroupBox groupBox1;
     175    private System.Windows.Forms.SplitContainer splitContainer;
     176    private System.Windows.Forms.GroupBox groupBox;
    177177    private System.Windows.Forms.Button parseBtn;
    178     private HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint> intervalConstraintsView;
    179     //private System.Windows.Forms.GroupBox intervalConstraintsView;
     178    private HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint> shapeConstraintsView;
    180179    private System.Windows.Forms.TextBox constraintsInput;
    181180    private Label errorOutput;
    182     private Label label1;
    183     protected ToolTip toolTip1;
     181    private Label infoLabel;
     182    protected ToolTip toolTip;
    184183    }
    185184}
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintsView.cs

    r17894 r17896  
    22
    33/* HeuristicLab
    4  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    55 *
    66 * This file is part of HeuristicLab.
     
    4848    protected override void OnContentChanged() {
    4949      base.OnContentChanged();
    50       this.intervalConstraintsView.Content = Content;
     50      this.shapeConstraintsView.Content = Content;
    5151      UpdateControl();
    5252    }
     
    8686        try {
    8787          var parsedConstraints = ShapeConstraintsParser.ParseConstraints(constraintsInput.Text);
    88           Content = parsedConstraints;
     88          Content.AddRange(parsedConstraints);
    8989          errorOutput.Text = "Constraints successfully parsed.";
    9090          errorOutput.ForeColor = Color.DarkGreen;
    91           //Catch the exception from the constraints parser and show it in the error dialog
    9291        } catch (ArgumentException ex) {
    93           Content.Clear();
    9492          errorOutput.Text = ex.Message.Replace("Parameter name", "@Line");
    9593          errorOutput.ForeColor = Color.DarkRed;
     94        } finally {
     95          suspendUpdates = false;
    9696        }
    97         suspendUpdates = false;
    98         UpdateControl();
    9997      } else {
    10098        errorOutput.Text = "No constraints were found!";
     
    107105        constraintsInput.Text = string.Empty;
    108106      } else {
    109         this.intervalConstraintsView.Content = Content;
    110         constraintsInput.Text = ToString(Content);
     107        var newText = ToString(Content);
     108        if (newText != constraintsInput.Text)
     109          constraintsInput.Text = newText;
    111110      }
    112111    }
     
    168167    }
    169168
    170     private void label1_DoubleClick(object sender, EventArgs e) {
    171       var infoText =
    172         "Within the text field you can define different types of shape constraints e.g. range constraints, monotonicity constraints, ..." +
    173         System.Environment.NewLine +
    174         "To define a model constraint: f in [0 .. 100], f is used for the selected target, the 'in' key word specifies the target in which the constraint should be, the interval is defined between square bracket." +
    175         System.Environment.NewLine +
    176         "The interval contains two bounds (lower and upper) this bounds are given as double values, to seperate both bounds from each other you can use (.., ;, ' ')" +
    177         System.Environment.NewLine +
    178         "To define monotonic or concave constraints you need to define the partial derivatives:" +
    179         System.Environment.NewLine +
    180         "∂f/∂x in [0 .. 1], therefore you have to define the partial fraction first, which can be done by using the \\partial symbol or 'd' followed by the target and the variable in the numerator and denominator respectively, after defining the fraction the interval is defined like in the model constraint." +
    181         System.Environment.NewLine +
    182         "To define constraints only on a specific range of the function you can define interval ranges" +
    183         System.Environment.NewLine +
    184         "f in [0 .. 100], x in [0 .. 1] the ranges are separated by commas and follow the same rules as before (giving the variable with the interval definition)" +
    185         System.Environment.NewLine + "To specify different weights on the constraints:" +
    186         System.Environment.NewLine + "f in [0 .. 100], x in [0 .. 1] weight: 2.0, you can add the keyword 'weight:' followed by a double value.";
    187 
    188       MessageBox.Show(infoText,"How to define shape constraints", MessageBoxButtons.OKCancel);
     169    private void helpButton_DoubleClick(object sender, EventArgs e) {
     170      using (InfoBox dialog = new InfoBox("Help for shape constraints",
     171        "HeuristicLab.Problems.DataAnalysis.Views.Resources.shapeConstraintsHelp.rtf",
     172        this)) {
     173        dialog.ShowDialog(this);
     174      }
    189175    }
    190176  }
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/Interval.cs

    r17887 r17896  
    2525using HEAL.Attic;
    2626using HeuristicLab.Common;
    27 using HeuristicLab.Core;
    2827
    2928namespace HeuristicLab.Problems.DataAnalysis {
     
    131130        return false;
    132131
    133       return (UpperBound.IsAlmost(other.UpperBound) || (double.IsNaN(UpperBound) && double.IsNaN(other.UpperBound)))
    134         && (LowerBound.IsAlmost(other.LowerBound) || (double.IsNaN(LowerBound) && double.IsNaN(other.LowerBound)));
     132      return (UpperBound==other.UpperBound || (double.IsNaN(UpperBound) && double.IsNaN(other.UpperBound)))
     133        && (LowerBound==other.LowerBound || (double.IsNaN(LowerBound) && double.IsNaN(other.LowerBound)));
    135134    }
    136135
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalCollection.cs

    r17893 r17896  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraint.cs

    r17891 r17896  
    22
    33/* HeuristicLab
    4  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    55 *
    66 * This file is part of HeuristicLab.
     
    3030  [Item("ShapeConstraint", "Constraint on the shape of a function e.g. monotonicity.")]
    3131  public sealed class ShapeConstraint : Item {
    32     // [Storable]
    33     // private string expression;
    34     //
    35     // public string Expression {
    36     //   get => expression;
    37     //   private set {
    38     //     if (expression == value)
    39     //       return;
    40     //     expression = value;
    41     //     OnChanged();
    42     //     OnToStringChanged();
    43     //   }
    44     // }
    45 
    46     // public string Definition => GetDefinitionString();
    47 
    4832    [Storable]
    4933    private string variable;
     
    5539          return;
    5640        variable = value;
     41        OnToStringChanged();
    5742        OnChanged();
    5843      }
    5944    }
    60 
    61     // [Storable]
    62     // private string target;
    63     //
    64     // public string Target {
    65     //   get => target;
    66     //   private set {
    67     //     if (target == value)
    68     //       return;
    69     //     target = value;
    70     //     OnChanged();
    71     //   }
    72     // }
    7345
    7446    public bool IsDerivative => NumberOfDerivations > 0;
     
    8557          return;
    8658        numberOfDerivations = value;
     59        OnToStringChanged();
    8760        OnChanged();
    8861      }
     
    9871          return;
    9972        interval = value;
     73        OnToStringChanged();
    10074        OnChanged();
    10175      }
    10276    }
    103 
    104     // [Storable]
    105     // private bool enabled;
    106     //
    107     // public bool Enabled {
    108     //   get => enabled;
    109     //   set {
    110     //     if (enabled == value)
    111     //       return;
    112     //     enabled = value;
    113     //     OnChanged();
    114     //   }
    115     // }
    11677
    11778    [Storable]
     
    12182      set {
    12283        if (regions != value) {
     84          if (regions != null) regions.Changed -= regions_Changed;
    12385          regions = value;
     86          if (regions != null) regions.Changed += regions_Changed;
     87          OnToStringChanged();
    12488          OnChanged();
    12589        }
    12690      }
    12791    }
     92
    12893
    12994    [Storable]
     
    13499        if (weight != value) {
    135100          weight = value;
     101          OnToStringChanged();
    136102          OnChanged();
    137103        }
     
    141107    [StorableConstructor]
    142108    private ShapeConstraint(StorableConstructorFlag _) : base(_) { }
     109
     110    [StorableHook(HookType.AfterDeserialization)]
     111    private void AfterDeserialization() {
     112      if (regions != null) regions.Changed += regions_Changed;
     113    }
    143114
    144115    // without derivation
     
    158129    public ShapeConstraint(string variable, int numberOfDerivations,
    159130                              Interval interval, IntervalCollection regions, double weight) {
    160       this.regions = regions;
    161       this.weight = weight;
    162       this.variable = variable;
    163       this.numberOfDerivations = numberOfDerivations;
    164       this.interval = interval;
    165       //this.enabled = enabled;
     131      Variable = variable;
     132      NumberOfDerivations = numberOfDerivations;
     133      Interval = interval;
     134      Regions = regions;
     135      Weight = weight;
    166136    }
    167137
     
    172142    private ShapeConstraint(ShapeConstraint original, Cloner cloner)
    173143      : base(original, cloner) {
    174       Regions = original.Regions;
    175144      Variable = original.Variable;
    176145      NumberOfDerivations = original.NumberOfDerivations;
    177146      Interval = original.Interval;
    178       //Enabled = original.Enabled;
     147      Regions = cloner.Clone(original.Regions);
     148      Weight = original.weight;
    179149    }
    180150
     
    188158
    189159
    190     // private string GetDefinitionString() {
    191     //   if (!IsDerivative) return "Target " + Variable;
    192     //
    193     //   var definition =
    194     //     $"∂{GetDerivationString(numberOfDerivations)}Target/∂{Variable}{GetDerivationString(numberOfDerivations)}";
    195     //   return definition;
    196     // }
     160    private void regions_Changed(object sender, EventArgs e) {
     161      OnToStringChanged();
     162      OnChanged();
     163    }
    197164
    198165    public override string ToString() {
     
    231198          expression += $", {region.Key} in [{region.Value.LowerBound} .. {region.Value.UpperBound}]";
    232199      }
    233       if(Weight != 1.0) {
     200      if (Weight != 1.0) {
    234201        expression += $" weight: {weight}";
    235202      }
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraintsParser.cs

    r17891 r17896  
    22
    33/* HeuristicLab
    4  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    55 *
    66 * This file is part of HeuristicLab.
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ShapeConstraints.cs

    r17891 r17896  
    22
    33/* HeuristicLab
    4  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    55 *
    66 * This file is part of HeuristicLab.
     
    3333  [Item("ShapeConstraints", "Represents shape constraints associated with a regression problem data e.g. monotonicity constraints.")]
    3434  public class ShapeConstraints : CheckedItemList<ShapeConstraint> {
    35     // private static readonly string exampleInput = "# Example for a target variable constraint:" + Environment.NewLine +
    36     //                                               "f in [0 .. 100]" + Environment.NewLine + Environment.NewLine +
    37     //                                               "# Example for constraints on model parameters: " + Environment.NewLine +
    38     //                                               "df/d'x' in [0 .. 10]" + Environment.NewLine +
    39     //                                               "∂²f/∂'x'² in [-1 .. inf.]";
    40     //
    41     // [Storable]
    42     // private string input;
    43 
    44     // public string Input {
    45     //   get => input;
    46     //   set {
    47     //     if (input == value) return;
    48     //     input = value;
    49     //     OnChanged();
    50     //   }
    51     // }
    52 
    53     // [Storable]
    54     // private string infoText;
    55 
    56     // public string InfoText {
    57     //   get => infoText;
    58     //   set {
    59     //     if (infoText == value) return;
    60     //     infoText = value;
    61     //     OnChanged();
    62     //   }
    63     // }
    64     //
    65     // [Storable]
    66     // private Color infoColor;
    67     //
    68     // public Color InfoColor {
    69     //   get => infoColor;
    70     //   set {
    71     //     if (infoColor == value) return;
    72     //     infoColor = value;
    73     //     OnChanged();
    74     //   }
    75     // }
    76 
    77     // [Storable]
    78     // private IEnumerable<IntervalConstraint> constraints;
    79 
    80     // public IEnumerable<IntervalConstraint> Constraints {
    81     //   get => constraints;
    82     //   set {
    83     //     if (constraints == value) return;
    84     //     constraints = value.ToList();
    85     //     OnChanged();
    86     //   }
    87     // }
    88 
    8935    public IEnumerable<ShapeConstraint> EnabledConstraints => base.CheckedItems.Select(checkedItem => checkedItem.Value);
    9036
     
    11561    }
    11662
    117     // [Storable]
    118     // public IRegressionProblemData ProblemData { get; private set; }
    119 
    12063    [StorableConstructor]
    12164    protected ShapeConstraints(StorableConstructorFlag _) : base(_) { }
     
    12366    protected ShapeConstraints(ShapeConstraints original, Cloner cloner)
    12467      : base(original, cloner) {
    125       // Input = original.Input;
    126       // InfoText = original.InfoText;
    127       // infoColor = original.InfoColor;
    128       // constraints = original.Constraints.Select(cloner.Clone).ToList();
    129       // ProblemData = cloner.Clone(original.ProblemData);
    13068    }
    13169
     
    13472    }
    13573
    136     public ShapeConstraints() {
    137       // Input = exampleInput;
    138       // InfoText = "";
    139       // InfoColor = Color.DarkOrange;
    140       // constraints = new List<IntervalConstraint>();
    141       // ProblemData = null;
     74    public ShapeConstraints() : base() {
    14275    }
    143 
    144     // public ShapeConstraints(IRegressionProblemData problemData) {
    145     //   Input = exampleInput;
    146     //   InfoText = infoText;
    147     //   InfoColor = InfoColor;
    148     //   constraints = new List<IntervalConstraint>();
    149     //   ProblemData = problemData;
    150     // }
    15176
    15277    public event EventHandler Changed;
  • branches/3073_IA_constraint_splitting_reintegration/Tests/ShapeConstraintsParserTest.cs

    r17893 r17896  
    1 using Microsoft.VisualStudio.TestTools.UnitTesting;
    2 using System;
     1#region License Information
     2
     3/* HeuristicLab
     4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     5 *
     6 * This file is part of HeuristicLab.
     7 *
     8 * HeuristicLab is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * HeuristicLab is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
     22#endregion
     23
     24using Microsoft.VisualStudio.TestTools.UnitTesting;
    325using HeuristicLab.Problems.DataAnalysis;
    426using System.Globalization;
Note: See TracChangeset for help on using the changeset viewer.