Free cookie consent management tool by TermsFeed Policy Generator

source: branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NKNew/BinaryVectorComparers/BinaryVectorComparer.cs @ 12483

Last change on this file since 12483 was 12483, checked in by ascheibe, 9 years ago

#2306 added a new project for NK landscapes and ported it to BasicProblem

File size: 1.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Core;
6using HeuristicLab.Data;
7using HeuristicLab.Common;
8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
9using HeuristicLab.Encodings.BinaryVectorEncoding;
10
11namespace HeuristicLab.Problems.NK {
12
13  public interface IBinaryVectorComparer : INamedItem, IComparer<BinaryVector> { }
14
15  [StorableClass]
16  public abstract class BinaryVectorComparer : NamedItem, IBinaryVectorComparer {
17
18    public override bool CanChangeName { get { return false; } }
19    public override bool CanChangeDescription { get { return false; } }
20
21    [StorableConstructor]
22    protected BinaryVectorComparer(bool serializing) : base(serializing) { }
23    protected BinaryVectorComparer(BinaryVectorComparer original, Cloner cloner)
24      : base(original, cloner) { }
25    public BinaryVectorComparer() {
26      name = ItemName;
27      description = ItemDescription;
28    }   
29
30    public abstract int Compare(BinaryVector x, BinaryVector y);
31  } 
32}
Note: See TracBrowser for help on using the repository browser.