Beispiel #1
0
        Tuple <IIndex <TNewKey>, VectorConstruction> IIndexBuilder.WithIndex <K, TNewKey>(IIndex <K> index1, IVector <TNewKey> indexVector, VectorConstruction vector)
        {
            Tuple <TNewKey, long>[] array       = (Tuple <TNewKey, long>[])SeqModule.ToArray <Tuple <TNewKey, long> >((IEnumerable <M0>) new LinearIndex.newKeys <TNewKey, K>(index1, indexVector, new KeyValuePair <K, long>(), (Tuple <K, long>)null, new long(), default(K), new TNewKey(), (IEnumerator <KeyValuePair <K, long> >)null, 0, (Tuple <TNewKey, long>)null));
            LinearIndex <TNewKey>   linearIndex = new LinearIndex <TNewKey>(System.Array.AsReadOnly <TNewKey>((TNewKey[])ArrayModule.OfSeq <TNewKey>((IEnumerable <M0>)SeqModule.Map <Tuple <TNewKey, long>, TNewKey>((Func <M0, M1>) new LinearIndex.newIndex <TNewKey>(), (IEnumerable <M0>)array))), (IIndexBuilder)this, (FSharpOption <bool>)null);
            long keyCount = ((IIndex <TNewKey>)linearIndex).KeyCount;

            LinearIndex.relocations relocations5178 = new LinearIndex.relocations();
            long   lo  = 0;
            long   hi  = keyCount - 1L;
            object obj = lo > hi ? (object)new LinearIndex.relocations(lo, hi, 1L, (Func <long, Func <long, bool> >) new LinearIndex.relocations()) : (object)new LinearIndex.relocations(lo, hi, 1L, (Func <long, Func <long, bool> >) new LinearIndex.relocations());
            IEnumerable <Tuple <long, long> > tuples = (IEnumerable <Tuple <long, long> >)SeqModule.Zip <long, long>((IEnumerable <M0>)SeqModule.Map <long, long>((Func <M0, M1>)relocations5178, (IEnumerable <M0>)obj), SeqModule.Map <Tuple <TNewKey, long>, long>((Func <M0, M1>) new LinearIndex.relocations <TNewKey>(), (IEnumerable <M0>)array));

            return(new Tuple <IIndex <TNewKey>, VectorConstruction>((IIndex <TNewKey>)linearIndex, VectorConstruction.NewRelocate(vector, (long)array.Length, tuples)));
        }
Beispiel #2
0
        Tuple <IIndex <b>, VectorConstruction> IIndexBuilder.LookupLevel <b>(Tuple <IIndex <b>, VectorConstruction> _arg9, ICustomLookup <b> searchKey)
        {
            Tuple <IIndex <b>, VectorConstruction> tuple = _arg9;
            VectorConstruction vectorConstruction        = tuple.Item2;
            IIndex <b>         index = tuple.Item1;

            Tuple <long, b>[] array = (Tuple <long, b>[])SeqModule.ToArray <Tuple <long, b> >((IEnumerable <M0>) new LinearIndex.matching <b>(searchKey, index, new KeyValuePair <b, long>(), (Tuple <b, long>)null, default(b), new long(), (IEnumerator <KeyValuePair <b, long> >)null, 0, (Tuple <long, b>)null));
            long length             = (long)array.Length;

            LinearIndex.relocs relocs5601 = new LinearIndex.relocs();
            long   lo  = 0;
            long   hi  = length - 1L;
            object obj = lo > hi ? (object)new LinearIndex.relocs(lo, hi, 1L, (Func <long, Func <long, bool> >) new LinearIndex.relocs()) : (object)new LinearIndex.relocs(lo, hi, 1L, (Func <long, Func <long, bool> >) new LinearIndex.relocs());
            IEnumerable <Tuple <long, long> > tuples = (IEnumerable <Tuple <long, long> >)SeqModule.Zip <long, long>((IEnumerable <M0>)SeqModule.Map <long, long>((Func <M0, M1>)relocs5601, (IEnumerable <M0>)obj), SeqModule.Map <Tuple <long, b>, long>((Func <M0, M1>) new LinearIndex.relocs <b>(), (IEnumerable <M0>)array));

            return(new Tuple <IIndex <b>, VectorConstruction>((IIndex <b>) new LinearIndex <b>(System.Array.AsReadOnly <b>(ArrayModule.OfSeq <b>((IEnumerable <b>)SeqModule.Map <Tuple <long, b>, b>((Func <M0, M1>) new LinearIndex.newIndex <b>(), (IEnumerable <M0>)array))), (IIndexBuilder)this, FSharpOption <bool> .Some(index.IsOrdered)), VectorConstruction.NewRelocate(vectorConstruction, length, tuples)));
        }