aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/proximity_info.h
diff options
context:
space:
mode:
authorYusuke Nojima <nojima@google.com>2011-10-03 16:44:29 +0900
committerYusuke Nojima <nojima@google.com>2011-10-04 17:22:41 +0900
commitc25c7ccf25dd45464b82d29adca067f9a941c11c (patch)
tree05cd98a918983fb83dc74e6dd1699893aeba937b /native/src/proximity_info.h
parent7afd910242c5008857c28888cb806586fd2dbf5d (diff)
downloadlatinime-c25c7ccf25dd45464b82d29adca067f9a941c11c.tar.gz
latinime-c25c7ccf25dd45464b82d29adca067f9a941c11c.tar.xz
latinime-c25c7ccf25dd45464b82d29adca067f9a941c11c.zip
Cache the sweet spot types
Change-Id: Ibaee062dc55c11892143d48b2d0959e78e52be83
Diffstat (limited to 'native/src/proximity_info.h')
-rw-r--r--native/src/proximity_info.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/native/src/proximity_info.h b/native/src/proximity_info.h
index a705d0cf6..421ca0ef6 100644
--- a/native/src/proximity_info.h
+++ b/native/src/proximity_info.h
@@ -81,7 +81,9 @@ private:
int getStartIndexFromCoordinates(const int x, const int y) const;
void initializeCodeToKeyIndex();
- SweetSpotType calculateSweetSpotType(int index, unsigned short baseLowerC) const;
+ SweetSpotType calculateSweetSpotType(int index) const;
+ float calculateSquaredDistanceFromSweetSpotCenter(int keyIndex, int inputIndex) const;
+
const int MAX_PROXIMITY_CHARS_SIZE;
const int KEYBOARD_WIDTH;
const int KEYBOARD_HEIGHT;
@@ -102,6 +104,7 @@ private:
float mSweetSpotCenterXs[MAX_KEY_COUNT_IN_A_KEYBOARD];
float mSweetSpotCenterYs[MAX_KEY_COUNT_IN_A_KEYBOARD];
float mSweetSpotRadii[MAX_KEY_COUNT_IN_A_KEYBOARD];
+ SweetSpotType mSweetSpotTypes[MAX_WORD_LENGTH_INTERNAL];
int mInputLength;
unsigned short mPrimaryInputWord[MAX_WORD_LENGTH_INTERNAL];
int mCodeToKeyIndex[MAX_CHAR_CODE + 1];