Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/18/20 18:55:08 (4 years ago)
Author:
abeham
Message:

#2521: worked on refactoring, worked a lot on binary encoding / problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GraphColoring/3.3/GraphColoringProblem.cs

    r17382 r17544  
    8383        imat[i, 1] = defaultInstance[i].Item2 - 1;
    8484      }
    85       Encoding.Length = defaultInstanceNodes;
     85      Dimension = defaultInstanceNodes;
    8686      AdjacencyListParameter.Value = imat;
    8787      BestKnownQualityParameter.Value = null;
     
    121121      if (FitnessFunction == FitnessFunction.Prioritized
    122122        && BestKnownColorsParameter.Value != null
    123         && Encoding.Length > 0) {
    124         var mag = Math.Pow(10, -(int)Math.Ceiling(Math.Log10(Encoding.Length)));
     123        && Dimension > 0) {
     124        var mag = Math.Pow(10, -(int)Math.Ceiling(Math.Log10(Dimension)));
    125125        // the value is e.g. 0.051 for 0 conflicts with 51 colors (and less than 1000 nodes)
    126126        BestKnownQuality = BestKnownColorsParameter.Value.Value * mag;
     
    247247
    248248    public void Load(GCPData data) {
    249       Encoding.Length = data.Nodes;
     249      Dimension = data.Nodes;
    250250      AdjacencyListParameter.Value = new IntMatrix(data.Adjacencies);
    251251      if (data.BestKnownColoring != null) {
     
    279279      instance.Name = Name;
    280280      instance.Description = Description;
    281       instance.Nodes = Encoding.Length;
     281      instance.Nodes = Dimension;
    282282      var adjList = AdjacencyListParameter.Value;
    283283      instance.Adjacencies = new int[adjList.Rows, 2];
Note: See TracChangeset for help on using the changeset viewer.