Exemplo n.º 1
0
 static DefaultSimilarity()
 {
     for (int i = 0; i < 256; i++)
     {
         NORM_TABLE[i] = SmallSingle.SByte315ToSingle((sbyte)i);
     }
 }
Exemplo n.º 2
0
 static BM25Similarity()
 {
     for (int i = 0; i < 256; i++)
     {
         float f = SmallSingle.SByte315ToSingle((sbyte)i);
         NORM_TABLE[i] = 1.0f / (f * f);
     }
 }
Exemplo n.º 3
0
 private static float[] LoadNormTable() // LUCENENET: Avoid static constructors (see https://github.com/apache/lucenenet/pull/224#issuecomment-469284006)
 {
     float[] normTable = new float[256];
     for (int i = 0; i < 256; i++)
     {
         normTable[i] = SmallSingle.SByte315ToSingle((sbyte)i);
     }
     return(normTable);
 }