Free cookie consent management tool by TermsFeed Policy Generator

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.