当前位置: 首页>>代码示例>>C#>>正文


C# Util.OpenBitSet类代码示例

本文整理汇总了C#中Lucene.Net.Util.OpenBitSet的典型用法代码示例。如果您正苦于以下问题:C# OpenBitSet类的具体用法?C# OpenBitSet怎么用?C# OpenBitSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OpenBitSet类属于Lucene.Net.Util命名空间,在下文中一共展示了OpenBitSet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateBitSet

 public static OpenBitSet CreateBitSet(IndexReader reader, Filter filter)
 {
     IndexSearcher searcher = new IndexSearcher(reader);
     OpenBitSet result = new OpenBitSet();
     searcher.Search(new MatchAllDocsQuery(), filter, new BitSetCollector(result));
     return result;
 }
开发者ID:jinujoseph,项目名称:NuGet.Services.Metadata,代码行数:7,代码来源:BitSetCollector.cs

示例2: BitSetRandomAccessDocIdSet

 public BitSetRandomAccessDocIdSet(bool multi, MultiValueFacetDataCache multiCache, OpenBitSet openBitSet, FacetDataCache dataCache)
 {
     _multi = multi;
     _multiCache = multiCache;
     _openBitSet = openBitSet;
     _dataCache = dataCache;
 }
开发者ID:modulexcite,项目名称:BoboBrowse.Net,代码行数:7,代码来源:BitSetFilter.cs

示例3: DoIterate

		// test interleaving different OpenBitSetIterator.next()/skipTo()
		internal virtual void  DoIterate(System.Collections.BitArray a, OpenBitSet b, int mode)
		{
			if (mode == 1)
				DoIterate1(a, b);
			if (mode == 2)
				DoIterate2(a, b);
		}
开发者ID:VirtueMe,项目名称:ravendb,代码行数:8,代码来源:TestOpenBitSet.cs

示例4: FindValues

 public override sealed int FindValues(OpenBitSet bitset, int docId, int maxId)
 {
     while (docId <= maxId && !bitset.FastGet(array[docId >> SHIFT_SIZE][docId & MASK]))
     {
         docId++;
     }
     return docId;
 }
开发者ID:NightOwl888,项目名称:Bobo-Browse.Net,代码行数:8,代码来源:BigByteArray.cs

示例5: FindValues

 public override int FindValues(OpenBitSet bitset, int docId, int maxId)
 {
     while (docId <= maxId && !bitset.FastGet(array[docId >> SHIFT_SIZE][docId & MASK]))
     {
         docId++;
     }
     return docId > maxId ? DocIdSetIterator.NO_MORE_DOCS : docId;
 }
开发者ID:NightOwl888,项目名称:Bobo-Browse.Net,代码行数:8,代码来源:BigIntArray.cs

示例6: DoGet

 internal virtual void  DoGet(System.Collections.BitArray a, OpenBitSet b)
 {
     int max = a.Count;
     for (int i = 0; i < max; i++)
     {
         Assert.AreEqual(a.Get(i) != b.Get(i), "mismatch: BitSet=[" + i + "]=" + a.Get(i));
     }
 }
开发者ID:Nangal,项目名称:lucene.net,代码行数:8,代码来源:TestOpenBitSet.cs

示例7: FindValues

 public override sealed int FindValues(OpenBitSet bitset, int docId, int maxId)
 {
     while (true)
     {
         if (bitset.FastGet(_array[docId >> SHIFT_SIZE][docId & MASK])) return docId;
         if (docId++ >= maxId) break;
     }
     return DocIdSetIterator.NO_MORE_DOCS;
 }
开发者ID:yao-yi,项目名称:BoboBrowse.Net,代码行数:9,代码来源:BigShortArray.cs

示例8: GetBitSet

 public virtual OpenBitSet GetBitSet(FacetDataCache dataCache)
 {
     if (lastCache == dataCache)
     {
         return bitSet;
     }
     bitSet = bitSetBuilder.BitSet(dataCache);
     lastCache = dataCache;
     return bitSet;
 }
开发者ID:modulexcite,项目名称:BoboBrowse.Net,代码行数:10,代码来源:BitSetFilter.cs

示例9: DoNextSetBit

		internal virtual void  DoNextSetBit(System.Collections.BitArray a, OpenBitSet b)
		{
			int aa = - 1, bb = - 1;
			do 
			{
				aa = SupportClass.BitSetSupport.NextSetBit(a, aa + 1);
				bb = b.NextSetBit(bb + 1);
				Assert.AreEqual(aa, bb);
			}
			while (aa >= 0);
		}
