am 100eb532: Merge "Increase terminal cache size for gesture."
* commit '100eb532924460e4522f841664eebb3382c56576': Increase terminal cache size for gesture.main
commit
f0eac04015
|
@ -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;
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue