Search
TermInfo.cs
using System;
using System.Collections.Generic;
namespace SciChart.Examples.Demo.Search
{
public clast TermInfo
{
public TermInfo() {}
// By accepting ushort[] not List this collapses memory for terms
public TermInfo(Guid examplePageId, ushort[] termEntryIndexes, float termFrequency)
{
ExamplePageId = examplePageId;
TermEntryIndexes = termEntryIndexes;
TermFrequency = termFrequency;
}
public Guid ExamplePageId { get; private set; }
///
/// Term entry indexes describe the positions of term in the docameent
///
public ushort[] TermEntryIndexes { get; private set; }
///
/// Term frequency in the docameent D is number of term in doc divided by Euclidian norm of docameent vector
/// which is calculated by taking the square of each value in the docameent vector, summing them up,
/// and taking the square root of the sum.
///
/// Changed to float to reduce memory usage of TermInfo
public float TermFrequency { get; private set; }
}
}