Merge "Remove unused code."

This commit is contained in:
Keisuke Kuroyanagi 2014-04-03 05:20:20 +00:00 committed by Android (Google) Code Review
commit 4df668d197
6 changed files with 0 additions and 29 deletions

View file

@ -118,14 +118,6 @@ static inline void dumpWordInfo(const int *word, const int length, const int ran
} }
} }
static inline void dumpResult(const int *outWords, const int *frequencies) {
AKLOGI("--- DUMP RESULT ---------");
for (int i = 0; i < MAX_RESULTS; ++i) {
dumpWordInfo(&outWords[i * MAX_WORD_LENGTH], MAX_WORD_LENGTH, i, frequencies[i]);
}
AKLOGI("-------------------------");
}
static AK_FORCE_INLINE void dumpWord(const int *word, const int length) { static AK_FORCE_INLINE void dumpWord(const int *word, const int length) {
static char charBuf[50]; static char charBuf[50];
const int N = intArrayToCharArray(word, length, charBuf, NELEMS(charBuf)); const int N = intArrayToCharArray(word, length, charBuf, NELEMS(charBuf));

View file

@ -58,7 +58,6 @@ ProximityInfo::ProximityInfo(JNIEnv *env, const jstring localeJStr,
const jfloatArray sweetSpotCenterYs, const jfloatArray sweetSpotRadii) const jfloatArray sweetSpotCenterYs, const jfloatArray sweetSpotRadii)
: GRID_WIDTH(gridWidth), GRID_HEIGHT(gridHeight), MOST_COMMON_KEY_WIDTH(mostCommonKeyWidth), : GRID_WIDTH(gridWidth), GRID_HEIGHT(gridHeight), MOST_COMMON_KEY_WIDTH(mostCommonKeyWidth),
MOST_COMMON_KEY_WIDTH_SQUARE(mostCommonKeyWidth * mostCommonKeyWidth), MOST_COMMON_KEY_WIDTH_SQUARE(mostCommonKeyWidth * mostCommonKeyWidth),
MOST_COMMON_KEY_HEIGHT(mostCommonKeyHeight),
NORMALIZED_SQUARED_MOST_COMMON_KEY_HYPOTENUSE(1.0f + NORMALIZED_SQUARED_MOST_COMMON_KEY_HYPOTENUSE(1.0f +
GeometryUtils::SQUARE_FLOAT(static_cast<float>(mostCommonKeyHeight) / GeometryUtils::SQUARE_FLOAT(static_cast<float>(mostCommonKeyHeight) /
static_cast<float>(mostCommonKeyWidth))), static_cast<float>(mostCommonKeyWidth))),

View file

@ -35,7 +35,6 @@ class ProximityInfo {
const jfloatArray sweetSpotCenterYs, const jfloatArray sweetSpotRadii); const jfloatArray sweetSpotCenterYs, const jfloatArray sweetSpotRadii);
~ProximityInfo(); ~ProximityInfo();
bool hasSpaceProximity(const int x, const int y) const; bool hasSpaceProximity(const int x, const int y) const;
int getNormalizedSquaredDistance(const int inputIndex, const int proximityIndex) const;
float getNormalizedSquaredDistanceFromCenterFloatG( float getNormalizedSquaredDistanceFromCenterFloatG(
const int keyId, const int x, const int y, const bool isGeometric) const; const int keyId, const int x, const int y, const bool isGeometric) const;
int getCodePointOf(const int keyIndex) const; int getCodePointOf(const int keyIndex) const;
@ -48,8 +47,6 @@ class ProximityInfo {
float getSweetSpotRadiiAt(int keyIndex) const { return mSweetSpotRadii[keyIndex]; } float getSweetSpotRadiiAt(int keyIndex) const { return mSweetSpotRadii[keyIndex]; }
float getSweetSpotCenterXAt(int keyIndex) const { return mSweetSpotCenterXs[keyIndex]; } float getSweetSpotCenterXAt(int keyIndex) const { return mSweetSpotCenterXs[keyIndex]; }
float getSweetSpotCenterYAt(int keyIndex) const { return mSweetSpotCenterYs[keyIndex]; } float getSweetSpotCenterYAt(int keyIndex) const { return mSweetSpotCenterYs[keyIndex]; }
void calculateNearbyKeyCodes(
const int x, const int y, const int primaryKey, int *inputCodes) const;
bool hasTouchPositionCorrectionData() const { return HAS_TOUCH_POSITION_CORRECTION_DATA; } bool hasTouchPositionCorrectionData() const { return HAS_TOUCH_POSITION_CORRECTION_DATA; }
int getMostCommonKeyWidth() const { return MOST_COMMON_KEY_WIDTH; } int getMostCommonKeyWidth() const { return MOST_COMMON_KEY_WIDTH; }
int getMostCommonKeyWidthSquare() const { return MOST_COMMON_KEY_WIDTH_SQUARE; } int getMostCommonKeyWidthSquare() const { return MOST_COMMON_KEY_WIDTH_SQUARE; }
@ -97,7 +94,6 @@ class ProximityInfo {
const int GRID_HEIGHT; const int GRID_HEIGHT;
const int MOST_COMMON_KEY_WIDTH; const int MOST_COMMON_KEY_WIDTH;
const int MOST_COMMON_KEY_WIDTH_SQUARE; const int MOST_COMMON_KEY_WIDTH_SQUARE;
const int MOST_COMMON_KEY_HEIGHT;
const float NORMALIZED_SQUARED_MOST_COMMON_KEY_HYPOTENUSE; const float NORMALIZED_SQUARED_MOST_COMMON_KEY_HYPOTENUSE;
const int CELL_WIDTH; const int CELL_WIDTH;
const int CELL_HEIGHT; const int CELL_HEIGHT;
@ -124,7 +120,6 @@ class ProximityInfo {
int mCenterXsG[MAX_KEY_COUNT_IN_A_KEYBOARD]; int mCenterXsG[MAX_KEY_COUNT_IN_A_KEYBOARD];
int mCenterYsG[MAX_KEY_COUNT_IN_A_KEYBOARD]; int mCenterYsG[MAX_KEY_COUNT_IN_A_KEYBOARD];
int mKeyKeyDistancesG[MAX_KEY_COUNT_IN_A_KEYBOARD][MAX_KEY_COUNT_IN_A_KEYBOARD]; int mKeyKeyDistancesG[MAX_KEY_COUNT_IN_A_KEYBOARD][MAX_KEY_COUNT_IN_A_KEYBOARD];
// TODO: move to correction.h
}; };
} // namespace latinime } // namespace latinime
#endif // LATINIME_PROXIMITY_INFO_H #endif // LATINIME_PROXIMITY_INFO_H

