Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/13/12 13:13:00 (12 years ago)
Author:
jkarder
Message:

#1247: integrated branch into trunk

Location:
trunk/sources/HeuristicLab.Optimization.Operators/3.3
Files:
1 edited
1 copied

Legend:

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

    r8640 r8642  
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    30 namespace HeuristicLab.Algorithms.RAPGA {
     30namespace HeuristicLab.Optimization.Operators {
    3131  /// <summary>
    3232  /// An operator that evaluates an expression.
    3333  /// </summary>
    34   [Item("Calculator", "An operator that evaluates an expression.")]
     34  [Item("ExpressionCalculator", "An operator that evaluates an expression.")]
    3535  [StorableClass]
    36   public class Calculator : ValuesCollector {
     36  public class ExpressionCalculator : ValuesCollector {
    3737    [Storable]
    38     public Optimization.Calculator Calc { get; set; }
     38    public Calculator Calculator { get; set; }
    3939
    4040    #region Parameter Properties
     
    5757
    5858    [StorableConstructor]
    59     protected Calculator(bool deserializing) : base(deserializing) { }
    60     protected Calculator(Calculator original, Cloner cloner)
     59    protected ExpressionCalculator(bool deserializing) : base(deserializing) { }
     60    protected ExpressionCalculator(ExpressionCalculator original, Cloner cloner)
    6161      : base(original, cloner) {
    62       this.Calc = cloner.Clone(original.Calc);
     62      this.Calculator = cloner.Clone(original.Calculator);
    6363    }
    64     public Calculator()
     64    public ExpressionCalculator()
    6565      : base() {
    6666      Parameters.Add(new ValueLookupParameter<IItem>("ExpressionResult", "The result of the evaluated expression."));
     
    7575  unquoted or in double quotes if they contain special characters or whitespace
    7676mathematical functions:
    77   +, -, /, ^ (power), log
     77  +, -, *, /, ^ (power), log
    7878predicates:
    7979  ==, <, >, isnull, not
     
    8989If the final value is null, the result variable is removed if it exists."));
    9090
    91       Calc = new Optimization.Calculator();
     91      Calculator = new Calculator();
    9292    }
    9393
    9494    public override IDeepCloneable Clone(Cloner cloner) {
    95       return new Calculator(this, cloner);
     95      return new ExpressionCalculator(this, cloner);
    9696    }
    9797
    9898    public override IOperation Apply() {
    99       Calc.Formula = Formula;
     99      Calculator.Formula = Formula;
    100100      var variables = new Dictionary<string, IItem>();
    101101      foreach (var collectedValue in CollectedValues)
    102102        variables[collectedValue.Name] = collectedValue.ActualValue;
    103       ExpressionResult = Calc.GetValue(variables);
     103      ExpressionResult = Calculator.GetValue(variables);
    104104      return base.Apply();
    105105    }
  • trunk/sources/HeuristicLab.Optimization.Operators/3.3/HeuristicLab.Optimization.Operators-3.3.csproj

    r8630 r8642  
    109109  </ItemGroup>
    110110  <ItemGroup>
     111    <Compile Include="ExpressionCalculator.cs" />
    111112    <Compile Include="NoSimilarityCalculator.cs" />
    112113    <Compile Include="QualitySimilarityCalculator.cs" />
Note: See TracChangeset for help on using the changeset viewer.