Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
MatchInformation.cs
1using System;
2using System.Text;
3
5{
9 public class MatchInformation
10 {
11 private DateTime timestamp = DateTime.MinValue;
12 private uint nrDistinctTokens = 0;
13 private ulong nrTokens = 0;
14 private ulong objectReference = 0;
15 private bool first = true;
16
21 {
22 }
23
27 public uint NrDistinctTokens => this.nrDistinctTokens;
28
32 public ulong NrTokens => this.nrTokens;
33
37 public DateTime Timestamp => this.timestamp;
38
42 public ulong ObjectReference => this.objectReference;
43
48 public void AddTokenReference(TokenReference Reference)
49 {
50 if (this.first)
51 {
52 this.first = false;
53 this.timestamp = Reference.Timestamp;
54 this.objectReference = Reference.ObjectReference;
55 }
56
57 //this.tokenReferences.AddLast(Reference);
58 this.nrDistinctTokens++;
59 this.nrTokens += Reference.Count;
60 }
61
63 public override string ToString()
64 {
65 StringBuilder sb = new StringBuilder();
66
67 sb.Append("Distinct: ");
68 sb.Append(this.NrDistinctTokens.ToString());
69 sb.Append(", Total: ");
70 sb.Append(this.NrTokens.ToString());
71 sb.Append(", Timestamp: ");
72 sb.Append(this.Timestamp.ToString());
73
74 return sb.ToString();
75 }
76 }
77}
Contains a reference to an indexed object.
Contains matching information about a document in a search.
MatchInformation()
Contains matching information about a document in a search.
void AddTokenReference(TokenReference Reference)
Adds a token reference.
uint NrDistinctTokens
Number of distinct tokens found.
DateTime Timestamp
Timestamps when corresponding object refernce was indexed.
ulong ObjectReference
Reference to the object containing the token.