Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/10 23:49:54 (14 years ago)
Author:
swagner
Message:

Renamed classes of HeuristicLab.Data (#909)

Location:
trunk/sources/HeuristicLab.Operators/3.3
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators/3.3/Comparator.cs

    r3017 r3048  
    4040      get { return (ValueLookupParameter<IItem>)Parameters["RightSide"]; }
    4141    }
    42     private ValueParameter<ComparisonData> ComparisonParameter {
    43       get { return (ValueParameter<ComparisonData>)Parameters["Comparison"]; }
     42    private ValueParameter<Comparison> ComparisonParameter {
     43      get { return (ValueParameter<Comparison>)Parameters["Comparison"]; }
    4444    }
    45     public LookupParameter<BoolData> ResultParameter {
    46       get { return (LookupParameter<BoolData>)Parameters["Result"]; }
     45    public LookupParameter<BoolValue> ResultParameter {
     46      get { return (LookupParameter<BoolValue>)Parameters["Result"]; }
    4747    }
    48     public ComparisonData Comparison {
     48    public Comparison Comparison {
    4949      get { return ComparisonParameter.Value; }
    5050      set { ComparisonParameter.Value = value; }
     
    5555      Parameters.Add(new LookupParameter<IItem>("LeftSide", "The left side of the comparison."));
    5656      Parameters.Add(new ValueLookupParameter<IItem>("RightSide", "The right side of the comparison."));
    57       Parameters.Add(new ValueParameter<ComparisonData>("Comparison", "The type of comparison.", new ComparisonData(Data.Comparison.Equal)));
    58       Parameters.Add(new LookupParameter<BoolData>("Result", "The result of the comparison."));
     57      Parameters.Add(new ValueParameter<Comparison>("Comparison", "The type of comparison.", new Comparison(Data.ComparisonType.Equal)));
     58      Parameters.Add(new LookupParameter<BoolValue>("Result", "The result of the comparison."));
    5959    }
    6060
     
    6868      bool b = false;
    6969      switch (Comparison.Value) {
    70         case HeuristicLab.Data.Comparison.Less:
     70        case HeuristicLab.Data.ComparisonType.Less:
    7171          b = i < 0; break;
    72         case HeuristicLab.Data.Comparison.LessOrEqual:
     72        case HeuristicLab.Data.ComparisonType.LessOrEqual:
    7373          b = i <= 0; break;
    74         case HeuristicLab.Data.Comparison.Equal:
     74        case HeuristicLab.Data.ComparisonType.Equal:
    7575          b = i == 0; break;
    76         case HeuristicLab.Data.Comparison.GreaterOrEqual:
     76        case HeuristicLab.Data.ComparisonType.GreaterOrEqual:
    7777          b = i >= 0; break;
    78         case HeuristicLab.Data.Comparison.Greater:
     78        case HeuristicLab.Data.ComparisonType.Greater:
    7979          b = i > 0; break;
    80         case HeuristicLab.Data.Comparison.NotEqual:
     80        case HeuristicLab.Data.ComparisonType.NotEqual:
    8181          b = i != 0; break;
    8282      }
    83       ResultParameter.ActualValue = new BoolData(b);
     83      ResultParameter.ActualValue = new BoolValue(b);
    8484      return base.Apply();
    8585    }
  • trunk/sources/HeuristicLab.Operators/3.3/ConditionalBranch.cs

    r3017 r3048  
    3333  [StorableClass]
    3434  public class ConditionalBranch : SingleSuccessorOperator {
    35     public LookupParameter<BoolData> ConditionParameter {
    36       get { return (LookupParameter<BoolData>)Parameters["Condition"]; }
     35    public LookupParameter<BoolValue> ConditionParameter {
     36      get { return (LookupParameter<BoolValue>)Parameters["Condition"]; }
    3737    }
    3838    protected OperatorParameter TrueBranchParameter {
     
    5353    public ConditionalBranch()
    5454      : base() {
    55       Parameters.Add(new LookupParameter<BoolData>("Condition", "A boolean variable which defines which branch is executed."));
     55      Parameters.Add(new LookupParameter<BoolValue>("Condition", "A boolean variable which defines which branch is executed."));
    5656      Parameters.Add(new OperatorParameter("TrueBranch", "The operator which is executed if the condition is true."));
    5757      Parameters.Add(new OperatorParameter("FalseBranch", "The operator which is executed if the condition is false."));
  • trunk/sources/HeuristicLab.Operators/3.3/DoubleCounter.cs

    r3017 r3048  
    3333  [Creatable("Test")]
    3434  public sealed class DoubleCounter : SingleSuccessorOperator {
    35     public LookupParameter<DoubleData> ValueParameter {
    36       get { return (LookupParameter<DoubleData>)Parameters["Value"]; }
     35    public LookupParameter<DoubleValue> ValueParameter {
     36      get { return (LookupParameter<DoubleValue>)Parameters["Value"]; }
    3737    }
    38     public ValueLookupParameter<DoubleData> IncrementParameter {
    39       get { return (ValueLookupParameter<DoubleData>)Parameters["Increment"]; }
     38    public ValueLookupParameter<DoubleValue> IncrementParameter {
     39      get { return (ValueLookupParameter<DoubleValue>)Parameters["Increment"]; }
    4040    }
    41     public DoubleData Increment {
     41    public DoubleValue Increment {
    4242      get { return IncrementParameter.Value; }
    4343      set { IncrementParameter.Value = value; }
     
    4646    public DoubleCounter()
    4747      : base() {
    48       Parameters.Add(new LookupParameter<DoubleData>("Value", "The value which should be incremented."));
    49       Parameters.Add(new ValueLookupParameter<DoubleData>("Increment", "The increment which is added to the value.", new DoubleData(1)));
     48      Parameters.Add(new LookupParameter<DoubleValue>("Value", "The value which should be incremented."));
     49      Parameters.Add(new ValueLookupParameter<DoubleValue>("Increment", "The increment which is added to the value.", new DoubleValue(1)));
    5050    }
    5151
    5252    public override IOperation Apply() {
    53       if (ValueParameter.ActualValue == null) ValueParameter.ActualValue = new DoubleData();
     53      if (ValueParameter.ActualValue == null) ValueParameter.ActualValue = new DoubleValue();
    5454      ValueParameter.ActualValue.Value += IncrementParameter.ActualValue.Value;
    5555      return base.Apply();
  • trunk/sources/HeuristicLab.Operators/3.3/IntCounter.cs

    r3017 r3048  
    3333  [Creatable("Test")]
    3434  public sealed class IntCounter : SingleSuccessorOperator {
    35     public LookupParameter<IntData> ValueParameter {
    36       get { return (LookupParameter<IntData>)Parameters["Value"]; }
     35    public LookupParameter<IntValue> ValueParameter {
     36      get { return (LookupParameter<IntValue>)Parameters["Value"]; }
    3737    }
    38     public ValueLookupParameter<IntData> IncrementParameter {
    39       get { return (ValueLookupParameter<IntData>)Parameters["Increment"]; }
     38    public ValueLookupParameter<IntValue> IncrementParameter {
     39      get { return (ValueLookupParameter<IntValue>)Parameters["Increment"]; }
    4040    }
    41     public IntData Increment {
     41    public IntValue Increment {
    4242      get { return IncrementParameter.Value; }
    4343      set { IncrementParameter.Value = value; }
     
    4646    public IntCounter()
    4747      : base() {
    48       Parameters.Add(new LookupParameter<IntData>("Value", "The value which should be incremented."));
    49       Parameters.Add(new ValueLookupParameter<IntData>("Increment", "The increment which is added to the value.", new IntData(1)));
     48      Parameters.Add(new LookupParameter<IntValue>("Value", "The value which should be incremented."));
     49      Parameters.Add(new ValueLookupParameter<IntValue>("Increment", "The increment which is added to the value.", new IntValue(1)));
    5050    }
    5151
    5252    public override IOperation Apply() {
    53       if (ValueParameter.ActualValue == null) ValueParameter.ActualValue = new IntData();
     53      if (ValueParameter.ActualValue == null) ValueParameter.ActualValue = new IntValue();
    5454      ValueParameter.ActualValue.Value += IncrementParameter.ActualValue.Value;
    5555      return base.Apply();
  • trunk/sources/HeuristicLab.Operators/3.3/StochasticBranch.cs

    r3017 r3048  
    3636      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3737    }
    38     public ValueLookupParameter<DoubleData> ProbabilityParameter {
    39       get { return (ValueLookupParameter<DoubleData>)Parameters["Probability"]; }
     38    public ValueLookupParameter<DoubleValue> ProbabilityParameter {
     39      get { return (ValueLookupParameter<DoubleValue>)Parameters["Probability"]; }
    4040    }
    4141    protected OperatorParameter FirstBranchParameter {
     
    5757      : base() {
    5858      Parameters.Add(new LookupParameter<IRandom>("Random", "A pseudo random number generator."));
    59       Parameters.Add(new ValueLookupParameter<DoubleData>("Probability", "The probability to execute the first branch."));
     59      Parameters.Add(new ValueLookupParameter<DoubleValue>("Probability", "The probability to execute the first branch."));
    6060      Parameters.Add(new OperatorParameter("FirstBranch", "The operator which is executed with the given probability."));
    6161      Parameters.Add(new OperatorParameter("SecondBranch", "The operator which is executed if the first branch is not executed."));
  • trunk/sources/HeuristicLab.Operators/3.3/SubScopesCreator.cs

    r3017 r3048  
    3333  [Creatable("Test")]
    3434  public class SubScopesCreator : SingleSuccessorOperator {
    35     public ValueLookupParameter<IntData> NumberOfSubScopesParameter {
    36       get { return (ValueLookupParameter<IntData>)Parameters["NumberOfSubScopes"]; }
     35    public ValueLookupParameter<IntValue> NumberOfSubScopesParameter {
     36      get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfSubScopes"]; }
    3737    }
    3838    protected ScopeParameter CurrentScopeParameter {
     
    4545    public SubScopesCreator()
    4646      : base() {
    47       Parameters.Add(new ValueLookupParameter<IntData>("NumberOfSubScopes", "The number of new and empty sub-scopes which should be added to the current scope."));
     47      Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfSubScopes", "The number of new and empty sub-scopes which should be added to the current scope."));
    4848      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope to which the new and empty sub-scopes are added."));
    4949    }
  • trunk/sources/HeuristicLab.Operators/3.3/SubScopesRemover.cs

    r3017 r3048  
    3333  [Creatable("Test")]
    3434  public sealed class SubScopesRemover : SingleSuccessorOperator {
    35     private ValueParameter<BoolData> RemoveAllSubScopesParameter {
    36       get { return (ValueParameter<BoolData>)Parameters["RemoveAllSubScopes"]; }
     35    private ValueParameter<BoolValue> RemoveAllSubScopesParameter {
     36      get { return (ValueParameter<BoolValue>)Parameters["RemoveAllSubScopes"]; }
    3737    }
    38     public ValueLookupParameter<IntData> SubScopeIndexParameter {
    39       get { return (ValueLookupParameter<IntData>)Parameters["SubScopeIndex"]; }
     38    public ValueLookupParameter<IntValue> SubScopeIndexParameter {
     39      get { return (ValueLookupParameter<IntValue>)Parameters["SubScopeIndex"]; }
    4040    }
    4141    private ScopeParameter CurrentScopeParameter {
     
    5353    public SubScopesRemover()
    5454      : base() {
    55       Parameters.Add(new ValueParameter<BoolData>("RemoveAllSubScopes", "True if all sub-scopes of the current scope should be removed, otherwise false.", new BoolData(true)));
    56       Parameters.Add(new ValueLookupParameter<IntData>("SubScopeIndex", "The index of the sub-scope which should be removed. This parameter is ignored, if RemoveAllSubScopes is true."));
     55      Parameters.Add(new ValueParameter<BoolValue>("RemoveAllSubScopes", "True if all sub-scopes of the current scope should be removed, otherwise false.", new BoolValue(true)));
     56      Parameters.Add(new ValueLookupParameter<IntValue>("SubScopeIndex", "The index of the sub-scope which should be removed. This parameter is ignored, if RemoveAllSubScopes is true."));
    5757      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope from which one or all sub-scopes should be removed."));
    5858    }
  • trunk/sources/HeuristicLab.Operators/3.3/SubScopesSorter.cs

    r3017 r3048  
    3636    private string actualName;
    3737
    38     public SubScopesLookupParameter<DoubleData> ValueParameter {
    39       get { return (SubScopesLookupParameter<DoubleData>)Parameters["Value"]; }
     38    public SubScopesLookupParameter<DoubleValue> ValueParameter {
     39      get { return (SubScopesLookupParameter<DoubleValue>)Parameters["Value"]; }
    4040    }
    41     public ValueLookupParameter<BoolData> DescendingParameter {
    42       get { return (ValueLookupParameter<BoolData>)Parameters["Descending"]; }
     41    public ValueLookupParameter<BoolValue> DescendingParameter {
     42      get { return (ValueLookupParameter<BoolValue>)Parameters["Descending"]; }
    4343    }
    4444    private ScopeParameter CurrentScopeParameter {
     
    5151    public SubScopesSorter()
    5252      : base() {
    53       Parameters.Add(new SubScopesLookupParameter<DoubleData>("Value", "The values contained in each sub-scope acording which the sub-scopes of the current scope are sorted."));
    54       Parameters.Add(new ValueLookupParameter<BoolData>("Descending", "True if the sub-scopes should be sorted in descending order, otherwise false."));
     53      Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Value", "The values contained in each sub-scope acording which the sub-scopes of the current scope are sorted."));
     54      Parameters.Add(new ValueLookupParameter<BoolValue>("Descending", "True if the sub-scopes should be sorted in descending order, otherwise false."));
    5555      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope whose sub-scopes are sorted."));
    5656    }
     
    5858    public override IOperation Apply() {
    5959      descending = DescendingParameter.ActualValue.Value;
    60       actualName = LookupParameter<ItemArray<DoubleData>>.TranslateName(ValueParameter.Name, ExecutionContext);
     60      actualName = LookupParameter<ItemArray<DoubleValue>>.TranslateName(ValueParameter.Name, ExecutionContext);
    6161      CurrentScope.SubScopes.Sort(SortScopes);
    6262      return base.Apply();
     
    7575        return -1;
    7676      else {
    77         int result = ((DoubleData)var1.Value).CompareTo((DoubleData)var2.Value);
     77        int result = ((DoubleValue)var1.Value).CompareTo((DoubleValue)var2.Value);
    7878        if (descending) result = result * -1;
    7979        return result;
Note: See TracChangeset for help on using the changeset viewer.