Home | History | Annotate | Download | only in quicksearchbox

Lines Matching refs:suggestions

27  * A promoter that gives preference to suggestions from higher ranking corpora.
39 public void doPickPromoted(Suggestions suggestions,
41 promoteSuggestions(suggestions.getCorpusResults(), maxPromoted, promoted);
45 void promoteSuggestions(Iterable<CorpusResult> suggestions, int maxPromoted,
47 if (DBG) Log.d(TAG, "Available results: " + suggestions);
49 // Split non-empty results into important suggestions and not-so-important
50 // suggestions, each corpus's cursor positioned at the first suggestion.
53 partitionSuggestionsByRank(suggestions, highRankingSuggestions, lowRankingSuggestions);
58 // Then try to fill promoted list with the remaining high-ranking suggestions,
59 // and then use the low-ranking suggestions if the list isn't full yet.
70 * among the incoming suggestions (this method doesn't change their order).
90 * among the incoming suggestions (this method doesn't change their order).
92 private void promoteEquallyFromEachCorpus(LinkedList<CorpusResult> suggestions,
101 if (suggestions.isEmpty()) {
105 int stripeSize = Math.max(1, slotsLeft / suggestions.size());
106 roundRobin(suggestions, slotsLeft, stripeSize, promoted);
110 roundRobin(suggestions, slotsLeft, slotsLeft, promoted);
114 * Partitions the suggestions into "important" (high-ranking)
115 * and "not-so-important" (low-ranking) suggestions, dependent on the
118 * @param suggestions
122 * high-ranking suggestions don't fill all the available space in the
125 private void partitionSuggestionsByRank(Iterable<CorpusResult> suggestions,
129 for (CorpusResult result : suggestions) {
159 * Promotes "stripes" of suggestions from each corpus.
163 * @param maxPromoted maximum number of suggestions to promote.
164 * @param stripeSize number of suggestions to take from each corpus.
165 * @param promoted the list to which promoted suggestions are added.
166 * @return the number of suggestions actually promoted.
185 * Copies suggestions from a SuggestionCursor to the list of promoted suggestions.
187 * @param cursor from which to copy the suggestions
188 * @param count maximum number of suggestions to copy
189 * @param promoted the list to which to add the suggestions
190 * @return the number of suggestions actually copied.