Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/29/12 09:22:21 (12 years ago)
Author:
jkarder
Message:

#1853:

  • enhanced combinations count calculation
  • restructured code
  • minor code improvements
  • added license information
Location:
branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding/3.3/SymbolicExpressionGrammar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding/3.3/SymbolicExpressionGrammar/SymbolValueConfiguration.cs

    r8517 r8535  
    4343    [StorableConstructor]
    4444    protected SymbolValueConfiguration(bool deserializing) : base(deserializing) { }
     45    protected SymbolValueConfiguration(SymbolValueConfiguration original, Cloner cloner)
     46      : base(original, cloner) {
     47      RegisterInitialFrequencyEvents();
     48      this.parentOptimizable = cloner.Clone(original.parentOptimizable);
     49    }
    4550    public SymbolValueConfiguration(Symbol symbol)
    4651      : base() {
     
    5055      this.ActualValue = new ConstrainedValue(symbol, symbol.GetType(), new ItemSet<IItem> { symbol }, false);
    5156    }
    52     protected SymbolValueConfiguration(SymbolValueConfiguration original, Cloner cloner)
    53       : base(original, cloner) {
     57    [StorableHook(HookType.AfterDeserialization)]
     58    private void AfterDeserialization() {
    5459      RegisterInitialFrequencyEvents();
    55       this.parentOptimizable = cloner.Clone(original.parentOptimizable);
    5660    }
    5761    public override IDeepCloneable Clone(Cloner cloner) {
    5862      return new SymbolValueConfiguration(this, cloner);
    59     }
    60     [StorableHook(HookType.AfterDeserialization)]
    61     private void AfterDeserialization() {
    62       RegisterInitialFrequencyEvents();
    6363    }
    6464    #endregion
  • branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding/3.3/SymbolicExpressionGrammar/SymbolicExpressionGrammarValueConfiguration.cs

    r8517 r8535  
    2929  [StorableClass]
    3030  public class SymbolicExpressionGrammarValueConfiguration : ParameterizedValueConfiguration {
    31 
    3231    #region Constructors and Cloning
    3332    [StorableConstructor]
    3433    protected SymbolicExpressionGrammarValueConfiguration(bool deserializing) : base(deserializing) { }
     34    protected SymbolicExpressionGrammarValueConfiguration(SymbolicExpressionGrammarValueConfiguration original, Cloner cloner) : base(original, cloner) { }
    3535    public SymbolicExpressionGrammarValueConfiguration() : base() { }
    36     public SymbolicExpressionGrammarValueConfiguration(ISymbolicExpressionGrammar grammar) {
     36    public SymbolicExpressionGrammarValueConfiguration(ISymbolicExpressionGrammar grammar)
     37      : base() {
    3738      this.IsOptimizable = true;
    3839      this.ActualValue = new ConstrainedValue(grammar, grammar.GetType(), new ItemSet<IItem> { grammar }, false);
    39     }
    40     protected SymbolicExpressionGrammarValueConfiguration(SymbolicExpressionGrammarValueConfiguration original, Cloner cloner)
    41       : base(original, cloner) {
    4240    }
    4341    public override IDeepCloneable Clone(Cloner cloner) {
Note: See TracChangeset for help on using the changeset viewer.