diff options
author | 2013-02-27 13:57:32 -0800 | |
---|---|---|
committer | 2013-03-06 18:30:43 -0800 | |
commit | 2192d08b9cca6a40d834d6a5001d19b5845ed8a0 (patch) | |
tree | 8dda0d5764d3f1ea5dae4d2f068a904b707995ad /native/jni/src/proximity_info_state_utils.cpp | |
parent | 042020b05fc258866acd3bb880491daca8ce559e (diff) | |
download | latinime-2192d08b9cca6a40d834d6a5001d19b5845ed8a0.tar.gz latinime-2192d08b9cca6a40d834d6a5001d19b5845ed8a0.tar.xz latinime-2192d08b9cca6a40d834d6a5001d19b5845ed8a0.zip |
Remove unused scale parameter from getPointToKeyLength()
Change-Id: I7bbe1b68264a389923f8a19bb37646c8ab0cb46f
Diffstat (limited to 'native/jni/src/proximity_info_state_utils.cpp')
-rw-r--r-- | native/jni/src/proximity_info_state_utils.cpp | 12 |
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( |