natix.CompactDS.Plain64InvertedIndex.Add C# (CSharp) Method

Add() public method

Adds a posting list to the index. Returns the corresponding symbol
public Add ( IEnumerable sortedlist ) : int
sortedlist IEnumerable Sortedlist.
return int
        public int Add(IEnumerable<int> sortedlist)
        {
            var list = new List<long> ();
            foreach (var u in sortedlist) {
                list.Add (u);
            }
            this.table.Add (list);
            this.numberOfItems += list.Count;
            return this.table.Count - 1;
        }

Same methods

Plain64InvertedIndex::Add ( IEnumerable sortedlist ) : int

Usage Example

Ejemplo n.º 1
0
 public static Plain64InvertedIndex Build(InvertedIndex invindex)
 {
     var I = new Plain64InvertedIndex ();
     for (int i = 0; i < invindex.Count; ++i) {
         I.Add (invindex[i]);
     }
     return I;
 }