Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/07/17 14:05:09 (7 years ago)
Author:
epitzer
Message:

#2727 completely replace basic array with array mapped trie in ValueTypeArray and descendants

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistentDataStructures/HeuristicLab.Encodings.PermutationEncoding/3.3/Permutation.cs

    r14186 r14650  
    7171    public Permutation(PermutationTypes type, IntArray elements)
    7272      : this(type, elements.Length) {
    73       for (int i = 0; i < array.Length; i++)
    74         array[i] = elements[i];
     73      for (int i = 0; i < historyArray.Length; i++)
     74        historyArray[i] = elements[i];
    7575    }
    7676
     
    103103          index2 = startIndex + random.Next(i + 1);
    104104          if (index1 != index2) {
    105             val = array[index1];
    106             array[index1] = array[index2];
    107             array[index2] = val;
     105            val = historyArray[index1];
     106            historyArray[index1] = historyArray[index2];
     107            historyArray[index2] = val;
    108108          }
    109109        }
Note: See TracChangeset for help on using the changeset viewer.