View file

@ -98,7 +98,4 @@ const int ProximityInfoParams::LOOKUP_RADIUS_PERCENTILE = 50;
const int ProximityInfoParams::FIRST_POINT_TIME_OFFSET_MILLIS = 150; const int ProximityInfoParams::FIRST_POINT_TIME_OFFSET_MILLIS = 150;
const int ProximityInfoParams::STRONG_DOUBLE_LETTER_TIME_MILLIS = 600; const int ProximityInfoParams::STRONG_DOUBLE_LETTER_TIME_MILLIS = 600;
// Used by ProximityInfoStateUtils::calculateNormalizedSquaredDistance()
const int ProximityInfoParams::NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR = 1 << 10;
} // namespace latinime } // namespace latinime

View file

@ -108,10 +108,6 @@ class ProximityInfoState {
return false; return false;
} }
inline const int *getPrimaryInputWord() const {
return mPrimaryInputWord;
}
inline bool touchPositionCorrectionEnabled() const { inline bool touchPositionCorrectionEnabled() const {
return mTouchPositionCorrectionEnabled; return mTouchPositionCorrectionEnabled;
} }
@ -156,10 +152,6 @@ class ProximityInfoState {
ProximityType getProximityTypeG(const int index, const int codePoint) const; ProximityType getProximityTypeG(const int index, const int codePoint) const;
const std::vector<int> *getSearchKeyVector(const int index) const {
return &mSampledSearchKeyVectors[index];
}
float getSpeedRate(const int index) const { float getSpeedRate(const int index) const {
return mSpeedRates[index]; return mSpeedRates[index];
} }

View file

@ -90,10 +90,6 @@ class ProximityInfoStateUtils {
std::vector<float> *sampledNormalizedSquaredLengthCache); std::vector<float> *sampledNormalizedSquaredLengthCache);
static void initPrimaryInputWord(const int inputSize, const int *const inputProximities, static void initPrimaryInputWord(const int inputSize, const int *const inputProximities,
int *primaryInputWord); int *primaryInputWord);
static void initNormalizedSquaredDistances(const ProximityInfo *const proximityInfo,
const int inputSize, const int *inputXCoordinates, const int *inputYCoordinates,
const int *const inputProximities, const std::vector<int> *const sampledInputXs,
const std::vector<int> *const sampledInputYs, int *normalizedSquaredDistances);
static void dump(const bool isGeometric, const int inputSize, static void dump(const bool isGeometric, const int inputSize,
const int *const inputXCoordinates, const int *const inputYCoordinates, const int *const inputXCoordinates, const int *const inputYCoordinates,
const int sampledInputSize, const std::vector<int> *const sampledInputXs, const int sampledInputSize, const std::vector<int> *const sampledInputXs,