Lucene.Net.Search.Similarity.DecodeNorm C# (CSharp) Method

DecodeNorm() public static method

Decodes a normalization factor stored in an index.
public static DecodeNorm ( byte b ) : float
b byte
return float
		public static float DecodeNorm(byte b)
		{
			return NORM_TABLE[b & 0xFF]; // & 0xFF maps negative bytes to positive above 127
		}

Usage Example

コード例 #1
0
        public override float Score()
        {
            //System.out.println("scoring " + first.doc);
            float raw = Similarity.Tf(freq) * value_Renamed;                        // raw score

            return(norms == null?raw:raw *Similarity.DecodeNorm(norms[first.doc])); // normalize
        }
All Usage Examples Of Lucene.Net.Search.Similarity::DecodeNorm