Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/21/12 16:51:45 (13 years ago)
Author:
mkommend
Message:

#1877: Corrected errors detected in unit test in HeuristicLab.FitnessLandscapeAnalysis.

Location:
branches/FitnessLandscapeAnalysis
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape.VRP/HeuristicLabAnalysisFitnessLandscapeVRPPlugin.cs.frame

    r7141 r8083  
    2727  [PluginFile("HeuristicLab.Analysis.FitnessLandscape.VRP-3.3.dll", PluginFileType.Assembly)]
    2828  [PluginDependency("HeuristicLab.Analysis.FitnessLandscape", "3.3")]
     29  [PluginDependency("HeuristicLab.Collections", "3.3")]
    2930  [PluginDependency("HeuristicLab.Common", "3.3")]
    3031  [PluginDependency("HeuristicLab.Common.Resources", "3.3")] 
     
    3233  [PluginDependency("HeuristicLab.Data", "3.3")]
    3334  [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")]
     35  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     36  [PluginDependency("HeuristicLab.Parameters", "3.3")]
    3437  [PluginDependency("HeuristicLab.Persistence", "3.3")] 
    3538  [PluginDependency("HeuristicLab.Problems.VehicleRouting", "3.3")]
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape.Views/HeuristicLabAnalysisFitnessLandscapeViewsPlugin.cs.frame

    r7472 r8083  
    2828  [PluginDependency("HeuristicLab.ALGLIB", "3.4")]
    2929  [PluginDependency("HeuristicLab.Analysis.FitnessLandscape", "3.3")]
    30   [PluginDependency("HeuristicLab.Collections", "3.3")]
    3130  [PluginDependency("HeuristicLab.Common", "3.3")]
    3231  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    3332  [PluginDependency("HeuristicLab.Core", "3.3")]
    3433  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
    35   [PluginDependency("HeuristicLab.Data", "3.3")]
    3634  [PluginDependency("HeuristicLab.MainForm", "3.3")]
    3735  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/HeuristicLabAnalysisFitnessLandscapePlugin.cs.frame

    r7472 r8083  
    3434  [PluginDependency("HeuristicLab.Data", "3.3")]
    3535  [PluginDependency("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3")]
    36   [PluginDependency("HeuristicLab.Encodings.IntegerVectorEncoding", "3.3")]
    3736  [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")]
    3837  [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")]
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK.Views/HeuristicLabProblemsNKViewsPlugin.cs.frame

    r7149 r8083  
    2626  [Plugin("HeuristicLab.Problems.NK.Views", "3.3.0.$WCREV$")]
    2727  [PluginFile("HeuristicLab.Problems.NK.Views-3.3.dll", PluginFileType.Assembly)]
    28   [PluginDependency("HeuristicLab.Common", "3.3")]
    2928  [PluginDependency("HeuristicLab.Core", "3.3")] 
    3029  [PluginDependency("HeuristicLab.Core.Views", "3.3")] 
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/BinaryVectorComparers/AverageBitBinaryVectorComparer.cs

    r7128 r8083  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
     1using System.Linq;
     2using HeuristicLab.Common;
    53using HeuristicLab.Core;
    6 using HeuristicLab.Data;
    7 using HeuristicLab.Common;
     4using HeuristicLab.Encodings.BinaryVectorEncoding;
    85using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    9 using HeuristicLab.Encodings.BinaryVectorEncoding;
    106
    117namespace HeuristicLab.Problems.NK {
    12  
     8
    139  [Item("Average Bit Binary Vector Comparer", "Compares two binary vectors by their average positive bit location")]
    1410  [StorableClass]
    1511  public sealed class AverageBitBinaryVectorComparer : BinaryVectorComparer {
    16    
     12
    1713    [StorableConstructor]
    18     protected AverageBitBinaryVectorComparer(bool deserializing) : base(deserializing) { }
    19     protected AverageBitBinaryVectorComparer(AverageBitBinaryVectorComparer original, Cloner cloner)
     14    private AverageBitBinaryVectorComparer(bool deserializing) : base(deserializing) { }
     15    private AverageBitBinaryVectorComparer(AverageBitBinaryVectorComparer original, Cloner cloner)
    2016      : base(original, cloner) {
    2117    }
     
    2521    }
    2622
    27     public static double AverageBit(BinaryVector x) {     
     23    public static double AverageBit(BinaryVector x) {
    2824      return x.Select((b, i) => new { b, i }).Where(v => v.b).Average(v => v.i);
    2925    }
    3026
    3127    public override int Compare(BinaryVector x, BinaryVector y) {
    32       return (AverageBit(x) - AverageBit(y)).CompareTo(0);     
    33     }   
    34   } 
     28      return (AverageBit(x) - AverageBit(y)).CompareTo(0);
     29    }
     30  }
    3531}
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/BinaryVectorComparers/LexicographicBinaryVectorComparer.cs

    r7128 r8083  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
     2using HeuristicLab.Common;
    53using HeuristicLab.Core;
    6 using HeuristicLab.Data;
    7 using HeuristicLab.Common;
     4using HeuristicLab.Encodings.BinaryVectorEncoding;
    85using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    9 using HeuristicLab.Encodings.BinaryVectorEncoding;
    106
    117namespace HeuristicLab.Problems.NK {
    12    
     8
    139  [Item("Lexicographic Binary Vector Comparer", "Compares two binary vectors lexicographically")]
    1410  [StorableClass]
     
    1612
    1713    [StorableConstructor]
    18     protected LexicographicBinaryVectorComparer(bool deserializing) : base(deserializing) { }
    19     protected LexicographicBinaryVectorComparer(LexicographicBinaryVectorComparer original, Cloner cloner)
     14    private LexicographicBinaryVectorComparer(bool deserializing) : base(deserializing) { }
     15    private LexicographicBinaryVectorComparer(LexicographicBinaryVectorComparer original, Cloner cloner)
    2016      : base(original, cloner) {
    2117    }
     
    2622
    2723    public override int Compare(BinaryVector x, BinaryVector y) {
    28       for (int i = 0; i<Math.Min(x.Length, y.Length); i++) {
     24      for (int i = 0; i < Math.Min(x.Length, y.Length); i++) {
    2925        if (!x[i] && y[i])
    3026          return -1;
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/BinaryVectorComparers/MedianBitBinaryVectorComparer.cs

    r7128 r8083  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
     1using System.Linq;
     2using HeuristicLab.Common;
    53using HeuristicLab.Core;
    6 using HeuristicLab.Data;
    7 using HeuristicLab.Common;
     4using HeuristicLab.Encodings.BinaryVectorEncoding;
    85using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    9 using HeuristicLab.Encodings.BinaryVectorEncoding;
    106
    117namespace HeuristicLab.Problems.NK {
     
    1612
    1713    [StorableConstructor]
    18     protected MedianBitBinaryVectorComparer(bool deserializing) : base(deserializing) { }
    19     protected MedianBitBinaryVectorComparer(MedianBitBinaryVectorComparer original, Cloner cloner)
     14    private MedianBitBinaryVectorComparer(bool deserializing) : base(deserializing) { }
     15    private MedianBitBinaryVectorComparer(MedianBitBinaryVectorComparer original, Cloner cloner)
    2016      : base(original, cloner) {
    2117    }
     
    2622
    2723    public static int MedianBit(BinaryVector x) {
    28       var activeIndices = x.Select((b, i) => new { b, i }).Where(v => v.b).ToList();     
    29       if (activeIndices.Count > 0)       
    30         return activeIndices[activeIndices.Count/2].i;
     24      var activeIndices = x.Select((b, i) => new { b, i }).Where(v => v.b).ToList();
     25      if (activeIndices.Count > 0)
     26        return activeIndices[activeIndices.Count / 2].i;
    3127      else
    3228        return 0;
     
    3531      return MedianBit(x) - MedianBit(y);
    3632    }
    37   } 
     33  }
    3834}
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/HeuristicLab.Problems.NK.csproj

    r7141 r8083  
    107107    <Reference Include="HeuristicLab.Common-3.3">
    108108      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
    109     </Reference>
    110     <Reference Include="HeuristicLab.Common.Resources-3.3">
    111       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
    112109    </Reference>
    113110    <Reference Include="HeuristicLab.Core-3.3">
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/HeuristicLabProblemsNKPlugin.cs.frame

    r7141 r8083  
    2828  [PluginDependency("HeuristicLab.Collections", "3.3")]
    2929  [PluginDependency("HeuristicLab.Common", "3.3")]
    30   [PluginDependency("HeuristicLab.Common.Resources", "3.3")] 
    3130  [PluginDependency("HeuristicLab.Core", "3.3")] 
    3231  [PluginDependency("HeuristicLab.Data", "3.3")]
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/NKLandscape.cs

    r8005 r8083  
    11using System;
    22using System.Collections.Generic;
    3 using System.Drawing;
    43using System.Linq;
    54using HeuristicLab.Common;
    6 using HeuristicLab.Common.Resources;
    75using HeuristicLab.Core;
    86using HeuristicLab.Data;
Note: See TracChangeset for help on using the changeset viewer.