Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/17 17:19:35 (8 years ago)
Author:
gkronber
Message:

#2520: changed all usages of StorableClass to use StorableType with an auto-generated GUID (did not add StorableType to other type definitions yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/PriorityQueue.cs

    r14785 r14927  
    6363
    6464    public KeyValuePair<TK, TV> PeekMin() {
    65       if(size == 0) {
     65      if (size == 0) {
    6666        throw new InvalidOperationException("Heap is empty");
    6767      }
     
    8686      size = sz - 1;
    8787      finalLayerDist++;
    88       if(finalLayerDist == finalLayerSize) {
     88      if (finalLayerDist == finalLayerSize) {
    8989        finalLayerSize >>= 2;
    9090        finalLayerDist = 0;
    9191      }
    9292
    93       while(succ < sz) {
     93      while (succ < sz) {
    9494        var minKey = data[succ].Key;
    9595        var delta = 0;
    9696
    9797        var otherKey = data[succ + 1].Key;
    98         if(otherKey.CompareTo(minKey) < 0) {
     98        if (otherKey.CompareTo(minKey) < 0) {
    9999          minKey = otherKey;
    100100          delta = 1;
    101101        }
    102102        otherKey = data[succ + 2].Key;
    103         if(otherKey.CompareTo(minKey) < 0) {
     103        if (otherKey.CompareTo(minKey) < 0) {
    104104          minKey = otherKey;
    105105          delta = 2;
    106106        }
    107107        otherKey = data[succ + 3].Key;
    108         if(otherKey.CompareTo(minKey) < 0) {
     108        if (otherKey.CompareTo(minKey) < 0) {
    109109          minKey = otherKey;
    110110          delta = 3;
     
    136136      pred = pred - layerDist; // finally preds index
    137137
    138       while(data[pred].Key.CompareTo(bubble) > 0) {  // must terminate since inf at root
     138      while (data[pred].Key.CompareTo(bubble) > 0) {  // must terminate since inf at root
    139139        data[hole].Key = data[pred].Key;
    140140        data[hole].Value = data[pred].Value;
     
    158158      finalLayerDist--;
    159159
    160       if(finalLayerDist == -1) { // layer full
    161                                  // start next layer
     160      if (finalLayerDist == -1) { // layer full
     161                                  // start next layer
    162162        finalLayerSize <<= 2;
    163163        finalLayerDist = finalLayerSize - 1;
     
    172172      pred = pred - layerDist; // finally preds index
    173173      var predKey = data[pred].Key;
    174       while(predKey.CompareTo(key) > 0) {
     174      while (predKey.CompareTo(key) > 0) {
    175175        data[hole].Key = predKey;
    176176        data[hole].Value = data[pred].Value;
     
    195195      var sup = Supremum;
    196196      var cap = capacity;
    197       for(var i = 1; i <= cap; i++) {
     197      for (var i = 1; i <= cap; i++) {
    198198        data[i].Key = sup;
    199199      }
Note: See TracChangeset for help on using the changeset viewer.