Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12737


Ignore:
Timestamp:
07/11/15 19:38:23 (9 years ago)
Author:
abeham
Message:

#2319: merged 12650,12701 to stable

Location:
stable
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab 3.3.sln

    r12733 r12737  
    7575    {3B90F866-70F8-43EF-A541-51819D255B7B} = {3B90F866-70F8-43EF-A541-51819D255B7B}
    7676    {07486E68-1517-4B9D-A58D-A38E99AE71AB} = {07486E68-1517-4B9D-A58D-A38E99AE71AB}
     77    {BE698769-975A-429E-828C-72BB2B6182C8} = {BE698769-975A-429E-828C-72BB2B6182C8}
    7778    {4AE3FC69-C575-42D2-BC46-0FAD5850EFC5} = {4AE3FC69-C575-42D2-BC46-0FAD5850EFC5}
    7879    {56F9106A-079F-4C61-92F6-86A84C2D84B7} = {56F9106A-079F-4C61-92F6-86A84C2D84B7}
     
    419420EndProject
    420421Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.CMAEvolutionStrategy-3.4", "HeuristicLab.Algorithms.CMAEvolutionStrategy\3.4\HeuristicLab.Algorithms.CMAEvolutionStrategy-3.4.csproj", "{291010E4-2F4E-4D29-A795-753CFF293FDB}"
     422EndProject
     423Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.LinearLinkageEncoding-3.3", "HeuristicLab.Encodings.LinearLinkageEncoding\3.3\HeuristicLab.Encodings.LinearLinkageEncoding-3.3.csproj", "{BE698769-975A-429E-828C-72BB2B6182C8}"
    421424EndProject
    422425Global
     
    20382041    {291010E4-2F4E-4D29-A795-753CFF293FDB}.Release|x86.ActiveCfg = Release|x86
    20392042    {291010E4-2F4E-4D29-A795-753CFF293FDB}.Release|x86.Build.0 = Release|x86
     2043    {BE698769-975A-429E-828C-72BB2B6182C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     2044    {BE698769-975A-429E-828C-72BB2B6182C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
     2045    {BE698769-975A-429E-828C-72BB2B6182C8}.Debug|x64.ActiveCfg = Debug|x64
     2046    {BE698769-975A-429E-828C-72BB2B6182C8}.Debug|x64.Build.0 = Debug|x64
     2047    {BE698769-975A-429E-828C-72BB2B6182C8}.Debug|x86.ActiveCfg = Debug|x86
     2048    {BE698769-975A-429E-828C-72BB2B6182C8}.Debug|x86.Build.0 = Debug|x86
     2049    {BE698769-975A-429E-828C-72BB2B6182C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
     2050    {BE698769-975A-429E-828C-72BB2B6182C8}.Release|Any CPU.Build.0 = Release|Any CPU
     2051    {BE698769-975A-429E-828C-72BB2B6182C8}.Release|x64.ActiveCfg = Release|x64
     2052    {BE698769-975A-429E-828C-72BB2B6182C8}.Release|x64.Build.0 = Release|x64
     2053    {BE698769-975A-429E-828C-72BB2B6182C8}.Release|x86.ActiveCfg = Release|x86
     2054    {BE698769-975A-429E-828C-72BB2B6182C8}.Release|x86.Build.0 = Release|x86
    20402055  EndGlobalSection
    20412056  GlobalSection(SolutionProperties) = preSolution
  • stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/MultiLLECrossover.cs

    r12286 r12737  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using System.Reflection;
    2526using HeuristicLab.Collections;
    2627using HeuristicLab.Common;
     
    6162      ChildParameter.ActualName = "LLE";
    6263
    63       foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ILinearLinkageCrossover))) {
     64      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ILinearLinkageCrossover), typeof(LinearLinkageEncoding).Assembly)) {
    6465        if (!typeof(MultiOperator<ILinearLinkageCrossover>).IsAssignableFrom(type))
    6566          Operators.Add((ILinearLinkageCrossover)Activator.CreateInstance(type), true);
  • stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/LinearLinkage.cs

    r12650 r12737  
    7777
    7878    /// <summary>
    79     /// This method parses the encoded array and gathers all items that
    80     /// belong to the same group as element <paramref name="index"/>.
    81     /// </summary>
    82     /// <param name="index">The element whose group should be returned.</param>
     79    /// This method parses the encoded array and gathers all elements
     80    /// that belong to the same group as element <paramref name="index"/>.
     81    /// </summary>
     82    /// <param name="index">The element whose group should be returned.
     83    /// </param>
    8384    /// <returns>The element at <paramref name="index"/> and all other
    8485    /// elements in the same group.</returns>
    8586    public IEnumerable<int> GetGroup(int index) {
    86       // return current element
    87       yield return index;
    88       var next = array[index];
    89       if (next == index) yield break;
    90       int prev;
    91       // return succeeding elements in group
    92       do {
    93         yield return next;
    94         prev = next;
    95         next = array[next];
    96       } while (next != prev);
    97       next = array[index];
    98       // return preceding elements in group
    99       for (prev = index - 1; prev >= 0; prev--) {
    100         if (array[prev] != next) continue;
    101         next = prev;
    102         yield return next;
    103       }
    104     }
    105 
    106     /// <summary>
    107     /// This method parses the encoded array and gathers the item itself as
    108     /// well as subsequent items that belong to the same group as element
    109     /// <paramref name="index"/>.
    110     /// </summary>
    111     /// <param name="index">The element from which items in the group should
    112     /// be returned.</param>
    113     /// <returns>The element at <paramref name="index"/> and all subsequent
     87      foreach (var n in GetGroupForward(index))
     88        yield return n;
     89      // the element index has already been yielded
     90      foreach (var n in GetGroupBackward(index).Skip(1))
     91        yield return n;
     92    }
     93
     94    /// <summary>
     95    /// This method parses the encoded array and gathers the element
     96    /// <paramref name="index"/> as well as subsequent elements that
     97    /// belong to the same group.
     98    /// </summary>
     99    /// <param name="index">The element from which subsequent (having a
     100    /// larger number) elements in the group should be returned.
     101    /// </param>
     102    /// <returns>The element <paramref name="index"/> and all subsequent
    114103    /// elements in the same group.</returns>
    115104    public IEnumerable<int> GetGroupForward(int index) {
     
    123112        next = array[next];
    124113      } while (next != prev);
     114    }
     115
     116    /// <summary>
     117    /// This method parses the encoded array and gathers the element
     118    /// given <paramref name="index"/> as well as preceeding elements that
     119    /// belong to the same group.
     120    /// </summary>
     121    /// <remarks>
     122    /// Warning, this code has performance O(index) as the array has to
     123    /// be fully traversed backwards from the given index.
     124    /// </remarks>
     125    /// <param name="index">The element from which preceeding (having a
     126    /// smaller number) elements in the group should be returned.
     127    /// </param>
     128    /// <returns>The element <paramref name="index"/> and all preceeding
     129    /// elements in the same group.</returns>
     130    public IEnumerable<int> GetGroupBackward(int index) {
     131      yield return index;
     132      var next = array[index];
     133      // return preceding elements in group
     134      for (var prev = index - 1; prev >= 0; prev--) {
     135        if (array[prev] != next) continue;
     136        next = prev;
     137        yield return next;
     138      }
    125139    }
    126140
  • stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Manipulators/MultiLLEManipulator.cs

    r12288 r12737  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using System.Reflection;
    2526using HeuristicLab.Collections;
    2627using HeuristicLab.Common;
     
    5354      : base() {
    5455      Parameters.Add(new LookupParameter<LinearLinkage>("LLE", "The encoding vector that is to be manipulated."));
    55       foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ILinearLinkageManipulator))) {
     56      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ILinearLinkageManipulator), typeof(LinearLinkageEncoding).Assembly)) {
    5657        if (!typeof(MultiOperator<ILinearLinkageManipulator>).IsAssignableFrom(type))
    5758          Operators.Add((ILinearLinkageManipulator)Activator.CreateInstance(type), true);
     
    5960      Operators.SetItemCheckedState(Operators.OfType<SwapItemManipulator>().First(), false);
    6061      Operators.SetItemCheckedState(Operators.OfType<GraftManipulator>().First(), false);
    61       SelectedOperatorParameter.ActualName = "SelectedManipulatorOperator";
     62      SelectedOperatorParameter.ActualName = "SelectedManipulationOperator";
    6263    }
    6364
Note: See TracChangeset for help on using the changeset viewer.