Пример #1
0
 /// <summary>
 /// No repeats: simplest case, and most common. It is important to keep this piece of the code simple and efficient </summary>
 private void InitSimple()
 {
     //System.err.println("initSimple: doc: "+min.doc);
     pq.Clear();
     // position pps and build queue from list
     for (PhrasePositions pp = min, prev = null; prev != max; pp = (prev = pp).next) // iterate cyclic list: done once handled max
     {
         pp.FirstPosition();
         if (pp.position > end)
         {
             end = pp.position;
         }
         pq.Add(pp);
     }
 }
Пример #2
0
 private void  Sort()
 {
     pq.Clear();
     for (PhrasePositions pp = first; pp != null; pp = pp.next)
     {
         pq.Add(pp);
     }
     PqToList();
 }