lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject lucene-solr git commit: remove O(N^2) asserts
Date Sat, 12 Mar 2016 11:16:50 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6_0 2ce9e096b -> a570c5420


remove O(N^2) asserts


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

Branch: refs/heads/branch_6_0
Commit: a570c54209c413f5602ec43d08fcdc22694cd730
Parents: 2ce9e09
Author: Mike McCandless <mikemccand@apache.org>
Authored: Sat Mar 12 06:17:03 2016 -0500
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Sat Mar 12 06:17:44 2016 -0500

----------------------------------------------------------------------
 lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a570c542/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java b/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java
index f1aba9d..0087690 100644
--- a/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java
@@ -943,7 +943,6 @@ public class BKDWriter implements Closeable {
   private byte[] markRightTree(long rightCount, int splitDim, PathSlice source, LongBitSet
ordBitSet) throws IOException {
 
     // Now we mark ords that fall into the right half, so we can partition on all other dims
that are not the split dim:
-    assert numDims == 1 || ordBitSet.cardinality() == 0: "cardinality=" + ordBitSet.cardinality();
 
     // Read the split value, then mark all ords in the right tree (larger than the split
value):
     try (PointReader reader = source.writer.getReader(source.start + source.count - rightCount))
{
@@ -961,8 +960,6 @@ public class BKDWriter implements Closeable {
           assert result;
           ordBitSet.set(reader.ord());
         }
-
-        assert rightCount == ordBitSet.cardinality(): "rightCount=" + rightCount + " cardinality="
+ ordBitSet.cardinality();
       }
     }
 


Mime
View raw message