am 100eb532: Merge "Increase terminal cache size for gesture."

* commit '100eb532924460e4522f841664eebb3382c56576':
  Increase terminal cache size for gesture.
main
Keisuke Kuroyanagi 2014-04-09 10:38:53 +00:00 committed by Android Git Automerger
commit f0eac04015
3 changed files with 6 additions and 1 deletions

View File

@ -45,6 +45,7 @@ class Traversal {
virtual float getMaxSpatialDistance() const = 0;
virtual int getDefaultExpandDicNodeSize() const = 0;
virtual int getMaxCacheSize(const int inputSize) const = 0;
virtual int getTerminalCacheSize() const = 0;
virtual bool isPossibleOmissionChildNode(const DicTraverseSession *const traverseSession,
const DicNode *const parentDicNode, const DicNode *const dicNode) const = 0;
virtual bool isGoodToTraverseNextWord(const DicNode *const dicNode) const = 0;

View File

@ -88,7 +88,7 @@ void Suggest::initializeSearch(DicTraverseSession *traverseSession) const {
} else {
// Restart recognition at the root.
traverseSession->resetCache(TRAVERSAL->getMaxCacheSize(traverseSession->getInputSize()),
MAX_RESULTS);
TRAVERSAL->getTerminalCacheSize());
// Create a new dic node here
DicNode rootNode;
DicNodeUtils::initAsRoot(traverseSession->getDictionaryStructurePolicy(),

View File

@ -146,6 +146,10 @@ class TypingTraversal : public Traversal {
: ScoringParams::MAX_CACHE_DIC_NODE_SIZE;
}
AK_FORCE_INLINE int getTerminalCacheSize() const {
return MAX_RESULTS;
}
AK_FORCE_INLINE bool isPossibleOmissionChildNode(
const DicTraverseSession *const traverseSession, const DicNode *const parentDicNode,
const DicNode *const dicNode) const {