Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/23/15 15:20:34 (9 years ago)
Author:
mkommend
Message:

#2320: Fixed analyzers and parameter typo in symbolic expression tree encoding.

Location:
branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthAnalyzer.cs

    r12012 r12334  
    5151      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
    5252    }
     53
     54    public ILookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
     55      get { return (ILookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
     56    }
    5357    public ValueLookupParameter<DataTable> SymbolicExpressionTreeLengthsParameter {
    5458      get { return (ValueLookupParameter<DataTable>)Parameters[SymbolicExpressionTreeLengthsParameterName]; }
     
    178182        }
    179183
    180         double maximumAllowedTreeLength = ((LookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]).ActualValue.Value;
     184        double maximumAllowedTreeLength = MaximumSymbolicExpressionTreeLengthParameter.ActualValue.Value;
    181185
    182186        treeLengthsTableRow.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram;
  • branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeEncoding.cs

    r12319 r12334  
    157157    #endregion
    158158
    159 
    160159    [StorableConstructor]
    161160    private SymbolicExpressionTreeEncoding(bool deserializing) : base(deserializing) { }
     
    164163    public SymbolicExpressionTreeEncoding(string name, ISymbolicExpressionGrammar grammar, int maximumLength, int maximumDepth)
    165164      : base(name) {
    166       treeLengthParameter = new FixedValueParameter<IntValue>("Maximium Tree Length", "Maximal length of the symbolic expression.", new IntValue(maximumLength));
     165      treeLengthParameter = new FixedValueParameter<IntValue>("Maximum Tree Length", "Maximal length of the symbolic expression.", new IntValue(maximumLength));
    167166      treeDepthParameter = new FixedValueParameter<IntValue>("Maximum Tree Depth", "Maximal depth of the symbolic expression. The minimum depth needed for the algorithm is 3 because two levels are reserved for the ProgramRoot and the Start symbol.", new IntValue(maximumDepth));
    168167      grammarParameter = new ValueParameter<ISymbolicExpressionGrammar>("Grammar", "The grammar that should be used for symbolic expression tree.", grammar);
     
    326325        analyzer.SymbolicExpressionTreeParameter.ActualName = Name;
    327326      }
     327      foreach (var analyzer in analyzers.OfType<SymbolicExpressionTreeLengthAnalyzer>()) {
     328        analyzer.MaximumSymbolicExpressionTreeLengthParameter.ActualName = TreeLengthParameter.Name;
     329      }
    328330    }
    329331
Note: See TracChangeset for help on using the changeset viewer.