Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/19 00:23:12 (5 years ago)
Author:
mkommend
Message:

#2520: Merged 16584, 16585,16594,16595, 16625, 16658, 16659, 16672, 16707, 16729, 16792, 16796, 16797, 16799, 16819, 16906, 16907, 16908, 16933, 16945, 16992, 16994, 16995, 16996, 16997, 17014, 17015, 17017, 17020, 17021, 17022, 17023, 17024, 17029, 17086, 17087, 17088, 17089 into stable.

Location:
stable
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding

  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionGrammarBase.cs

    r17097 r17105  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
    27 using HEAL.Attic;
    2828
    2929namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
     
    3838
    3939    #region properties for separation between implementation and persistence
     40    private IEnumerable<ISymbol> storableSymbols;
    4041    [Storable(Name = "Symbols")]
    4142    private IEnumerable<ISymbol> StorableSymbols {
    4243      get { return symbols.Values.ToArray(); }
    43       set { foreach (var s in value) symbols.Add(s.Name, s); }
    44     }
    45 
     44      set { storableSymbols = value; }
     45    }
     46
     47    private IEnumerable<KeyValuePair<ISymbol, Tuple<int, int>>> storableSymbolSubtreeCount;
    4648    [Storable(Name = "SymbolSubtreeCount")]
    4749    private IEnumerable<KeyValuePair<ISymbol, Tuple<int, int>>> StorableSymbolSubtreeCount {
    4850      get { return symbolSubtreeCount.Select(x => new KeyValuePair<ISymbol, Tuple<int, int>>(GetSymbol(x.Key), x.Value)).ToArray(); }
    49       set { foreach (var pair in value) symbolSubtreeCount.Add(pair.Key.Name, pair.Value); }
    50     }
    51 
     51      set { storableSymbolSubtreeCount = value; }
     52    }
     53
     54    private IEnumerable<KeyValuePair<ISymbol, IEnumerable<ISymbol>>> storableAllowedChildSymbols;
    5255    [Storable(Name = "AllowedChildSymbols")]
    5356    private IEnumerable<KeyValuePair<ISymbol, IEnumerable<ISymbol>>> StorableAllowedChildSymbols {
    5457      get { return allowedChildSymbols.Select(x => new KeyValuePair<ISymbol, IEnumerable<ISymbol>>(GetSymbol(x.Key), x.Value.Select(GetSymbol).ToArray())).ToArray(); }
    55       set { foreach (var pair in value) allowedChildSymbols.Add(pair.Key.Name, pair.Value.Select(y => y.Name).ToList()); }
    56     }
    57 
     58      set { storableAllowedChildSymbols = value; }
     59    }
     60
     61    private IEnumerable<KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>> storableAllowedChildSymbolsPerIndex;
    5862    [Storable(Name = "AllowedChildSymbolsPerIndex")]
    5963    private IEnumerable<KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>> StorableAllowedChildSymbolsPerIndex {
    6064      get { return allowedChildSymbolsPerIndex.Select(x => new KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>(Tuple.Create(GetSymbol(x.Key.Item1), x.Key.Item2), x.Value.Select(GetSymbol).ToArray())).ToArray(); }
    61       set {
    62         foreach (var pair in value)
    63           allowedChildSymbolsPerIndex.Add(Tuple.Create(pair.Key.Item1.Name, pair.Key.Item2), pair.Value.Select(y => y.Name).ToList());
    64       }
     65      set { storableAllowedChildSymbolsPerIndex = value; }
    6566    }
    6667    #endregion
     
    8889
    8990      suppressEvents = false;
     91    }
     92
     93    [StorableHook(HookType.AfterDeserialization)]
     94    private void AfterDeserialization() {
     95      foreach (var s in storableSymbols) symbols.Add(s.Name, s);
     96      foreach (var pair in storableSymbolSubtreeCount) symbolSubtreeCount.Add(pair.Key.Name, pair.Value);
     97      foreach (var pair in storableAllowedChildSymbols) allowedChildSymbols.Add(pair.Key.Name, pair.Value.Select(y => y.Name).ToList());
     98      foreach (var pair in storableAllowedChildSymbolsPerIndex)
     99        allowedChildSymbolsPerIndex.Add(Tuple.Create(pair.Key.Item1.Name, pair.Key.Item2), pair.Value.Select(y => y.Name).ToList());
     100
     101      storableSymbols = null;
     102      storableSymbolSubtreeCount = null;
     103      storableAllowedChildSymbols = null;
     104      storableAllowedChildSymbolsPerIndex = null;
    90105    }
    91106
  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj

    r17097 r17105  
    100100  </PropertyGroup>
    101101  <ItemGroup>
    102     <Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
    103       <HintPath>..\..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
    104     </Reference>
    105     <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    106       <HintPath>..\..\packages\HEAL.Attic.1.0.0-pre02\lib\net461\HEAL.Attic.dll</HintPath>
    107     </Reference>
    108102    <Reference Include="System" />
    109103    <Reference Include="System.Core">
     
    111105    </Reference>
    112106    <Reference Include="System.Drawing" />
    113     <Reference Include="System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
    114       <HintPath>..\..\packages\System.Drawing.Common.4.5.1\lib\net461\System.Drawing.Common.dll</HintPath>
    115     </Reference>
    116107    <Reference Include="System.Xml.Linq">
    117108      <RequiredTargetFramework>3.5</RequiredTargetFramework>
     
    215206  <ItemGroup>
    216207    <None Include="HeuristicLab.snk" />
    217     <None Include="packages.config" />
    218208    <None Include="Plugin.cs.frame" />
    219209    <None Include="Properties\AssemblyInfo.cs.frame" />
     
    302292      <Install>true</Install>
    303293    </BootstrapperPackage>
     294  </ItemGroup>
     295  <ItemGroup>
     296    <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     297      <SpecificVersion>False</SpecificVersion>
     298      <HintPath>..\..\bin\HEAL.Attic.dll</HintPath>
     299      <Private>False</Private>
     300    </Reference>
    304301  </ItemGroup>
    305302  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame

    r17097 r17105  
    3737  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    3838  [PluginDependency("HeuristicLab.Parameters", "3.3")]
    39   [PluginDependency("HeuristicLab.Persistence", "3.3")]
     39  [PluginDependency("HeuristicLab.Attic", "1.0")]
    4040  [PluginDependency("HeuristicLab.Random", "3.3")]
    4141  public class HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin : PluginBase {
Note: See TracChangeset for help on using the changeset viewer.