lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [5/5] lucenenet git commit: Merge remote-tracking branch 'guidotag/ms_pq_references'
Date Sun, 01 Mar 2015 19:41:08 GMT
Merge remote-tracking branch 'guidotag/ms_pq_references'


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/bdf4ec7b
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/bdf4ec7b
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/bdf4ec7b

Branch: refs/heads/master
Commit: bdf4ec7b05d279ff426063a81e7f338fff20ca04
Parents: 781e1c2 ee021b6
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Sun Mar 1 21:40:33 2015 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Sun Mar 1 21:40:33 2015 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Core/Util/PriorityQueue.cs       | 60 +++++++++-----
 .../core/Util/TestPriorityQueue.cs              | 82 ++++++++++++++++++--
 2 files changed, 117 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bdf4ec7b/src/Lucene.Net.Core/Util/PriorityQueue.cs
----------------------------------------------------------------------
diff --cc src/Lucene.Net.Core/Util/PriorityQueue.cs
index a0b52b7,83e60a4..0460d76
--- a/src/Lucene.Net.Core/Util/PriorityQueue.cs
+++ b/src/Lucene.Net.Core/Util/PriorityQueue.cs
@@@ -36,10 -37,17 +37,17 @@@ namespace Lucene.Net.Uti
      public abstract class PriorityQueue<T>
      {
          private int QueueSize = 0;
-         private readonly int MaxSize;
-         private readonly T[] Heap;
+         private int MaxSize;
+         private T[] Heap;
+         private bool resizable;
+ 
+         public PriorityQueue()
+             : this(8, false)
+         {
+             resizable = true;
+         } 
  
 -        public PriorityQueue(int maxSize)
 +        public PriorityQueue(int maxSize = 128)
              : this(maxSize, true)
          {
          }


Mime
View raw message