diff options
author | 2013-02-08 04:46:03 +0900 | |
---|---|---|
committer | 2013-02-14 17:04:34 +0900 | |
commit | e5cdd21102e4e49b18c696261a084783eb6d7e7a (patch) | |
tree | 3373ee3d3f5c9c606941c6f217a8959e335e73b1 /native/jni/src/proximity_info_state.h | |
parent | afe889a83d43afe23d22d28a443b051bb115f023 (diff) | |
download | latinime-e5cdd21102e4e49b18c696261a084783eb6d7e7a.tar.gz latinime-e5cdd21102e4e49b18c696261a084783eb6d7e7a.tar.xz latinime-e5cdd21102e4e49b18c696261a084783eb6d7e7a.zip |
clean up seach key vector
Bug: 8197301
Change-Id: I6a67d2914bd44b3ceca655adcd65c9c42796b026
Diffstat (limited to 'native/jni/src/proximity_info_state.h')
-rw-r--r-- | native/jni/src/proximity_info_state.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/native/jni/src/proximity_info_state.h b/native/jni/src/proximity_info_state.h index 0386450bd..c4cbd582d 100644 --- a/native/jni/src/proximity_info_state.h +++ b/native/jni/src/proximity_info_state.h @@ -50,7 +50,7 @@ class ProximityInfoState { mIsContinuationPossible(false), mSampledInputXs(), mSampledInputYs(), mSampledTimes(), mSampledInputIndice(), mSampledLengthCache(), mBeelineSpeedPercentiles(), mSampledDistanceCache_G(), mSpeedRates(), mDirections(), mCharProbabilities(), - mSampledNearKeysVector(), mSampledSearchKeysVector(), + mSampledNearKeySets(), mSampledSearchKeySets(), mSampledSearchKeyVectors(), mTouchPositionCorrectionEnabled(false), mSampledInputSize(0), mMostProbableStringProbability(0.0f) { memset(mInputProximities, 0, sizeof(mInputProximities)); @@ -155,7 +155,9 @@ class ProximityInfoState { ProximityType getMatchedProximityId(const int index, const int c, const bool checkProximityChars, int *proximityIndex = 0) const; - int getAllPossibleChars(const size_t startIndex, int *const filter, const int filterSize) const; + const std::vector<int> *getSearchKeyVector(const int index) const { + return &mSampledSearchKeyVectors[index]; + } float getSpeedRate(const int index) const { return mSpeedRates[index]; @@ -236,13 +238,14 @@ class ProximityInfoState { std::vector<hash_map_compat<int, float> > mCharProbabilities; // The vector for the key code set which holds nearby keys for each sampled input point // 1. Used to calculate the probability of the key - // 2. Used to calculate mSampledSearchKeysVector - std::vector<ProximityInfoStateUtils::NearKeycodesSet> mSampledNearKeysVector; + // 2. Used to calculate mSampledSearchKeySets + std::vector<ProximityInfoStateUtils::NearKeycodesSet> mSampledNearKeySets; // The vector for the key code set which holds nearby keys of some trailing sampled input points // for each sampled input point. These nearby keys contain the next characters which can be in // the dictionary. Specifically, currently we are looking for keys nearby trailing sampled // inputs including the current input point. - std::vector<ProximityInfoStateUtils::NearKeycodesSet> mSampledSearchKeysVector; + std::vector<ProximityInfoStateUtils::NearKeycodesSet> mSampledSearchKeySets; + std::vector<std::vector<int> > mSampledSearchKeyVectors; bool mTouchPositionCorrectionEnabled; int mInputProximities[MAX_PROXIMITY_CHARS_SIZE * MAX_WORD_LENGTH]; int mNormalizedSquaredDistances[MAX_PROXIMITY_CHARS_SIZE * MAX_WORD_LENGTH]; |