aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/proximity_info_state_utils.cpp
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2013-03-06 18:46:45 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-06 18:46:45 -0800
commit6f1388571ff2adb82aa9b92538e93feb943335ce (patch)
treec1233974d3e5e46ee5fafd347a8d2ace7f757d4f /native/jni/src/proximity_info_state_utils.cpp
parent26df5201cc3390e9cd855da9b55dd53bea34692d (diff)
parent951272d24aa2ec188c1cdcfdbd1a2afc8edf2d3f (diff)
downloadlatinime-6f1388571ff2adb82aa9b92538e93feb943335ce.tar.gz
latinime-6f1388571ff2adb82aa9b92538e93feb943335ce.tar.xz
latinime-6f1388571ff2adb82aa9b92538e93feb943335ce.zip
am 951272d2: am 2192d08b: Remove unused scale parameter from getPointToKeyLength()
* commit '951272d24aa2ec188c1cdcfdbd1a2afc8edf2d3f': Remove unused scale parameter from getPointToKeyLength()
Diffstat (limited to 'native/jni/src/proximity_info_state_utils.cpp')
-rw-r--r--native/jni/src/proximity_info_state_utils.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/native/jni/src/proximity_info_state_utils.cpp b/native/jni/src/proximity_info_state_utils.cpp
index 2ca39f9e3..7cbc88cff 100644
--- a/native/jni/src/proximity_info_state_utils.cpp
+++ b/native/jni/src/proximity_info_state_utils.cpp
@@ -634,27 +634,19 @@ namespace latinime {
return getAngleDiff(previousDirection, nextDirection);
}
-// TODO: Remove the "scale" parameter
// This function basically converts from a length to an edit distance. Accordingly, it's obviously
// wrong to compare with mMaxPointToKeyLength.
/* static */ float ProximityInfoStateUtils::getPointToKeyByIdLength(const float maxPointToKeyLength,
const std::vector<float> *const SampledDistanceCache_G, const int keyCount,
- const int inputIndex, const int keyId, const float scale) {
+ const int inputIndex, const int keyId) {
if (keyId != NOT_AN_INDEX) {
const int index = inputIndex * keyCount + keyId;
- return min((*SampledDistanceCache_G)[index] * scale, maxPointToKeyLength);
+ return min((*SampledDistanceCache_G)[index], maxPointToKeyLength);
}
// If the char is not a key on the keyboard then return the max length.
return static_cast<float>(MAX_VALUE_FOR_WEIGHTING);
}
-/* static */ float ProximityInfoStateUtils::getPointToKeyByIdLength(const float maxPointToKeyLength,
- const std::vector<float> *const SampledDistanceCache_G, const int keyCount,
- const int inputIndex, const int keyId) {
- return getPointToKeyByIdLength(
- maxPointToKeyLength, SampledDistanceCache_G, keyCount, inputIndex, keyId, 1.0f);
-}
-
// Updates probabilities of aligning to some keys and skipping.
// Word suggestion should be based on this probabilities.
/* static */ void ProximityInfoStateUtils::updateAlignPointProbabilities(