コード例 #1
0
ファイル: SpanScorer.cs プロジェクト: carrie901/mono
		protected internal SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms):base(similarity)
		{
			this.spans = spans;
			this.norms = norms;
			this.weight = weight;
			this.value_Renamed = weight.GetValue();
			if (this.spans.Next())
			{
				doc = - 1;
			}
			else
			{
				doc = NO_MORE_DOCS;
				more = false;
			}
		}
コード例 #2
0
ファイル: NearSpansOrdered.cs プロジェクト: carrie901/mono
		/// <summary>Check whether two Spans in the same document are ordered.</summary>
		/// <param name="spans1">
		/// </param>
		/// <param name="spans2">
		/// </param>
		/// <returns> true iff spans1 starts before spans2
		/// or the spans start at the same position,
		/// and spans1 ends before spans2.
		/// </returns>
		internal static bool DocSpansOrdered(Spans spans1, Spans spans2)
		{
			System.Diagnostics.Debug.Assert(spans1.Doc() == spans2.Doc(), "doc1 " + spans1.Doc() + " != doc2 " + spans2.Doc());
			int start1 = spans1.Start();
			int start2 = spans2.Start();
			/* Do not call docSpansOrdered(int,int,int,int) to avoid invoking .end() : */
			return (start1 == start2)?(spans1.End() < spans2.End()):(start1 < start2);
		}
コード例 #3
0
            // TODO: Remove warning after API has been finalized
            public override bool IsPayloadAvailable()
            {
                Spans top = Top();

                return(top != null && top.IsPayloadAvailable());
            }
コード例 #4
0
ファイル: NearSpansUnordered.cs プロジェクト: carrie901/mono
			public SpansCell(NearSpansUnordered enclosingInstance, Spans spans, int index)
			{
				InitBlock(enclosingInstance);
				this.spans = spans;
				this.index = index;
			}
コード例 #5
0
 public SpansCell(NearSpansUnordered enclosingInstance, Spans spans, int index)
 {
     InitBlock(enclosingInstance);
     this.spans = spans;
     this.index = index;
 }