private bool FirstNonOrderedNextToPartialList() { /* Creates a partial list consisting of first non ordered and earlier. * Returns first non ordered .next(). */ last = first = null; int orderedIndex = 0; while (queue.Top() != null) { SpansCell cell = (SpansCell)queue.Pop(); AddToList(cell); if (cell.index == orderedIndex) { orderedIndex++; } else { return(cell.Next()); // FIXME: continue here, rename to eg. checkOrderedMatch(): // when checkSlop() and not ordered, repeat cell.next(). // when checkSlop() and ordered, add to list and repeat queue.pop() // without checkSlop(): no match, rebuild the queue from the partial list. // When queue is empty and checkSlop() and ordered there is a match. } } throw new System.SystemException("Unexpected: ordered"); }
private void InitList(bool next) { for (int i = 0; More && i < Ordered.Count; i++) { SpansCell cell = Ordered[i]; if (next) { More = cell.Next(); // move to first entry } if (More) { AddToList(cell); // add to list } } }
private void InitList(bool next, IState state) { for (int i = 0; more && i < ordered.Count; i++) { SpansCell cell = ordered[i]; if (next) { more = cell.Next(state); // move to first entry } if (more) { AddToList(cell); // add to list } } }