Exemple #1
0
 public override bool Contains23(Obj val2, Obj val3)
 {
     if (idxs231 == null)
     {
         idxs231 = Algs.SortedIndexes(col2, col3, col1);
     }
     return(Algs.BinSearchRange(idxs231, col2, col3, val2, val3)[1] > 0);
 }
Exemple #2
0
 public override bool Contains2(Obj obj)
 {
     if (revIdxs == null)
     {
         revIdxs = Algs.SortedIndexes(col2, col1);
     }
     return(Algs.BinSearchRange(revIdxs, col2, obj)[1] > 0);
 }
Exemple #3
0
 public override bool Contains13(Obj val1, Obj val3)
 {
     if (idxs312 == null)
     {
         idxs312 = Algs.SortedIndexes(col3, col1, col2);
     }
     return(Algs.BinSearchRange(idxs312, col3, col1, val3, val1)[1] > 0);
 }
Exemple #4
0
        public override TernRelIter GetTernRelIterByCol12(Obj val1, Obj val2)
        {
            int[] firstAndCount = Algs.BinSearchRange(col1, col2, val1, val2);
            int   first         = firstAndCount[0];
            int   count         = firstAndCount[1];

            return(new TernRelIter(col1, col2, col3, null, first, first + count - 1));
        }
Exemple #5
0
        public override BinRelIter GetBinRelIterByCol2(Obj obj)
        {
            if (revIdxs == null)
            {
                revIdxs = Algs.SortedIndexes(col2, col1);
            }
            int[] firstAndCount = Algs.BinSearchRange(revIdxs, col2, obj);
            int   first         = firstAndCount[0];
            int   count         = firstAndCount[1];

            return(new BinRelIter(col1, col2, revIdxs, first, first + count - 1));
        }
Exemple #6
0
        public override TernRelIter GetTernRelIterByCol23(Obj val2, Obj val3)
        {
            if (idxs231 == null)
            {
                idxs231 = Algs.SortedIndexes(col2, col3, col1);
            }
            int[] firstAndCount = Algs.BinSearchRange(idxs231, col2, col3, val2, val3);
            int   first         = firstAndCount[0];
            int   count         = firstAndCount[1];

            return(new TernRelIter(col1, col2, col3, idxs231, first, first + count - 1));
        }
Exemple #7
0
        public override bool Contains(Obj obj1, Obj obj2, Obj obj3)
        {
            int[] firstAndCount = Algs.BinSearchRange(col1, 0, col1.Length, obj1);
            int   first         = firstAndCount[0];
            int   count         = firstAndCount[1];

            if (count == 0)
            {
                return(false);
            }

            firstAndCount = Algs.BinSearchRange(col2, first, count, obj2);
            first         = firstAndCount[0];
            count         = firstAndCount[1];
            if (count == 0)
            {
                return(false);
            }

            int idx = Algs.BinSearch(col3, first, count, obj3);

            return(idx != -1);
        }
Exemple #8
0
 public override bool Contains12(Obj val1, Obj val2)
 {
     return(Algs.BinSearchRange(col1, col2, val1, val2)[1] > 0);
 }
Exemple #9
0
 public override bool Contains1(Obj val)
 {
     return(Algs.BinSearchRange(col1, 0, col1.Length, val)[1] > 0);
 }