开发者ID:VirtueMe,项目名称:ravendb,代码行数:11,代码来源:TestOpenBitSet.cs

示例10: MultiValueORFacetFilter

 public MultiValueORFacetFilter(MultiValueFacetDataCache dataCache, int[] index)
 {
     _dataCache = dataCache;
     _nestedArray = dataCache._nestedArray;
     _index = index;
     _bitset = new OpenBitSet(_dataCache.valArray.Count);
     foreach (int i in _index)
     {
         _bitset.FastSet(i);
     }
 }
开发者ID:NightOwl888,项目名称:Bobo-Browse.Net,代码行数:11,代码来源:MultiValueORFacetFilter.cs

示例11: DoIterate2

		internal virtual void  DoIterate2(System.Collections.BitArray a, OpenBitSet b)
		{
			int aa = - 1, bb = - 1;
			OpenBitSetIterator iterator = new OpenBitSetIterator(b);
			do 
			{
				aa = SupportClass.BitSetSupport.NextSetBit(a, aa + 1);
				bb = rand.NextDouble() > 0.5 ? iterator.NextDoc() : iterator.Advance(bb + 1);
				Assert.AreEqual(aa == - 1?DocIdSetIterator.NO_MORE_DOCS:aa, bb);
			}
			while (aa >= 0);
		}
开发者ID:VirtueMe,项目名称:ravendb,代码行数:12,代码来源:TestOpenBitSet.cs

示例12: GetDocIdSet

 public override DocIdSet GetDocIdSet(IndexReader reader)
 {
     OpenBitSet bitSet = new OpenBitSet(reader.NumDocs());
     TermDocs termDocs = reader.TermDocs(new Term("TenantId", _tenantId));
     while (termDocs.Next())
     {
         if (termDocs.Freq > 0)
         {
             bitSet.Set(termDocs.Doc);
         }
     }
     return bitSet;
 }
开发者ID:jinujoseph,项目名称:NuGet.Services.Metadata,代码行数:13,代码来源:TenantFilter.cs

示例13: FacetOrFilter

 public FacetOrFilter(FacetDataCache dataCache, int[] index, bool takeCompliment)
 {
     this.dataCache = dataCache;
     orderArray = dataCache.orderArray;
     this.index = index;
     bitset = new OpenBitSet(this.dataCache.valArray.Count);
     foreach (int i in this.index)
     {
         bitset.FastSet(i);
     }
     if (takeCompliment)
     {
         bitset.Flip(0, this.dataCache.valArray.Count);
     }
 }
开发者ID:NightOwl888,项目名称:Bobo-Browse.Net,代码行数:15,代码来源:FacetOrFilter.cs

示例14: BitSet

        public virtual OpenBitSet BitSet(FacetDataCache dataCache)
        {
            int[] index = facetValueConverter.Convert(dataCache, vals);

            OpenBitSet bitset = new OpenBitSet(dataCache.ValArray.Count);
            foreach (int i in index)
            {
                bitset.FastSet(i);
            }
            if (takeCompliment)
            {
                // flip the bits
                for (int i = 0; i < index.Length; ++i)
                {
                    bitset.FastFlip(i);
                }
            }
            return bitset;
        }
开发者ID:modulexcite,项目名称:BoboBrowse.Net,代码行数:19,代码来源:ValueConverterBitSetBuilder.cs

示例15: GetDocIdSet

        /// <summary>
        /// Get the DocIdSet.
        /// </summary>
        /// <param name="reader">Applcible reader.</param>
        /// <returns>The set.</returns>
        public override DocIdSet GetDocIdSet(IndexReader reader)
        {
            OpenBitSet result = new OpenBitSet(reader.MaxDoc());
            TermDocs td = reader.TermDocs();
            try
            {
                foreach (Term t in this.terms)
                {
                    td.Seek(t);
                    while (td.Next())
                    {
                        result.Set(td.Doc());
                    }
                }
            }
            finally
            {
                td.Close();
            }

            return result;
        }
开发者ID:VirtueMe,项目名称:ravendb,代码行数:27,代码来源:TermsFilter.cs


注:本文中的Lucene.Net.Util.OpenBitSet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。