浏览代码

sorted array

David Sehnal 7 年之前
父节点
当前提交
d0f3acda4d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/mol-base/collections/integer/impl/sorted-array.ts

+ 1 - 1
src/mol-base/collections/integer/impl/sorted-array.ts

@@ -258,7 +258,7 @@ const _maxIntRangeRet = { startI: 0, startJ: 0, endI: 0, endJ: 0 };
 function getSuitableIntersectionRange(a: Nums, b: Nums) {
     const la = a.length, lb = b.length;
     const ratio = la / lb;
-    if (ratio <= 0.5 || ratio >= 2 || (la >= 128 && lb >= 128)) {
+    if (la >= 128 || lb >= 128 || ratio <= 0.34 || ratio >= 2.99) {
         _maxIntRangeRet.startI = findPredecessorIndex(a, start(b));
         _maxIntRangeRet.startJ = findPredecessorIndex(b, start(a));
         _maxIntRangeRet.endI = findPredecessorIndex(a, end(b));