aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/correction.cpp
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-08-12 19:07:44 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-12 19:07:44 -0700
commit7b4531a16f0d7f237822e94f3e962257ee9d0c16 (patch)
tree2237aa0f754e3ab44ccfac034f5ef6e17ffda724 /native/jni/src/correction.cpp
parentf9b2841fb592778ad34b5181e1c0bcbf551e3632 (diff)
parentbcec82de66f52655593dc233346f11468f5077a0 (diff)
downloadlatinime-7b4531a16f0d7f237822e94f3e962257ee9d0c16.tar.gz
latinime-7b4531a16f0d7f237822e94f3e962257ee9d0c16.tar.xz
latinime-7b4531a16f0d7f237822e94f3e962257ee9d0c16.zip
am bcec82de: Clean up constructors
* commit 'bcec82de66f52655593dc233346f11468f5077a0': Clean up constructors
Diffstat (limited to 'native/jni/src/correction.cpp')
-rw-r--r--native/jni/src/correction.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/native/jni/src/correction.cpp b/native/jni/src/correction.cpp
index b18b35e8c..e1f9db92d 100644
--- a/native/jni/src/correction.cpp
+++ b/native/jni/src/correction.cpp
@@ -1092,7 +1092,7 @@ int Correction::RankingAlgorithm::editDistance(const unsigned short *before,
// In dictionary.cpp, getSuggestion() method,
// suggestion scores are computed using the below formula.
// original score
-// := pow(mTypedLetterMultiplier (this is defined 2),
+// := powf(mTypedLetterMultiplier (this is defined 2),
// (the number of matched characters between typed word and suggested word))
// * (individual word's score which defined in the unigram dictionary,
// and this score is defined in range [0, 255].)
@@ -1104,11 +1104,11 @@ int Correction::RankingAlgorithm::editDistance(const unsigned short *before,
// capitalization, then treat it as if the score was 255.
// - If before.length() == after.length()
// => multiply by mFullWordMultiplier (this is defined 2))
-// So, maximum original score is pow(2, min(before.length(), after.length())) * 255 * 2 * 1.2
+// So, maximum original score is powf(2, min(before.length(), after.length())) * 255 * 2 * 1.2
// For historical reasons we ignore the 1.2 modifier (because the measure for a good
// autocorrection threshold was done at a time when it didn't exist). This doesn't change
// the result.
-// So, we can normalize original score by dividing pow(2, min(b.l(),a.l())) * 255 * 2.
+// So, we can normalize original score by dividing powf(2, min(b.l(),a.l())) * 255 * 2.
/* static */
float Correction::RankingAlgorithm::calcNormalizedScore(const unsigned short *before,
@@ -1130,7 +1130,7 @@ float Correction::RankingAlgorithm::calcNormalizedScore(const unsigned short *be
}
const float maxScore = score >= S_INT_MAX ? S_INT_MAX : MAX_INITIAL_SCORE
- * pow(static_cast<float>(TYPED_LETTER_MULTIPLIER),
+ * powf(static_cast<float>(TYPED_LETTER_MULTIPLIER),
static_cast<float>(min(beforeLength, afterLength - spaceCount)))
* FULL_WORD_MULTIPLIER;