Encodes a normalization factor for storage in an index.

The encoding uses a three-bit mantissa, a five-bit exponent, and the zero-exponent point at 15, thus representing values from around 7x10^9 to 2x10^-9 with about one significant decimal digit of accuracy. Zero is also represented. Negative numbers are rounded up to zero. Values too large to represent are rounded down to the largest representable value. Positive values too small to represent are rounded up to the smallest positive representable value.

Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public static byte EncodeNorm(
	float f
)
Visual Basic
Public Shared Function EncodeNorm ( _
	f As Single _
) As Byte
Visual C++
public:
static unsigned char EncodeNorm(
	float f
)

Parameters

f
Type: System..::..Single

[Missing <param name="f"/> documentation for "M:Lucene.Net.Search.Similarity.EncodeNorm(System.Single)"]

Return Value

[Missing <returns> documentation for "M:Lucene.Net.Search.Similarity.EncodeNorm(System.Single)"]

See Also